clippy 2.0.10 → 2.0.11

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
  SHA1:
3
- metadata.gz: afc08f45b3c0a43bbe722616e5a771438bcfbc09
4
- data.tar.gz: 65660f53d6e06e8f798f33e39c366f7b8d14d8f0
3
+ metadata.gz: 4a5d10356a21cd06442d7e311e73a578b3361b1b
4
+ data.tar.gz: 5fadea6240cd400770e7fb278576021a6e521343
5
5
  SHA512:
6
- metadata.gz: babc1f065373ddf231ce547790b4ebe7ab881a5ccf8cc8f633b5aed09cc42d0da11c146289c77e990240536274d7ac934b178e4292ee67896a5d2edd794c3ea2
7
- data.tar.gz: 0570d2e22e0e962c3575f7b106ea2473050fdddfc2aaff189e7618a1f44962e084de07171572cb018bf3309dd0f01f36b9badafe932ad1a6177644fba670e6d2
6
+ metadata.gz: 2704a16a9e86dad775efc12543ffa8f48ffd46ed7bb68018ca4949630b8a8384d3637f9d7eb7285881915437f517a7fd4cfa47baa3050ece20d9828bedda0712
7
+ data.tar.gz: 90f0bf35022f216d0a2d683377ccae6d7544a4c343f9efdd8f6cfdd05bf61a869e9fbf26d71665a6a4b64057a02b3b48dac80db575d91f4dbcf899d5353892c4
data/Gemfile CHANGED
@@ -2,9 +2,5 @@ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  group :development do
5
- unless ENV["CI"]
6
- gem "pry"
7
- end
8
-
9
5
  gem "rake"
10
6
  end
data/License CHANGED
@@ -1,19 +1,20 @@
1
- Copyright (c) 2011-2013 Jordon Bedwell
1
+ Copyright (c) 2011-2014 Jordon Bedwell
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- this software and associated documentation files (the "Software"), to deal in
5
- the Software without restriction, including without limitation the rights to
6
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
- of the Software, and to permit persons to whom the Software is furnished to do
8
- so, subject to the following conditions:
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 in all
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 OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
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
@@ -27,7 +27,7 @@ Clippy.paste and Clippy.clear
27
27
  ```
28
28
 
29
29
  ```
30
- Clippy v2.0.7: Clippy [--copy [< File] ['Text']]
30
+ Clippy v2.0.11: Clippy [--copy [< File] ['Text']]
31
31
  --paste Paste
32
32
  --help This
33
33
  --clear Clear
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
- ($stdout.puts "More than one arg is not allowable" and exit 1) if ARGV.count > 1
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
- run_command("stdin", $/ != "\r\n" ? data.to_s.gsub($/, "\r\n") : data)[0] == 0 ? true : false
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
- stdin, stdout, stderr, pid = Open3.popen3(binary + COMMAND_ARGS[binary][type])
77
- type == "stdin" ? stdin.puts(data) : out = stdout.read.strip
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
- [stdin, stdout, stderr].each do |m|
80
+ [i, o, e].each do |m|
80
81
  m.close
81
82
  end
82
83
 
83
84
  [
84
- pid.value,
85
+ p.value,
85
86
  type == "stdin" ? data : out
86
87
  ]
87
88
  end
@@ -1,3 +1,3 @@
1
1
  module Clippy
2
- VERSION = "2.0.10"
2
+ VERSION = "2.0.11"
3
3
  end
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.10
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: 2013-09-14 00:00:00.000000000 Z
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.1'
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.1'
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.4'
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.4'
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
- - Readme.md
63
+ - Gemfile
64
64
  - License
65
65
  - Rakefile
66
- - Gemfile
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.3
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.