dogsay 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/bin/dinosay +5 -0
- data/bin/dogsay +5 -0
- data/lib/dogsay/version.rb +1 -1
- data/lib/dogsay.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: 5df247b502946379da74b5e098e732811cb17ca9
|
4
|
+
data.tar.gz: b169a1c95d05e9578a6d1a13dfa24688f8c4b9df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b1f11fa91ff6b29ce4b20db2677f72df26432521d0c6a540548f610d790d2c294320e237f4479d1ae947a148c779ddcffbd4d460e0fb98a24e0dd98e3f030c0
|
7
|
+
data.tar.gz: ace5e5c81199a92141021b50edbf398a6c1f7a97c80e155c36e807e017444c6fa2e2be68103e0abe6d49f633972c3147aa77a409eaf85dddc353c2a1ece006fa
|
data/.gitignore
CHANGED
data/bin/dinosay
CHANGED
@@ -15,6 +15,7 @@ def opts_from_cli
|
|
15
15
|
opts.on('-s', '--strip', 'Strip newlines from input') { options[:strip] = true }
|
16
16
|
opts.on('-l', '--list', 'List available dogs') { options[:all_dogs] = true }
|
17
17
|
opts.on('--list-animals', 'List available animal types') { options[:all_animals] = true }
|
18
|
+
opts.on('-v', '--version', 'Print version information') { options[:version] = true }
|
18
19
|
opts.on('-h', '--help', 'Display this screen') { options[:help] = true ; options[:input] = opts.to_s }
|
19
20
|
end
|
20
21
|
begin
|
@@ -43,6 +44,10 @@ if options[:all_animals]
|
|
43
44
|
puts "Possible animals are: #{Dogsay::Dog.all_animals}"
|
44
45
|
exit true
|
45
46
|
end
|
47
|
+
if options[:version]
|
48
|
+
puts "#{File.basename(__FILE__)} #{Dogsay::VERSION}"
|
49
|
+
exit true
|
50
|
+
end
|
46
51
|
|
47
52
|
input = ARGV.empty? ? ARGF.read : ARGV.join(' ')
|
48
53
|
begin
|
data/bin/dogsay
CHANGED
@@ -15,6 +15,7 @@ def opts_from_cli
|
|
15
15
|
opts.on('-s', '--strip', 'Strip newlines from input') { options[:strip] = true }
|
16
16
|
opts.on('-l', '--list', 'List available dogs') { options[:all_dogs] = true }
|
17
17
|
opts.on('--list-animals', 'List available animal types') { options[:all_animals] = true }
|
18
|
+
opts.on('-v', '--version', 'Print version information') { options[:version] = true }
|
18
19
|
opts.on('-h', '--help', 'Display this screen') { options[:help] = true ; options[:input] = opts.to_s }
|
19
20
|
end
|
20
21
|
begin
|
@@ -43,6 +44,10 @@ if options[:all_animals]
|
|
43
44
|
puts "Possible animals are: #{Dogsay::Dog.all_animals}"
|
44
45
|
exit true
|
45
46
|
end
|
47
|
+
if options[:version]
|
48
|
+
puts "#{File.basename(__FILE__)} #{Dogsay::VERSION}"
|
49
|
+
exit true
|
50
|
+
end
|
46
51
|
|
47
52
|
input = ARGV.empty? ? ARGF.read : ARGV.join(' ')
|
48
53
|
begin
|
data/lib/dogsay/version.rb
CHANGED
data/lib/dogsay.rb
CHANGED