crack 0.1.6 → 0.1.7

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.
data/History CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.1.7 2010-02-19
2
+ * 1 minor patch
3
+ * Added patch from @purp for ISO 8601 date/time format
1
4
  == 0.1.6 2010-01-31
2
5
  * 1 minor patch
3
6
  * Added Crack::VERSION constant - http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 6
3
+ :patch: 7
4
4
  :build:
5
5
  :major: 0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{crack}
8
- s.version = "0.1.6"
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-01-31}
12
+ s.date = %q{2010-02-20}
13
13
  s.email = %q{nunemaker@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -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:
@@ -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.6
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-01-31 00:00:00 -06:00
13
+ date: 2010-02-20 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies: []
16
16