- Requires Ruby 3.0
Clipboard.copy
and.clear
now always return true instead of the pasted string
- Add experimental OSC52 implementation (only
Clipboard.copy
) - Linux-based
Clipboard.copy
methods now take a clipboard argumentclipboard:
to choose which clipboard to copy to (default is "all"). For example:Clipboard.copy("data", clipboard: "primary")
copies only to primary clipboard - Linux-based
Clipboard.paste
methods use either theclipboard:
keyword argument or the single positional argument for choosing the clipboard to paste from - Allow setting the clipboard implementation with snake-cased symbol/string:
Clipboard.implementation = :linux_wayland
- Change
copy
,paste
, andclear
to always accept keyword arguments - All implementations are now based on
Clipboard::Implementation
- Move implementation detection to
utils.rb
- Be sure to pass a valid lowercase clipboard selection name (or
"all"
) when choosing clipboards, it will now raise anArgumentError
if the clipboard name is not supported by the implementation
- Add more specs and run them on GitHub Actions CI
- Always use plaintext mimetype for wl-clipboard
- Do not include newline when pasting from wl-clipboard
- Internal: Let ClipboardLoadError inherit from StandardError, not Exception
- Add Wayland support via
wl-copy
, patch by @cramt - Only silence clipboard warnings when $VERBOSE is nil
- Fix Windows implementation (so it works on more recent Windows), patch by @P3t3rU5
- Fix missing String#+@ method on Ruby <2.3, patch by @AaronC81
- Don't break on Ruby 2.1, patch by @grosser
- Fix Cygwin implementation to work when File constant is loaded, fix by @ntachino
- Windows version actually mutates a string, fix by @scivola
- Prefer xsel over xclip, because it can handle more data
- Conditionally read or don't read the output stream of external commands, fixes #32
- Special thanks to @orange-kao for the bug report + PR
- Add a GTK based clipboard
- Use frozen string literals
- Add WSL to autoloaded constants
- Support WSL (Windows Subsystem for Linux)
- Linux: Replace calls to
which
with native check (thanks @woodruffw)
- Surpress 3rd party processes' STDERR, see #26
- Internal API changes to meet modified relaxed ruby style guidelines
- Remove support for 1.8
- Windows: Fix that the gem tries to convert encoding of pasted strings, leave this to user
- Support Cygwin's clipboard
- Improve Linux xsel support #17
- Windows 1.9 multibyte support
- Restore 1.8 Support
- Don't load current version from file (gh#15)
- Add missing require 'rbconfig'
- File backend: File only accessible by owner
- Small tweaks
- Fix permissions in packaged rubygem
- Add basic java clipboard support
- Allow Ocra packing
- Fix a Windows bug
- Support rubygems-test ("gem test clipboard" if rubygems-test is installed)
- Fallback to Clipboard::File, if no other clipboard is available
- Also check for xsel if using linux implementation
- Fix for jruby copying
- You can directly use a specific implementation, e.g.: require 'clipboard/file' # gives you Clipboard::File