nnmClub_api 0.1.1 → 0.1.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: ace972f2078b5d339710e7b709c4b64892d92d74
4
- data.tar.gz: b6d2c2bbad9c91ceb4cee4240680cb9a7d4ede82
3
+ metadata.gz: 2c6f9b3f6aea0859c2788fb207456e31c55c47fd
4
+ data.tar.gz: 3ac33f004d439412cefbad1caf8360bf50f58ace
5
5
  SHA512:
6
- metadata.gz: 123c3443d0449aca73c3d62887a4cf4a8cf26f61f7bd5c241d1fa38bf1f8d3fe5c0e1806054f9f2aac039990a9d2a9b54ec3dd13d9a0c2dc5a48e06b41acd036
7
- data.tar.gz: 20dae94d1293010ea931c964186593fe7025e7cb6b40f84bac833690c0b5ec708c7255fa90c879feae7e1a30678bb529cbf946ce8b88d12583bc99fe6d425c78
6
+ metadata.gz: 34791c3ecccc2b80dd15077487061733f5dd2d024ff572fafd38d98e1e86d72ba125c774b968d9df7a36deac03488f610e346e6b62c75a9aad87d29d3df97258
7
+ data.tar.gz: fcbc23208435222de5433b0bed3876b98b0050b57ba5c7290dfeb7476c5213a89a38392713c463fc4a96c816fbe7f6bac48b7c7536524a73504a45b288db9bc3
@@ -8,7 +8,7 @@ module NnmClub
8
8
  document = Nokogiri::HTML(open(NnmClub::TorrentURL+torrent_id))
9
9
  postbody = document.css('.postbody').first
10
10
  info = {:content => postbody.to_html( encoding: "UTF-8" ),
11
- :image => postbody.css('var.postImg').first['title']
11
+ :image => postbody.css('var.postImg').empty? ? "nil" : postbody.css('var.postImg').first['title']
12
12
  }
13
13
  return info
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module NnmClubApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -34,7 +34,7 @@ describe "NnmClub" do
34
34
 
35
35
  describe "Torrent" do
36
36
  before {
37
- @torrent_id = "728159"
37
+ @torrent_id = "97600"
38
38
  @torrent = NnmClub::Torrent.find @torrent_id
39
39
  }
40
40
  it "should return @description" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nnmClub_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Baranov Sergey