nokogiri-diff 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/.gitignore +2 -0
- data/ChangeLog.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -5
- data/Rakefile +8 -7
- data/gemspec.yml +7 -7
- data/nokogiri-diff.gemspec +101 -7
- data/spec/spec_helper.rb +1 -1
- metadata +88 -97
data/.gemtest
ADDED
File without changes
|
data/.gitignore
ADDED
data/ChangeLog.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# nokogiri-diff
|
2
2
|
|
3
|
-
* [Source](
|
4
|
-
* [Issues](
|
3
|
+
* [Source](https://github.com/postmodern/nokogiri-diff)
|
4
|
+
* [Issues](https://github.com/postmodern/nokogiri-diff/issues)
|
5
5
|
* [Documentation](http://rubydoc.info/gems/nokogiri-diff/frames)
|
6
|
-
*
|
6
|
+
* [Email](mailto:postmodern.mod3 at gmail.com)
|
7
7
|
|
8
8
|
## Description
|
9
9
|
|
@@ -61,7 +61,7 @@ Only find the removed nodes:
|
|
61
61
|
|
62
62
|
* [ruby](http://www.ruby-lang.org/) >= 1.8.7
|
63
63
|
* [tdiff](http://github.com/postmodern/tdiff) ~> 0.3.2
|
64
|
-
* [nokogiri](http://nokogiri.rubyforge.org/) ~> 1.
|
64
|
+
* [nokogiri](http://nokogiri.rubyforge.org/) ~> 1.5
|
65
65
|
|
66
66
|
## Install
|
67
67
|
|
@@ -69,6 +69,6 @@ Only find the removed nodes:
|
|
69
69
|
|
70
70
|
## Copyright
|
71
71
|
|
72
|
-
Copyright (c) 2010 Hal Brodigan
|
72
|
+
Copyright (c) 2010-2012 Hal Brodigan
|
73
73
|
|
74
74
|
See {file:LICENSE.txt} for details.
|
data/Rakefile
CHANGED
@@ -2,17 +2,17 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
begin
|
5
|
-
gem '
|
6
|
-
require '
|
5
|
+
gem 'rubygems-tasks', '~> 0.1'
|
6
|
+
require 'rubygems/tasks'
|
7
7
|
|
8
|
-
|
8
|
+
Gem::Tasks.new
|
9
9
|
rescue LoadError => e
|
10
|
-
|
11
|
-
|
10
|
+
warn e.message
|
11
|
+
warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
|
12
12
|
end
|
13
13
|
|
14
14
|
begin
|
15
|
-
gem 'rspec', '~> 2.
|
15
|
+
gem 'rspec', '~> 2.4'
|
16
16
|
require 'rspec/core/rake_task'
|
17
17
|
|
18
18
|
RSpec::Core::RakeTask.new
|
@@ -21,10 +21,11 @@ rescue LoadError => e
|
|
21
21
|
abort "Please run `gem install rspec` to install RSpec."
|
22
22
|
end
|
23
23
|
end
|
24
|
+
task :test => :spec
|
24
25
|
task :default => :spec
|
25
26
|
|
26
27
|
begin
|
27
|
-
gem 'yard', '~> 0.
|
28
|
+
gem 'yard', '~> 0.7'
|
28
29
|
require 'yard'
|
29
30
|
|
30
31
|
YARD::Rake::YardocTask.new
|
data/gemspec.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
name: nokogiri-diff
|
2
|
-
version: 0.1.
|
2
|
+
version: 0.1.1
|
3
3
|
summary: Calculate the differences between two XML/HTML documents.
|
4
4
|
description:
|
5
5
|
Nokogiri::Diff adds the ability to calculate the differences (added
|
@@ -8,16 +8,16 @@ description:
|
|
8
8
|
license: MIT
|
9
9
|
authors: Postmodern
|
10
10
|
email: postmodern.mod3@gmail.com
|
11
|
-
homepage:
|
11
|
+
homepage: https://github.com/postmodern/nokogiri-diff#readme
|
12
12
|
has_yard: true
|
13
13
|
|
14
|
-
required_ruby_version: >= 1.8.7
|
14
|
+
required_ruby_version: ">= 1.8.7"
|
15
15
|
|
16
16
|
dependencies:
|
17
17
|
tdiff: ~> 0.3.2
|
18
|
-
nokogiri: ~> 1.
|
18
|
+
nokogiri: ~> 1.5
|
19
19
|
|
20
20
|
development_dependencies:
|
21
|
-
|
22
|
-
rspec: ~> 2.
|
23
|
-
yard: ~> 0.
|
21
|
+
rubygems-tasks: ~> 0.1
|
22
|
+
rspec: ~> 2.4
|
23
|
+
yard: ~> 0.7
|
data/nokogiri-diff.gemspec
CHANGED
@@ -1,10 +1,104 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gemspec|
|
6
|
+
root = File.dirname(__FILE__)
|
7
|
+
lib_dir = File.join(root,'lib')
|
8
|
+
files = `git ls-files`.split($/)
|
9
|
+
|
10
|
+
filter_files = lambda { |paths|
|
11
|
+
files & case paths
|
12
|
+
when Array
|
13
|
+
paths
|
14
|
+
when String
|
15
|
+
Dir[paths]
|
16
|
+
end
|
17
|
+
}
|
18
|
+
|
19
|
+
version = {
|
20
|
+
:file => 'nokogiri/diff/version',
|
21
|
+
:constant => 'Nokogiri::Diff::VERSION'
|
22
|
+
}
|
23
|
+
|
24
|
+
defaults = {
|
25
|
+
'name' => File.basename(root),
|
26
|
+
'files' => files,
|
27
|
+
'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
|
28
|
+
'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
|
29
|
+
'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
|
30
|
+
'doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
|
31
|
+
'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
|
32
|
+
}
|
33
|
+
|
34
|
+
metadata = defaults.merge(YAML.load_file('gemspec.yml'))
|
35
|
+
|
36
|
+
gemspec.name = metadata['name']
|
37
|
+
gemspec.version = if metadata['version']
|
38
|
+
metadata['version']
|
39
|
+
else
|
40
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
41
|
+
|
42
|
+
require version[:file]
|
43
|
+
eval(version[:constant])
|
44
|
+
end
|
45
|
+
|
46
|
+
gemspec.summary = metadata.fetch('summary',metadata['description'])
|
47
|
+
gemspec.description = metadata.fetch('description',metadata['summary'])
|
48
|
+
|
49
|
+
gemspec.licenses = Array(metadata['license'])
|
50
|
+
gemspec.authors = Array(metadata['authors'])
|
51
|
+
|
52
|
+
gemspec.email = metadata['email']
|
53
|
+
gemspec.homepage = metadata['homepage']
|
54
|
+
|
55
|
+
gemspec.require_paths = Array(metadata['require_paths'])
|
56
|
+
gemspec.files = filter_files[metadata['files']]
|
57
|
+
gemspec.executables = metadata['executables']
|
58
|
+
gemspec.extensions = metadata['extensions']
|
59
|
+
|
60
|
+
if Gem::VERSION < '1.7.'
|
61
|
+
gemspec.default_executable = gemspec.executables.first
|
62
|
+
end
|
63
|
+
|
64
|
+
gemspec.test_files = filter_files[metadata['test_files']]
|
65
|
+
gemspec.extra_rdoc_files = Array(metadata['extra_doc_files'])
|
66
|
+
|
67
|
+
gemspec.post_install_message = metadata['post_install_message']
|
68
|
+
gemspec.requirements = metadata['requirements']
|
69
|
+
|
70
|
+
if gemspec.respond_to?(:required_ruby_version=)
|
71
|
+
gemspec.required_ruby_version = metadata['required_ruby_version']
|
72
|
+
end
|
73
|
+
|
74
|
+
if gemspec.respond_to?(:required_rubygems_version=)
|
75
|
+
gemspec.required_rubygems_version = metadata['required_ruby_version']
|
76
|
+
end
|
77
|
+
|
78
|
+
parse_versions = lambda { |versions|
|
79
|
+
case versions
|
80
|
+
when Array
|
81
|
+
versions.map { |v| v.to_s }
|
82
|
+
when String
|
83
|
+
versions.split(/,\s*/)
|
84
|
+
end
|
85
|
+
}
|
86
|
+
|
87
|
+
if metadata['dependencies']
|
88
|
+
metadata['dependencies'].each do |name,versions|
|
89
|
+
gemspec.add_dependency(name,parse_versions[versions])
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
if metadata['runtime_dependencies']
|
94
|
+
metadata['runtime_dependencies'].each do |name,versions|
|
95
|
+
gemspec.add_runtime_dependency(name,parse_versions[versions])
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
if metadata['development_dependencies']
|
100
|
+
metadata['development_dependencies'].each do |name,versions|
|
101
|
+
gemspec.add_development_dependency(name,parse_versions[versions])
|
102
|
+
end
|
6
103
|
end
|
7
|
-
rescue NameError
|
8
|
-
STDERR.puts "The 'nokogiri-diff.gemspec' file requires Ore."
|
9
|
-
STDERR.puts "Run `gem install ore-core` to install Ore."
|
10
104
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
gem 'rspec', '~> 2.
|
1
|
+
gem 'rspec', '~> 2.4'
|
2
2
|
require 'rspec'
|
metadata
CHANGED
@@ -1,109 +1,109 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri-diff
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Postmodern
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: tdiff
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 3
|
31
|
-
- 2
|
20
|
+
- !ruby/object:Gem::Version
|
32
21
|
version: 0.3.2
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: nokogiri
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.3.2
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: nokogiri
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
|
-
requirements:
|
34
|
+
requirements:
|
41
35
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
- 1
|
45
|
-
- 4
|
46
|
-
- 1
|
47
|
-
version: 1.4.1
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.5'
|
48
38
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: ore-tasks
|
52
39
|
prerelease: false
|
53
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.5'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rubygems-tasks
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
54
49
|
none: false
|
55
|
-
requirements:
|
50
|
+
requirements:
|
56
51
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
- 0
|
60
|
-
- 3
|
61
|
-
- 0
|
62
|
-
version: 0.3.0
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
63
54
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: rspec
|
67
55
|
prerelease: false
|
68
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
57
|
none: false
|
70
|
-
requirements:
|
58
|
+
requirements:
|
71
59
|
- - ~>
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.4'
|
78
70
|
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: yard
|
82
71
|
prerelease: false
|
83
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.4'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: yard
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
84
81
|
none: false
|
85
|
-
requirements:
|
82
|
+
requirements:
|
86
83
|
- - ~>
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
- 0
|
90
|
-
- 6
|
91
|
-
- 0
|
92
|
-
version: 0.6.0
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0.7'
|
93
86
|
type: :development
|
94
|
-
|
95
|
-
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0.7'
|
94
|
+
description: Nokogiri::Diff adds the ability to calculate the differences (added or
|
95
|
+
removed nodes) between two XML/HTML documents.
|
96
96
|
email: postmodern.mod3@gmail.com
|
97
97
|
executables: []
|
98
|
-
|
99
98
|
extensions: []
|
100
|
-
|
101
|
-
extra_rdoc_files:
|
102
|
-
- README.md
|
99
|
+
extra_rdoc_files:
|
103
100
|
- ChangeLog.md
|
104
101
|
- LICENSE.txt
|
105
|
-
|
102
|
+
- README.md
|
103
|
+
files:
|
106
104
|
- .document
|
105
|
+
- .gemtest
|
106
|
+
- .gitignore
|
107
107
|
- .rspec
|
108
108
|
- .yardopts
|
109
109
|
- ChangeLog.md
|
@@ -118,39 +118,30 @@ files:
|
|
118
118
|
- nokogiri-diff.gemspec
|
119
119
|
- spec/diff_spec.rb
|
120
120
|
- spec/spec_helper.rb
|
121
|
-
|
122
|
-
|
123
|
-
licenses:
|
121
|
+
homepage: https://github.com/postmodern/nokogiri-diff#readme
|
122
|
+
licenses:
|
124
123
|
- MIT
|
125
124
|
post_install_message:
|
126
125
|
rdoc_options: []
|
127
|
-
|
128
|
-
require_paths:
|
126
|
+
require_paths:
|
129
127
|
- lib
|
130
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
129
|
none: false
|
132
|
-
requirements:
|
133
|
-
- -
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
segments:
|
136
|
-
- 1
|
137
|
-
- 8
|
138
|
-
- 7
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
139
133
|
version: 1.8.7
|
140
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
135
|
none: false
|
142
|
-
requirements:
|
143
|
-
- -
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
|
146
|
-
- 0
|
147
|
-
version: "0"
|
136
|
+
requirements:
|
137
|
+
- - ! '>='
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 1.8.7
|
148
140
|
requirements: []
|
149
|
-
|
150
|
-
|
151
|
-
rubygems_version: 1.3.7
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 1.8.23
|
152
143
|
signing_key:
|
153
144
|
specification_version: 3
|
154
145
|
summary: Calculate the differences between two XML/HTML documents.
|
155
|
-
test_files:
|
146
|
+
test_files:
|
156
147
|
- spec/diff_spec.rb
|