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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6bf7694dc2bb293f060cb9226387ceee027430e
4
- data.tar.gz: 3dc8eecd86050c1a169de44308fdac2897215042
3
+ metadata.gz: 0c72117b8b61d65636a41eb0ce8e514caf2b8429
4
+ data.tar.gz: 2673312800731ada999827354338da323ea3b91e
5
5
  SHA512:
6
- metadata.gz: 49054ace192879e2a5892263b254f40007ded0c8b2b4887c36897d84b2b33a94d658fe2c9024963559f36b5e1d244a223f073fc6c8df84566b8123d166557997
7
- data.tar.gz: 010d4a7a3dfe711e00b88be3efc7d741520d4b2838b88db593067af37c0623a4845939abebeab710188c5dd0c64f4fe0a61bf80f0551be0669d7328ad35f3b3a
6
+ metadata.gz: fb5f6ee4a776e5540a4a5c3e019dc2a6b89acd68ecee014d48329a98fbe2c3719cc0d094a2f3d618d6c531bf9b63ffffbd6622b97c1c1ebc5089d30b1a8dc212
7
+ data.tar.gz: 3e1f611b9cb7a6e21ef4855db30a2b8c199c74692a03e09dd0cbee35d0a5e6c28036d57890e46b486a8ab95890f84c1a4c3a47e86aca0a9c611218de95d273ba
data/Gemfile CHANGED
@@ -1,10 +1,4 @@
1
- # A sample Gemfile
2
1
  source "https://rubygems.org"
3
2
 
4
- gem 'mechanize'
5
- gem 'sinatra'
6
-
7
- group :test, :development do
8
- gem 'rspec'
9
- end
3
+ gemspec
10
4
 
data/README.md CHANGED
@@ -9,7 +9,11 @@ Fuck off and read a hobo name.
9
9
  ## Installation:
10
10
 
11
11
  ```BASH
12
- gem install hobos
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
@@ -1,3 +1,3 @@
1
1
  module Hobos
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert H Grayson II