rarbg 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RARBG
4
- # RARBG categories
4
+ # RARBG categories mapping.
5
5
  CATEGORIES = {
6
6
  'Movies/XVID' => 14,
7
7
  'Movies/XVID/720' => 48,
@@ -25,6 +25,6 @@ module RARBG
25
25
  'Games/PS4' => 53,
26
26
  'Games/XBOX-360' => 32,
27
27
  'Software/PC ISO' => 33,
28
- 'XXX' => 4
28
+ 'XXX' => 4
29
29
  }.freeze
30
30
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RARBG
4
- # Gem version
5
- VERSION = '1.1.1'
4
+ # Gem version.
5
+ VERSION = '1.2.0'
6
6
  end
@@ -10,13 +10,13 @@ Gem::Specification.new do |spec|
10
10
  spec.author = 'Tommaso Barbato'
11
11
  spec.email = 'epistrephein@gmail.com'
12
12
 
13
- spec.summary = 'RARBG Ruby client.'
13
+ spec.summary = 'RARBG API Ruby client.'
14
14
  spec.description = 'Ruby wrapper for the RARBG Torrent API.'
15
15
  spec.homepage = 'https://github.com/epistrephein/rarbg'
16
16
  spec.license = 'MIT'
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
- f.match(%r{^(test|spec|features)/})
19
+ f.match(%r{^(spec|docs)/})
20
20
  end
21
21
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
22
  spec.require_path = 'lib'
@@ -31,14 +31,15 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.required_ruby_version = '>= 2.0'
33
33
 
34
- spec.add_runtime_dependency 'faraday', '~> 0.10'
35
- spec.add_runtime_dependency 'faraday_middleware', '~> 0.10'
34
+ spec.add_runtime_dependency 'faraday', '~> 0.12'
35
+ spec.add_runtime_dependency 'faraday_middleware', '~> 0.12'
36
36
 
37
- spec.add_development_dependency 'bundler', '~> 1.16'
38
- spec.add_development_dependency 'pry', '~> 0'
37
+ spec.add_development_dependency 'bundler', '~> 1.15'
38
+ spec.add_development_dependency 'pry', '~> 0.10'
39
39
  spec.add_development_dependency 'rake', '~> 12.0'
40
- spec.add_development_dependency 'rspec', '~> 3.0'
41
- spec.add_development_dependency 'simplecov', '~> 0'
42
- spec.add_development_dependency 'webmock', '~> 3.4'
40
+ spec.add_development_dependency 'rspec', '~> 3.6'
41
+ spec.add_development_dependency 'rubocop', '~> 0.59'
42
+ spec.add_development_dependency 'simplecov', '~> 0.13'
43
+ spec.add_development_dependency 'webmock', '~> 3.0'
43
44
  spec.add_development_dependency 'yard', '~> 0.9'
44
45
  end
@@ -7,7 +7,7 @@ RSpec.describe RARBG::API do
7
7
  end
8
8
 
9
9
  context 'when token request succeeds' do
10
- before(:context) do
10
+ before(:each) do
11
11
  stub_token(@token)
12
12
  stub_list(@token)
13
13
  @rarbg.list
@@ -23,7 +23,13 @@ RSpec.configure do |config|
23
23
  # Enable temporarily focused examples and groups
24
24
  config.filter_run_when_matching :focus
25
25
 
26
+ # Use expect syntax
26
27
  config.expect_with :rspec do |c|
27
28
  c.syntax = :expect
28
29
  end
30
+
31
+ # Stub RATE_LIMIT to speed up tests
32
+ config.before(:example) do
33
+ stub_const('RARBG::API::RATE_LIMIT', 0.1)
34
+ end
29
35
  end
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.1.1
4
+ version: 1.2.0
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-10-19 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: '0.12'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.10'
26
+ version: '0.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday_middleware
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.10'
33
+ version: '0.12'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.10'
40
+ version: '0.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '1.15'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.16'
54
+ version: '1.15'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.10'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.10'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,42 +86,56 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '3.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '3.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.59'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.59'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: simplecov
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0'
117
+ version: '0.13'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0'
124
+ version: '0.13'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: webmock
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '3.4'
131
+ version: '3.0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '3.4'
138
+ version: '3.0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: yard
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -143,39 +157,24 @@ extensions: []
143
157
  extra_rdoc_files: []
144
158
  files:
145
159
  - ".editorconfig"
146
- - ".github/ISSUE_TEMPLATE.md"
160
+ - ".github/CODEOWNERS"
161
+ - ".github/ISSUE_TEMPLATE/BUG_REPORT.md"
162
+ - ".github/ISSUE_TEMPLATE/FEATURE_REQUEST.md"
163
+ - ".github/PULL_REQUEST_TEMPLATE.md"
147
164
  - ".gitignore"
148
165
  - ".rspec"
166
+ - ".rubocop.yml"
149
167
  - ".travis.yml"
150
168
  - ".yardopts"
151
169
  - CHANGELOG.md
152
170
  - CODE_OF_CONDUCT.md
171
+ - CONTRIBUTING.md
153
172
  - Gemfile
154
173
  - LICENSE
155
174
  - README.md
156
175
  - Rakefile
157
176
  - bin/console
158
177
  - bin/setup
159
- - docs/RARBG.html
160
- - docs/RARBG/API.html
161
- - docs/RARBG/APIError.html
162
- - docs/_config.yml
163
- - docs/_index.html
164
- - docs/class_list.html
165
- - docs/css/common.css
166
- - docs/css/full_list.css
167
- - docs/css/style.css
168
- - docs/file.CHANGELOG.html
169
- - docs/file.LICENSE.html
170
- - docs/file.README.html
171
- - docs/file_list.html
172
- - docs/frames.html
173
- - docs/index.html
174
- - docs/js/app.js
175
- - docs/js/full_list.js
176
- - docs/js/jquery.js
177
- - docs/method_list.html
178
- - docs/top-level-namespace.html
179
178
  - lib/rarbg.rb
180
179
  - lib/rarbg/api.rb
181
180
  - lib/rarbg/categories.rb
@@ -211,11 +210,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
210
  - !ruby/object:Gem::Version
212
211
  version: '0'
213
212
  requirements: []
214
- rubyforge_project:
215
- rubygems_version: 2.7.7
213
+ rubygems_version: 3.0.1
216
214
  signing_key:
217
215
  specification_version: 4
218
- summary: RARBG Ruby client.
216
+ summary: RARBG API Ruby client.
219
217
  test_files:
220
218
  - spec/rarbg/list_spec.rb
221
219
  - spec/rarbg/rarbg_spec.rb
@@ -1,195 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: RARBG
8
-
9
- &mdash; Documentation by YARD 0.9.16
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "RARBG";
19
- relpath = '';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="_index.html">Index (R)</a> &raquo;
40
-
41
-
42
- <span class="title">RARBG</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Module: RARBG
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/rarbg.rb<span class="defines">,<br />
82
- lib/rarbg/api.rb,<br /> lib/rarbg/version.rb,<br /> lib/rarbg/categories.rb</span>
83
- </dd>
84
- </dl>
85
-
86
- </div>
87
-
88
- <h2>Overview</h2><div class="docstring">
89
- <div class="discussion">
90
-
91
- <p>Main namespace for RARBG</p>
92
-
93
-
94
- </div>
95
- </div>
96
- <div class="tags">
97
-
98
-
99
- </div><h2>Defined Under Namespace</h2>
100
- <p class="children">
101
-
102
-
103
-
104
-
105
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="RARBG/API.html" title="RARBG::API (class)">API</a></span>, <span class='object_link'><a href="RARBG/APIError.html" title="RARBG::APIError (class)">APIError</a></span>
106
-
107
-
108
- </p>
109
-
110
-
111
- <h2>
112
- Constant Summary
113
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
114
- </h2>
115
-
116
- <dl class="constants">
117
-
118
- <dt id="VERSION-constant" class="">VERSION =
119
- <div class="docstring">
120
- <div class="discussion">
121
-
122
- <p>Gem version</p>
123
-
124
-
125
- </div>
126
- </div>
127
- <div class="tags">
128
-
129
-
130
- </div>
131
- </dt>
132
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1.1.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
133
-
134
- <dt id="CATEGORIES-constant" class="">CATEGORIES =
135
- <div class="docstring">
136
- <div class="discussion">
137
-
138
- <p>RARBG categories</p>
139
-
140
-
141
- </div>
142
- </div>
143
- <div class="tags">
144
-
145
-
146
- </div>
147
- </dt>
148
- <dd><pre class="code"><span class='lbrace'>{</span>
149
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/XVID</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>14</span><span class='comma'>,</span>
150
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/XVID/720</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>48</span><span class='comma'>,</span>
151
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x264</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>17</span><span class='comma'>,</span>
152
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x264/1080</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>44</span><span class='comma'>,</span>
153
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x264/720</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>45</span><span class='comma'>,</span>
154
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x264/3D</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>47</span><span class='comma'>,</span>
155
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x264/4k</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>50</span><span class='comma'>,</span>
156
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x265/4k</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>51</span><span class='comma'>,</span>
157
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/x265/4k/HDR</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>52</span><span class='comma'>,</span>
158
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/Full BD</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>42</span><span class='comma'>,</span>
159
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Movies/BD Remux</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>46</span><span class='comma'>,</span>
160
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TV Episodes</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>18</span><span class='comma'>,</span>
161
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TV HD Episodes</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>41</span><span class='comma'>,</span>
162
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TV UHD Episodes</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>49</span><span class='comma'>,</span>
163
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Music/MP3</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>23</span><span class='comma'>,</span>
164
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Music/FLAC</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>25</span><span class='comma'>,</span>
165
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Games/PC ISO</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>27</span><span class='comma'>,</span>
166
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Games/PC RIP</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>28</span><span class='comma'>,</span>
167
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Games/PS3</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>40</span><span class='comma'>,</span>
168
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Games/PS4</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>53</span><span class='comma'>,</span>
169
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Games/XBOX-360</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>32</span><span class='comma'>,</span>
170
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Software/PC ISO</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>33</span><span class='comma'>,</span>
171
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>XXX</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='int'>4</span>
172
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
173
-
174
- </dl>
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
- </div>
186
-
187
- <div id="footer">
188
- Generated on Fri Oct 19 11:11:03 2018 by
189
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
190
- 0.9.16 (ruby-2.4.5).
191
- </div>
192
-
193
- </div>
194
- </body>
195
- </html>