xmlcanonicalizer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,8 +6,8 @@ source "http://rubygems.org"
6
6
  # Add dependencies to develop your gem here.
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
+ gem "rdoc"
9
10
  gem "shoulda", ">= 0"
10
- gem "bundler", "~> 1.0.0"
11
+ gem "bundler", "~> 1.1.0"
11
12
  gem "jeweler", "~> 1.6.4"
12
- gem "rcov", ">= 0"
13
13
  end
@@ -0,0 +1,26 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ git (1.2.5)
5
+ jeweler (1.6.4)
6
+ bundler (~> 1.0)
7
+ git (>= 1.2.5)
8
+ rake
9
+ json (1.7.3)
10
+ rake (0.9.2.2)
11
+ rdoc (3.12)
12
+ json (~> 1.4)
13
+ shoulda (3.0.1)
14
+ shoulda-context (~> 1.0.0)
15
+ shoulda-matchers (~> 1.0.0)
16
+ shoulda-context (1.0.0)
17
+ shoulda-matchers (1.0.0)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ bundler (~> 1.1.0)
24
+ jeweler (~> 1.6.4)
25
+ rdoc
26
+ shoulda
data/Rakefile CHANGED
@@ -25,22 +25,9 @@ Rake::TestTask.new(:test) do |test|
25
25
  test.verbose = true
26
26
  end
27
27
 
28
- begin
29
- require 'rcov/rcovtask'
30
- Rcov::RcovTask.new do |test|
31
- test.libs << 'test'
32
- test.pattern = 'test/**/test_*.rb'
33
- test.verbose = true
34
- end
35
- rescue LoadError
36
- task :rcov do
37
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
- end
39
- end
40
-
41
28
  task :default => :test
42
29
 
43
- require 'rake/rdoctask'
30
+ require 'rdoc/task'
44
31
  Rake::RDocTask.new do |rdoc|
45
32
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
46
33
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -355,7 +355,7 @@ module XML
355
355
 
356
356
  def write_text_node(node, visible)
357
357
  if (visible)
358
- @res = @res + normalize_string(node.value(), node.node_type())
358
+ @res = @res + normalize_string(node.to_s, node.node_type())
359
359
  end
360
360
  end
361
361
 
@@ -10,6 +10,15 @@ class TestXmlcanonicalizer < Test::Unit::TestCase
10
10
  xml_expect = "<foo bar=\"test\"></foo>";
11
11
  assert_equal xml_expect, xml_canonicalized
12
12
  end
13
+
14
+ should "canonicalize xml entities correctly" do
15
+ xml = File.read(File.dirname(File.expand_path(__FILE__))+'/withentities.xml')
16
+ xml_canonicalizer = XML::Util::XmlCanonicalizer.new(true,true)
17
+ rexml = REXML::Document.new(xml);
18
+ xml_canonicalized = xml_canonicalizer.canonicalize(rexml);
19
+
20
+ assert_equal xml, xml_canonicalized
21
+ end
13
22
 
14
23
  should "canonicalize a complex xml file" do
15
24
  fp = File.new(File.dirname(File.expand_path(__FILE__))+'/complex.xml','r')
@@ -0,0 +1 @@
1
+ <element>Which have entities &amp; needs to work</element>
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{xmlcanonicalizer}
8
- s.version = "0.1.1"
7
+ s.name = "xmlcanonicalizer"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Andrew Ferk}]
12
- s.date = %q{2011-07-31}
13
- s.description = %q{This is taken from XMLCanonicalizer/WSS4R and http://github.com/borisnadion/xml-canonicalizer}
14
- s.email = %q{andrewferk@gmail.com}
11
+ s.authors = ["Andrew Ferk"]
12
+ s.date = "2012-07-05"
13
+ s.description = "This is taken from XMLCanonicalizer/WSS4R and http://github.com/borisnadion/xml-canonicalizer"
14
+ s.email = "andrewferk@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  "Gemfile",
22
+ "Gemfile.lock",
22
23
  "LICENSE",
23
24
  "README.rdoc",
24
25
  "Rakefile",
@@ -31,35 +32,36 @@ Gem::Specification.new do |s|
31
32
  "test/saml_assertion.xml",
32
33
  "test/saml_expected_canonical_form.xml",
33
34
  "test/test_xmlcanonicalizer.rb",
35
+ "test/withentities.xml",
34
36
  "tests.watchr",
35
37
  "xmlcanonicalizer.gemspec"
36
38
  ]
37
- s.homepage = %q{http://github.com/andrewferk/xmlcanonicalizer}
38
- s.require_paths = [%q{lib}]
39
- s.rubygems_version = %q{1.8.6}
40
- s.summary = %q{XML Canonicalizer for Ruby >= 1.9.2}
39
+ s.homepage = "http://github.com/andrewferk/xmlcanonicalizer"
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = "1.8.24"
42
+ s.summary = "XML Canonicalizer for Ruby >= 1.9.2"
41
43
 
42
44
  if s.respond_to? :specification_version then
43
45
  s.specification_version = 3
44
46
 
45
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
46
49
  s.add_development_dependency(%q<shoulda>, [">= 0"])
47
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
50
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
48
51
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
49
- s.add_development_dependency(%q<rcov>, [">= 0"])
50
52
  s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
51
53
  else
54
+ s.add_dependency(%q<rdoc>, [">= 0"])
52
55
  s.add_dependency(%q<shoulda>, [">= 0"])
53
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.1.0"])
54
57
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
55
- s.add_dependency(%q<rcov>, [">= 0"])
56
58
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
57
59
  end
58
60
  else
61
+ s.add_dependency(%q<rdoc>, [">= 0"])
59
62
  s.add_dependency(%q<shoulda>, [">= 0"])
60
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
+ s.add_dependency(%q<bundler>, ["~> 1.1.0"])
61
64
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
62
- s.add_dependency(%q<rcov>, [">= 0"])
63
65
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
64
66
  end
65
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlcanonicalizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-31 00:00:00.000000000Z
12
+ date: 2012-07-05 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: shoulda
16
- requirement: &15170980 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
17
33
  none: false
18
34
  requirements:
19
35
  - - ! '>='
@@ -21,21 +37,31 @@ dependencies:
21
37
  version: '0'
22
38
  type: :development
23
39
  prerelease: false
24
- version_requirements: *15170980
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
25
46
  - !ruby/object:Gem::Dependency
26
47
  name: bundler
27
- requirement: &15170180 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
28
49
  none: false
29
50
  requirements:
30
51
  - - ~>
31
52
  - !ruby/object:Gem::Version
32
- version: 1.0.0
53
+ version: 1.1.0
33
54
  type: :development
34
55
  prerelease: false
35
- version_requirements: *15170180
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.0
36
62
  - !ruby/object:Gem::Dependency
37
63
  name: jeweler
38
- requirement: &15169480 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
39
65
  none: false
40
66
  requirements:
41
67
  - - ~>
@@ -43,10 +69,15 @@ dependencies:
43
69
  version: 1.6.4
44
70
  type: :development
45
71
  prerelease: false
46
- version_requirements: *15169480
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 1.6.4
47
78
  - !ruby/object:Gem::Dependency
48
- name: rcov
49
- requirement: &15168680 !ruby/object:Gem::Requirement
79
+ name: thoughtbot-shoulda
80
+ requirement: !ruby/object:Gem::Requirement
50
81
  none: false
51
82
  requirements:
52
83
  - - ! '>='
@@ -54,18 +85,12 @@ dependencies:
54
85
  version: '0'
55
86
  type: :development
56
87
  prerelease: false
57
- version_requirements: *15168680
58
- - !ruby/object:Gem::Dependency
59
- name: thoughtbot-shoulda
60
- requirement: &15167480 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
61
89
  none: false
62
90
  requirements:
63
91
  - - ! '>='
64
92
  - !ruby/object:Gem::Version
65
93
  version: '0'
66
- type: :development
67
- prerelease: false
68
- version_requirements: *15167480
69
94
  description: This is taken from XMLCanonicalizer/WSS4R and http://github.com/borisnadion/xml-canonicalizer
70
95
  email: andrewferk@gmail.com
71
96
  executables: []
@@ -76,6 +101,7 @@ extra_rdoc_files:
76
101
  files:
77
102
  - .document
78
103
  - Gemfile
104
+ - Gemfile.lock
79
105
  - LICENSE
80
106
  - README.rdoc
81
107
  - Rakefile
@@ -88,6 +114,7 @@ files:
88
114
  - test/saml_assertion.xml
89
115
  - test/saml_expected_canonical_form.xml
90
116
  - test/test_xmlcanonicalizer.rb
117
+ - test/withentities.xml
91
118
  - tests.watchr
92
119
  - xmlcanonicalizer.gemspec
93
120
  homepage: http://github.com/andrewferk/xmlcanonicalizer
@@ -102,6 +129,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
129
  - - ! '>='
103
130
  - !ruby/object:Gem::Version
104
131
  version: '0'
132
+ segments:
133
+ - 0
134
+ hash: 1160331789090862282
105
135
  required_rubygems_version: !ruby/object:Gem::Requirement
106
136
  none: false
107
137
  requirements:
@@ -110,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
140
  version: '0'
111
141
  requirements: []
112
142
  rubyforge_project:
113
- rubygems_version: 1.8.6
143
+ rubygems_version: 1.8.24
114
144
  signing_key:
115
145
  specification_version: 3
116
146
  summary: XML Canonicalizer for Ruby >= 1.9.2