ero_getter 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  require 'rspec'
4
4
  require 'ero_getter'
5
- require 'fakeweb'
5
+ require 'webmock/rspec'
6
6
 
7
7
  # Requires supporting files with custom matchers and macros, etc,
8
8
  # in ./support/ and its subdirectories.
@@ -13,7 +13,7 @@ RSpec.configure do |config|
13
13
  end
14
14
 
15
15
  def fake(method, url, file)
16
- FakeWeb.register_uri(method, url, :body => File.read(sample_path(file)))
16
+ stub_request(method, url).to_return(:body => File.read(sample_path(file)))
17
17
  end
18
18
 
19
19
  def sample_path(file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ero_getter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-02 00:00:00.000000000 Z
12
+ date: 2012-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -139,29 +139,13 @@ dependencies:
139
139
  - - ! '>='
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: fakeweb
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
142
  description: ero getter
159
143
  email: masaki@hisme.net
160
144
  executables: []
161
145
  extensions: []
162
146
  extra_rdoc_files:
163
147
  - LICENSE.txt
164
- - README.rdoc
148
+ - README.md
165
149
  files:
166
150
  - .document
167
151
  - .rspec
@@ -170,11 +154,12 @@ files:
170
154
  - Gemfile
171
155
  - Guardfile
172
156
  - LICENSE.txt
173
- - README.rdoc
157
+ - README.md
174
158
  - Rakefile
175
159
  - VERSION
176
160
  - ero_getter.gemspec
177
161
  - lib/downloader/gazou_sokuhou.rb
162
+ - lib/downloader/mink_channel.rb
178
163
  - lib/downloader/nijigazou_sokuhou.rb
179
164
  - lib/downloader/pm_style.rb
180
165
  - lib/downloader/wakuteka_sokuhou.rb
@@ -182,12 +167,14 @@ files:
182
167
  - lib/ero_getter/base.rb
183
168
  - lib/ero_getter/utils.rb
184
169
  - spec/downloader/gazou_sokuhou_spec.rb
170
+ - spec/downloader/mink_channel_spec.rb
185
171
  - spec/downloader/nijigazou_sokuhou_spec.rb
186
172
  - spec/downloader/pm_style_spec.rb
187
173
  - spec/downloader/wakuteka_sokuhou_spec.rb
188
174
  - spec/ero_getter/base_spec.rb
189
175
  - spec/ero_getter_spec.rb
190
176
  - spec/samples/gazou_sokuhou/sample.html
177
+ - spec/samples/mink_channel/sample.html
191
178
  - spec/samples/nijigazou_sokuhou/first.html
192
179
  - spec/samples/nijigazou_sokuhou/global_last.html
193
180
  - spec/samples/nijigazou_sokuhou/last.html
@@ -211,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
198
  version: '0'
212
199
  segments:
213
200
  - 0
214
- hash: 2588041468797638508
201
+ hash: 3376061946197028478
215
202
  required_rubygems_version: !ruby/object:Gem::Requirement
216
203
  none: false
217
204
  requirements:
data/README.rdoc DELETED
@@ -1,63 +0,0 @@
1
- = ero_getter
2
-
3
- ero_getter is downloader for ero gazou.
4
-
5
- == usage
6
- EroGetter.download(url)
7
-
8
- automaticaly download in $HOME/ero_getter/#{site}/#{sub_directory}/
9
-
10
- == support other sites
11
-
12
- add lib/downloader/#{site_name}.rb
13
-
14
- class #{SiteName} < EroGetter::Base
15
- name 'Site Name'
16
- url %r{http://example.com/archives/(\d+).html}
17
- target "a > img" do |path| # use css selector
18
- path.parent[:href] =~ /jpe?g|gif|png/ # filter like Array.select
19
- end
20
- sub_directory do
21
- url.match(/(\d+)\.html/)[1]
22
- end
23
- filename {|attr| "%04d%s" % [attr[:index], attr[:ext]] } # if you want sequencial filename
24
- end
25
-
26
- make directory spec/samples/#{site_name}
27
- and download sample of html source in spec/sample/#{site_name}/sample.html
28
-
29
- add spec/downloader#{site_name}_spec.rb
30
-
31
- require 'spec_helper'
32
- describe #{SiteName} do
33
- subject { @dl }
34
- let(:url) { 'http://example.com/archives/01010101.html' }
35
- before do
36
- EroGetter.stub(:mkdir)
37
- @dl = #{SiteName}.new(url)
38
- fake(:get, url, '#{site_name}/sample.html')
39
- end
40
- its(:sub_directory) { should == '01010101' }
41
- its("targets.count") { should == #{numbers of image} }
42
- end
43
-
44
- then pull request!
45
-
46
- == see also
47
- http://github.com/masarakki/ero_getter_server
48
-
49
- == Contributing to ero_getter
50
-
51
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
52
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
53
- * Fork the project.
54
- * Start a feature/bugfix branch.
55
- * Commit and push until you are happy with your contribution.
56
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
57
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
58
-
59
- == Copyright
60
-
61
- Copyright (c) 2012 masarakki. See LICENSE.txt for
62
- further details.
63
-