addic7ed 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ HTTP/1.1 302 Found
2
+ Date: Wed, 18 Dec 2013 23:26:35 GMT
3
+ Server: Apache/2
4
+ X-Powered-By: PHP/5.2.10
5
+ Set-Cookie: PHPSESSID=2f4023b26134fffd2f081058461ab114; path=/
6
+ Expires: Thu, 19 Nov 1981 08:52:00 GMT
7
+ Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
8
+ Pragma: no-cache
9
+ Location: /index.php
10
+ Vary: Accept-Encoding,User-Agent
11
+ Content-Length: 0
12
+ Content-Type: text/html
13
+
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'coveralls'
2
2
  Coveralls.wear!
3
3
 
4
+ require 'webmock/rspec'
5
+ WebMock.disable_net_connect!(allow_localhost: true)
6
+
4
7
  RSpec.configure do |config|
5
8
  # Use color in STDOUT
6
9
  config.color_enabled = true
metadata CHANGED
@@ -1,55 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addic7ed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Baudino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2014-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: webmock
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: nokogiri
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ! '>='
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '0'
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ! '>='
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  description: Ruby script (cli) to fetch subtitles on Addic7ed
@@ -59,23 +73,27 @@ executables:
59
73
  extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
76
+ - LICENSE.md
77
+ - bin/addic7ed
62
78
  - lib/addic7ed.rb
63
79
  - lib/addic7ed/common.rb
64
- - lib/addic7ed/version.rb
80
+ - lib/addic7ed/episode.rb
81
+ - lib/addic7ed/errors.rb
65
82
  - lib/addic7ed/filename.rb
83
+ - lib/addic7ed/parser.rb
66
84
  - lib/addic7ed/subtitle.rb
67
- - lib/addic7ed/errors.rb
68
- - lib/addic7ed/episode.rb
69
- - bin/addic7ed
70
- - Gemfile
71
- - Gemfile.lock
72
- - README.md
73
- - Rakefile
74
- - spec/addic7ed-subtitle_spec.rb
85
+ - lib/addic7ed/version.rb
86
+ - spec/addic7ed-common_spec.rb
75
87
  - spec/addic7ed-episode_spec.rb
76
88
  - spec/addic7ed-filename_spec.rb
89
+ - spec/addic7ed-subtitle_spec.rb
90
+ - spec/responses/walking-dead-3-2-1.http
91
+ - spec/responses/walking-dead-3-2-48.http
92
+ - spec/responses/walking-dead-3-2-7.http
93
+ - spec/responses/walking-dead-3-2-8.http
94
+ - spec/responses/walking-dead-3-4-8.http
95
+ - spec/responses/walking-dead-3-42-8.http
77
96
  - spec/spec_helper.rb
78
- - spec/addic7ed-common_spec.rb
79
97
  homepage: https://github.com/michaelbaudino/addic7ed-ruby
80
98
  licenses:
81
99
  - MIT
@@ -86,22 +104,29 @@ require_paths:
86
104
  - lib
87
105
  required_ruby_version: !ruby/object:Gem::Requirement
88
106
  requirements:
89
- - - ! '>='
107
+ - - ">="
90
108
  - !ruby/object:Gem::Version
91
109
  version: '0'
92
110
  required_rubygems_version: !ruby/object:Gem::Requirement
93
111
  requirements:
94
- - - ! '>='
112
+ - - ">="
95
113
  - !ruby/object:Gem::Version
96
114
  version: '0'
97
115
  requirements: []
98
116
  rubyforge_project:
99
- rubygems_version: 2.1.10
117
+ rubygems_version: 2.2.0
100
118
  signing_key:
101
119
  specification_version: 4
102
120
  summary: Addic7ed auto-downloader
103
121
  test_files:
104
- - spec/addic7ed-subtitle_spec.rb
122
+ - spec/addic7ed-common_spec.rb
105
123
  - spec/addic7ed-episode_spec.rb
106
124
  - spec/addic7ed-filename_spec.rb
107
- - spec/addic7ed-common_spec.rb
125
+ - spec/addic7ed-subtitle_spec.rb
126
+ - spec/responses/walking-dead-3-2-1.http
127
+ - spec/responses/walking-dead-3-2-48.http
128
+ - spec/responses/walking-dead-3-2-7.http
129
+ - spec/responses/walking-dead-3-2-8.http
130
+ - spec/responses/walking-dead-3-4-8.http
131
+ - spec/responses/walking-dead-3-42-8.http
132
+ - spec/spec_helper.rb
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
- # The gem's dependencies will be specified in addic7ed.gemspec
3
- gemspec
4
-
5
- gem 'coveralls', require: false
data/Gemfile.lock DELETED
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- addic7ed (0.1.9)
5
- nokogiri
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- coveralls (0.7.0)
11
- multi_json (~> 1.3)
12
- rest-client
13
- simplecov (>= 0.7)
14
- term-ansicolor
15
- thor
16
- diff-lcs (1.2.4)
17
- mime-types (2.0)
18
- mini_portile (0.5.2)
19
- multi_json (1.8.2)
20
- nokogiri (1.6.0)
21
- mini_portile (~> 0.5.0)
22
- rake (10.1.0)
23
- rest-client (1.6.7)
24
- mime-types (>= 1.16)
25
- rspec (2.14.1)
26
- rspec-core (~> 2.14.0)
27
- rspec-expectations (~> 2.14.0)
28
- rspec-mocks (~> 2.14.0)
29
- rspec-core (2.14.7)
30
- rspec-expectations (2.14.3)
31
- diff-lcs (>= 1.1.3, < 2.0)
32
- rspec-mocks (2.14.4)
33
- simplecov (0.7.1)
34
- multi_json (~> 1.0)
35
- simplecov-html (~> 0.7.1)
36
- simplecov-html (0.7.1)
37
- term-ansicolor (1.2.2)
38
- tins (~> 0.8)
39
- thor (0.18.1)
40
- tins (0.12.0)
41
-
42
- PLATFORMS
43
- ruby
44
-
45
- DEPENDENCIES
46
- addic7ed!
47
- coveralls
48
- rake
49
- rspec
data/README.md DELETED
@@ -1,96 +0,0 @@
1
- # addic7ed-ruby [![Build Status](https://travis-ci.org/michaelbaudino/addic7ed-ruby.png)](https://travis-ci.org/michaelbaudino/addic7ed-ruby) [![Dependency Status](https://gemnasium.com/michaelbaudino/addic7ed-ruby.png)](https://gemnasium.com/michaelbaudino/addic7ed-ruby) [![Code Climate](https://codeclimate.com/github/michaelbaudino/addic7ed-ruby.png)](https://codeclimate.com/github/michaelbaudino/addic7ed-ruby) [![Coverage Status](https://coveralls.io/repos/michaelbaudino/addic7ed-ruby/badge.png?branch=master)](https://coveralls.io/r/michaelbaudino/addic7ed-ruby)
2
-
3
-
4
- Ruby command-line script to fetch subtitles on Addic7ed
5
-
6
- Current version: **0.1.9**
7
-
8
- ### Is it working ?
9
-
10
- Well, it should...
11
-
12
- ### How to use it ?
13
-
14
- 1. Install it:
15
-
16
- ```bash
17
- $ gem install addic7ed
18
- ```
19
- 2. Use it (e.g. to download a French subtitle for a "Californication" episode):
20
-
21
- ```bash
22
- $ addic7ed -l fr /path/to/Californication.S06E07.720p.HDTV.x264-2HD.mkv
23
- ```
24
- 3. Enjoy your show :tv:
25
-
26
- ### Are there any options ?
27
-
28
- Sure
29
-
30
- ```bash
31
- $ addic7ed -h
32
- Usage: addic7ed [options] <file1> [<file2>, <file3>, ...]
33
- -l, --language [LANGUAGE] Language code to look subtitles for (default: French)
34
- -a, --all-subtitles Display all available subtitles
35
- -n, --do-not-download Do not download the subtitle
36
- -f, --force Overwrite existing subtitle
37
- -v, --[no-]verbose Run verbosely
38
- -q, --quiet Run without output (cron-mode)
39
- -d, --debug Debug mode [do not use]
40
- -h, --help Show this message
41
- -L, --list-languages List all available languages
42
- -V, --version Show version number
43
- ```
44
-
45
- ### How to contribute ?
46
-
47
- Feel free to submit a Pull Request, I'd be glad to review/merge it.
48
-
49
- Also, if you like the awesome work done by the Addic7ed team, please consider [donating to them](http://www.addic7ed.com) !
50
-
51
- ### Notes
52
-
53
- Addic7ed restricts the number of subtitle download to 15 per 24h (30 per 24h for registered users, and 55 for VIP users).
54
-
55
- Don't get mad, they have to pay for their servers, you know.
56
-
57
- ### Roadmap
58
-
59
- There's some work remaining:
60
- - Support registered users
61
- - Support directory parsing
62
- - Document code
63
- - Test cli behaviour
64
- - Colorize output
65
- - Write doc for cron usage
66
- - Write doc for iwatch usage
67
-
68
- ### Changelog
69
-
70
- * 0.1.9: Fix the scraper because of a modification on Addic7ed website
71
- * 0.1.8: Added priority to subtitles uploaded by Addic7ed staff
72
- * 0.1.7: Fixed a bug when a subtitle had multiple revisions on Addic7ed.com
73
- * 0.1.6: Enhanced subtitles version string filters (remove heading and trailing dashes)
74
- * 0.1.5: Enhanced subtitles version string filters (remove heading and trailing spaces and dots)
75
- * 0.1.4: Fixed a bug in require paths which made 0.1.3 unusable
76
- * 0.1.3: Fixed bugs with show names containing country code or production year
77
- * 0.1.2: Fixed how the daily download limit reach is detected
78
- * 0.1.1: This is now a _working_ gem
79
- * 0.1.0: This is now a gem
80
- * 0.0.1: Added ability to actually download a subtitle
81
- * 0.0.6: Added choice of the best subtitle to download, amongst all available for an episode
82
- * 0.0.5: Added support for Travis-CI
83
- * 0.0.4: Added retrieving of Addic7ed URL for an episode (including URL for a specific language)
84
- * 0.0.3: Added parsing of command line arguments
85
- * 0.0.2: Added Filename class to analyze filenames and guess showname, season and episode number
86
- * 0.0.1: Initial file structure (Bundler, Rspec, Readme, ...)
87
-
88
- ### License (MIT)
89
-
90
- Copyright (c) 2013 Michael Baudino
91
-
92
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
93
-
94
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
95
-
96
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require 'rspec/core/rake_task'
2
-
3
- RSpec::Core::RakeTask.new(:spec)
4
-
5
- task :default => :spec
6
-
7
- require 'bundler'
8
- Bundler::GemHelper.install_tasks