clippy 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +0 -4
- data/License +17 -16
- data/Readme.md +1 -1
- data/bin/clippy +1 -1
- data/lib/clippy.rb +6 -5
- data/lib/clippy/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5d10356a21cd06442d7e311e73a578b3361b1b
|
4
|
+
data.tar.gz: 5fadea6240cd400770e7fb278576021a6e521343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2704a16a9e86dad775efc12543ffa8f48ffd46ed7bb68018ca4949630b8a8384d3637f9d7eb7285881915437f517a7fd4cfa47baa3050ece20d9828bedda0712
|
7
|
+
data.tar.gz: 90f0bf35022f216d0a2d683377ccae6d7544a4c343f9efdd8f6cfdd05bf61a869e9fbf26d71665a6a4b64057a02b3b48dac80db575d91f4dbcf899d5353892c4
|
data/Gemfile
CHANGED
data/License
CHANGED
@@ -1,19 +1,20 @@
|
|
1
|
-
Copyright (c) 2011-
|
1
|
+
Copyright (c) 2011-2014 Jordon Bedwell
|
2
2
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
-
this software and associated documentation files (the
|
5
|
-
the Software without restriction, including
|
6
|
-
use, copy, modify, merge, publish,
|
7
|
-
|
8
|
-
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
+
copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
9
10
|
|
10
|
-
The above copyright notice and this permission notice shall be included
|
11
|
-
copies or substantial portions of the Software.
|
11
|
+
The above copyright notice and this permission notice shall be included
|
12
|
+
in all copies or substantial portions of the Software.
|
12
13
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
15
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
18
|
-
|
19
|
-
SOFTWARE.
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
15
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Readme.md
CHANGED
data/bin/clippy
CHANGED
@@ -12,7 +12,7 @@ OptionParser.new do |opts|
|
|
12
12
|
opts.on("--version", "Version") { $stdout.puts Clippy::VERSION }
|
13
13
|
|
14
14
|
opts.on("--copy", "Copy a String or STDIN") do
|
15
|
-
($
|
15
|
+
($stderr.puts "More than one arg is not allowable" and exit 1) if ARGV.count > 1
|
16
16
|
exit Clippy.copy(ARGV.count == 0 ? ARGF.readlines.join : ARGV.first.dup) ? 0 : 1
|
17
17
|
end
|
18
18
|
end.parse!
|
data/lib/clippy.rb
CHANGED
@@ -40,7 +40,8 @@ module Clippy module_function
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def copy(data)
|
43
|
-
|
43
|
+
data = data.to_s.gsub($/, "\r\n") if $/ != "\r\n"
|
44
|
+
rtrn = run_command("stdin", data)[0] == 0 ? true : false
|
44
45
|
end
|
45
46
|
|
46
47
|
def paste
|
@@ -73,15 +74,15 @@ module Clippy module_function
|
|
73
74
|
end
|
74
75
|
|
75
76
|
def run_command(type, data = '')
|
76
|
-
|
77
|
-
type == "stdin" ?
|
77
|
+
i, o, e, p = Open3.popen3(binary + COMMAND_ARGS[binary][type])
|
78
|
+
type == "stdin" ? i.puts(data) : out = o.read.strip
|
78
79
|
|
79
|
-
[
|
80
|
+
[i, o, e].each do |m|
|
80
81
|
m.close
|
81
82
|
end
|
82
83
|
|
83
84
|
[
|
84
|
-
|
85
|
+
p.value,
|
85
86
|
type == "stdin" ? data : out
|
86
87
|
]
|
87
88
|
end
|
data/lib/clippy/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clippy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.14'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: envygeeks-coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: luna-rspec-formatters
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
54
|
+
version: '0'
|
55
55
|
description: A utility to access the systems clipboard.
|
56
56
|
email:
|
57
57
|
- envygeeks@gmail.com
|
@@ -60,13 +60,13 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
-
|
63
|
+
- Gemfile
|
64
64
|
- License
|
65
65
|
- Rakefile
|
66
|
-
-
|
66
|
+
- Readme.md
|
67
|
+
- bin/clippy
|
67
68
|
- lib/clippy.rb
|
68
69
|
- lib/clippy/version.rb
|
69
|
-
- bin/clippy
|
70
70
|
homepage: https://github.com/envygeeks/clippy
|
71
71
|
licenses:
|
72
72
|
- MIT
|
@@ -77,17 +77,17 @@ require_paths:
|
|
77
77
|
- lib
|
78
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
89
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.1
|
90
|
+
rubygems_version: 2.2.1
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: A utility to access the systems clipboard.
|