nikkou 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +78 -0
- data/Rakefile +28 -0
- data/lib/nikkou.rb +16 -0
- data/lib/nikkou/drillable.rb +16 -0
- data/lib/nikkou/findable.rb +7 -0
- data/lib/nikkou/mechanize.rb +4 -0
- data/lib/nikkou/mechanize/page.rb +15 -0
- data/lib/nikkou/nokogiri.rb +4 -0
- data/lib/nikkou/nokogiri/xml.rb +6 -0
- data/lib/nikkou/nokogiri/xml/document.rb +14 -0
- data/lib/nikkou/nokogiri/xml/node.rb +39 -0
- data/lib/nikkou/nokogiri/xml/node_set.rb +48 -0
- data/lib/nikkou/version.rb +3 -0
- data/spec/drillable_spec.rb +45 -0
- data/spec/files/test.html +22 -0
- data/spec/findable_spec.rb +45 -0
- data/spec/node_set_spec.rb +47 -0
- data/spec/node_spec.rb +34 -0
- data/spec/spec_helper.rb +10 -0
- metadata +151 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 Tom Benner
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
Nikkou
|
2
|
+
======
|
3
|
+
description
|
4
|
+
|
5
|
+
Description
|
6
|
+
-----------
|
7
|
+
|
8
|
+
Nikkou...
|
9
|
+
|
10
|
+
### time
|
11
|
+
|
12
|
+
Returns a Time object (in UTC) by automatically parsing the text or specified attribute of the node.
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
# <a href="/p/1">3 hours ago</a>
|
16
|
+
doc.search('a').first.time # 2013-04-16 02:42:34 UTC
|
17
|
+
```
|
18
|
+
|
19
|
+
###### Options
|
20
|
+
|
21
|
+
`attribute` - The attribute to parse:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
# <a href="/p/1" data-published-at="2013-04-16 02:42:34">My link</a>
|
25
|
+
doc.search('a').first.time(attribute: 'data-published-at') # 2013-04-16 02:42:34 UTC
|
26
|
+
```
|
27
|
+
|
28
|
+
`time_zone` - The document's time zone (the time will be converted from that to UTC):
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
# <a href="/p/1">3 hours ago</a>
|
32
|
+
doc.search('a').first.time(time_zone: 'America/New_York') # 2013-04-16 06:42:34 UTC
|
33
|
+
```
|
34
|
+
|
35
|
+
#### url
|
36
|
+
|
37
|
+
Returns an absolute URL; useful for parsing relative hrefs. The document's `uri` needs to be set for Nikkou to know what domain to add to relative hrefs.
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
# <a href="/p/1">My link</a>
|
41
|
+
doc.uri = 'http://mysite.com/mypage'
|
42
|
+
doc.search('a').first.url # http://mysite.com/p/1
|
43
|
+
```
|
44
|
+
|
45
|
+
###### Options
|
46
|
+
|
47
|
+
`attribute` - The attribute to parse:
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
# <a href="/p/1" data-comments-url="/p/1#comments">My Link</a>
|
51
|
+
doc.uri = 'http://mysite.com/mypage'
|
52
|
+
doc.search('a').first.url('data-comments-url') # http://mysite.com/p/1#comments
|
53
|
+
```
|
54
|
+
|
55
|
+
### attr_matches(attribute, pattern)
|
56
|
+
|
57
|
+
Selects nodes with an attribute matching a pattern. The pattern's matches are stored in `Node#matches`.
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
# <span data-tooltip="3 Comments">My Text</span>
|
61
|
+
doc.search('span').attr_matches('data-tooltip', /(\d+) comments/i).first.text # My Text
|
62
|
+
doc.search('span').attr_matches('data-tooltip', /(\d+) comments/i).first.matches # ["3 Comments", "3"]
|
63
|
+
```
|
64
|
+
|
65
|
+
### text_matches(attribute, pattern)
|
66
|
+
|
67
|
+
Selects nodes with text matching a pattern. The pattern's matches are stored in `Node#matches`.
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
# <a href="/p/1">3 Comments</a>
|
71
|
+
doc.search('span').text_matches(/^(\d+) comments$/i).first.attr('href') # "/p/1"
|
72
|
+
doc.search('span').text_matches(/^(\d+) comments$/i).first.matches # ["3 Comments", "3"]
|
73
|
+
```
|
74
|
+
|
75
|
+
License
|
76
|
+
-------
|
77
|
+
|
78
|
+
Nikkou is released under the MIT License. Please see the MIT-LICENSE file for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'Nikkou'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
Bundler::GemHelper.install_tasks
|
24
|
+
|
25
|
+
require 'rspec/core/rake_task'
|
26
|
+
RSpec::Core::RakeTask.new('spec')
|
27
|
+
|
28
|
+
task :default => :spec
|
data/lib/nikkou.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'active_support/core_ext'
|
3
|
+
require 'tzinfo'
|
4
|
+
|
5
|
+
module Nikkou
|
6
|
+
end
|
7
|
+
|
8
|
+
directory = Pathname.new(File.dirname(File.absolute_path(__FILE__)))
|
9
|
+
Dir.glob(directory.join('nikkou', '*.rb')) { |file| require file }
|
10
|
+
Dir.glob(directory.join('nikkou', '**/*.rb')) { |file| require file }
|
11
|
+
|
12
|
+
Nokogiri::XML::Document.send(:include, Nikkou::Nokogiri::XML::Document)
|
13
|
+
Nokogiri::XML::Node.send(:include, Nikkou::Nokogiri::XML::Node)
|
14
|
+
Nokogiri::XML::NodeSet.send(:include, Nikkou::Nokogiri::XML::NodeSet)
|
15
|
+
|
16
|
+
Mechanize::Page.send(:include, Nikkou::Mechanize::Page) if defined?(Mechanize::Page)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Nikkou
|
2
|
+
module Drillable
|
3
|
+
def drill(*methods)
|
4
|
+
value = self
|
5
|
+
methods.each do |method|
|
6
|
+
if method.is_a?(Array)
|
7
|
+
value = value.send(*method)
|
8
|
+
else
|
9
|
+
value = value.send(method)
|
10
|
+
end
|
11
|
+
return nil if value.blank?
|
12
|
+
end
|
13
|
+
value
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Nikkou
|
2
|
+
module Nokogiri
|
3
|
+
module XML
|
4
|
+
module Node
|
5
|
+
include Nikkou::Drillable
|
6
|
+
include Nikkou::Findable
|
7
|
+
|
8
|
+
attr_accessor :matches
|
9
|
+
|
10
|
+
def url(attribute='href')
|
11
|
+
return nil if attr(attribute).nil? || document.nil? || document.uri.nil?
|
12
|
+
href = attr(attribute)
|
13
|
+
return href if href =~ /^https?:\/\//
|
14
|
+
return "http:#{href}" if href.start_with?('//')
|
15
|
+
root_url = "#{document.uri.scheme}://#{document.uri.host}"
|
16
|
+
URI.join(root_url, href).to_s
|
17
|
+
end
|
18
|
+
|
19
|
+
def time(options={})
|
20
|
+
defaults = {
|
21
|
+
attribute: nil,
|
22
|
+
time_zone: 'UTC' # e.g. 'Eastern Time (US & Canada)'
|
23
|
+
}
|
24
|
+
options.reverse_merge!(defaults)
|
25
|
+
time_zone = TZInfo::Timezone.get(options[:time_zone])
|
26
|
+
string = options[:attribute] ? attr(options[:attribute]).to_s : text.to_s
|
27
|
+
if string =~ /(\d+)\s+(seconds?|minutes?|hours?|days?|weeks?|months?)\s+ago/i
|
28
|
+
number = $1.to_i
|
29
|
+
units = $2
|
30
|
+
time = (Time.now.utc - number.send(units))
|
31
|
+
else
|
32
|
+
time = Time.zone.parse(string)
|
33
|
+
end
|
34
|
+
time_zone.local_to_utc(time)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Nikkou
|
2
|
+
module Nokogiri
|
3
|
+
module XML
|
4
|
+
module NodeSet
|
5
|
+
include Nikkou::Drillable
|
6
|
+
include Nikkou::Findable
|
7
|
+
|
8
|
+
def attr_includes(attribute, string)
|
9
|
+
list = select do |node|
|
10
|
+
return false if node.attr(attribute).nil?
|
11
|
+
node.attr(attribute).include?(string)
|
12
|
+
end
|
13
|
+
self.class.new(document, list)
|
14
|
+
end
|
15
|
+
|
16
|
+
def attr_matches(attribute, pattern)
|
17
|
+
list = []
|
18
|
+
each do |node|
|
19
|
+
next if node.attr(attribute).nil?
|
20
|
+
if node.attr(attribute).match(pattern)
|
21
|
+
node.matches = $~.to_a
|
22
|
+
list << node
|
23
|
+
end
|
24
|
+
end
|
25
|
+
self.class.new(document, list)
|
26
|
+
end
|
27
|
+
|
28
|
+
def text_includes(string)
|
29
|
+
list = select do |node|
|
30
|
+
node.text.include?(string)
|
31
|
+
end
|
32
|
+
self.class.new(document, list)
|
33
|
+
end
|
34
|
+
|
35
|
+
def text_matches(pattern)
|
36
|
+
list = []
|
37
|
+
each do |node|
|
38
|
+
if node.text.match(pattern)
|
39
|
+
node.matches = $~.to_a
|
40
|
+
list << node
|
41
|
+
end
|
42
|
+
end
|
43
|
+
self.class.new(document, list)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Nikkou::Drillable do
|
4
|
+
before do
|
5
|
+
assets_directory = File.expand_path(File.join(File.dirname(__FILE__), 'files'))
|
6
|
+
html_file = File.join(assets_directory, 'test.html')
|
7
|
+
@html = Nokogiri::HTML.parse(File.read(html_file))
|
8
|
+
end
|
9
|
+
|
10
|
+
describe Nokogiri::XML::Document do
|
11
|
+
it 'returns nil' do
|
12
|
+
nodes = @html.drill([:search, '.post'], :first, [:search, '.post-non-existent'])
|
13
|
+
nodes.should be_nil
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'returns non-nil' do
|
17
|
+
nodes = @html.drill([:search, '.post'], :first, [:search, '.post-footer'])
|
18
|
+
nodes.should == @html.search('.post').first.search('.post-footer')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe Nokogiri::XML::Node do
|
23
|
+
it 'returns nil' do
|
24
|
+
nodes = @html.search('body').first.drill([:search, '.post'], :first, [:search, '.post-non-existent'])
|
25
|
+
nodes.should be_nil
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'returns non-nil' do
|
29
|
+
nodes = @html.search('body').first.drill([:search, '.post'], :first, [:search, '.post-footer'])
|
30
|
+
nodes.should == @html.search('.post').first.search('.post-footer')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Nokogiri::XML::NodeSet do
|
35
|
+
it 'returns nil' do
|
36
|
+
nodes = @html.search('body').drill([:search, '.post'], :first, [:search, '.post-non-existent'])
|
37
|
+
nodes.should be_nil
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'returns non-nil' do
|
41
|
+
nodes = @html.search('body').drill([:search, '.post'], :first, [:search, '.post-footer'])
|
42
|
+
nodes.should == @html.search('.post').first.search('.post-footer')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Test</title>
|
6
|
+
</head>
|
7
|
+
|
8
|
+
<body>
|
9
|
+
<div class="post">
|
10
|
+
<h3><a class="relative-url" href="/p/1">Post 1</a></h3>
|
11
|
+
<div class="post-body">
|
12
|
+
<a class="absolute-url" href="http://www.absoluteurl.com/">Lorem</a> <a class="external-url" href="http://www.ipsum.com/">ipsum</a> dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
13
|
+
</div>
|
14
|
+
<div class="post-footer">
|
15
|
+
<ul>
|
16
|
+
<li><a class="post-comments" href="/p/1#comments">12 comments</a></li>
|
17
|
+
<li><a class="post-published-at" href="/p/1" data-published-at="2013-04-01 00:00:00">3 hours ago</a></li>
|
18
|
+
</ul>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Nikkou::Findable do
|
4
|
+
before do
|
5
|
+
assets_directory = File.expand_path(File.join(File.dirname(__FILE__), 'files'))
|
6
|
+
html_file = File.join(assets_directory, 'test.html')
|
7
|
+
@html = Nokogiri::HTML.parse(File.read(html_file))
|
8
|
+
end
|
9
|
+
|
10
|
+
describe Nokogiri::XML::Document do
|
11
|
+
it 'returns nil' do
|
12
|
+
node = @html.find('.post .post-non-existent')
|
13
|
+
node.should be_nil
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'returns non-nil' do
|
17
|
+
node = @html.find('.post .post-footer')
|
18
|
+
node.should == @html.search('.post .post-footer').first
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe Nokogiri::XML::Node do
|
23
|
+
it 'returns nil' do
|
24
|
+
node = @html.search('body').first.find('.post .post-non-existent')
|
25
|
+
node.should be_nil
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'returns non-nil' do
|
29
|
+
node = @html.search('body').first.find('.post .post-footer')
|
30
|
+
node.should == @html.search('.post .post-footer').first
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Nokogiri::XML::NodeSet do
|
35
|
+
it 'returns nil' do
|
36
|
+
node = @html.search('body').find('.post .post-non-existent')
|
37
|
+
node.should be_nil
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'returns non-nil' do
|
41
|
+
node = @html.search('body').find('.post .post-footer')
|
42
|
+
node.should == @html.search('.post .post-footer').first
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Nokogiri::XML::NodeSet do
|
4
|
+
before do
|
5
|
+
assets_directory = File.expand_path(File.join(File.dirname(__FILE__), 'files'))
|
6
|
+
html_file = File.join(assets_directory, 'test.html')
|
7
|
+
@html = Nokogiri::HTML.parse(File.read(html_file))
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '.attr_includes' do
|
11
|
+
it 'finds nodes' do
|
12
|
+
nodes = @html.search('a').attr_includes('href', 'ipsum.com')
|
13
|
+
nodes.first.text.should == 'ipsum'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '.attr_matches' do
|
18
|
+
it 'finds nodes' do
|
19
|
+
nodes = @html.search('a').attr_matches('href', /(lorem|ipsum)\.com/)
|
20
|
+
nodes.first.text.should == 'ipsum'
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'sets matches' do
|
24
|
+
nodes = @html.search('a').attr_matches('href', /(lorem|ipsum)\.com/)
|
25
|
+
nodes.first.matches.should == ['ipsum.com', 'ipsum']
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '.text_matches' do
|
30
|
+
it 'finds nodes' do
|
31
|
+
nodes = @html.search('a').text_matches(/(\d+) comments/)
|
32
|
+
nodes.first.text.should == '12 comments'
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'sets matches' do
|
36
|
+
nodes = @html.search('a').text_matches(/(\d+) comments/)
|
37
|
+
nodes.first.matches.should == ['12 comments', '12']
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '.text_includes' do
|
42
|
+
it 'finds nodes' do
|
43
|
+
nodes = @html.search('a').text_includes('ipsum')
|
44
|
+
nodes.first.text.should == 'ipsum'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/spec/node_spec.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Nokogiri::XML::Node do
|
4
|
+
before do
|
5
|
+
assets_directory = File.expand_path(File.join(File.dirname(__FILE__), 'files'))
|
6
|
+
html_file = File.join(assets_directory, 'test.html')
|
7
|
+
@html = Nokogiri::HTML.parse(File.read(html_file))
|
8
|
+
@html.uri = 'http://www.loremipsum.com/page/2'
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.url' do
|
12
|
+
it 'reads absolute URLs' do
|
13
|
+
@html.search('a.absolute-url').first.url.should == 'http://www.absoluteurl.com/'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'reads relative URLs' do
|
17
|
+
@html.search('a.relative-url').first.url.should == 'http://www.loremipsum.com/p/1'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '.time' do
|
22
|
+
it 'reads relative time' do
|
23
|
+
@html.search('.post-published-at').first.time.to_i.should == (Time.now.utc - 3.hours).to_i
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'reads attributes' do
|
27
|
+
@html.search('.post-published-at').first.time(attribute: 'data-published-at').to_s.should == '2013-04-01 00:00:00 UTC'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'converts time zones' do
|
31
|
+
@html.search('.post-published-at').first.time(attribute: 'data-published-at', time_zone: 'America/New_York').to_s.should == '2013-04-01 04:00:00 UTC'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nikkou
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tom Benner
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nokogiri
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activesupport
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: tzinfo
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rspec
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: Utilities for Nokogiri
|
95
|
+
email:
|
96
|
+
- tombenner@gmail.com
|
97
|
+
executables: []
|
98
|
+
extensions: []
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
101
|
+
- lib/nikkou/drillable.rb
|
102
|
+
- lib/nikkou/findable.rb
|
103
|
+
- lib/nikkou/mechanize/page.rb
|
104
|
+
- lib/nikkou/mechanize.rb
|
105
|
+
- lib/nikkou/nokogiri/xml/document.rb
|
106
|
+
- lib/nikkou/nokogiri/xml/node.rb
|
107
|
+
- lib/nikkou/nokogiri/xml/node_set.rb
|
108
|
+
- lib/nikkou/nokogiri/xml.rb
|
109
|
+
- lib/nikkou/nokogiri.rb
|
110
|
+
- lib/nikkou/version.rb
|
111
|
+
- lib/nikkou.rb
|
112
|
+
- MIT-LICENSE
|
113
|
+
- Rakefile
|
114
|
+
- README.md
|
115
|
+
- spec/drillable_spec.rb
|
116
|
+
- spec/files/test.html
|
117
|
+
- spec/findable_spec.rb
|
118
|
+
- spec/node_set_spec.rb
|
119
|
+
- spec/node_spec.rb
|
120
|
+
- spec/spec_helper.rb
|
121
|
+
homepage: https://github.com/tombenner/nikkou
|
122
|
+
licenses: []
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
130
|
+
- - ! '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
135
|
+
requirements:
|
136
|
+
- - ! '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
requirements: []
|
140
|
+
rubyforge_project:
|
141
|
+
rubygems_version: 1.8.24
|
142
|
+
signing_key:
|
143
|
+
specification_version: 3
|
144
|
+
summary: Utilities for Nokogiri
|
145
|
+
test_files:
|
146
|
+
- spec/drillable_spec.rb
|
147
|
+
- spec/files/test.html
|
148
|
+
- spec/findable_spec.rb
|
149
|
+
- spec/node_set_spec.rb
|
150
|
+
- spec/node_spec.rb
|
151
|
+
- spec/spec_helper.rb
|