scrubber-scrubyt 0.4.16 → 0.4.20

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.
data/CHANGELOG CHANGED
@@ -1,5 +1,12 @@
1
1
  = scRUBYt! Changelog
2
2
 
3
+ == 0.4.3
4
+ == 20th April
5
+
6
+ - [NEW] option to close the firefox window after the scraping is finished (thanks to Mikkel Garcia and Damien Garros)
7
+ - [FIX] scRUBYt! now works with latest version of mechanize (thanks to nesquena, austinmoore and Leandro Nunes)
8
+
9
+
3
10
  == 0.4.05
4
11
  == 20th October
5
12
 
data/README CHANGED
@@ -118,3 +118,4 @@ Copyright (c) 2006 by Peter Szinek (peter@/NO-SPAM/rubyrailways.com)
118
118
  = Copyright
119
119
 
120
120
  This library is distributed under the GPL. Please see the LICENSE file.
121
+
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task "cleanup_readme" => ["rdoc"]
17
17
 
18
18
  gem_spec = Gem::Specification.new do |s|
19
19
  s.name = 'scrubyt'
20
- s.version = '0.4.12'
20
+ s.version = '0.4.20'
21
21
  s.summary = 'A powerful Web-scraping framework built on Mechanize and Hpricot (and FireWatir)'
22
22
  s.description = %{scRUBYt! is an easy to learn and use, yet powerful and effective web scraping framework. It's most interesting part is a Web-scraping DSL built on HPricot and WWW::Mechanize, which allows to navigate to the page of interest, then extract and query data records with a few lines of code. It is hard to describe scRUBYt! in a few sentences - you have to see it for yourself!}
23
23
  # Files containing Test::Unit test cases.
@@ -242,6 +242,10 @@ module Scrubyt
242
242
  sleep(time)
243
243
  @@agent.wait
244
244
  end
245
+
246
+ def self.close_firefox
247
+ @@agent.close
248
+ end
245
249
  end
246
250
  end
247
251
  end
@@ -278,7 +278,7 @@ module Scrubyt
278
278
  loop do
279
279
  @@current_form = FetchAction.get_mechanize_doc.forms[i]
280
280
  return nil if @@current_form == nil
281
- break if @@current_form.form_node.attributes[lookup_attribute_name] == lookup_attribute_value
281
+ break if @@current_form.form_node.attributes[lookup_attribute_name].to_s == lookup_attribute_value
282
282
  i+= 1
283
283
  end
284
284
  end
@@ -83,6 +83,7 @@ module Scrubyt
83
83
 
84
84
  #Once all is set up, evaluate the extractor from the root pattern!
85
85
  root_results = evaluate_extractor
86
+ FetchAction.close_firefox if @mode.is_a?(Hash) && @mode[:close]
86
87
 
87
88
  @result = ScrubytResult.new('root')
88
89
  @result.push(*root_results)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrubber-scrubyt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.16
4
+ version: 0.4.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Szinek