scrolls 0.3.3 → 0.3.4

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.
@@ -20,15 +20,7 @@ module Scrolls
20
20
  v = v.to_s
21
21
  has_single_quote = v.index("'")
22
22
  has_double_quote = v.index('"')
23
- if v =~ / /
24
- if has_single_quote && has_double_quote
25
- v = '"' + v.gsub(/\\|"/) { |c| "\\#{c}" } + '"'
26
- elsif has_double_quote
27
- v = "'" + v.gsub('\\', '\\\\\\') + "'"
28
- else
29
- v = '"' + v.gsub('\\', '\\\\\\') + '"'
30
- end
31
- elsif v =~ /=/
23
+ if v =~ /[ =:,]/
32
24
  if has_single_quote && has_double_quote
33
25
  v = '"' + v.gsub(/\\|"/) { |c| "\\#{c}" } + '"'
34
26
  elsif has_double_quote
@@ -1,3 +1,3 @@
1
1
  module Scrolls
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
data/test/test_parser.rb CHANGED
@@ -49,6 +49,14 @@ class TestScrollsParser < Test::Unit::TestCase
49
49
  assert_equal 's="x=4, y=10"', unparse(data)
50
50
  assert_equal data.inspect, parse(unparse(data)).inspect
51
51
 
52
+ data = {s: "x:y" }
53
+ assert_equal 's="x:y"', unparse(data)
54
+ assert_equal data.inspect, parse(unparse(data)).inspect
55
+
56
+ data = {s: "x,y" }
57
+ assert_equal 's="x,y"', unparse(data)
58
+ assert_equal data.inspect, parse(unparse(data)).inspect
59
+
52
60
  # simple value is unquoted
53
61
  data = { s: "hi" }
54
62
  assert_equal 's=hi', unparse(data)
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrolls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Curt Micol
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-15 00:00:00.000000000 Z
12
+ date: 2014-01-14 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: Logging, easier, more consistent.
14
15
  email:
@@ -37,26 +38,27 @@ files:
37
38
  homepage: https://github.com/asenchi/scrolls
38
39
  licenses:
39
40
  - MIT
40
- metadata: {}
41
41
  post_install_message:
42
42
  rdoc_options: []
43
43
  require_paths:
44
44
  - lib
45
45
  required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
46
47
  requirements:
47
- - - '>='
48
+ - - ! '>='
48
49
  - !ruby/object:Gem::Version
49
50
  version: '0'
50
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
51
53
  requirements:
52
- - - '>='
54
+ - - ! '>='
53
55
  - !ruby/object:Gem::Version
54
56
  version: '0'
55
57
  requirements: []
56
58
  rubyforge_project:
57
- rubygems_version: 2.0.3
59
+ rubygems_version: 1.8.23
58
60
  signing_key:
59
- specification_version: 4
61
+ specification_version: 3
60
62
  summary: When do we log? All the time.
61
63
  test_files:
62
64
  - test/test_atomic.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: d28b354cb4e72276125072ef90d2e3805c113f4e
4
- data.tar.gz: 5c298b15aa7c13b3f331b8e21fb5449bba573378
5
- SHA512:
6
- metadata.gz: 6c33ba3926c85e139e5557a056fa3633513cad1be910d6ee509cd8691311a859f1c4ca622135e7d1e3508f8dcb0cecd3f425f2efa15fb64267caf00dce69548f
7
- data.tar.gz: 870a0b7e8d4c980e6e750b1ad2dfaf03d7acd2c199aead992c0b1a2f16691ee0e5c3701b5421f7048117b70b47d9d5186ac525def68bf74ff072123e6ad5b301