pavlov_rss 0.0.4 → 0.0.5

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: 35a29663a549afb08c61d6f4b88619c588d6c172
4
- data.tar.gz: 9b74530d53d962b0f2c9d50c9558a73ea15f8b5e
3
+ metadata.gz: db654d1ad2a3598481166857616cbffccaeb9407
4
+ data.tar.gz: 0190333578206965798e596c12d56be51c2c764c
5
5
  SHA512:
6
- metadata.gz: ff7e6ae7cf8950adc99ae1efacd8a043dc35a17fcda5b172185c7645fef399204a78fa02f466b3f7e2c106c04afb9ae1da1a9592af112d3d3c12cf25d719b748
7
- data.tar.gz: a58856d9e2bb5763a98a1eebd3740cfabc2a4e9b2ec5148035c446ae5462aeb4c7ae01e46bf416ec9abb844f0c33d425a2d9221fcdb02ac53d3c5b1ca08d30cb
6
+ metadata.gz: cc89f35da0811807a75a2c32e0ef613baa236f7d317f7d350682952078579bdcc63e945a33014f645ca31594a12aa50a7d1d228c85970f5cb93dc6b3d2a82e8c
7
+ data.tar.gz: b0843eca7c4b5ffb368d8dac4a5c0322bafc4e8feeb1e75d98269e26a9d326aedb6604599ef53d07572b7dcaac17bfa16382ca54fc381186bfc79e120eb3601a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pavlov_rss (0.0.4)
4
+ pavlov_rss (0.0.5)
5
5
  activesupport
6
6
  nokogiri
7
7
 
@@ -28,7 +28,7 @@ module PavlovRss
28
28
  result = case
29
29
  when hash.has_key?('rss')
30
30
  hash['rss']['channel']['item']
31
- when value.has_key?('feed')
31
+ when hash.has_key?('feed')
32
32
  hash['feed']['entry']
33
33
  end
34
34
  result ||= []
@@ -1,3 +1,3 @@
1
1
  module PavlovRss
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -6,14 +6,14 @@ describe PavlovRss::Reader do
6
6
  describe '#hash_to_item' do
7
7
  subject { described_class.new.hash_to_item(hash) }
8
8
 
9
- describe do
9
+ context do
10
10
  let(:hash) do
11
11
  {'rss' => {'channel' => {'item' => []}}}
12
12
  end
13
13
  it { should be_empty }
14
14
  end
15
15
 
16
- describe do
16
+ context do
17
17
  let(:hash) do
18
18
  {'rss' => {'channel' => {'item' =>
19
19
  {'title' => 'title1'}
@@ -22,7 +22,7 @@ describe PavlovRss::Reader do
22
22
  it { should have(1).item }
23
23
  end
24
24
 
25
- describe do
25
+ context do
26
26
  let(:hash) do
27
27
  {'rss' => {'channel' => {'item' => [
28
28
  {'title' => 'title1'},
@@ -31,6 +31,16 @@ describe PavlovRss::Reader do
31
31
  end
32
32
  it { should have(2).items }
33
33
  end
34
+
35
+ context 'with atom' do
36
+ let(:hash) do
37
+ {'feed' => {'entry' => [
38
+ {'title' => 'title1'},
39
+ {'title' => 'title2'},
40
+ ]}}
41
+ end
42
+ it { should have(2).items }
43
+ end
34
44
  end
35
45
 
36
46
  describe '#rss_to_hash' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pavlov_rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minwoo Lee