hobos 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -7
- data/README.md +5 -1
- data/bin/hobos +17 -7
- data/hobos.gemspec +6 -5
- data/lib/hobos/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: 0c72117b8b61d65636a41eb0ce8e514caf2b8429
|
4
|
+
data.tar.gz: 2673312800731ada999827354338da323ea3b91e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb5f6ee4a776e5540a4a5c3e019dc2a6b89acd68ecee014d48329a98fbe2c3719cc0d094a2f3d618d6c531bf9b63ffffbd6622b97c1c1ebc5089d30b1a8dc212
|
7
|
+
data.tar.gz: 3e1f611b9cb7a6e21ef4855db30a2b8c199c74692a03e09dd0cbee35d0a5e6c28036d57890e46b486a8ab95890f84c1a4c3a47e86aca0a9c611218de95d273ba
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,11 @@ Fuck off and read a hobo name.
|
|
9
9
|
## Installation:
|
10
10
|
|
11
11
|
```BASH
|
12
|
-
|
12
|
+
git clone https://www.github.com/rhgraysonii/hobos.git
|
13
|
+
cd hobos
|
14
|
+
gem build hobos.gemspec
|
15
|
+
gem install hobos-0.0.2.gem
|
16
|
+
cd ..
|
13
17
|
```
|
14
18
|
|
15
19
|
And now you can simply look them up by id or at random.
|
data/bin/hobos
CHANGED
@@ -2,13 +2,23 @@
|
|
2
2
|
|
3
3
|
require 'hobos'
|
4
4
|
|
5
|
-
api = Hobos::Api.new
|
6
|
-
if ARGV[0]
|
7
|
-
|
8
|
-
puts api.hobo ARGV[0]
|
9
|
-
else
|
10
|
-
puts api.hobo [1..700].to_a.sample
|
11
|
-
end
|
5
|
+
$api = Hobos::Api.new
|
12
6
|
|
13
7
|
|
8
|
+
def try_hobo found_hobo
|
9
|
+
resp = $api.hobo rand(0..700)
|
10
|
+
while !found_hobo
|
11
|
+
if resp != "{ 'error': { 'message': 'bad UID' } }"
|
12
|
+
found_hobo = true
|
13
|
+
else
|
14
|
+
try_hobo(found_hobo)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
puts resp
|
18
|
+
end
|
14
19
|
|
20
|
+
if ARGV[0]
|
21
|
+
puts $api.hobo ARGV[0]
|
22
|
+
else
|
23
|
+
try_hobo false
|
24
|
+
end
|
data/hobos.gemspec
CHANGED
@@ -6,6 +6,12 @@ require 'hobos/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "hobos"
|
8
8
|
spec.version = Hobos::VERSION
|
9
|
+
|
10
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
11
|
+
spec.add_development_dependency "rake"
|
12
|
+
spec.add_development_dependency "rspec"
|
13
|
+
spec.add_development_dependency "mechanize"
|
14
|
+
|
9
15
|
spec.authors = ["Robert H Grayson II"]
|
10
16
|
spec.email = ["bobbygrayson@gmail.com"]
|
11
17
|
spec.summary = %q{Get your hobo on.}
|
@@ -18,9 +24,4 @@ Gem::Specification.new do |spec|
|
|
18
24
|
|
19
25
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
26
|
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.6"
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
-
spec.add_development_dependency "rspec"
|
25
|
-
spec.add_development_dependency "mechanize"
|
26
27
|
end
|
data/lib/hobos/version.rb
CHANGED