gendered 0.0.5 → 0.0.7

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: f86b31842ddc95c2113669e6f66a5d99aac816a3
4
- data.tar.gz: c94175107eea8f35359a3e3ce610c59572847f5e
3
+ metadata.gz: 45dd165cc82b4c0d37492943c3e0b404df8a8001
4
+ data.tar.gz: 2dfab03e1dcf771e14e25ed8addc0db487ceb746
5
5
  SHA512:
6
- metadata.gz: d69366b21df292f59b479a5eba8c16d3055b7de8b457acc968bbf0aa52c7b40057f5e40659d6f5c1334203f2dfb9394226652183cfe41b8240b3ad250ee57582
7
- data.tar.gz: dc544551f8658804b434b29269d374f6aa5cbd31df8b1dd4027c063bef8667d2d2a099df7eecab15b5070da432f80acd663fa749f1903b18dd242ae22ef78ae8
6
+ metadata.gz: ad9be58b9a724ec1d1bdbbc02b6b1ea0d97b433b9fc09bfc8d47afa5fc014cfaea1c473a83065dafe2ce3606e26fd85239d65a4e66f6cedd64d61aaf029abd75
7
+ data.tar.gz: afe8c2d93528556df06443068e38b537c2641bfe411fe1250facea51547523294a0415670119daccbd66429ac34a171f17f4384118f285efce1ce351457446f5
@@ -20,7 +20,12 @@ module Gendered
20
20
  names.collect do |name|
21
21
  name = Name.new(name) if name.is_a?(String)
22
22
 
23
- guess = guesses.find { |g| g["name"] == name.value }
23
+ guess = case
24
+ when guesses.is_a?(Array)
25
+ guesses.find { |g| g["name"] == name.value }
26
+ else
27
+ guesses
28
+ end
24
29
 
25
30
  if guess["gender"]
26
31
  name.gender = guess["gender"].to_sym
@@ -34,7 +39,7 @@ module Gendered
34
39
  end
35
40
 
36
41
  def url
37
- url = "http://api.genderize.io/?"
42
+ url = "https://api.genderize.io/?"
38
43
  url += "country_id=#{country_id}&" if country_id
39
44
 
40
45
  name_queries = names.collect.with_index do |name, index|
@@ -1,3 +1,3 @@
1
1
  module Gendered
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -19,7 +19,7 @@ module Gendered
19
19
  end
20
20
 
21
21
  it "creates the correct url" do
22
- expect(subject.url).to eq "http://api.genderize.io/?name[0]=Sean&name[1]=Theresa"
22
+ expect(subject.url).to eq "https://api.genderize.io/?name[0]=Sean&name[1]=Theresa"
23
23
  end
24
24
 
25
25
  it "cannot be initialized with an empty array" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gendered
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Devine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -124,3 +124,4 @@ test_files:
124
124
  - spec/lib/gendered/name_list_spec.rb
125
125
  - spec/lib/gendered/name_spec.rb
126
126
  - spec/spec_helper.rb
127
+ has_rdoc: