zooqle_search 1.0.0 → 1.0.1

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: 19790b27b7e8a2e8848948973271407c26e3c6c7
4
- data.tar.gz: c83033c654abfbd7896ee46ea1d680bceebd51df
3
+ metadata.gz: 6e2d98d960ba966bd24197a1c9f5d69db7f8b122
4
+ data.tar.gz: 14ec7f2a33deb973e290f3c7dcfc66159da40cc2
5
5
  SHA512:
6
- metadata.gz: c4aa7b076c3823dcb0eb9ae1294fc2cd8fc701d7ea3bef4362f18e405f2bc0317990d7f6d75842955c7ddd8d9ca803ba8856c489d6d212a8e3f137b3b07b2681
7
- data.tar.gz: 44fe3eccc736ebf617061429de74e5a9984fcba1c48a2c2e2568b06a3562e96704a5f3f54eaf1e238d5e738f6640994702c8086ddd724bfe643ce5ff92144dfb
6
+ metadata.gz: 6a307f593a3ed1dd09ad3257328701725159909c1b036e3e123f3539ff02155f49515d3a3a115b94d9e2e5061ead4950bedc64dd4bddb732f364a6cd00b0eef7
7
+ data.tar.gz: 110572c97211504c35d26d284d9baeeee6fd26bb1b3675a6b5995c454933aa83d1de7cca390f6efcb34fb22fc9d1ae7970b8ae94cbb970aa75a7738eb4d605fa
@@ -10,7 +10,7 @@ FactoryGirl.find_definitions
10
10
  # You can add fixtures and/or initialization code here to make experimenting
11
11
  # with your gem easier. You can also use a different console, if you like.
12
12
  # link = build :link
13
- search = build :search, search: 'suits s06e05'
13
+ search = build :search, search: 'silicon valley s03e08'
14
14
 
15
15
  # (If you use this, don't forget to add pry to your Gemfile!)
16
16
  require 'pry'
@@ -29,6 +29,8 @@ module ZooqleSearch
29
29
  end
30
30
 
31
31
  def download(path = './')
32
+ raise 'No download url provided' unless @download_url
33
+
32
34
  response = HTTParty.get(@download_url)
33
35
 
34
36
  raise 'Wrong content-type. Aborting.' unless response.headers['content-type'].include? 'application/x-bittorrent'
@@ -47,7 +47,7 @@ module ZooqleSearch
47
47
 
48
48
  size = link.at('.progress-bar').text
49
49
  magnet = link.at('a[title="Magnet link"]')['href']
50
- download_url = BASE_URL + link.at('a[title="Generate .torrent"]')['href']
50
+ download_url = BASE_URL + link.at('a[title="Generate .torrent"]')['href'] if link.at('a[title="Generate .torrent"]')
51
51
 
52
52
  seeders_leechers = seeders_leechers['title']
53
53
  seeders = seeders_leechers[/Seeders: (?<seeders>[\d,]+) \| Leechers: (?<leechers>[\d,]+)/, :seeders]
@@ -1,3 +1,3 @@
1
1
  module ZooqleSearch
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zooqle_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Marchante
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri