sensu-json 1.1.1-java → 2.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +0 -3
- data/lib/sensu/json.rb +2 -2
- data/lib/sensu/json/{java.rb → jrjackson.rb} +4 -8
- data/sensu-json.gemspec +6 -3
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e306899d54d06d0dfde699f96199758d069266c8
|
4
|
+
data.tar.gz: c8a25da16ec5bc19dbd1e6e4c54ea5ad916a8718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6adfe3add1175a020a68709d82aac60082edd34ac310d268d7d47c04b380f0f18d4435445cd3b97f65b9d27b5dd6af1537eae6362b965192a321cb26df643d21
|
7
|
+
data.tar.gz: 54a9cc6ec89d7080a490a6d806dccb377c62333d1396cd9aa1143750dedee7de247ce2a840b3336140c2cb853dad815a69b64a9a5bbf3b3505042ff5ac1d2319
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,9 +2,6 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/sensu/sensu-json.svg?branch=master)](https://travis-ci.org/sensu/sensu-json)
|
4
4
|
|
5
|
-
[![Code Climate](https://codeclimate.com/github/sensu/sensu-json.png)](https://codeclimate.com/github/sensu/sensu-json)
|
6
|
-
[![Code Climate Coverage](https://codeclimate.com/github/sensu/sensu-json/coverage.png)](https://codeclimate.com/github/sensu/sensu-json)
|
7
|
-
|
8
5
|
## Installation
|
9
6
|
|
10
7
|
Add this line to your application's Gemfile:
|
data/lib/sensu/json.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
require "
|
1
|
+
require "jrjackson"
|
2
2
|
|
3
3
|
module Sensu
|
4
4
|
module JSON
|
5
5
|
# The Sensu JSON parser when running on JRuby.
|
6
|
-
class
|
6
|
+
class JrJackson
|
7
7
|
# Load (and parse) a JSON string. Sensu expects symbolized keys.
|
8
8
|
#
|
9
9
|
# @param string [String]
|
10
10
|
# @return [Object]
|
11
11
|
def load(string)
|
12
|
-
::
|
12
|
+
::JrJackson::Json.load(string, :symbolize_keys => true, :raw => true)
|
13
13
|
end
|
14
14
|
|
15
15
|
# Dump (generate) a JSON string from a Ruby object.
|
@@ -17,11 +17,7 @@ module Sensu
|
|
17
17
|
# @param object [Object]
|
18
18
|
# @param options [Hash]
|
19
19
|
def dump(object, options={})
|
20
|
-
|
21
|
-
::JSON.pretty_generate(object)
|
22
|
-
else
|
23
|
-
::JSON.fast_generate(object)
|
24
|
-
end
|
20
|
+
::JrJackson::Json.dump(object, options)
|
25
21
|
end
|
26
22
|
end
|
27
23
|
end
|
data/sensu-json.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "sensu-json"
|
5
|
-
spec.version = "
|
5
|
+
spec.version = "2.0.0"
|
6
6
|
spec.platform = RUBY_PLATFORM =~ /java/ ? Gem::Platform::JAVA : Gem::Platform::RUBY
|
7
7
|
spec.authors = ["Sean Porter"]
|
8
8
|
spec.email = ["portertech@gmail.com"]
|
@@ -16,10 +16,13 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
|
19
|
+
if RUBY_PLATFORM =~ /java/
|
20
|
+
spec.add_dependency("jrjackson", "0.4.0")
|
21
|
+
else
|
22
|
+
spec.add_dependency("oj", "2.14.6")
|
23
|
+
end
|
20
24
|
|
21
25
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
26
|
spec.add_development_dependency "rake"
|
23
27
|
spec.add_development_dependency "rspec"
|
24
|
-
spec.add_development_dependency "codeclimate-test-reporter"
|
25
28
|
end
|
metadata
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: jrjackson
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.4.0
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
|
-
- -
|
22
|
+
- - '='
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: 0.4.0
|
25
25
|
prerelease: false
|
26
|
-
type: :
|
26
|
+
type: :runtime
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.6'
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- - "
|
36
|
+
- - "~>"
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
38
|
+
version: '1.6'
|
39
39
|
prerelease: false
|
40
40
|
type: :development
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
prerelease: false
|
54
54
|
type: :development
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- bin/console
|
83
83
|
- bin/setup
|
84
84
|
- lib/sensu/json.rb
|
85
|
-
- lib/sensu/json/
|
85
|
+
- lib/sensu/json/jrjackson.rb
|
86
86
|
- lib/sensu/json/oj.rb
|
87
87
|
- lib/sensu/json/parse_error.rb
|
88
88
|
- sensu-json.gemspec
|