crack 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of crack might be problematic. Click here for more details.
- data/History +3 -0
- data/VERSION.yml +1 -1
- data/crack.gemspec +2 -2
- data/lib/crack/json.rb +1 -1
- data/test/json_test.rb +2 -0
- metadata +2 -2
data/History
CHANGED
data/VERSION.yml
CHANGED
data/crack.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{crack}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["John Nunemaker", "Wynn Netherland"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-20}
|
13
13
|
s.email = %q{nunemaker@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
data/lib/crack/json.rb
CHANGED
@@ -20,7 +20,7 @@ module Crack
|
|
20
20
|
end
|
21
21
|
|
22
22
|
# matches YAML-formatted dates
|
23
|
-
DATE_REGEX = /^\d{4}-\d{2}-\d{2}$|^\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?$/
|
23
|
+
DATE_REGEX = /^\d{4}-\d{2}-\d{2}$|^\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?$/
|
24
24
|
|
25
25
|
# Ensure that ":" and "," are always followed by a space
|
26
26
|
def self.convert_json_to_yaml(json) #:nodoc:
|
data/test/json_test.rb
CHANGED
@@ -14,6 +14,8 @@ class JsonTest < Test::Unit::TestCase
|
|
14
14
|
%({a: "a's, b's and c's", "b": "5,000"}) => {"a" => "a's, b's and c's", "b" => "5,000"},
|
15
15
|
%({a: "2007-01-01"}) => {'a' => Date.new(2007, 1, 1)},
|
16
16
|
%({a: "2007-01-01 01:12:34 Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)},
|
17
|
+
# Handle ISO 8601 date/time format http://en.wikipedia.org/wiki/ISO_8601
|
18
|
+
%({a: "2007-01-01T01:12:34Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)},
|
17
19
|
# no time zone
|
18
20
|
%({a: "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"},
|
19
21
|
%({"bio": "1985-01-29: birthdate"}) => {'bio' => '1985-01-29: birthdate'},
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-
|
13
|
+
date: 2010-02-20 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|