horsefield 0.4.65 → 0.4.66

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: 080e717136819399f7dfcdcf7365ef0f75b30ec5
4
- data.tar.gz: 05891cdf6035afa8128b9c2dc15388ad1fe71ad8
3
+ metadata.gz: b39019389eda9ae2ba5a43e94d45f1167cb9f264
4
+ data.tar.gz: dee940c96213b9d9618d59d7df268aafe27e552b
5
5
  SHA512:
6
- metadata.gz: 08e9ffb70f35b0c367552a371c21fbf9dd7e98f2faa9009ad4c8cecb5da8de9d7192bd6d6e2e1baf061fde45c2072dee88c867d1d030816545f086aa7e0bf8e3
7
- data.tar.gz: 7415f5c9c0c8677f20f04eca02e2d115b025afe69f69199ebf1efcb3958ed8f66844c72e0133ce6532ad33235c388a60ef32b3f6f9b9da7ca1157804c949e422
6
+ metadata.gz: 67208edcfb3f1da904367db57707a656a1f1427e47b6e2ff23afd95180df6799ae6564c210117940f3002d6cb8abd8283480a7c41563b150370f14402224619c
7
+ data.tar.gz: e9bb0e15fee15461fd03b10b1ba182478eb60e127a0d59f534ecb2d243aa13a6ebeb8ffc0c17b463211cd267d3b9354b059028022e76ac065cc132721c9b5819
@@ -12,4 +12,8 @@ module Horsefield
12
12
  class Nokogiri::XML::Attr
13
13
  include Diggable
14
14
  end
15
+
16
+ class Nokogiri::XML::Text
17
+ include Diggable
18
+ end
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Horsefield
2
- VERSION = "0.4.65"
2
+ VERSION = "0.4.66"
3
3
  end
@@ -9,6 +9,7 @@ class RedditScraper
9
9
  one :tagline, 'p.tagline' do
10
10
  one :submitted, './time/@datetime'
11
11
  one :subreddit, 'a.subreddit'
12
+ one? :missing, '.missing'
12
13
  end
13
14
  many :links, './/a[contains(@href, "reddit.com")]/@href'
14
15
  end
@@ -23,6 +24,6 @@ class TestScraper < Minitest::Test
23
24
 
24
25
  def test_scraper
25
26
  reddit = RedditScraper.new(@html).scrape
26
- p reddit
27
+ p reddit[:posts].first[:tagline]
27
28
  end
28
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: horsefield
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.65
4
+ version: 0.4.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Strömberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri