pump 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b930e2c3f51715a45b93e926ee3f1919d5958a9
4
- data.tar.gz: 9deabda70b6c60e6829faa5303ed8c155b87a3d8
3
+ metadata.gz: 94ff0f5cef6e535be8d383cbdc0894ad6cad3247
4
+ data.tar.gz: d7ace652091d3ce66eced7bbcf69438998a4abc6
5
5
  SHA512:
6
- metadata.gz: 27f537da752f98e0a036c193f9424f9dc55face76e0689acfbff4a73584a4ada0689e89eb741cf13a32f3f36ad92b66c337b4c845ea4bf4d02eb70d17630f5e0
7
- data.tar.gz: 005b91800f465e6f14977fc1e203e41410ec4d26120138842ca7bd44d4e5312d2287a9d68b325ff7784d3b4e0fb26909e5aef51e2db7a079da92d5544a05c645
6
+ metadata.gz: c35d78070528961c1509f5cd2ea3d9738077b41046240bbc82c7b454561ea51df1a1cc2841f64ef43f22a2e2aabccbf8c212d8f6671b6901b24fb849b89faefd
7
+ data.tar.gz: d8f8e432d713bf988ecd9484897e24df93b0eab3c40bff501e4fb6ac3b1b5cf1fc22f1f8c707f5f54b0a896a8cba8560697505dbee2f0142892490311846dcee
data/CHANGES.md CHANGED
@@ -1,6 +1,12 @@
1
1
  ### dev
2
2
 
3
- [full changelog](http://github.com/yolk/pump/compare/v0.6.5...master)
3
+ [full changelog](http://github.com/yolk/pump/compare/v0.6.6...master)
4
+
5
+ ### 0.6.6 / 2014-07-03
6
+
7
+ [full changelog](http://github.com/yolk/valvat/compare/v0.6.5...v0.6.6)
8
+
9
+ * XML: Remove ilegal chars from string values also on multiple line strings
4
10
 
5
11
  ### 0.6.5 / 2014-07-03
6
12
 
data/lib/pump/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pump
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
data/lib/pump/xml.rb CHANGED
@@ -69,7 +69,7 @@ module Pump
69
69
  (0x10000..0x10FFFF)
70
70
  ]
71
71
 
72
- VALID_XML_CHARS = Regexp.new('^['+
72
+ VALID_XML_CHARS = Regexp.new('\A['+
73
73
  VALID_CHAR.map { |item|
74
74
  case item
75
75
  when Fixnum
@@ -78,7 +78,7 @@ module Pump
78
78
  [item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8')
79
79
  end
80
80
  }.join +
81
- ']*$')
81
+ ']*\Z')
82
82
 
83
83
  def remove_ilegal_chars(string)
84
84
  return string if !string.is_a?(String) || string =~ VALID_XML_CHARS
@@ -15,10 +15,10 @@ describe Pump::Xml do
15
15
  end
16
16
 
17
17
  context "with ilegal chars" do
18
- let(:person) { Struct.new(:name, :age, :last_name).new("Benny \u001APenny", 9, "Hellman") }
18
+ let(:person) { Struct.new(:name, :age, :last_name).new("Benny\n\u001APenny", 9, "Hellman") }
19
19
 
20
20
  it "returns xml string" do
21
- xml.encode(person).should eql("#{XML_INSTRUCT}<person>\n <name>Benny Penny</name>\n</person>\n")
21
+ xml.encode(person).should eql("#{XML_INSTRUCT}<person>\n <name>Benny\nPenny</name>\n</person>\n")
22
22
  end
23
23
  end
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Munz