assonnato 0.6.1 → 0.6.2

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: 0d52d3fe4e41cf0818c1767612539815263dd396
4
- data.tar.gz: 031f5d0a3ccd84cb97165f6f455d9750fb1bf62d
3
+ metadata.gz: ede4e10695a772234702bd662ef229c962d4155b
4
+ data.tar.gz: 0ac6f6d1bf318f27a11a0d6389f9342465506454
5
5
  SHA512:
6
- metadata.gz: 9c79e568b71f922e5a42f3961236f1d0955577ac0daa87e58a96fa0a7c253f5be503a853b53188d7f7a1851918402dd066683c8de785e6b9e3bc73242dbc1830
7
- data.tar.gz: bbd444d534c26ead3c04690a4fa0b2d6926a3a326a9dc56ef7ab88f480e67b2660dd10e992e7b6a8ede8e74dd9436237c714d187c333e5d7941b93cf0c9cd343
6
+ metadata.gz: cb0ec42d25da3e52c861a3407ceb69343e4f2c54ee91afe4311f13e10b1a40a86c1178218b79dc5164d6cea68d2da9ae699388772d84d41c04e748650f414c60
7
+ data.tar.gz: 7a0f45d61725ed74cf254b44e100cfa1bb0695213a2dc2a2d97d7e003da13bd4142af30538672491da5c77fa70db7e17bd8a13443012fed4949021ff2827cfe8
@@ -21,5 +21,9 @@ module Assonnato
21
21
  def get!(show, episode)
22
22
  all!(show).select { |ep| ep.episode == episode }
23
23
  end
24
+
25
+ def last!(status)
26
+ parse get(@host, @path, "/episodes/last/#{status}")
27
+ end
24
28
  end
25
29
  end
@@ -45,6 +45,10 @@ module Assonnato
45
45
  }
46
46
  end
47
47
 
48
+ def last!(status)
49
+ raise NotImplementedError, 'Show#last is not implemented'
50
+ end
51
+
48
52
  private
49
53
  def by_fansub(fansub)
50
54
  "/fansubs/#{URI.escape fansub}"
@@ -9,5 +9,5 @@
9
9
  #++
10
10
 
11
11
  module Assonnato
12
- VERSION = '0.6.1'
12
+ VERSION = '0.6.2'
13
13
  end
data/spec/episode_spec.rb CHANGED
@@ -27,4 +27,11 @@ describe 'Assonnato' do
27
27
  res.first.should be_kind_of(Struct)
28
28
  res.first.episode.should eql(1)
29
29
  end
30
+
31
+ it 'returns the last episode of each show with the given status' do
32
+ res = @episode.last! :ongoing
33
+ res.should be_kind_of(Array)
34
+ res.should_not be_empty
35
+ res.first.should be_kind_of(Struct)
36
+ end
30
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assonnato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-11 00:00:00.000000000 Z
11
+ date: 2014-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json