clippy 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/clippy +8 -8
- data/lib/clippy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3116c995ba1ffc7d4f5f3be2943fc7160bd08146
|
4
|
+
data.tar.gz: 2e4ff8b7dcbfd9876db091fc330a3941bb1411cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1a120ed9eaa482a42ff2054d32842c4093466075d59df460a5f336aa3cf6797cadaa8c2ad5da1d3942711fc8572a528b288d3a0e75da556aa0cfb2694261371
|
7
|
+
data.tar.gz: bbf03540bb66b839e8aa2665e6a7f8471d653aadf9f78fd5000948762eb60b982c3e188ffb564a31d1ed41083a27ee6ba308c45f175775e01a87cfc3484df417
|
data/bin/clippy
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require_relative
|
4
|
-
require
|
3
|
+
require_relative "../lib/clippy"
|
4
|
+
require "optparse"
|
5
5
|
|
6
6
|
OptionParser.new do |opts|
|
7
7
|
opts.banner = "Clippy v#{Clippy::VERSION}: Clippy [--copy [< File] ['Text']]"
|
8
8
|
|
9
|
-
opts.on(
|
10
|
-
opts.on(
|
11
|
-
opts.on(
|
12
|
-
opts.on(
|
9
|
+
opts.on("--paste", "Paste") { $stdout.puts Clippy.paste }
|
10
|
+
opts.on("--help", "This") { $stdout.puts opts }
|
11
|
+
opts.on("--clear", "Clear") { exit Clippy.clear ? 0 : 1 }
|
12
|
+
opts.on("--version", "Version") { $stdout.puts Clippy::VERSION }
|
13
13
|
|
14
|
-
opts.on(
|
15
|
-
($stdout.puts
|
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
|
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/version.rb
CHANGED