clipboard 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36dbdb09b06bc41833ad82b692560179ea1dde1a061db1dfab093d6ddea64cb7
4
- data.tar.gz: 2fc4772e208ee387887ba3558b4acfdc810132877664f59d30fe5605c0218c2e
3
+ metadata.gz: 1176250dac08a0b34135139cae0057d85980a5db1b64f56b5c89fd4745d176e2
4
+ data.tar.gz: b55213775852ec00ffa7d58a8e97b8e3b31530067e02e6604885873e44a6424e
5
5
  SHA512:
6
- metadata.gz: 73d188dcf4b8ce431da705feaa6cdf71889ab48679d584450cdf88e871f19fb0ff15b7c1d325ca65f104bdc4195c8bdbdfb01ff477e4fef8f2ab20a12ff8bd4f
7
- data.tar.gz: c7d4e4c0e7ca463c4d3799bfbe7a15b1c1cb67aaca4fa1b84aacb9ea39794b8d64eb264d86ab773806049a1a5c6abe766c7ccb87211ebb4afb64fc7faf313259
6
+ metadata.gz: 317ce477428ad9390f5ea8dff8afac8fbd23633210bc94de5a4f5db55982681e1a6fa7c4eca2c2204ca4d46238a707ec1a5516076fa456556ad0ec0bd1b7221e
7
+ data.tar.gz: f7245a4588ba5fecfd2974f970b6849807fe488acc321b54d546c993900c95487b2be5c0bf50230ba617fa3aac15097ffc912050fdbe1cf2983be41321b6b976
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.4.1
4
+ * Always use plaintext mimetype for wl-clipboard
5
+ * Do not include newline when pasting from wl-clipboard
6
+ * Internal: Let ClipboardLoadError inherit from StandardError, not Exception
7
+
3
8
  ## 1.4.0
4
9
  * Add Wayland support via `wl-copy`, patch by @cramt
5
10
  * Only silence clipboard warnings when $VERBOSE is nil
@@ -6,17 +6,18 @@ module Clipboard
6
6
  module LinuxWayland
7
7
  extend self
8
8
 
9
- WRITE_COMMAND = "wl-copy"
10
- READ_COMMAND = "wl-paste"
9
+ TEST_COMMAND = "wl-copy"
10
+ WRITE_COMMAND = "wl-copy --type text/plain"
11
+ READ_COMMAND = "wl-paste --type text/plain --no-newline"
11
12
 
12
- if !Utils.executable_installed?(WRITE_COMMAND)
13
+ if !Utils.executable_installed?(TEST_COMMAND)
13
14
  raise Clipboard::ClipboardLoadError, "clipboard: Could not find required program wl-copy\n" \
14
15
  "Please install it or try a different implementation"
15
16
  end
16
17
 
17
18
  def paste(might_select_primary_clipboard = nil)
18
19
  if might_select_primary_clipboard == "primary"
19
- `#{READ_COMMAND} -p`
20
+ `#{READ_COMMAND} --primary`
20
21
  else
21
22
  `#{READ_COMMAND}`
22
23
  end
@@ -28,7 +29,7 @@ module Clipboard
28
29
  end
29
30
 
30
31
  def clear
31
- `#{WRITE_COMMAND} -c`
32
+ `#{WRITE_COMMAND} --clear`
32
33
  end
33
34
  end
34
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clipboard
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.1"
5
5
  end
data/lib/clipboard.rb CHANGED
@@ -8,7 +8,7 @@ require_relative 'clipboard/utils'
8
8
  module Clipboard
9
9
  extend self
10
10
 
11
- class ClipboardLoadError < Exception
11
+ class ClipboardLoadError < StandardError
12
12
  end
13
13
 
14
14
  unless defined? Ocra # see gh#9
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clipboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis