crack 0.1.4 → 0.1.5

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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.5 2010-01-27
2
+ * 1 minor patch
3
+ * Strings that begin with dates shouldn't be parsed as such (sandro)
4
+
1
5
  == 0.1.3 2009-06-22
2
6
  * 1 minor patch
3
7
  * Parsing a text node with attributes stores them in the attributes method (tamalw)
data/Rakefile CHANGED
@@ -8,10 +8,11 @@ begin
8
8
  gem.summary = %Q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
9
9
  gem.email = "nunemaker@gmail.com"
10
10
  gem.homepage = "http://github.com/jnunemaker/crack"
11
- gem.authors = ["John Nunemaker"]
11
+ gem.authors = ["John Nunemaker", "Wynn Netherland"]
12
12
  gem.rubyforge_project = 'crack'
13
13
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
14
  end
15
+ Jeweler::GemcutterTasks.new
15
16
  rescue LoadError
16
17
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
17
18
  end
@@ -1,4 +1,5 @@
1
1
  ---
2
- :major: 0
3
2
  :minor: 1
4
- :patch: 4
3
+ :patch: 5
4
+ :build:
5
+ :major: 0
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{crack}
5
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["John Nunemaker"]
9
- s.date = %q{2009-07-19}
11
+ s.authors = ["John Nunemaker", "Wynn Netherland"]
12
+ s.date = %q{2010-01-27}
10
13
  s.email = %q{nunemaker@gmail.com}
11
14
  s.extra_rdoc_files = [
12
15
  "LICENSE",
@@ -33,12 +36,11 @@ Gem::Specification.new do |s|
33
36
  "test/test_helper.rb",
34
37
  "test/xml_test.rb"
35
38
  ]
36
- s.has_rdoc = true
37
39
  s.homepage = %q{http://github.com/jnunemaker/crack}
38
40
  s.rdoc_options = ["--charset=UTF-8"]
39
41
  s.require_paths = ["lib"]
40
42
  s.rubyforge_project = %q{crack}
41
- s.rubygems_version = %q{1.3.1}
43
+ s.rubygems_version = %q{1.3.5}
42
44
  s.summary = %q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
43
45
  s.test_files = [
44
46
  "test/crack_test.rb",
@@ -51,7 +53,7 @@ Gem::Specification.new do |s|
51
53
 
52
54
  if s.respond_to? :specification_version then
53
55
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
- s.specification_version = 2
56
+ s.specification_version = 3
55
57
 
56
58
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
57
59
  else
@@ -59,3 +61,4 @@ Gem::Specification.new do |s|
59
61
  else
60
62
  end
61
63
  end
64
+
@@ -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]+\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:
@@ -65,4 +65,4 @@ module Crack
65
65
  end
66
66
  end
67
67
  end
68
- end
68
+ end
@@ -14,8 +14,9 @@ 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
- # no time zone
18
- %({a: "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"},
17
+ # no time zone
18
+ %({a: "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"},
19
+ %({"bio": "1985-01-29: birthdate"}) => {'bio' => '1985-01-29: birthdate'},
19
20
  %([]) => [],
20
21
  %({}) => {},
21
22
  %(1) => 1,
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
+ - Wynn Netherland
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-07-19 00:00:00 -04:00
13
+ date: 2010-01-27 00:00:00 -06:00
13
14
  default_executable:
14
15
  dependencies: []
15
16
 
@@ -68,7 +69,7 @@ requirements: []
68
69
  rubyforge_project: crack
69
70
  rubygems_version: 1.3.5
70
71
  signing_key:
71
- specification_version: 2
72
+ specification_version: 3
72
73
  summary: Really simple JSON and XML parsing, ripped from Merb and Rails.
73
74
  test_files:
74
75
  - test/crack_test.rb