genderize_io_rb 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6289f33481a995b92a006be0b9e7e15fec4c16a3
4
+ data.tar.gz: a506262d5ee712b7ccefc6cc880cb6446ef53df1
5
+ SHA512:
6
+ metadata.gz: ac9f3b0c7c0836627788ba4540ecb64f201a0b902c7b950a44e58718e3d64f34597da91f56dee79c3500a6115b885d80c2276dafe96ad2d472b3fea2da19847b
7
+ data.tar.gz: 8f321ff64dc9d6cef23069f213351e430dc1c171c77afa65bdcf7601746baa8e5567ee9e7fde3754fdff4f051ca16b8e2eb8a1e09bb0fe4053b6929b2f03b883
data/Gemfile CHANGED
@@ -15,5 +15,5 @@ group :development do
15
15
  gem "bundler", ">= 1.0.0"
16
16
  gem "jeweler", :git => "https://github.com/technicalpickles/jeweler.git"
17
17
  gem "sqlite3"
18
- gem "baza", "0.0.12"
18
+ gem "baza", ">= 0.0.12"
19
19
  end
@@ -1,23 +1,23 @@
1
1
  GIT
2
2
  remote: https://github.com/technicalpickles/jeweler.git
3
- revision: f7e0a55a207d83f56637dd8fbabf26a803410faf
3
+ revision: f2128d70918d690a5226e176e00bbca51ce85646
4
4
  specs:
5
- jeweler (1.8.7)
5
+ jeweler (2.0.1)
6
6
  builder
7
- bundler (~> 1.0)
7
+ bundler (>= 1.0)
8
8
  git (>= 1.2.5)
9
- github_api (= 0.10.1)
9
+ github_api
10
10
  highline (>= 1.6.15)
11
- nokogiri (= 1.5.10)
11
+ nokogiri (>= 1.5.10)
12
12
  rake
13
13
  rdoc
14
14
 
15
15
  GEM
16
16
  remote: http://rubygems.org/
17
17
  specs:
18
- addressable (2.3.5)
18
+ addressable (2.3.6)
19
19
  array_enumerator (0.0.3)
20
- baza (0.0.12)
20
+ baza (0.0.13)
21
21
  array_enumerator
22
22
  datet
23
23
  knjrbfw
@@ -25,40 +25,43 @@ GEM
25
25
  wref
26
26
  builder (3.2.2)
27
27
  datet (0.0.25)
28
+ descendants_tracker (0.0.4)
29
+ thread_safe (~> 0.3, >= 0.3.1)
28
30
  diff-lcs (1.1.3)
29
- faraday (0.8.8)
30
- multipart-post (~> 1.2.0)
31
+ faraday (0.9.0)
32
+ multipart-post (>= 1.2, < 3)
31
33
  git (1.2.6)
32
- github_api (0.10.1)
33
- addressable
34
- faraday (~> 0.8.1)
34
+ github_api (0.11.3)
35
+ addressable (~> 2.3)
36
+ descendants_tracker (~> 0.0.1)
37
+ faraday (~> 0.8, < 0.10)
35
38
  hashie (>= 1.2)
36
- multi_json (~> 1.4)
37
- nokogiri (~> 1.5.2)
39
+ multi_json (>= 1.7.5, < 2.0)
40
+ nokogiri (~> 1.6.0)
38
41
  oauth2
39
- hashie (2.0.5)
40
- highline (1.6.19)
41
- http2 (0.0.22)
42
- httpauth (0.2.0)
43
- json (1.8.0)
44
- jwt (0.1.8)
42
+ hashie (2.1.1)
43
+ highline (1.6.21)
44
+ http2 (0.0.23)
45
+ json (1.8.1)
46
+ jwt (0.1.11)
45
47
  multi_json (>= 1.5)
46
- knjrbfw (0.0.107)
48
+ knjrbfw (0.0.109)
47
49
  datet
48
50
  http2
49
51
  php4r
50
52
  ruby_process
51
53
  tsafe
52
54
  wref
53
- multi_json (1.7.9)
55
+ mini_portile (0.5.3)
56
+ multi_json (1.9.3)
54
57
  multi_xml (0.5.5)
55
- multipart-post (1.2.0)
56
- nokogiri (1.5.10)
57
- oauth2 (0.9.2)
58
- faraday (~> 0.8)
59
- httpauth (~> 0.2)
60
- jwt (~> 0.1.4)
61
- multi_json (~> 1.0)
58
+ multipart-post (2.0.0)
59
+ nokogiri (1.6.1)
60
+ mini_portile (~> 0.5.0)
61
+ oauth2 (0.9.3)
62
+ faraday (>= 0.8, < 0.10)
63
+ jwt (~> 0.1.8)
64
+ multi_json (~> 1.3)
62
65
  multi_xml (~> 0.5)
63
66
  rack (~> 1.2)
64
67
  php4r (0.0.4)
@@ -66,7 +69,7 @@ GEM
66
69
  http2
67
70
  string-strtr
68
71
  rack (1.5.2)
69
- rake (10.1.0)
72
+ rake (10.3.1)
70
73
  rdoc (3.12.2)
71
74
  json (~> 1.4)
72
75
  rspec (2.8.0)
@@ -77,12 +80,13 @@ GEM
77
80
  rspec-expectations (2.8.0)
78
81
  diff-lcs (~> 1.1.2)
79
82
  rspec-mocks (2.8.0)
80
- ruby_process (0.0.8)
83
+ ruby_process (0.0.9)
81
84
  tsafe
82
85
  wref
83
- sqlite3 (1.3.8)
86
+ sqlite3 (1.3.9)
84
87
  string-cases (0.0.0)
85
88
  string-strtr (0.0.3)
89
+ thread_safe (0.3.3)
86
90
  tsafe (0.0.11)
87
91
  wref (0.0.6)
88
92
 
@@ -90,7 +94,7 @@ PLATFORMS
90
94
  ruby
91
95
 
92
96
  DEPENDENCIES
93
- baza (= 0.0.12)
97
+ baza (>= 0.0.12)
94
98
  bundler (>= 1.0.0)
95
99
  http2
96
100
  jeweler!
@@ -1,8 +1,19 @@
1
- = genderize_io_rb
1
+ # GenderizeIoRb
2
2
 
3
- Description goes here.
3
+ Start by adding it to your Gemfile and bundle it:
4
+ ```ruby
5
+ gem 'genderize_io_rb'
6
+ ```
4
7
 
5
- == Contributing to genderize_io_rb
8
+ Now check a name like this:
9
+ ```ruby
10
+ gir = GenderizeIoRb.new
11
+ res = gir.info_for_name("kasper")
12
+ puts "Name: #{res[:result].name}"
13
+ puts "Gender: #{res[:result].gender}"
14
+ ```
15
+
16
+ # Contributing to genderize_io_rb
6
17
 
7
18
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
19
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
@@ -12,7 +23,7 @@ Description goes here.
12
23
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
24
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
25
 
15
- == Copyright
26
+ # Copyright
16
27
 
17
28
  Copyright (c) 2013 Kasper Johansen. See LICENSE.txt for
18
29
  further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -5,16 +5,16 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "genderize_io_rb"
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kasper Johansen"]
12
- s.date = "2013-09-12"
12
+ s.date = "2014-04-28"
13
13
  s.description = "A small Gem that makes it possible to determine gender from a name via the Genderize.io service."
14
14
  s.email = "kaspernj@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
- "README.rdoc"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  "Gemfile",
23
23
  "Gemfile.lock",
24
24
  "LICENSE.txt",
25
- "README.rdoc",
25
+ "README.md",
26
26
  "Rakefile",
27
27
  "VERSION",
28
28
  "genderize_io_rb.gemspec",
@@ -36,11 +36,11 @@ Gem::Specification.new do |s|
36
36
  s.homepage = "http://github.com/kaspernj/genderize_io_rb"
37
37
  s.licenses = ["MIT"]
38
38
  s.require_paths = ["lib"]
39
- s.rubygems_version = "1.8.23"
39
+ s.rubygems_version = "2.0.7"
40
40
  s.summary = "A small Gem that makes it possible to determine gender from a name via the Genderize.io service."
41
41
 
42
42
  if s.respond_to? :specification_version then
43
- s.specification_version = 3
43
+ s.specification_version = 4
44
44
 
45
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
46
  s.add_runtime_dependency(%q<http2>, [">= 0"])
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
51
51
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
52
52
  s.add_development_dependency(%q<jeweler>, [">= 0"])
53
53
  s.add_development_dependency(%q<sqlite3>, [">= 0"])
54
- s.add_development_dependency(%q<baza>, ["= 0.0.12"])
54
+ s.add_development_dependency(%q<baza>, [">= 0.0.12"])
55
55
  else
56
56
  s.add_dependency(%q<http2>, [">= 0"])
57
57
  s.add_dependency(%q<json>, [">= 0"])
@@ -61,7 +61,7 @@ Gem::Specification.new do |s|
61
61
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
62
62
  s.add_dependency(%q<jeweler>, [">= 0"])
63
63
  s.add_dependency(%q<sqlite3>, [">= 0"])
64
- s.add_dependency(%q<baza>, ["= 0.0.12"])
64
+ s.add_dependency(%q<baza>, [">= 0.0.12"])
65
65
  end
66
66
  else
67
67
  s.add_dependency(%q<http2>, [">= 0"])
@@ -72,7 +72,7 @@ Gem::Specification.new do |s|
72
72
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
73
73
  s.add_dependency(%q<jeweler>, [">= 0"])
74
74
  s.add_dependency(%q<sqlite3>, [">= 0"])
75
- s.add_dependency(%q<baza>, ["= 0.0.12"])
75
+ s.add_dependency(%q<baza>, [">= 0.0.12"])
76
76
  end
77
77
  end
78
78
 
@@ -30,7 +30,7 @@ class GenderizeIoRb
30
30
  @cache_as = args[:cache_as]
31
31
  end
32
32
 
33
- def info_for_name(name)
33
+ def info_for_name(name, args = {})
34
34
  name = name.to_s.strip
35
35
  name_lc = name.downcase
36
36
 
@@ -48,7 +48,6 @@ class GenderizeIoRb
48
48
  cache_as_key = "genderize_io_rb_#{name_lc}"
49
49
  if @cache_as
50
50
  cache_as_res = @cache_as.read(cache_as_key)
51
- puts "CacheAsRes: #{cache_as_res}"
52
51
 
53
52
  if cache_as_res
54
53
  res = ::GenderizeIoRb::Result.new(
@@ -5,12 +5,12 @@ describe "GenderizeIoRb" do
5
5
  gir = GenderizeIoRb.new
6
6
 
7
7
  res = gir.info_for_name("kasper")
8
- res.name.should eql("kasper")
9
- res.gender.should eql("male")
8
+ res[:result].name.should eql("kasper")
9
+ res[:result].gender.should eql("male")
10
10
 
11
11
  res = gir.info_for_name("christina")
12
- res.name.should eql("christina")
13
- res.gender.should eql("female")
12
+ res[:result].name.should eql("christina")
13
+ res[:result].gender.should eql("female")
14
14
 
15
15
  gir.destroy
16
16
  end
@@ -29,9 +29,9 @@ describe "GenderizeIoRb" do
29
29
  gir = GenderizeIoRb.new(:cache_db => db)
30
30
 
31
31
  res = gir.info_for_name("kasper")
32
- res.name.should eql("kasper")
32
+ res[:result].name.should eql("kasper")
33
33
 
34
- res = gir.cache_db.select(:genderize_io_rb_cache, {"name" => "kasper"})
34
+ res = gir.cache_db.select(:genderize_io_rb_cache, "name" => "kasper")
35
35
 
36
36
  count = 0
37
37
  res.each do |data|
metadata CHANGED
@@ -1,160 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genderize_io_rb
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.8
4
+ version: 0.0.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kasper Johansen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-12 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- prerelease: false
16
14
  name: http2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
17
20
  type: :runtime
21
+ prerelease: false
18
22
  version_requirements: !ruby/object:Gem::Requirement
19
23
  requirements:
20
- - - ! '>='
24
+ - - '>='
21
25
  - !ruby/object:Gem::Version
22
26
  version: '0'
23
- none: false
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
24
29
  requirement: !ruby/object:Gem::Requirement
25
30
  requirements:
26
- - - ! '>='
31
+ - - '>='
27
32
  - !ruby/object:Gem::Version
28
33
  version: '0'
29
- none: false
30
- - !ruby/object:Gem::Dependency
31
- prerelease: false
32
- name: json
33
34
  type: :runtime
35
+ prerelease: false
34
36
  version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
- - - ! '>='
38
+ - - '>='
37
39
  - !ruby/object:Gem::Version
38
40
  version: '0'
39
- none: false
41
+ - !ruby/object:Gem::Dependency
42
+ name: string-cases
40
43
  requirement: !ruby/object:Gem::Requirement
41
44
  requirements:
42
- - - ! '>='
45
+ - - '>='
43
46
  - !ruby/object:Gem::Version
44
47
  version: '0'
45
- none: false
46
- - !ruby/object:Gem::Dependency
47
- prerelease: false
48
- name: string-cases
49
48
  type: :runtime
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- none: false
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ! '>='
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- none: false
62
55
  - !ruby/object:Gem::Dependency
63
- prerelease: false
64
56
  name: rspec
65
- type: :development
66
- version_requirements: !ruby/object:Gem::Requirement
57
+ requirement: !ruby/object:Gem::Requirement
67
58
  requirements:
68
59
  - - ~>
69
60
  - !ruby/object:Gem::Version
70
61
  version: 2.8.0
71
- none: false
72
- requirement: !ruby/object:Gem::Requirement
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
73
65
  requirements:
74
66
  - - ~>
75
67
  - !ruby/object:Gem::Version
76
68
  version: 2.8.0
77
- none: false
78
69
  - !ruby/object:Gem::Dependency
79
- prerelease: false
80
70
  name: rdoc
81
- type: :development
82
- version_requirements: !ruby/object:Gem::Requirement
71
+ requirement: !ruby/object:Gem::Requirement
83
72
  requirements:
84
73
  - - ~>
85
74
  - !ruby/object:Gem::Version
86
75
  version: '3.12'
87
- none: false
88
- requirement: !ruby/object:Gem::Requirement
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
89
79
  requirements:
90
80
  - - ~>
91
81
  - !ruby/object:Gem::Version
92
82
  version: '3.12'
93
- none: false
94
83
  - !ruby/object:Gem::Dependency
95
- prerelease: false
96
84
  name: bundler
97
- type: :development
98
- version_requirements: !ruby/object:Gem::Requirement
85
+ requirement: !ruby/object:Gem::Requirement
99
86
  requirements:
100
- - - ! '>='
87
+ - - '>='
101
88
  - !ruby/object:Gem::Version
102
89
  version: 1.0.0
103
- none: false
104
- requirement: !ruby/object:Gem::Requirement
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
105
93
  requirements:
106
- - - ! '>='
94
+ - - '>='
107
95
  - !ruby/object:Gem::Version
108
96
  version: 1.0.0
109
- none: false
110
97
  - !ruby/object:Gem::Dependency
111
- prerelease: false
112
98
  name: jeweler
113
- type: :development
114
- version_requirements: !ruby/object:Gem::Requirement
99
+ requirement: !ruby/object:Gem::Requirement
115
100
  requirements:
116
- - - ! '>='
101
+ - - '>='
117
102
  - !ruby/object:Gem::Version
118
103
  version: '0'
119
- none: false
120
- requirement: !ruby/object:Gem::Requirement
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ! '>='
108
+ - - '>='
123
109
  - !ruby/object:Gem::Version
124
110
  version: '0'
125
- none: false
126
111
  - !ruby/object:Gem::Dependency
127
- prerelease: false
128
112
  name: sqlite3
129
- type: :development
130
- version_requirements: !ruby/object:Gem::Requirement
113
+ requirement: !ruby/object:Gem::Requirement
131
114
  requirements:
132
- - - ! '>='
115
+ - - '>='
133
116
  - !ruby/object:Gem::Version
134
117
  version: '0'
135
- none: false
136
- requirement: !ruby/object:Gem::Requirement
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
137
121
  requirements:
138
- - - ! '>='
122
+ - - '>='
139
123
  - !ruby/object:Gem::Version
140
124
  version: '0'
141
- none: false
142
125
  - !ruby/object:Gem::Dependency
143
- prerelease: false
144
126
  name: baza
145
- type: :development
146
- version_requirements: !ruby/object:Gem::Requirement
127
+ requirement: !ruby/object:Gem::Requirement
147
128
  requirements:
148
- - - '='
129
+ - - '>='
149
130
  - !ruby/object:Gem::Version
150
131
  version: 0.0.12
151
- none: false
152
- requirement: !ruby/object:Gem::Requirement
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
153
135
  requirements:
154
- - - '='
136
+ - - '>='
155
137
  - !ruby/object:Gem::Version
156
138
  version: 0.0.12
157
- none: false
158
139
  description: A small Gem that makes it possible to determine gender from a name via
159
140
  the Genderize.io service.
160
141
  email: kaspernj@gmail.com
@@ -162,14 +143,14 @@ executables: []
162
143
  extensions: []
163
144
  extra_rdoc_files:
164
145
  - LICENSE.txt
165
- - README.rdoc
146
+ - README.md
166
147
  files:
167
148
  - .document
168
149
  - .rspec
169
150
  - Gemfile
170
151
  - Gemfile.lock
171
152
  - LICENSE.txt
172
- - README.rdoc
153
+ - README.md
173
154
  - Rakefile
174
155
  - VERSION
175
156
  - genderize_io_rb.gemspec
@@ -182,30 +163,26 @@ files:
182
163
  homepage: http://github.com/kaspernj/genderize_io_rb
183
164
  licenses:
184
165
  - MIT
166
+ metadata: {}
185
167
  post_install_message:
186
168
  rdoc_options: []
187
169
  require_paths:
188
170
  - lib
189
171
  required_ruby_version: !ruby/object:Gem::Requirement
190
172
  requirements:
191
- - - ! '>='
173
+ - - '>='
192
174
  - !ruby/object:Gem::Version
193
- segments:
194
- - 0
195
- hash: -1771412768099350443
196
175
  version: '0'
197
- none: false
198
176
  required_rubygems_version: !ruby/object:Gem::Requirement
199
177
  requirements:
200
- - - ! '>='
178
+ - - '>='
201
179
  - !ruby/object:Gem::Version
202
180
  version: '0'
203
- none: false
204
181
  requirements: []
205
182
  rubyforge_project:
206
- rubygems_version: 1.8.23
183
+ rubygems_version: 2.0.7
207
184
  signing_key:
208
- specification_version: 3
185
+ specification_version: 4
209
186
  summary: A small Gem that makes it possible to determine gender from a name via the
210
187
  Genderize.io service.
211
188
  test_files: []