legion-json 0.1.6 → 1.1.4
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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +69 -25
- data/.gitignore +2 -1
- data/.rubocop.yml +3 -1
- data/Gemfile +0 -1
- data/Gemfile.lock +77 -0
- data/README.md +5 -34
- data/bitbucket-pipelines.yml +10 -19
- data/legion-json.gemspec +10 -13
- data/lib/legion/json.rb +7 -32
- data/lib/legion/json/version.rb +1 -1
- data/sonar-project.properties +11 -0
- metadata +51 -26
- data/.circleci/setup-rubygems.sh +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/legion/json/jrjackson.rb +0 -14
- data/lib/legion/json/oj.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0618ae5248d63f45f70ef35a7b1d2825fcfb88e4a0f8951ed5cd3f8c56c2e48a'
|
|
4
|
+
data.tar.gz: 28788a943771782f54a0d01ebd59f54b8e9a9abb9645d03f49db8dcdfa6a8362
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da75e65198e0647f210b440351bca2aae57bffac00b19cde1feeb2b710d6066d81bbcf8acbae6047dffab02ef0c143138cd34f8e10587e0c57a187360bb213fc
|
|
7
|
+
data.tar.gz: e7c9c1753cc0534dc2a874bfd02065ad9f6ead1919a25abd467eb12673864f46e01860ba55f5c7c8a72f7fdeb88e55778590daf635eb9d7cd8cdce7bfa5d2e6f
|
data/.circleci/config.yml
CHANGED
|
@@ -1,49 +1,90 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
orbs:
|
|
3
|
-
ruby: circleci/ruby@
|
|
3
|
+
ruby: circleci/ruby@1.1.2
|
|
4
|
+
sonarcloud: sonarsource/sonarcloud@1.0.2
|
|
4
5
|
|
|
5
6
|
jobs:
|
|
6
7
|
"rubocop":
|
|
7
8
|
docker:
|
|
8
|
-
- image:
|
|
9
|
+
- image: cimg/ruby:2.7
|
|
9
10
|
steps:
|
|
10
11
|
- checkout
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- run:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
- restore_cache:
|
|
13
|
+
key: "bundler cache mri"
|
|
14
|
+
- run: bundle update
|
|
15
|
+
- run: bundle exec rubocop --format=json --out=rubocop-result.json
|
|
16
|
+
- store_test_results:
|
|
17
|
+
path: rubocop-result.json
|
|
18
|
+
- sonarcloud/scan
|
|
19
|
+
- run: bundle exec rubocop
|
|
20
|
+
- save_cache:
|
|
21
|
+
key: "bundler cache mri"
|
|
22
|
+
paths:
|
|
23
|
+
- "/usr/local/bundle"
|
|
17
24
|
"ruby-two-five":
|
|
18
25
|
docker:
|
|
19
|
-
- image:
|
|
20
|
-
- image: memcached:1.5-alpine
|
|
26
|
+
- image: cimg/ruby:2.5
|
|
21
27
|
steps:
|
|
22
28
|
- checkout
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
29
|
+
- restore_cache:
|
|
30
|
+
key: "bundler cache mri"
|
|
31
|
+
- run: bundle update
|
|
32
|
+
- save_cache:
|
|
33
|
+
key: "bundler cache mri"
|
|
34
|
+
paths:
|
|
35
|
+
- "/usr/local/bundle"
|
|
36
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
|
37
|
+
- store_test_results:
|
|
38
|
+
path: rspec-results.xml
|
|
39
|
+
- sonarcloud/scan
|
|
27
40
|
"ruby-two-six":
|
|
28
41
|
docker:
|
|
29
|
-
- image:
|
|
30
|
-
- image: memcached:1.5-alpine
|
|
42
|
+
- image: cimg/ruby:2.6
|
|
31
43
|
steps:
|
|
32
44
|
- checkout
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
45
|
+
- restore_cache:
|
|
46
|
+
key: "bundler cache mri"
|
|
47
|
+
- run: bundle update
|
|
48
|
+
- save_cache:
|
|
49
|
+
key: "bundler cache mri"
|
|
50
|
+
paths:
|
|
51
|
+
- "/usr/local/bundle"
|
|
52
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
|
53
|
+
- store_test_results:
|
|
54
|
+
path: rspec-results.xml
|
|
55
|
+
- sonarcloud/scan
|
|
37
56
|
"ruby-two-seven":
|
|
38
57
|
docker:
|
|
39
58
|
- image: circleci/ruby:2.7
|
|
40
|
-
- image: memcached:1.5-alpine
|
|
41
59
|
steps:
|
|
42
60
|
- checkout
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
61
|
+
- restore_cache:
|
|
62
|
+
key: "bundler cache mri"
|
|
63
|
+
- run: bundle update
|
|
64
|
+
- save_cache:
|
|
65
|
+
key: "bundler cache mri"
|
|
66
|
+
paths:
|
|
67
|
+
- "/usr/local/bundle"
|
|
68
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
|
69
|
+
- store_test_results:
|
|
70
|
+
path: rspec-results.xml
|
|
71
|
+
- sonarcloud/scan
|
|
72
|
+
"ruby-three":
|
|
73
|
+
docker:
|
|
74
|
+
- image: circleci/ruby:3
|
|
75
|
+
steps:
|
|
76
|
+
- checkout
|
|
77
|
+
- restore_cache:
|
|
78
|
+
key: "bundler cache mri"
|
|
79
|
+
- run: bundle update
|
|
80
|
+
- save_cache:
|
|
81
|
+
key: "bundler cache mri"
|
|
82
|
+
paths:
|
|
83
|
+
- "/usr/local/bundle"
|
|
84
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
|
85
|
+
- store_test_results:
|
|
86
|
+
path: rspec-results.xml
|
|
87
|
+
- sonarcloud/scan
|
|
47
88
|
|
|
48
89
|
workflows:
|
|
49
90
|
version: 2
|
|
@@ -57,5 +98,8 @@ workflows:
|
|
|
57
98
|
requires:
|
|
58
99
|
- ruby-two-five
|
|
59
100
|
- ruby-two-seven:
|
|
101
|
+
requires:
|
|
102
|
+
- ruby-two-five
|
|
103
|
+
- ruby-three:
|
|
60
104
|
requires:
|
|
61
105
|
- ruby-two-five
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require: rubocop-performance
|
|
2
1
|
Layout/LineLength:
|
|
3
2
|
Max: 120
|
|
4
3
|
Metrics/MethodLength:
|
|
@@ -9,6 +8,8 @@ Metrics/BlockLength:
|
|
|
9
8
|
Max: 50
|
|
10
9
|
Layout/SpaceAroundEqualsInParameterDefault:
|
|
11
10
|
EnforcedStyle: space
|
|
11
|
+
Style/OptionalBooleanParameter:
|
|
12
|
+
Enabled: false
|
|
12
13
|
Style/SymbolArray:
|
|
13
14
|
Enabled: true
|
|
14
15
|
Layout/HashAlignment:
|
|
@@ -18,6 +19,7 @@ Style/Documentation:
|
|
|
18
19
|
Enabled: false
|
|
19
20
|
AllCops:
|
|
20
21
|
TargetRubyVersion: 2.5
|
|
22
|
+
NewCops: enable
|
|
21
23
|
Style/FrozenStringLiteralComment:
|
|
22
24
|
Enabled: false
|
|
23
25
|
Naming/FileName:
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
legion-json (1.1.4)
|
|
5
|
+
json_pure
|
|
6
|
+
legion-exceptions (>= 1.1.5)
|
|
7
|
+
multi_json
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
ast (2.4.1)
|
|
13
|
+
diff-lcs (1.4.4)
|
|
14
|
+
docile (1.3.4)
|
|
15
|
+
json (2.5.1)
|
|
16
|
+
json_pure (2.5.1)
|
|
17
|
+
legion-exceptions (1.1.5)
|
|
18
|
+
multi_json (1.15.0)
|
|
19
|
+
oj (3.10.18)
|
|
20
|
+
parallel (1.20.1)
|
|
21
|
+
parser (3.0.0.0)
|
|
22
|
+
ast (~> 2.4.1)
|
|
23
|
+
rainbow (3.0.0)
|
|
24
|
+
rake (13.0.3)
|
|
25
|
+
regexp_parser (2.0.3)
|
|
26
|
+
rexml (3.2.4)
|
|
27
|
+
rspec (3.10.0)
|
|
28
|
+
rspec-core (~> 3.10.0)
|
|
29
|
+
rspec-expectations (~> 3.10.0)
|
|
30
|
+
rspec-mocks (~> 3.10.0)
|
|
31
|
+
rspec-core (3.10.1)
|
|
32
|
+
rspec-support (~> 3.10.0)
|
|
33
|
+
rspec-expectations (3.10.1)
|
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
35
|
+
rspec-support (~> 3.10.0)
|
|
36
|
+
rspec-mocks (3.10.1)
|
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
|
+
rspec-support (~> 3.10.0)
|
|
39
|
+
rspec-support (3.10.1)
|
|
40
|
+
rspec_junit_formatter (0.4.1)
|
|
41
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
|
42
|
+
rubocop (1.8.0)
|
|
43
|
+
parallel (~> 1.10)
|
|
44
|
+
parser (>= 3.0.0.0)
|
|
45
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
46
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
47
|
+
rexml
|
|
48
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
|
49
|
+
ruby-progressbar (~> 1.7)
|
|
50
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
51
|
+
rubocop-ast (1.4.0)
|
|
52
|
+
parser (>= 2.7.1.5)
|
|
53
|
+
ruby-progressbar (1.11.0)
|
|
54
|
+
simplecov (0.17.1)
|
|
55
|
+
docile (~> 1.1)
|
|
56
|
+
json (>= 1.8, < 3)
|
|
57
|
+
simplecov-html (~> 0.10.0)
|
|
58
|
+
simplecov-html (0.10.2)
|
|
59
|
+
simplecov_json_formatter (0.1.2)
|
|
60
|
+
unicode-display_width (2.0.0)
|
|
61
|
+
|
|
62
|
+
PLATFORMS
|
|
63
|
+
x86_64-darwin-18
|
|
64
|
+
|
|
65
|
+
DEPENDENCIES
|
|
66
|
+
bundler (>= 2)
|
|
67
|
+
legion-json!
|
|
68
|
+
oj
|
|
69
|
+
rake
|
|
70
|
+
rspec
|
|
71
|
+
rspec_junit_formatter
|
|
72
|
+
rubocop
|
|
73
|
+
simplecov (< 0.18.0)
|
|
74
|
+
simplecov_json_formatter
|
|
75
|
+
|
|
76
|
+
BUNDLED WITH
|
|
77
|
+
2.2.4
|
data/README.md
CHANGED
|
@@ -1,42 +1,13 @@
|
|
|
1
1
|
# Legion::Json
|
|
2
2
|
|
|
3
|
-
Legion::Json is part of the Legion Framework
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Add this line to your application's Gemfile:
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
gem 'legion-json'
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
And then execute:
|
|
15
|
-
|
|
16
|
-
$ bundle
|
|
17
|
-
|
|
18
|
-
Or install it yourself as:
|
|
19
|
-
|
|
20
|
-
$ gem install legion-json
|
|
3
|
+
Legion::Json is part of the Legion Framework
|
|
4
|
+
[Issue Tracker - Jira](https://legionio.atlassian.net/projects/JSON/issues)
|
|
5
|
+
[Docs - Confluence](https://legionio.atlassian.net/wiki/spaces/LEGION/pages/24674324)
|
|
6
|
+
[RubyGems](https://rubygems.org/gems/legion-json)
|
|
21
7
|
|
|
22
8
|
## Usage
|
|
23
|
-
|
|
24
9
|
This library provides the Legion JSON parser abstraction, enabling the use of platform specific JSON parsers.
|
|
25
|
-
|
|
26
|
-
## Development
|
|
27
|
-
|
|
28
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
29
|
-
|
|
30
|
-
To install this gem onto your local machine, run `bundle exec install`.
|
|
31
|
-
|
|
32
|
-
## Contributing
|
|
33
|
-
|
|
34
|
-
Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/legion-io/legion-json/issues This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
10
|
+
Based on the old sensu-json gem
|
|
35
11
|
|
|
36
12
|
## License
|
|
37
|
-
|
|
38
13
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
39
|
-
|
|
40
|
-
## Credit
|
|
41
|
-
|
|
42
|
-
This gem was based on the Sensu JSON gem. You can find the original gem [here](https://github.com/sensu/sensu-json)
|
data/bitbucket-pipelines.yml
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
image: ruby:2.
|
|
1
|
+
image: ruby:2.7
|
|
2
2
|
|
|
3
3
|
pipelines:
|
|
4
4
|
tags:
|
|
5
|
-
|
|
5
|
+
"v*":
|
|
6
6
|
- step:
|
|
7
|
-
name:
|
|
8
|
-
|
|
9
|
-
deployment: staging
|
|
7
|
+
name: Push to RubyGems
|
|
8
|
+
deployment: RubyGems
|
|
10
9
|
script:
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- step:
|
|
17
|
-
name: Deploy to Rubygems MRI
|
|
18
|
-
image: ruby:2.4.0
|
|
19
|
-
deployment: production
|
|
20
|
-
script:
|
|
21
|
-
- bash .circleci/setup-rubygems.sh
|
|
22
|
-
- gem build legion-json.gemspec
|
|
23
|
-
- gem push "legion-json-$(git describe --tags).gem"
|
|
10
|
+
- gem install gem-release
|
|
11
|
+
- (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
|
|
12
|
+
- gem release
|
|
13
|
+
artifacts:
|
|
14
|
+
- pkg/**
|
|
24
15
|
definitions:
|
|
25
16
|
caches:
|
|
26
|
-
bundler:
|
|
17
|
+
bundler: /usr/local/bundle
|
data/legion-json.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
3
3
|
require 'legion/json/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = 'legion-json'
|
|
7
7
|
spec.version = Legion::Json::VERSION
|
|
8
8
|
spec.authors = ['Esity']
|
|
9
9
|
spec.email = ['matthewdiverson@gmail.com']
|
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = 'A gem used to load and use JSON objects inside the Legion framework'
|
|
13
13
|
spec.homepage = 'https://bitbucket.org/legion-io/legion-json'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version = '
|
|
15
|
+
spec.required_ruby_version = '>= 2.5'
|
|
16
16
|
spec.metadata = {
|
|
17
17
|
'bug_tracker_uri' => 'https://legionio.atlassian.net/projects/JSON/issues',
|
|
18
18
|
'changelog_uri' => 'https://legionio.atlassian.net/wiki/spaces/LEGION/pages/24674324/JSON',
|
|
@@ -25,21 +25,18 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
26
26
|
f.match(%r{^(test|spec|features)/})
|
|
27
27
|
end
|
|
28
|
-
spec.bindir = 'exe'
|
|
29
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
30
28
|
spec.require_paths = ['lib']
|
|
31
29
|
|
|
32
|
-
spec.add_development_dependency 'bundler'
|
|
33
|
-
spec.add_development_dependency '
|
|
30
|
+
spec.add_development_dependency 'bundler', '>= 2'
|
|
31
|
+
spec.add_development_dependency 'oj' unless RUBY_ENGINE == 'jruby'
|
|
34
32
|
spec.add_development_dependency 'rake'
|
|
35
33
|
spec.add_development_dependency 'rspec'
|
|
36
34
|
spec.add_development_dependency 'rspec_junit_formatter'
|
|
37
35
|
spec.add_development_dependency 'rubocop'
|
|
38
|
-
spec.add_development_dependency '
|
|
39
|
-
spec.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
end
|
|
36
|
+
spec.add_development_dependency 'simplecov', '< 0.18.0'
|
|
37
|
+
spec.add_development_dependency 'simplecov_json_formatter'
|
|
38
|
+
|
|
39
|
+
spec.add_dependency 'json_pure'
|
|
40
|
+
spec.add_dependency 'legion-exceptions', '>= 1.1.5'
|
|
41
|
+
spec.add_dependency 'multi_json'
|
|
45
42
|
end
|
data/lib/legion/json.rb
CHANGED
|
@@ -1,48 +1,23 @@
|
|
|
1
1
|
require 'legion/json/version'
|
|
2
2
|
require 'legion/json/parse_error'
|
|
3
|
+
require 'multi_json'
|
|
3
4
|
|
|
4
5
|
module Legion
|
|
5
|
-
# Used to create JSON objects
|
|
6
6
|
module JSON
|
|
7
7
|
class << self
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# the bottom of this file. The appropriate JSON parser will be
|
|
11
|
-
# loaded for the current platform.
|
|
12
|
-
#
|
|
13
|
-
# @return [Object] parser.
|
|
14
|
-
def setup!
|
|
15
|
-
if RUBY_ENGINE == 'jruby'
|
|
16
|
-
require 'jrjackson'
|
|
17
|
-
require 'legion/json/jrjackson'
|
|
18
|
-
@parser = Legion::JSON::JrJackson.new
|
|
19
|
-
else
|
|
20
|
-
require 'oj'
|
|
21
|
-
Oj.default_options = { mode: :compat }
|
|
22
|
-
require 'legion/json/oj'
|
|
23
|
-
@parser = Legion::JSON::Oj.new
|
|
24
|
-
end
|
|
8
|
+
def parser
|
|
9
|
+
@parser ||= MultiJson
|
|
25
10
|
end
|
|
26
11
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
# @param string [String]
|
|
30
|
-
# @return [Object]
|
|
31
|
-
def load(string)
|
|
32
|
-
@parser.load(string)
|
|
12
|
+
def load(string, symbolize_keys = true)
|
|
13
|
+
parser.load(string, symbolize_keys: symbolize_keys)
|
|
33
14
|
rescue StandardError => e
|
|
34
15
|
raise Legion::JSON::ParseError.build(e, string)
|
|
35
16
|
end
|
|
36
17
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# @param object [Object]
|
|
40
|
-
# @param options [Hash]
|
|
41
|
-
def dump(object, options = {})
|
|
42
|
-
@parser.dump(object, options)
|
|
18
|
+
def dump(object, pretty = false)
|
|
19
|
+
parser.dump(object, pretty: pretty)
|
|
43
20
|
end
|
|
44
21
|
end
|
|
45
22
|
end
|
|
46
23
|
end
|
|
47
|
-
|
|
48
|
-
Legion::JSON.setup!
|
data/lib/legion/json/version.rb
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
sonar.projectKey=legion-io_legion-json
|
|
2
|
+
sonar.organization=legion-io
|
|
3
|
+
sonar.sources=.
|
|
4
|
+
sonar.exclusions=vendor/**
|
|
5
|
+
sonar.coverage.exclusions=spec/**
|
|
6
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
|
7
|
+
sonar.ruby.file.suffixes=rb,ruby
|
|
8
|
+
sonar.ruby.coverage.framework=RSpec
|
|
9
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
|
10
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
|
11
|
+
sonar.ruby.rubocop.filePath=.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: legion-json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -16,26 +16,26 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '2'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: oj
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
@@ -95,7 +95,21 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: simplecov
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "<"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: 0.18.0
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "<"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 0.18.0
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: simplecov_json_formatter
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
115
|
- - ">="
|
|
@@ -109,33 +123,47 @@ dependencies:
|
|
|
109
123
|
- !ruby/object:Gem::Version
|
|
110
124
|
version: '0'
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
126
|
+
name: json_pure
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
|
114
128
|
requirements:
|
|
115
|
-
- - "
|
|
129
|
+
- - ">="
|
|
116
130
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
131
|
+
version: '0'
|
|
118
132
|
type: :runtime
|
|
119
133
|
prerelease: false
|
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
135
|
requirements:
|
|
122
|
-
- - "
|
|
136
|
+
- - ">="
|
|
123
137
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '
|
|
138
|
+
version: '0'
|
|
125
139
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
140
|
+
name: legion-exceptions
|
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
|
128
142
|
requirements:
|
|
129
|
-
- - "
|
|
143
|
+
- - ">="
|
|
130
144
|
- !ruby/object:Gem::Version
|
|
131
|
-
version:
|
|
145
|
+
version: 1.1.5
|
|
132
146
|
type: :runtime
|
|
133
147
|
prerelease: false
|
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
149
|
requirements:
|
|
136
|
-
- - "
|
|
150
|
+
- - ">="
|
|
137
151
|
- !ruby/object:Gem::Version
|
|
138
|
-
version:
|
|
152
|
+
version: 1.1.5
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: multi_json
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
type: :runtime
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
139
167
|
description: A gem used to load and use JSON objects inside the Legion framework
|
|
140
168
|
email:
|
|
141
169
|
- matthewdiverson@gmail.com
|
|
@@ -144,23 +172,20 @@ extensions: []
|
|
|
144
172
|
extra_rdoc_files: []
|
|
145
173
|
files:
|
|
146
174
|
- ".circleci/config.yml"
|
|
147
|
-
- ".circleci/setup-rubygems.sh"
|
|
148
175
|
- ".gitignore"
|
|
149
176
|
- ".rubocop.yml"
|
|
150
177
|
- Gemfile
|
|
178
|
+
- Gemfile.lock
|
|
151
179
|
- LICENSE.txt
|
|
152
180
|
- README.md
|
|
153
181
|
- Rakefile
|
|
154
|
-
- bin/console
|
|
155
|
-
- bin/setup
|
|
156
182
|
- bitbucket-pipelines.yml
|
|
157
183
|
- codecov.yml
|
|
158
184
|
- legion-json.gemspec
|
|
159
185
|
- lib/legion/json.rb
|
|
160
|
-
- lib/legion/json/jrjackson.rb
|
|
161
|
-
- lib/legion/json/oj.rb
|
|
162
186
|
- lib/legion/json/parse_error.rb
|
|
163
187
|
- lib/legion/json/version.rb
|
|
188
|
+
- sonar-project.properties
|
|
164
189
|
homepage: https://bitbucket.org/legion-io/legion-json
|
|
165
190
|
licenses:
|
|
166
191
|
- MIT
|
|
@@ -177,7 +202,7 @@ require_paths:
|
|
|
177
202
|
- lib
|
|
178
203
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
204
|
requirements:
|
|
180
|
-
- - "
|
|
205
|
+
- - ">="
|
|
181
206
|
- !ruby/object:Gem::Version
|
|
182
207
|
version: '2.5'
|
|
183
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
@@ -186,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
186
211
|
- !ruby/object:Gem::Version
|
|
187
212
|
version: '0'
|
|
188
213
|
requirements: []
|
|
189
|
-
rubygems_version: 3.
|
|
214
|
+
rubygems_version: 3.1.4
|
|
190
215
|
signing_key:
|
|
191
216
|
specification_version: 4
|
|
192
217
|
summary: Legion JSON
|
data/.circleci/setup-rubygems.sh
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'legion/json'
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require 'irb'
|
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
module Legion
|
|
2
|
-
module JSON
|
|
3
|
-
# The Legion JSON parser when running on JRuby.
|
|
4
|
-
class JrJackson
|
|
5
|
-
def load(string)
|
|
6
|
-
::JrJackson::Json.load(string, symbolize_keys: true, raw: true)
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def dump(object, options = {})
|
|
10
|
-
::JrJackson::Json.dump(object, options)
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
data/lib/legion/json/oj.rb
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module Legion
|
|
2
|
-
module JSON
|
|
3
|
-
# The Legion JSON parser when running on MRI.
|
|
4
|
-
class Oj
|
|
5
|
-
def load(string)
|
|
6
|
-
::Oj.load(string, symbol_keys: true)
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def dump(object, options = {})
|
|
10
|
-
options[:indent] = 2 if options[:pretty]
|
|
11
|
-
::Oj.dump(object, options)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|