metrocot 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/.gemtest +0 -0
  2. data/History.txt +5 -0
  3. data/README.txt +2 -2
  4. data/Rakefile +7 -7
  5. data/lib/metrocot.rb +7 -4
  6. metadata +38 -14
data/.gemtest ADDED
File without changes
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 1.0.3 / 2011-02-16
2
+
3
+ * make work with recent hpricot (node.children can now return nil) as
4
+ well as hoe 2
5
+
1
6
  === 1.0.2 / 2009-01-08
2
7
 
3
8
  * added docs and examples
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  = metrocot
2
2
 
3
- * http://www.metrocascade.com/mdn/opensource/metrocot (url)
3
+ * http://metrocot.rubygems.org/index.html
4
4
 
5
5
  == DESCRIPTION:
6
6
 
@@ -60,7 +60,7 @@ done in a very compact readable format.
60
60
 
61
61
  == INSTALL:
62
62
 
63
- * sudo gem install metricot
63
+ * sudo gem install metrocot
64
64
 
65
65
  == LICENSE:
66
66
 
data/Rakefile CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rubygems'
4
3
  require 'hoe'
5
- require './lib/metrocot.rb'
6
4
 
7
- Hoe.new('metrocot', Metrocot::VERSION) do |p|
8
- p.rubyforge_name = 'metrocot'
9
- p.developer('Helmut Hissen', 'helmut@zeebar.com')
10
- p.summary = "An Hpricot based tool for harvesting list-like data from HTML pages."
11
- p.remote_rdoc_dir = '' # Release to root
5
+ Hoe.plugin :gemcutter
6
+
7
+ Hoe.spec 'metrocot' do
8
+ self.rubyforge_name = 'metrocot'
9
+ developer('Helmut Hissen', 'helmut@zeebar.com')
10
+ summary = "An Hpricot based tool for harvesting list-like data from HTML pages."
11
+ remote_rdoc_dir = '' # Release to root
12
12
  end
13
13
 
14
14
 
data/lib/metrocot.rb CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
  class Metrocot < Object
66
66
 
67
- VERSION = '1.0.2'
67
+ VERSION = '1.0.3'
68
68
 
69
69
 
70
70
  # represents a subtree withing a metrocot dom. the semantics are roughly equivalent
@@ -918,9 +918,12 @@ class Metrocot < Object
918
918
  @hnode_index[node] = ix
919
919
  ix += 1
920
920
  if node.elem?
921
- node.children.each { |child|
922
- ix = flatten_hnodes(ix, child)
923
- }
921
+ children = node.children
922
+ unless children.nil?
923
+ children.each { |child|
924
+ ix = flatten_hnodes(ix, child)
925
+ }
926
+ end
924
927
  end
925
928
  @hnode_succ_index[node] = ix
926
929
  ix
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metrocot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 3
10
+ version: 1.0.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Helmut Hissen
@@ -9,20 +15,29 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-01-08 00:00:00 -08:00
18
+ date: 2011-02-21 00:00:00 -08:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: hoe
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
23
- version: 1.8.2
24
- version:
25
- description: Metrocot builds on Hpricot to allow scraping of list data from HTML pages with a minimum of code and page specific information. The specification is done in a very compact readable format.
29
+ hash: 41
30
+ segments:
31
+ - 2
32
+ - 9
33
+ - 1
34
+ version: 2.9.1
35
+ type: :development
36
+ version_requirements: *id001
37
+ description: |-
38
+ Metrocot builds on Hpricot to allow scraping of list data from HTML pages
39
+ with a minimum of code and page specific information. The specification is
40
+ done in a very compact readable format.
26
41
  email:
27
42
  - helmut@zeebar.com
28
43
  executables:
@@ -41,8 +56,11 @@ files:
41
56
  - bin/metrocot
42
57
  - lib/metrocot.rb
43
58
  - test/test_metrocot.rb
59
+ - .gemtest
44
60
  has_rdoc: true
45
- homepage: http://www.metrocascade.com/mdn/opensource/metrocot (url)
61
+ homepage: http://metrocot.rubygems.org/index.html
62
+ licenses: []
63
+
46
64
  post_install_message:
47
65
  rdoc_options:
48
66
  - --main
@@ -50,23 +68,29 @@ rdoc_options:
50
68
  require_paths:
51
69
  - lib
52
70
  required_ruby_version: !ruby/object:Gem::Requirement
71
+ none: false
53
72
  requirements:
54
73
  - - ">="
55
74
  - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
56
78
  version: "0"
57
- version:
58
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
+ none: false
59
81
  requirements:
60
82
  - - ">="
61
83
  - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
62
87
  version: "0"
63
- version:
64
88
  requirements: []
65
89
 
66
90
  rubyforge_project: metrocot
67
- rubygems_version: 1.2.0
91
+ rubygems_version: 1.5.2
68
92
  signing_key:
69
- specification_version: 2
70
- summary: An Hpricot based tool for harvesting list-like data from HTML pages.
93
+ specification_version: 3
94
+ summary: Metrocot builds on Hpricot to allow scraping of list data from HTML pages with a minimum of code and page specific information
71
95
  test_files:
72
96
  - test/test_metrocot.rb