ruson 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/README.md +4 -0
- data/lib/ruson/base.rb +3 -3
- data/lib/ruson/version.rb +1 -1
- data/ruson.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce2f769ca67cbfea3feffe5a675187972178ef0aa0f3198e5bd661eb73ba0b6b
|
4
|
+
data.tar.gz: aa3a6364985dcde6e9fe02c2c08375542d4108920cb11c24992734fbf155e113
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a1f330248e57a9528cd1a47b6bf75910c69a6730144e1e406cc4868092bd0a0fded5638f9abf6e1c1599490968d6a3316a153a89c4c2ffa7a0527c9cb960c5f
|
7
|
+
data.tar.gz: a500b50c315b2dec1c563801fa6fd692d831cdbd1fbf5ef90b68b4fb1df1f6abc740a3336907fdb91dbbc830a3df9095d87149abd616e009ca2adce93b2ccb30
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -144,6 +144,10 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
144
144
|
|
145
145
|
Bug reports and pull requests are welcome on GitHub at https://github.com/klriutsa/ruson. 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.
|
146
146
|
|
147
|
+
## Code Status
|
148
|
+
|
149
|
+
[![Build Status](https://travis-ci.org/klriutsa/ruson.svg?branch=master)](https://travis-ci.org/klriutsa/ruson)
|
150
|
+
|
147
151
|
## License
|
148
152
|
|
149
153
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/ruson/base.rb
CHANGED
@@ -20,9 +20,9 @@ module Ruson
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def initialize(json,
|
24
|
-
params
|
25
|
-
params
|
23
|
+
def initialize(json, root_key: nil)
|
24
|
+
params = convert(json)
|
25
|
+
params = params[root_key.to_s] unless root_key.nil?
|
26
26
|
@params = params
|
27
27
|
|
28
28
|
self.class.accessors.each do |key, options|
|
data/lib/ruson/version.rb
CHANGED
data/ruson.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~>
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
27
|
spec.add_development_dependency 'activesupport'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- klriutsa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
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.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
|
110
|
-
rubygems_version: 2.7.7
|
109
|
+
rubygems_version: 3.0.3
|
111
110
|
signing_key:
|
112
111
|
specification_version: 4
|
113
112
|
summary: ruby json library.
|