rarbg 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +16 -4
- data/README.md +12 -11
- data/lib/rarbg/api.rb +5 -4
- data/lib/rarbg/version.rb +1 -1
- data/rarbg.gemspec +1 -1
- data/spec/rarbg/list_spec.rb +1 -1
- data/spec/rarbg/search_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a91ed44e5ad44e77bc5bd06fe75f9ef2d746cef0
|
|
4
|
+
data.tar.gz: 5b20b46f1dd9c91f13d1a5446fda6c0d7644832f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56b316e40fc95f82e58965cbdc0e647da001d7b64b94d474884bb9f47cf8f7a06ef3f8623c00c2464d43e4a3d028b617d55ad99ff75d7802b8fdd2f49541368e
|
|
7
|
+
data.tar.gz: 10dbe3daef729954e12e7d56321af8029ac1b5b64a68d5e4f9244f32bd868da8d5c135839b8c54494a7a0d065753fb195be7bc4e9fd7b55d651990620136f4ef
|
data/CHANGELOG.md
CHANGED
|
@@ -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
|
-
[](https://rubygems.org/gems/rarbg)
|
|
3
|
+
[](https://travis-ci.org/epistrephein/rarbg)
|
|
4
|
+
[](https://codeclimate.com/github/epistrephein/rarbg/maintainability)
|
|
5
|
+
[](https://codeclimate.com/github/epistrephein/rarbg/test_coverage)
|
|
6
|
+
[](https://gemnasium.com/epistrephein/rarbg)
|
|
7
|
+
[](https://hakiri.io/github/epistrephein/rarbg/master)
|
|
8
|
+
[](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 [](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
|
|
53
|
-
rarbg.list(min_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 [](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)
|
|
116
117
|
This gem is released as open source under the terms of the [MIT License](LICENSE).
|
data/lib/rarbg/api.rb
CHANGED
|
@@ -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
|
|
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'
|
|
183
|
-
'
|
|
184
|
-
'
|
|
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
|
|
data/lib/rarbg/version.rb
CHANGED
data/rarbg.gemspec
CHANGED
|
@@ -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' =>
|
|
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
|
}
|
data/spec/rarbg/list_spec.rb
CHANGED
|
@@ -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
|
|
37
|
+
expect(@rarbg.list).to all include('filename').and include('download')
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
data/spec/rarbg/search_spec.rb
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
|
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:
|