rarbg 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: 97d8036d6683ad8f531bfbdce8a3b84ae80cc48d
4
- data.tar.gz: 9934b0ac6016d6b8cb9d8b4f62ad674f611603d8
3
+ metadata.gz: a91ed44e5ad44e77bc5bd06fe75f9ef2d746cef0
4
+ data.tar.gz: 5b20b46f1dd9c91f13d1a5446fda6c0d7644832f
5
5
  SHA512:
6
- metadata.gz: b8659a8ac02af06b417eabed6e871eea5c2e16dac2c9fdf71f2ea653a17832845c16f722f479f4eb4d8551e6da397dbd83bdedbc22ba3024feefc1b7e69335dd
7
- data.tar.gz: b19db1e895fd7cc59ff7ba5104062b63aef09bb89f6ad9d62d492495ea8023f8a10bdecb747e7f0b793715dd25df3c4276e3ef2d72c063531cc22cdc777e8373
6
+ metadata.gz: 56b316e40fc95f82e58965cbdc0e647da001d7b64b94d474884bb9f47cf8f7a06ef3f8623c00c2464d43e4a3d028b617d55ad99ff75d7802b8fdd2f49541368e
7
+ data.tar.gz: 10dbe3daef729954e12e7d56321af8029ac1b5b64a68d5e4f9244f32bd868da8d5c135839b8c54494a7a0d065753fb195be7bc4e9fd7b55d651990620136f4ef
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## 1.0.1 - 2018-05-04
8
+ [Release](https://github.com/epistrephein/rarbg/releases/tag/v1.0.1) |
9
+ [Diff](https://github.com/epistrephein/rarbg/compare/v1.0.0...v1.0.1)
10
+
11
+ #### Added
12
+ - Faraday now logs requests to stdout if in verbose mode (`-w` or `-v`).
13
+
14
+ #### Fixed
15
+ - Fixed code styling and some documentation errors.
16
+ - Fixed IMDb id autocorrect in `search`.
17
+
18
+
7
19
  ## 1.0.0 – 2018-04-02
8
20
  [Release](https://github.com/epistrephein/rarbg/releases/tag/v1.0.0) |
9
21
  [Diff](https://github.com/epistrephein/rarbg/compare/v0.1.4...v1.0.0)
@@ -29,7 +41,7 @@ search type must be specified as a keyword argument upon `search`.
29
41
  [Diff](https://github.com/epistrephein/rarbg/compare/v0.1.3...v0.1.4)
30
42
 
31
43
  #### Fixed
32
- - Set Faraday middleware before adapter to suppress warning
44
+ - Set Faraday middleware before adapter to suppress warning.
33
45
 
34
46
 
35
47
  ## 0.1.3 – 2016-12-23
@@ -37,7 +49,7 @@ search type must be specified as a keyword argument upon `search`.
37
49
  [Diff](https://github.com/epistrephein/rarbg/compare/v0.1.2...v0.1.3)
38
50
 
39
51
  #### Changed
40
- - Move `app_id` and `token` params to `call` method to prevent override
52
+ - Move `app_id` and `token` params to `call` method to prevent override.
41
53
 
42
54
 
43
55
  ## 0.1.2 – 2016-12-21
@@ -45,7 +57,7 @@ search type must be specified as a keyword argument upon `search`.
45
57
  [Diff](https://github.com/epistrephein/rarbg/compare/v0.1.1...v0.1.2)
46
58
 
47
59
  #### Changed
48
- - Sleep for 2 seconds after `get_token` to avoid request limit error
60
+ - Sleep for 2 seconds after `get_token` to avoid request limit error.
49
61
 
50
62
 
51
63
  ## 0.1.1 – 2016-12-21
@@ -58,4 +70,4 @@ search type must be specified as a keyword argument upon `search`.
58
70
 
59
71
  ## 0.1.0 – 2016-12-21
60
72
 
61
- Yanked
73
+ Initial release. Yanked from [rubygems](https://rubygems.org).
data/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # RARBG
2
- [![Gem Version](https://img.shields.io/gem/v/rarbg.svg?colorB=brightgreen&style=flat-square)](https://rubygems.org/gems/rarbg)
3
- [![Build status](https://img.shields.io/travis/epistrephein/rarbg/master.svg?style=flat-square)](https://travis-ci.org/epistrephein/rarbg)
4
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/epistrephein/rarbg.svg?style=flat-square)](https://codeclimate.com/github/epistrephein/rarbg)
5
- [![Coverage](https://img.shields.io/codeclimate/c/epistrephein/rarbg.svg?style=flat-square)](https://codeclimate.com/github/epistrephein/rarbg)
6
- [![Dependency Status](https://img.shields.io/gemnasium/epistrephein/rarbg.svg?style=flat-square)](https://gemnasium.com/epistrephein/rarbg)
7
- [![Inline docs](http://inch-ci.org/github/epistrephein/rarbg.svg?branch=master&style=flat-square)](http://inch-ci.org/github/epistrephein/rarbg)
2
+ [![Gem Version](https://img.shields.io/gem/v/rarbg.svg?colorB=brightgreen)](https://rubygems.org/gems/rarbg)
3
+ [![Build status](https://travis-ci.org/epistrephein/rarbg.svg?branch=master)](https://travis-ci.org/epistrephein/rarbg)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/maintainability)](https://codeclimate.com/github/epistrephein/rarbg/maintainability)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/adf6a91b754bb4aaacf2/test_coverage)](https://codeclimate.com/github/epistrephein/rarbg/test_coverage)
6
+ [![Dependency Status](https://gemnasium.com/badges/github.com/epistrephein/rarbg.svg)](https://gemnasium.com/epistrephein/rarbg)
7
+ [![Security](https://hakiri.io/github/epistrephein/rarbg/master.svg)](https://hakiri.io/github/epistrephein/rarbg/master)
8
+ [![Inline docs](http://inch-ci.org/github/epistrephein/rarbg.svg?branch=master)](http://inch-ci.org/github/epistrephein/rarbg)
8
9
 
9
10
  Ruby wrapper for RARBG Torrent API.
10
11
 
@@ -22,7 +23,7 @@ Or add it to your Gemfile and execute `bundle install`
22
23
  gem 'rarbg', '~> 1.0'
23
24
  ```
24
25
 
25
- ## Usage [![Documentation](https://img.shields.io/badge/docs-yard-blue.svg?style=flat-square)](http://www.rubydoc.info/gems/rarbg)
26
+ ## Usage [![Documentation](https://img.shields.io/badge/docs-yard-blue.svg)](http://www.rubydoc.info/github/epistrephein/rarbg)
26
27
 
27
28
  This gem wraps all API methods available from [RARBG TorrentAPI](https://torrentapi.org/apidocs_v2.txt).
28
29
 
@@ -49,8 +50,8 @@ All successful method calls return an array of hashes.
49
50
  # List last 100 torrents.
50
51
  rarbg.list(limit: 100)
51
52
 
52
- # List all torrents with at least 20 seeders, sorted by seeders.
53
- rarbg.list(min_seeders: 100, sort: :seeders)
53
+ # List torrents with at least 20 seeders, sorted by seeders.
54
+ rarbg.list(min_seeders: 20, sort: :seeders)
54
55
 
55
56
  # List torrents with extended json infos.
56
57
  rarbg.list(format: :json_extended)
@@ -96,7 +97,7 @@ rarbg.search(limit: 50)
96
97
  # => ArgumentError: At least one parameter required among string, imdb, tvdb, themoviedb for search mode.
97
98
  ```
98
99
 
99
- ## Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)](http://makeapullrequest.com)
100
+ ## Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](http://makeapullrequest.com)
100
101
 
101
102
  Bug reports and pull requests are welcome on [GitHub](https://github.com/epistrephein/rarbg).
102
103
 
@@ -112,5 +113,5 @@ You can contribute changes by forking the project and submitting a pull request.
112
113
  6. Push to the branch (`git push origin my-new-feature`)
113
114
  7. Create a new pull request
114
115
 
115
- ## License [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
116
+ ## License [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
116
117
  This gem is released as open source under the terms of the [MIT License](LICENSE).
@@ -39,6 +39,7 @@ module RARBG
39
39
  @conn = Faraday.new(url: API_ENDPOINT) do |conn|
40
40
  conn.request :json
41
41
  conn.response :json
42
+ conn.response :logger if $VERBOSE
42
43
  conn.adapter Faraday.default_adapter
43
44
 
44
45
  conn.options.timeout = 90
@@ -74,7 +75,7 @@ module RARBG
74
75
  # rarbg = RARBG::API.new
75
76
  # rarbg.list(limit: 100, ranked: true, category: [44])
76
77
  #
77
- # @example List all torrent with minimum 50 seeders
78
+ # @example List torrents with at least 50 seeders
78
79
  # rarbg = RARBG::API.new
79
80
  # rarbg.list(min_seeders: 50)
80
81
  def list(params = {})
@@ -179,9 +180,9 @@ module RARBG
179
180
  # Convert ruby sugar to expected value style.
180
181
  def normalize
181
182
  {
182
- 'category' => (->(v) { v.join(';') }),
183
- 'imdb' => (->(v) { v.to_s[/^tt/] ? v.to_s : "tt#{v}" }),
184
- 'ranked' => (->(v) { v == false ? 0 : 1 })
183
+ 'category' => (->(v) { v.join(';') }),
184
+ 'ranked' => (->(v) { v == false ? 0 : 1 }),
185
+ 'search_imdb' => (->(v) { v.to_s[/^tt/] ? v.to_s : "tt#{v}" })
185
186
  }
186
187
  end
187
188
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RARBG
4
4
  # Gem version
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.metadata = {
25
25
  'bug_tracker_uri' => 'https://github.com/epistrephein/rarbg/issues',
26
26
  'changelog_uri' => 'https://github.com/epistrephein/rarbg/blob/master/CHANGELOG.md',
27
- 'documentation_uri' => 'http://www.rubydoc.info/gems/rarbg',
27
+ 'documentation_uri' => "http://www.rubydoc.info/gems/rarbg/#{RARBG::VERSION}",
28
28
  'homepage_uri' => 'https://github.com/epistrephein/rarbg',
29
29
  'source_code_uri' => 'https://github.com/epistrephein/rarbg'
30
30
  }
@@ -34,7 +34,7 @@ RSpec.describe RARBG::API do
34
34
  end
35
35
 
36
36
  it 'returns hashes with filename and download link' do
37
- expect(@rarbg.list).to all(include('filename').and include('download'))
37
+ expect(@rarbg.list).to all include('filename').and include('download')
38
38
  end
39
39
  end
40
40
 
@@ -35,7 +35,7 @@ RSpec.describe RARBG::API do
35
35
 
36
36
  it 'returns hashes with filename and download link' do
37
37
  expect(@rarbg.search(imdb: 'tt0000000'))
38
- .to all(include('filename').and include('download'))
38
+ .to all include('filename').and include('download')
39
39
  end
40
40
  end
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rarbg
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
  - Tommaso Barbato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-02 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -171,7 +171,7 @@ licenses:
171
171
  metadata:
172
172
  bug_tracker_uri: https://github.com/epistrephein/rarbg/issues
173
173
  changelog_uri: https://github.com/epistrephein/rarbg/blob/master/CHANGELOG.md
174
- documentation_uri: http://www.rubydoc.info/gems/rarbg
174
+ documentation_uri: http://www.rubydoc.info/gems/rarbg/1.0.1
175
175
  homepage_uri: https://github.com/epistrephein/rarbg
176
176
  source_code_uri: https://github.com/epistrephein/rarbg
177
177
  post_install_message: