zaml 0.1.2 → 0.1.3

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.
Files changed (4) hide show
  1. data/ChangeLog +4 -0
  2. data/lib/zaml.rb +2 -2
  3. data/test/zaml_test.rb +6 -1
  4. metadata +14 -5
@@ -0,0 +1,4 @@
1
+ 2010.06.06, Version 0.1.3
2
+
3
+ * Fix for serializing hashes that contain a string value that ends with a
4
+ colon
@@ -13,7 +13,7 @@
13
13
  require 'yaml'
14
14
 
15
15
  class ZAML
16
- VERSION = "0.1.2"
16
+ VERSION = "0.1.3"
17
17
  #
18
18
  # Class Methods
19
19
  #
@@ -231,7 +231,7 @@ class String
231
231
  when (
232
232
  (self =~ /\A(true|false|yes|no|on|null|off|#{num}(:#{num})*|!|=|~)$/i) or
233
233
  (self =~ /\A\n* /) or
234
- (self =~ /\s$/) or
234
+ (self =~ /[\s:]/) or
235
235
  (self =~ /^[>|][-+\d]*\s/i) or
236
236
  (self[-1..-1] =~ /\s/) or
237
237
  (self =~ /[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\xFF]/) or
@@ -318,7 +318,12 @@ class ZamlDumpTest < Test::Unit::TestCase
318
318
  hash[hash] = hash
319
319
  dump_test(hash)
320
320
  end
321
-
321
+
322
+ def test_dump_hash_value_with_colon
323
+ hash = { 'a' => 'a value:', 'b' => 'b value' }
324
+ dump_test(hash)
325
+ end
326
+
322
327
  #
323
328
  # array
324
329
  #
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 3
9
+ version: 0.1.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - Markus Roberts
@@ -13,7 +18,7 @@ autorequire:
13
18
  bindir: bin
14
19
  cert_chain: []
15
20
 
16
- date: 2009-10-03 00:00:00 -07:00
21
+ date: 2010-06-06 00:00:00 -07:00
17
22
  default_executable:
18
23
  dependencies: []
19
24
 
@@ -26,9 +31,11 @@ extensions: []
26
31
  extra_rdoc_files:
27
32
  - README
28
33
  - LICENSE
34
+ - ChangeLog
29
35
  files:
30
36
  - README
31
37
  - LICENSE
38
+ - ChangeLog
32
39
  - lib/zaml.rb
33
40
  - test/zaml_benchmarks.rb
34
41
  - test/zaml_test.rb
@@ -46,18 +53,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
53
  requirements:
47
54
  - - ">="
48
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
49
58
  version: "0"
50
- version:
51
59
  required_rubygems_version: !ruby/object:Gem::Requirement
52
60
  requirements:
53
61
  - - ">="
54
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
55
65
  version: "0"
56
- version:
57
66
  requirements: []
58
67
 
59
68
  rubyforge_project:
60
- rubygems_version: 1.3.4
69
+ rubygems_version: 1.3.6
61
70
  signing_key:
62
71
  specification_version: 3
63
72
  summary: A partial replacement for YAML, writen with speed and code clarity in mind.