json_pure 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +4 -5
- data/CHANGES.md +6 -1
- data/Gemfile +10 -3
- data/README.md +1 -1
- data/Rakefile +7 -9
- data/VERSION +1 -1
- data/ext/json/ext/parser/parser.c +1 -1
- data/ext/json/ext/parser/parser.rl +1 -1
- data/json.gemspec +0 -0
- data/json_pure.gemspec +5 -5
- data/lib/json/add/ostruct.rb +1 -1
- data/lib/json/version.rb +1 -1
- data/tests/json_generator_test.rb +3 -2
- data/tests/test_helper.rb +0 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 599eefe7c422d40c2ff44c43c1b23ea43b975d7c
|
4
|
+
data.tar.gz: 62794b8c0ecc154922fbfaa29216a7fb881307b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7863446d00a6da77b9d8a60394c464010cef20bd47994ff386d3794dbd70b110c22273395241b0ded1ecd3ec05fdc4307572f20746f09869afe7260856dd0dcd
|
7
|
+
data.tar.gz: 4a34ea97107f72aa3ade90e03e9effa78cda56b434b89151b67941f56426ffd76b5e35c987655d8f4473d14edc56686650847d897f3ce681a73472012e78b730
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -4,17 +4,16 @@ language: ruby
|
|
4
4
|
|
5
5
|
# Specify which ruby versions you wish to run your tests on, each version will be used
|
6
6
|
rvm:
|
7
|
+
- 1.9.3
|
7
8
|
- 2.0.0
|
8
9
|
- 2.1
|
9
10
|
- 2.2
|
10
|
-
- 2.3.
|
11
|
+
- 2.3.3
|
12
|
+
- 2.4.0
|
13
|
+
- jruby
|
11
14
|
- ruby-head
|
12
15
|
matrix:
|
13
|
-
include:
|
14
|
-
- rvm: jruby
|
15
|
-
env: JRUBY_OPTS="--2.0"
|
16
16
|
allow_failures:
|
17
|
-
- rvm: rbx-2
|
18
17
|
- rvm: ruby-head
|
19
18
|
script: "bundle exec rake"
|
20
19
|
sudo: false
|
data/CHANGES.md
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
|
4
|
+
## 2017-01-12 (2.0.3)
|
5
|
+
* Set `required_ruby_version` to 1.9
|
6
|
+
* Some small fixes
|
7
|
+
|
3
8
|
## 2016-07-26 (2.0.2)
|
4
9
|
* Specify `required_ruby_version` for json\_pure.
|
5
10
|
* Fix issue #295 failure when parsing frozen strings.
|
6
11
|
|
7
12
|
## 2016-07-01 (2.0.1)
|
8
|
-
* Fix problem when requiring json\_pure and Parser constant was
|
13
|
+
* Fix problem when requiring json\_pure and Parser constant was defined top
|
9
14
|
level.
|
10
15
|
* Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
|
11
16
|
* Store `current_nesting` on stack by Aaron Patterson.
|
data/Gemfile
CHANGED
@@ -2,8 +2,15 @@
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
case ENV['JSON']
|
6
|
+
when 'ext', nil
|
7
|
+
if ENV['RUBY_ENGINE'] == 'jruby'
|
8
|
+
gemspec :name => 'json', :path => 'java'
|
9
|
+
else
|
10
|
+
gemspec :name => 'json'
|
11
|
+
end
|
12
|
+
when 'pure'
|
13
|
+
gemspec :name => 'json_pure'
|
14
|
+
end
|
8
15
|
|
9
16
|
gem 'simplecov'
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -95,7 +95,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
|
|
95
95
|
s.email = "flori@ping.de"
|
96
96
|
s.homepage = "http://flori.github.com/#{PKG_NAME}"
|
97
97
|
s.license = 'Ruby'
|
98
|
-
s.required_ruby_version = '
|
98
|
+
s.required_ruby_version = '>= 1.9'
|
99
99
|
end
|
100
100
|
|
101
101
|
desc 'Creates a json_pure.gemspec file'
|
@@ -133,7 +133,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
|
|
133
133
|
s.email = "flori@ping.de"
|
134
134
|
s.homepage = "http://flori.github.com/#{PKG_NAME}"
|
135
135
|
s.license = 'Ruby'
|
136
|
-
s.required_ruby_version = '
|
136
|
+
s.required_ruby_version = '>= 1.9'
|
137
137
|
end
|
138
138
|
|
139
139
|
desc 'Creates a json.gemspec file'
|
@@ -200,13 +200,11 @@ namespace :gems do
|
|
200
200
|
end
|
201
201
|
|
202
202
|
if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
ENV['JAVA_HOME'] = local_java
|
209
|
-
end
|
203
|
+
ENV['JAVA_HOME'] ||= [
|
204
|
+
'/usr/local/java/jdk',
|
205
|
+
'/usr/lib/jvm/java-6-openjdk',
|
206
|
+
'/Library/Java/Home',
|
207
|
+
].find { |c| File.directory?(c) }
|
210
208
|
if ENV['JAVA_HOME']
|
211
209
|
warn " *** JAVA_HOME is set to #{ENV['JAVA_HOME'].inspect}"
|
212
210
|
ENV['PATH'] = ENV['PATH'].split(/:/).unshift(java_path = "#{ENV['JAVA_HOME']}/bin") * ':'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.3
|
@@ -1675,7 +1675,7 @@ static VALUE convert_encoding(VALUE source)
|
|
1675
1675
|
}
|
1676
1676
|
FORCE_UTF8(source);
|
1677
1677
|
} else {
|
1678
|
-
source = rb_str_conv_enc(source,
|
1678
|
+
source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
|
1679
1679
|
}
|
1680
1680
|
#endif
|
1681
1681
|
return source;
|
@@ -570,7 +570,7 @@ static VALUE convert_encoding(VALUE source)
|
|
570
570
|
}
|
571
571
|
FORCE_UTF8(source);
|
572
572
|
} else {
|
573
|
-
source = rb_str_conv_enc(source,
|
573
|
+
source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
|
574
574
|
}
|
575
575
|
#endif
|
576
576
|
return source;
|
data/json.gemspec
CHANGED
Binary file
|
data/json_pure.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: json_pure 2.0.
|
2
|
+
# stub: json_pure 2.0.3 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "json_pure".freeze
|
6
|
-
s.version = "2.0.
|
6
|
+
s.version = "2.0.3"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2017-01-12"
|
12
12
|
s.description = "This is a JSON implementation in pure Ruby.".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
14
|
s.extra_rdoc_files = ["README.md".freeze]
|
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.homepage = "http://flori.github.com/json".freeze
|
17
17
|
s.licenses = ["Ruby".freeze]
|
18
18
|
s.rdoc_options = ["--title".freeze, "JSON implemention for ruby".freeze, "--main".freeze, "README.md".freeze]
|
19
|
-
s.required_ruby_version = Gem::Requirement.new("
|
20
|
-
s.rubygems_version = "2.6.
|
19
|
+
s.required_ruby_version = Gem::Requirement.new(">= 1.9".freeze)
|
20
|
+
s.rubygems_version = "2.6.8".freeze
|
21
21
|
s.summary = "JSON Implementation for Ruby".freeze
|
22
22
|
s.test_files = ["./tests/test_helper.rb".freeze]
|
23
23
|
|
data/lib/json/add/ostruct.rb
CHANGED
@@ -7,7 +7,7 @@ require 'ostruct'
|
|
7
7
|
class OpenStruct
|
8
8
|
|
9
9
|
# Deserializes JSON string by constructing new Struct object with values
|
10
|
-
# <tt>
|
10
|
+
# <tt>t</tt> serialized by <tt>to_json</tt>.
|
11
11
|
def self.json_create(object)
|
12
12
|
new(object['t'] || object[:t])
|
13
13
|
end
|
data/lib/json/version.rb
CHANGED
@@ -277,12 +277,13 @@ EOT
|
|
277
277
|
if defined?(JSON::Ext::Generator)
|
278
278
|
def test_broken_bignum # [ruby-core:38867]
|
279
279
|
pid = fork do
|
280
|
-
|
280
|
+
x = 1 << 64
|
281
|
+
x.class.class_eval do
|
281
282
|
def to_s
|
282
283
|
end
|
283
284
|
end
|
284
285
|
begin
|
285
|
-
JSON::Ext::Generator::State.new.generate(
|
286
|
+
JSON::Ext::Generator::State.new.generate(x)
|
286
287
|
exit 1
|
287
288
|
rescue TypeError
|
288
289
|
exit 0
|
data/tests/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -167,9 +167,9 @@ require_paths:
|
|
167
167
|
- lib
|
168
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- - "
|
170
|
+
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
172
|
+
version: '1.9'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
175
|
- - ">="
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.6.
|
180
|
+
rubygems_version: 2.6.8
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: JSON Implementation for Ruby
|