aranha-rails 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea03bcdec3dd45159d259277c82e9caa7d6aa8469499abfff9567101a7d23e6f
4
- data.tar.gz: e25011f06e74adc37e3192e6a5fa80e849430b4b8dd0ebc7ddb0e1af3cc7ff98
3
+ metadata.gz: 223ccb25f6cb914fe5342b32936934560f6020a9d3fbb16d649bfa2f96ce7459
4
+ data.tar.gz: bc4a7ef62b9a13a53f00fb81f1613173f9b20050d37367bfa112cfbd467d06a5
5
5
  SHA512:
6
- metadata.gz: 458bf075dec14c64b8c63065a81bfde264420940161f7d7475ee84bf1712a86ddb04dc10f45d06d346c0fe9c9963e19d1a756898cd02505c07fe078b017576b4
7
- data.tar.gz: 6be3e41fb8f7abd3cf950bcfd55f9d0c36778c124d34e1cd0e12bd44ef5944864b164299358f176157488842228cf8d98650330718d6fa771cfa1b8b4bf468ed
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
 
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Rails
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
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.1.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-28 00:00:00.000000000 Z
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_scaffold