whos_dated_who 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c152af8ddc7438e056e2a1369c7d3325310e220
4
- data.tar.gz: 726dbdc1e2124ab3c2aaad97944d749f5caa2e8b
3
+ metadata.gz: 3d437538a3bae9ddbeb70cf7d7ca8b3de01129cd
4
+ data.tar.gz: 37b4a6fc89ae977bc394cf8073e1a4740f399e1d
5
5
  SHA512:
6
- metadata.gz: 7a9cf0a43d21181bef7fcb119fbd2337993e048b383a2c5a80ed6c14e09722a4a2898fc6b42439edc1d6d5d1c0b52270e09ab740aea0c36570aca8f6fa57b95a
7
- data.tar.gz: 4f9eee074b7c7aec058c4f1ea840c95431654c5bbab5423e0b21995adbfa72fc93f355f3700c9ba574fb5e9037fbccca8143bf5aaa02cc65259d81ee42fde9fe
6
+ metadata.gz: 84daf2404f99ec13db4cb4bfb387f90c2eb0630535d12b198b3ee56600f97d55b11904aa4c95ae3d1baaea7a7c2d7b93c368eb2f187f3a6083f8924e6bce5942
7
+ data.tar.gz: 7834556f5bee6ee937d4872bf15bb703e07351080948f49117d2a62eaa88f8e357e7e30104b2fa3f72c58df5e9a97e919844df505ce16d3fc11f60155b883ca1
@@ -5,3 +5,5 @@ rvm:
5
5
  env:
6
6
  global:
7
7
  secure: LajEHfUoZ43iJI3DWRWNyWRumb73A4fCMJyTxP3chHoA7Rbh6Baie1vuQVDCbt4TiOMlZVhP7d21JonsvsFyfagKdTTNyUM1m9pNXWX1z/mIV51/TtOgpx2o8eNExI2SB4LqOrLDZ/UFvdl9xIrgmUQgRjcjqfq5MmNHLO1N/co=
8
+ sudo: false
9
+ cache: bundler
@@ -1,8 +1,10 @@
1
1
  module WhosDatedWho
2
2
  class Client
3
3
  def fetch(name)
4
- bing_results = BingClient.new.search("#{name} site:dating.famousfix.com")
4
+ search = "#{name} dating site:whosdatedwho.com"
5
+ bing_results = BingClient.new.search(search)
5
6
  url = bing_results.first[:Web].first[:Url]
7
+
6
8
  resp = Faraday.get(url)
7
9
 
8
10
  if resp.success?
@@ -17,7 +17,7 @@ module WhosDatedWho
17
17
  private
18
18
 
19
19
  def extract_bio
20
- bio_selector = '#rcol .cbox-nopad:nth-child(3)'
20
+ bio_selector = '#rcol .cbox:nth-child(3)'
21
21
  bio = @doc.css(bio_selector)
22
22
 
23
23
  # if it's biography section, skip it
@@ -35,7 +35,7 @@ module WhosDatedWho
35
35
  current = @doc.css('.pbox.datebox')
36
36
  relationship = {}
37
37
 
38
- relationship[:human] = current.css('div.padb10:first').text
38
+ relationship[:human] = current.css('div.pb10:first').text
39
39
  relationship[:dates] = current.css('ul li').map(&:content)
40
40
  result[:current_relationship] = relationship
41
41
 
@@ -1,3 +1,3 @@
1
1
  module WhosDatedWho
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -6,16 +6,16 @@ describe WhosDatedWho do
6
6
  context 'smoke test' do
7
7
  it 'fetches and parses the correct results' do
8
8
  result = client.fetch('Candice Swanepoel')
9
- expect(result.status).to eq(:dating)
9
+ expect(result.status).to eq(:engaged)
10
10
  expect(result.biography.first_name).to eq('Candice')
11
11
  expect(result.biography.last_name).to eq('Swanepoel')
12
- expect(result.biography.age).to eq(26)
12
+ expect(result.biography.age).to eq(27)
13
13
 
14
14
  result = client.fetch('Jennifer Lawrence')
15
- expect(result.status).to eq(:single)
15
+ expect(result.status).to eq(:dating)
16
16
  expect(result.biography.first_name).to eq('Jennifer')
17
17
  expect(result.biography.last_name).to eq('Lawrence')
18
- expect(result.biography.age).to eq(24)
18
+ expect(result.biography.age).to eq(25)
19
19
  end
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whos_dated_who
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Perez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-08 00:00:00.000000000 Z
11
+ date: 2015-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  requirements: []
290
290
  rubyforge_project:
291
- rubygems_version: 2.4.5
291
+ rubygems_version: 2.4.5.1
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: Unofficial API for whosdatedwho.com