json_pure 2.5.1 → 2.6.0

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +5 -5
  3. data/README.md +3 -3
  4. data/VERSION +1 -1
  5. data/json_pure.gemspec +3 -9
  6. data/lib/json/pure/parser.rb +1 -1
  7. data/lib/json/version.rb +1 -1
  8. data/lib/json.rb +1 -1
  9. metadata +7 -89
  10. data/Gemfile +0 -14
  11. data/lib/json/ext/.keep +0 -0
  12. data/tests/fixtures/fail10.json +0 -1
  13. data/tests/fixtures/fail11.json +0 -1
  14. data/tests/fixtures/fail12.json +0 -1
  15. data/tests/fixtures/fail13.json +0 -1
  16. data/tests/fixtures/fail14.json +0 -1
  17. data/tests/fixtures/fail18.json +0 -1
  18. data/tests/fixtures/fail19.json +0 -1
  19. data/tests/fixtures/fail2.json +0 -1
  20. data/tests/fixtures/fail20.json +0 -1
  21. data/tests/fixtures/fail21.json +0 -1
  22. data/tests/fixtures/fail22.json +0 -1
  23. data/tests/fixtures/fail23.json +0 -1
  24. data/tests/fixtures/fail24.json +0 -1
  25. data/tests/fixtures/fail25.json +0 -1
  26. data/tests/fixtures/fail27.json +0 -2
  27. data/tests/fixtures/fail28.json +0 -2
  28. data/tests/fixtures/fail29.json +0 -1
  29. data/tests/fixtures/fail3.json +0 -1
  30. data/tests/fixtures/fail30.json +0 -1
  31. data/tests/fixtures/fail31.json +0 -1
  32. data/tests/fixtures/fail32.json +0 -1
  33. data/tests/fixtures/fail4.json +0 -1
  34. data/tests/fixtures/fail5.json +0 -1
  35. data/tests/fixtures/fail6.json +0 -1
  36. data/tests/fixtures/fail7.json +0 -1
  37. data/tests/fixtures/fail8.json +0 -1
  38. data/tests/fixtures/fail9.json +0 -1
  39. data/tests/fixtures/obsolete_fail1.json +0 -1
  40. data/tests/fixtures/pass1.json +0 -56
  41. data/tests/fixtures/pass15.json +0 -1
  42. data/tests/fixtures/pass16.json +0 -1
  43. data/tests/fixtures/pass17.json +0 -1
  44. data/tests/fixtures/pass2.json +0 -1
  45. data/tests/fixtures/pass26.json +0 -1
  46. data/tests/fixtures/pass3.json +0 -6
  47. data/tests/json_addition_test.rb +0 -199
  48. data/tests/json_common_interface_test.rb +0 -169
  49. data/tests/json_encoding_test.rb +0 -107
  50. data/tests/json_ext_parser_test.rb +0 -15
  51. data/tests/json_fixtures_test.rb +0 -40
  52. data/tests/json_generator_test.rb +0 -399
  53. data/tests/json_generic_object_test.rb +0 -82
  54. data/tests/json_parser_test.rb +0 -497
  55. data/tests/json_string_matching_test.rb +0 -38
  56. data/tests/lib/core_assertions.rb +0 -763
  57. data/tests/lib/envutil.rb +0 -365
  58. data/tests/lib/find_executable.rb +0 -22
  59. data/tests/lib/helper.rb +0 -4
  60. data/tests/ractor_test.rb +0 -30
  61. data/tests/test_helper.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4e1c25d9bf266db237cc4ff4b8ed5d3eef23970a2955629263bd77cde2a2d22
4
- data.tar.gz: 17c534038df29705db934ed1142422809303e15e867b10826f2249b593b01b9c
3
+ metadata.gz: 8f1ce1e33dc671d54c843629592229a16a0de61727602228a65b508581abb051
4
+ data.tar.gz: 21b166151dd27512e74c2f157f54dd310d488a80a96da564ccaed31772a61108
5
5
  SHA512:
6
- metadata.gz: 21d99e851ffb2f991fe4b1abc9aa68afe45fbce41db7bfd46a3e511b5f5436cf8074f9916287bf73b9bb9fb47c50747b49a75461c90c43300cb9dcb196c28856
7
- data.tar.gz: b4f0783804a87d0274f757085933df8776c4faa7776d43075c9613b210ccff72988cdec0895aef6b94aaec2e02ce03b512c8d093b534bf7d4e4a5778716e51ca
6
+ metadata.gz: c49d14b3e02ce23c16bf1ee4fea517789a5191e4d994433c886aa48ddbfc4209bd7de24de928405e81419ab715d06ac6b558eb21054eaaa7af825e62cac8eb55
7
+ data.tar.gz: 39df566e12dede3bb3c27768ea1fdee5310aba19b879fe87509a4735a2e9177f927bd02b15978419992ff4b7b946755b416587db40282626a48bd574e4735cc0
data/CHANGES.md CHANGED
@@ -83,7 +83,7 @@
83
83
 
84
84
  ## 2015-09-11 (2.0.0)
85
85
  * Now complies to newest JSON RFC 7159.
86
- * Implements compatibiliy to ruby 2.4 integer unification.
86
+ * Implements compatibility to ruby 2.4 integer unification.
87
87
  * Drops support for old rubies whose life has ended, that is rubies < 2.0.
88
88
  Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
89
89
  * There were still some mentions of dual GPL licensing in the source, but JSON
@@ -124,9 +124,9 @@
124
124
  ## 2013-02-04 (1.7.7)
125
125
  * Security fix for JSON create_additions default value and
126
126
  `JSON::GenericObject`. It should not be possible to create additions unless
127
- explicitely requested by setting the create_additions argument to true or
127
+ explicitly requested by setting the create_additions argument to true or
128
128
  using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
129
- be automatically deserialised, this has to be explicitely enabled by
129
+ be automatically deserialised, this has to be explicitly enabled by
130
130
  setting
131
131
  JSON::GenericObject.json_creatable = true
132
132
  as well.
@@ -272,7 +272,7 @@
272
272
  ## 2010-04-23 (1.4.0)
273
273
  * Major speed improvements and building with simplified
274
274
  directory/file-structure.
275
- * Extension should at least be comapatible with MRI, YARV and Rubinius.
275
+ * Extension should at least be compatible with MRI, YARV and Rubinius.
276
276
 
277
277
  ## 2010-04-07 (1.2.4)
278
278
  * Triger const_missing callback to make Rails' dynamic class loading work.
@@ -290,7 +290,7 @@
290
290
  strings in object names/keys.
291
291
 
292
292
  ## 2009-10-01 (1.2.0)
293
- * `fast_generate` now raises an exeception for nan and infinite floats.
293
+ * `fast_generate` now raises an exception for nan and infinite floats.
294
294
  * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
295
295
  and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
296
296
  functions are used to convert from all supported encodings. ASCII-8BIT
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # JSON implementation for Ruby
2
2
 
3
- [![Travis Widget](http://travis-ci.org/flori/json.svg?branch=master)](https://travis-ci.org/flori/json)
3
+ [![CI](https://github.com/flori/json/actions/workflows/ci.yml/badge.svg)](https://github.com/flori/json/actions/workflows/ci.yml)
4
4
 
5
5
  ## Description
6
6
 
@@ -267,7 +267,7 @@ the `pp` library's `pp` methods.
267
267
 
268
268
  The script `tools/server.rb` contains a small example if you want to test, how
269
269
  receiving a JSON object from a webrick server in your browser with the
270
- javasript prototype library http://www.prototypejs.org works.
270
+ JavaScript prototype library http://www.prototypejs.org works.
271
271
 
272
272
  ## Speed Comparisons
273
273
 
@@ -294,7 +294,7 @@ extension:
294
294
  ```
295
295
 
296
296
  In the table above 1 is `JSON::Ext::Parser`, 2 is `YAML.load` with YAML
297
- compatbile JSON document, 3 is is `JSON::Pure::Parser`, and 4 is
297
+ compatible JSON document, 3 is is `JSON::Pure::Parser`, and 4 is
298
298
  `ActiveSupport::JSON.decode`. The ActiveSupport JSON-decoder converts the
299
299
  input first to YAML and then uses the YAML-parser, the conversion seems to
300
300
  slow it down so much that it is only as fast as the `JSON::Pure::Parser`!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.6.0
data/json_pure.gemspec CHANGED
@@ -11,10 +11,9 @@ Gem::Specification.new do |s|
11
11
  s.email = "flori@ping.de".freeze
12
12
 
13
13
  s.extra_rdoc_files = ["README.md".freeze]
14
- s.rdoc_options = ["--title".freeze, "JSON implemention for ruby".freeze, "--main".freeze, "README.md".freeze]
14
+ s.rdoc_options = ["--title".freeze, "JSON implementation for ruby".freeze, "--main".freeze, "README.md".freeze]
15
15
  s.files = [
16
16
  "CHANGES.md".freeze,
17
- "Gemfile".freeze,
18
17
  "LICENSE".freeze,
19
18
  "README.md".freeze,
20
19
  "VERSION".freeze,
@@ -36,13 +35,12 @@ Gem::Specification.new do |s|
36
35
  "lib/json/add/time.rb".freeze,
37
36
  "lib/json/common.rb".freeze,
38
37
  "lib/json/ext.rb".freeze,
39
- "lib/json/ext/.keep".freeze,
40
38
  "lib/json/generic_object.rb".freeze,
41
39
  "lib/json/pure.rb".freeze,
42
40
  "lib/json/pure/generator.rb".freeze,
43
41
  "lib/json/pure/parser.rb".freeze,
44
42
  "lib/json/version.rb".freeze,
45
- ] + Dir["tests/**/*"]
43
+ ]
46
44
  s.homepage = "http://flori.github.com/json".freeze
47
45
  s.metadata = {
48
46
  'bug_tracker_uri' => 'https://github.com/flori/json/issues',
@@ -53,9 +51,5 @@ Gem::Specification.new do |s|
53
51
  'wiki_uri' => 'https://github.com/flori/json/wiki'
54
52
  }
55
53
 
56
- s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
57
- s.test_files = ["./tests/test_helper.rb".freeze]
58
-
59
- s.add_development_dependency "rake"
60
- s.add_development_dependency "test-unit"
54
+ s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
61
55
  end
@@ -45,7 +45,7 @@ module JSON
45
45
  /(?=\*/) # single slash before this comment's end
46
46
  )*
47
47
  \*/ # the End of this comment
48
- |[ \t\r\n]+ # whitespaces: space, horicontal tab, lf, cr
48
+ |[ \t\r\n]+ # whitespaces: space, horizontal tab, lf, cr
49
49
  )+
50
50
  )mx
51
51
 
data/lib/json/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
  module JSON
3
3
  # JSON version
4
- VERSION = '2.5.1'
4
+ VERSION = '2.6.0'
5
5
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
6
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
7
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/lib/json.rb CHANGED
@@ -493,7 +493,7 @@ require 'json/common'
493
493
  # json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]}
494
494
  # ruby1 = JSON.parse(json, create_additions: true) # #<struct Customer name="Dave", address="123 Main">
495
495
  # ruby1.class # Customer
496
- #
496
+ #
497
497
  # \Symbol:
498
498
  # require 'json/add/symbol'
499
499
  # ruby0 = :foo # foo
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_pure
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-22 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: test-unit
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: This is a JSON implementation in pure Ruby.
42
14
  email: flori@ping.de
43
15
  executables: []
@@ -45,9 +17,7 @@ extensions: []
45
17
  extra_rdoc_files:
46
18
  - README.md
47
19
  files:
48
- - "./tests/test_helper.rb"
49
20
  - CHANGES.md
50
- - Gemfile
51
21
  - LICENSE
52
22
  - README.md
53
23
  - VERSION
@@ -69,62 +39,11 @@ files:
69
39
  - lib/json/add/time.rb
70
40
  - lib/json/common.rb
71
41
  - lib/json/ext.rb
72
- - lib/json/ext/.keep
73
42
  - lib/json/generic_object.rb
74
43
  - lib/json/pure.rb
75
44
  - lib/json/pure/generator.rb
76
45
  - lib/json/pure/parser.rb
77
46
  - lib/json/version.rb
78
- - tests/fixtures/fail10.json
79
- - tests/fixtures/fail11.json
80
- - tests/fixtures/fail12.json
81
- - tests/fixtures/fail13.json
82
- - tests/fixtures/fail14.json
83
- - tests/fixtures/fail18.json
84
- - tests/fixtures/fail19.json
85
- - tests/fixtures/fail2.json
86
- - tests/fixtures/fail20.json
87
- - tests/fixtures/fail21.json
88
- - tests/fixtures/fail22.json
89
- - tests/fixtures/fail23.json
90
- - tests/fixtures/fail24.json
91
- - tests/fixtures/fail25.json
92
- - tests/fixtures/fail27.json
93
- - tests/fixtures/fail28.json
94
- - tests/fixtures/fail29.json
95
- - tests/fixtures/fail3.json
96
- - tests/fixtures/fail30.json
97
- - tests/fixtures/fail31.json
98
- - tests/fixtures/fail32.json
99
- - tests/fixtures/fail4.json
100
- - tests/fixtures/fail5.json
101
- - tests/fixtures/fail6.json
102
- - tests/fixtures/fail7.json
103
- - tests/fixtures/fail8.json
104
- - tests/fixtures/fail9.json
105
- - tests/fixtures/obsolete_fail1.json
106
- - tests/fixtures/pass1.json
107
- - tests/fixtures/pass15.json
108
- - tests/fixtures/pass16.json
109
- - tests/fixtures/pass17.json
110
- - tests/fixtures/pass2.json
111
- - tests/fixtures/pass26.json
112
- - tests/fixtures/pass3.json
113
- - tests/json_addition_test.rb
114
- - tests/json_common_interface_test.rb
115
- - tests/json_encoding_test.rb
116
- - tests/json_ext_parser_test.rb
117
- - tests/json_fixtures_test.rb
118
- - tests/json_generator_test.rb
119
- - tests/json_generic_object_test.rb
120
- - tests/json_parser_test.rb
121
- - tests/json_string_matching_test.rb
122
- - tests/lib/core_assertions.rb
123
- - tests/lib/envutil.rb
124
- - tests/lib/find_executable.rb
125
- - tests/lib/helper.rb
126
- - tests/ractor_test.rb
127
- - tests/test_helper.rb
128
47
  homepage: http://flori.github.com/json
129
48
  licenses:
130
49
  - Ruby
@@ -138,7 +57,7 @@ metadata:
138
57
  post_install_message:
139
58
  rdoc_options:
140
59
  - "--title"
141
- - JSON implemention for ruby
60
+ - JSON implementation for ruby
142
61
  - "--main"
143
62
  - README.md
144
63
  require_paths:
@@ -147,16 +66,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
66
  requirements:
148
67
  - - ">="
149
68
  - !ruby/object:Gem::Version
150
- version: '2.0'
69
+ version: '2.3'
151
70
  required_rubygems_version: !ruby/object:Gem::Requirement
152
71
  requirements:
153
72
  - - ">="
154
73
  - !ruby/object:Gem::Version
155
74
  version: '0'
156
75
  requirements: []
157
- rubygems_version: 3.2.2
76
+ rubygems_version: 3.3.0.dev
158
77
  signing_key:
159
78
  specification_version: 4
160
79
  summary: JSON Implementation for Ruby
161
- test_files:
162
- - "./tests/test_helper.rb"
80
+ test_files: []
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- # vim: set ft=ruby:
2
-
3
- source 'https://rubygems.org'
4
-
5
- case ENV['JSON']
6
- when 'ext', nil
7
- if ENV['RUBY_ENGINE'] == 'jruby'
8
- gemspec :name => 'json-java'
9
- else
10
- gemspec :name => 'json'
11
- end
12
- when 'pure'
13
- gemspec :name => 'json_pure'
14
- end
data/lib/json/ext/.keep DELETED
File without changes
@@ -1 +0,0 @@
1
- {"Extra value after close": true} "misplaced quoted value"
@@ -1 +0,0 @@
1
- {"Illegal expression": 1 + 2}
@@ -1 +0,0 @@
1
- {"Illegal invocation": alert()}
@@ -1 +0,0 @@
1
- {"Numbers cannot have leading zeroes": 013}
@@ -1 +0,0 @@
1
- {"Numbers cannot be hex": 0x14}
@@ -1 +0,0 @@
1
- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
@@ -1 +0,0 @@
1
- {"Missing colon" null}
@@ -1 +0,0 @@
1
- ["Unclosed array"
@@ -1 +0,0 @@
1
- {"Double colon":: null}
@@ -1 +0,0 @@
1
- {"Comma instead of colon", null}
@@ -1 +0,0 @@
1
- ["Colon instead of comma": false]
@@ -1 +0,0 @@
1
- ["Bad value", truth]
@@ -1 +0,0 @@
1
- ['single quote']
@@ -1 +0,0 @@
1
- ["tab character in string "]
@@ -1,2 +0,0 @@
1
- ["line
2
- break"]
@@ -1,2 +0,0 @@
1
- ["line\
2
- break"]
@@ -1 +0,0 @@
1
- {
@@ -1 +0,0 @@
1
- {unquoted_key: "keys must be quoted"}
@@ -1 +0,0 @@
1
- [
@@ -1 +0,0 @@
1
- [1, 2, 3,
@@ -1 +0,0 @@
1
- {"foo": "bar"
@@ -1 +0,0 @@
1
- ["extra comma",]
@@ -1 +0,0 @@
1
- ["double extra comma",,]
@@ -1 +0,0 @@
1
- [ , "<-- missing value"]
@@ -1 +0,0 @@
1
- ["Comma after the close"],
@@ -1 +0,0 @@
1
- ["Extra close"]]
@@ -1 +0,0 @@
1
- {"Extra comma": true,}
@@ -1 +0,0 @@
1
- "A JSON payload should be an object or array, not a string."
@@ -1,56 +0,0 @@
1
- [
2
- "JSON Test Pattern pass1",
3
- {"object with 1 member":["array with 1 element"]},
4
- {},
5
- [],
6
- -42,
7
- true,
8
- false,
9
- null,
10
- {
11
- "integer": 1234567890,
12
- "real": -9876.543210,
13
- "e": 0.123456789e-12,
14
- "E": 1.234567890E+34,
15
- "": 23456789012E666,
16
- "zero": 0,
17
- "one": 1,
18
- "space": " ",
19
- "quote": "\"",
20
- "backslash": "\\",
21
- "controls": "\b\f\n\r\t",
22
- "slash": "/ & \/",
23
- "alpha": "abcdefghijklmnopqrstuvwyz",
24
- "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
25
- "digit": "0123456789",
26
- "special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
27
- "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
28
- "true": true,
29
- "false": false,
30
- "null": null,
31
- "array":[ ],
32
- "object":{ },
33
- "address": "50 St. James Street",
34
- "url": "http://www.JSON.org/",
35
- "comment": "// /* <!-- --",
36
- "# -- --> */": " ",
37
- " s p a c e d " :[1,2 , 3
38
-
39
- ,
40
-
41
- 4 , 5 , 6 ,7 ],
42
- "compact": [1,2,3,4,5,6,7],
43
- "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
44
- "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
45
- "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
46
- : "A key can be any string"
47
- },
48
- 0.5 ,98.6
49
- ,
50
- 99.44
51
- ,
52
-
53
- 1066
54
-
55
-
56
- ,"rosebud"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \x15"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \'"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \017"]
@@ -1 +0,0 @@
1
- [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
@@ -1 +0,0 @@
1
- ["tab\ character\ in\ string\ "]
@@ -1,6 +0,0 @@
1
- {
2
- "JSON Test Pattern pass3": {
3
- "The outermost value": "must be an object or array.",
4
- "In this test": "It is an object."
5
- }
6
- }