nikkou 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +12 -1
  3. data/lib/nikkou.rb +2 -1
  4. data/lib/nikkou/version.rb +1 -1
  5. metadata +27 -37
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a1c3a66bc93c0ccbd618f1d894e3b1f191922f4c
4
+ data.tar.gz: b5dc86ce566f3344f5251891f8d504f2f47a3e60
5
+ SHA512:
6
+ metadata.gz: 045237ebcab464c160db27cdaf2ea98beb7af1ca4d4abe85f66504ef6664bb6643640aa4ae975606e09e990ef7ff020c048a595d6bfa94f6cc642e2f4c90dfd4
7
+ data.tar.gz: e7dd5045569e580ed739157803dab76b0ab0e2c6b79c8856dbc3b7f12a2575eec8d2c770551e2286750ef3de13a287dba5580da5dfac6b6a7f570da3eaac6693
data/README.md CHANGED
@@ -2,11 +2,22 @@ Nikkou
2
2
  ======
3
3
  Extract useful data from HTML and XML with ease!
4
4
 
5
+ [<img src="https://secure.travis-ci.org/tombenner/nikkou.png" />](http://travis-ci.org/tombenner/nikkou)
6
+
5
7
  Description
6
8
  -----------
7
9
 
8
10
  Nikkou adds additional methods to Nokogiri to make extracting commonly-used data from HTML and XML easier. It lets you transform HTML into structured data very quickly, and it integrates nicely with [Mechanize](https://github.com/sparklemotion/mechanize).
9
11
 
12
+ Installation
13
+ ------------
14
+
15
+ Add Nikkou to your Gemfile:
16
+
17
+ ```ruby
18
+ gem 'nikkou'
19
+ ```
20
+
10
21
  Method Overview
11
22
  ---------------
12
23
 
@@ -112,7 +123,7 @@ Selects nodes where the specified attribute includes the string.
112
123
 
113
124
  ```ruby
114
125
  # <div data-type="major-news">My Text</div>
115
- doc.attr_equals('data-type', 'news').first.text # "My Text"
126
+ doc.attr_includes('data-type', 'news').first.text # "My Text"
116
127
  ```
117
128
 
118
129
  #### attr_matches(attribute, pattern)
@@ -1,11 +1,12 @@
1
1
  require 'nokogiri'
2
2
  require 'active_support/core_ext'
3
+ require 'pathname'
3
4
  require 'tzinfo'
4
5
 
5
6
  module Nikkou
6
7
  end
7
8
 
8
- directory = Pathname.new(File.dirname(File.absolute_path(__FILE__)))
9
+ directory = Pathname.new(File.dirname(__FILE__))
9
10
  Dir.glob(directory.join('nikkou', '*.rb')) { |file| require file }
10
11
  Dir.glob(directory.join('nikkou', '**/*.rb')) { |file| require file }
11
12
 
@@ -1,3 +1,3 @@
1
1
  module Nikkou
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nikkou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tom Benner
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-02 00:00:00.000000000 Z
11
+ date: 2014-07-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: tzinfo
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: Extract useful data from HTML and XML with ease!
@@ -98,20 +87,20 @@ executables: []
98
87
  extensions: []
99
88
  extra_rdoc_files: []
100
89
  files:
90
+ - MIT-LICENSE
91
+ - README.md
92
+ - Rakefile
93
+ - lib/nikkou.rb
101
94
  - lib/nikkou/drillable.rb
102
95
  - lib/nikkou/findable.rb
103
- - lib/nikkou/mechanize/page.rb
104
96
  - lib/nikkou/mechanize.rb
97
+ - lib/nikkou/mechanize/page.rb
98
+ - lib/nikkou/nokogiri.rb
99
+ - lib/nikkou/nokogiri/xml.rb
105
100
  - lib/nikkou/nokogiri/xml/document.rb
106
101
  - lib/nikkou/nokogiri/xml/node.rb
107
102
  - lib/nikkou/nokogiri/xml/node_set.rb
108
- - lib/nikkou/nokogiri/xml.rb
109
- - lib/nikkou/nokogiri.rb
110
103
  - lib/nikkou/version.rb
111
- - lib/nikkou.rb
112
- - MIT-LICENSE
113
- - Rakefile
114
- - README.md
115
104
  - spec/drillable_spec.rb
116
105
  - spec/files/test.html
117
106
  - spec/findable_spec.rb
@@ -119,28 +108,28 @@ files:
119
108
  - spec/node_spec.rb
120
109
  - spec/spec_helper.rb
121
110
  homepage: https://github.com/tombenner/nikkou
122
- licenses: []
111
+ licenses:
112
+ - MIT
113
+ metadata: {}
123
114
  post_install_message:
124
115
  rdoc_options: []
125
116
  require_paths:
126
117
  - lib
127
118
  required_ruby_version: !ruby/object:Gem::Requirement
128
- none: false
129
119
  requirements:
130
- - - ! '>='
120
+ - - '>='
131
121
  - !ruby/object:Gem::Version
132
122
  version: '0'
133
123
  required_rubygems_version: !ruby/object:Gem::Requirement
134
- none: false
135
124
  requirements:
136
- - - ! '>='
125
+ - - '>='
137
126
  - !ruby/object:Gem::Version
138
127
  version: '0'
139
128
  requirements: []
140
129
  rubyforge_project:
141
- rubygems_version: 1.8.24
130
+ rubygems_version: 2.2.2
142
131
  signing_key:
143
- specification_version: 3
132
+ specification_version: 4
144
133
  summary: Extract useful data from HTML and XML with ease!
145
134
  test_files:
146
135
  - spec/drillable_spec.rb
@@ -149,3 +138,4 @@ test_files:
149
138
  - spec/node_set_spec.rb
150
139
  - spec/node_spec.rb
151
140
  - spec/spec_helper.rb
141
+ has_rdoc: