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 +4 -0
- data/Rakefile +2 -1
- data/VERSION.yml +3 -2
- data/crack.gemspec +9 -6
- data/lib/crack/json.rb +2 -2
- data/test/json_test.rb +3 -2
- metadata +4 -3
data/History
CHANGED
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
|
data/VERSION.yml
CHANGED
data/crack.gemspec
CHANGED
@@ -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.
|
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{
|
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.
|
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 =
|
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
|
+
|
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}
|
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
|
data/test/json_test.rb
CHANGED
@@ -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
|
+
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:
|
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:
|
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
|