aranha-rails 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aranha/rails/fixtures_download.rb +3 -3
- data/lib/aranha/rails/manager.rb +7 -0
- data/lib/aranha/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 223ccb25f6cb914fe5342b32936934560f6020a9d3fbb16d649bfa2f96ce7459
|
4
|
+
data.tar.gz: bc4a7ef62b9a13a53f00fb81f1613173f9b20050d37367bfa112cfbd467d06a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 464d6ad5cbeba036d0db9835fe2fb06ad38ec4338a2cc6ced2bf0157cddce35c38f6a073fb74eab90ab94e05593a80d2e3cf8496f61ed150ca43a7a29d264597
|
7
|
+
data.tar.gz: 303773ff9b8abf14431ccdb13eb070799834f8d8d8b3e78e4e4523959afdd29b69b39da823581bf7e0fb7afab611c56cfe39a59eea230fcd4b19a64779b95e40
|
@@ -18,7 +18,7 @@ module Aranha
|
|
18
18
|
|
19
19
|
def run
|
20
20
|
url_files.each do |f|
|
21
|
-
Rails.logger.info(relative_path(f))
|
21
|
+
::Rails.logger.info(relative_path(f))
|
22
22
|
download(url(f), target(f)) if @download
|
23
23
|
end
|
24
24
|
end
|
@@ -40,11 +40,11 @@ module Aranha
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def fixtures_root
|
43
|
-
Rails.root.to_s
|
43
|
+
::Rails.root.to_s
|
44
44
|
end
|
45
45
|
|
46
46
|
def download(url, target)
|
47
|
-
Rails.logger.info "Baixando \"#{url}\"..."
|
47
|
+
::Rails.logger.info "Baixando \"#{url}\"..."
|
48
48
|
content = ::Aranha::Parsers::Base.new(url).content
|
49
49
|
raise "Content is blank for \"#{url}\"" if content.blank?
|
50
50
|
|
data/lib/aranha/rails/manager.rb
CHANGED
@@ -33,6 +33,13 @@ module Aranha
|
|
33
33
|
::Rails.logger.warn(message)
|
34
34
|
end
|
35
35
|
|
36
|
+
def start_points_to_addresses
|
37
|
+
super
|
38
|
+
::Aranha::StartPoint.all.each do |sp|
|
39
|
+
add_address(sp.uri, sp.processor_class, sp.extra_data)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
36
43
|
def unprocessed_addresses
|
37
44
|
::Aranha::Address.unprocessed
|
38
45
|
end
|
data/lib/aranha/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aranha-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_scaffold
|