multi_json 1.7.4 → 1.7.5

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.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,8 @@
1
+ 1.7.5
2
+ -----
3
+ * [Fix warning '*' interpreted as argument prefix](https://github.com/intridea/multi_json/commit/b698962c7f64430222a1f06430669706a47aff89)
4
+ * [Remove stdlib warning](https://github.com/intridea/multi_json/commit/d06eec6b7996ac8b4ff0e2229efd835379b0c30f)
5
+
1
6
  1.7.4
2
7
  -----
3
8
  * [Cache options for better performance](https://github.com/intridea/multi_json/commit/8a26ee93140c4bed36194ed9fb887a1b6919257b)
@@ -12,8 +17,8 @@
12
17
 
13
18
  1.7.2
14
19
  -----
15
- * [Renamed Jrjackson adapter to JrJackson](https://github.com/intridea/multi_json/commit/b36dc915fc0e6548cbad06b5db6f520e040c9c8b)
16
- * [Implemented jrjackson -> jr_jackson alias for back-compatability](https://github.com/intridea/multi_json/commit/aa50ab8b7bb646b8b75d5d65dfeadae8248a4f10)
20
+ * [Rename Jrjackson adapter to JrJackson](https://github.com/intridea/multi_json/commit/b36dc915fc0e6548cbad06b5db6f520e040c9c8b)
21
+ * [Implement jrjackson -> jr_jackson alias for back-compatability](https://github.com/intridea/multi_json/commit/aa50ab8b7bb646b8b75d5d65dfeadae8248a4f10)
17
22
  * [Update vendored OkJson module](https://github.com/intridea/multi_json/commit/30a3f474e17dd86a697c3fab04f468d1a4fd69d7)
18
23
 
19
24
  1.7.1
@@ -138,7 +143,7 @@
138
143
 
139
144
  0.0.3
140
145
  -----
141
- * [Improved defaulting and documentation](https://github.com/sferik/twitter/commit/3a0e41b9e4b0909201045fa47704b78c9d949b73)
146
+ * [Improve defaulting and documentation](https://github.com/sferik/twitter/commit/3a0e41b9e4b0909201045fa47704b78c9d949b73)
142
147
 
143
148
  0.0.2
144
149
  -----
@@ -31,7 +31,7 @@ module MultiJson
31
31
  %w(load_options= dump_options=).each do |method|
32
32
  define_method method do |*args|
33
33
  use current_adapter
34
- super *args
34
+ super(*args)
35
35
  end
36
36
  end
37
37
 
@@ -5,16 +5,6 @@ module MultiJson
5
5
  class JsonCommon < Adapter
6
6
  defaults :load, :create_additions => false, :quirks_mode => true
7
7
 
8
- GEM_VERSION = '1.7.7'
9
-
10
- def activate
11
- if JSON::VERSION < GEM_VERSION
12
- Kernel.warn "You are using an old or stdlib version of #{gem_name} gem\n" +
13
- "Please upgrade to the recent version by adding this to your Gemfile:\n\n" +
14
- " gem '#{gem_name}', '~> #{GEM_VERSION}'\n"
15
- end
16
- end
17
-
18
8
  def load(string, options={})
19
9
  string = string.read if string.respond_to?(:read)
20
10
 
@@ -6,10 +6,6 @@ module MultiJson
6
6
  # Use the JSON gem to dump/load.
7
7
  class JsonGem < JsonCommon
8
8
  ParseError = ::JSON::ParserError
9
-
10
- def gem_name
11
- 'json'
12
- end
13
9
  end
14
10
  end
15
11
  end
@@ -6,10 +6,6 @@ module MultiJson
6
6
  # Use JSON pure to dump/load.
7
7
  class JsonPure < JsonCommon
8
8
  ParseError = ::JSON::ParserError
9
-
10
- def gem_name
11
- 'json_pure'
12
- end
13
9
  end
14
10
  end
15
11
  end
@@ -1,3 +1,18 @@
1
1
  module MultiJson
2
- VERSION = '1.7.4' unless defined?(MultiJson::VERSION)
2
+ class Version
3
+ MAJOR = 1 unless defined? MultiJson::Version::MAJOR
4
+ MINOR = 7 unless defined? MultiJson::Version::MINOR
5
+ PATCH = 5 unless defined? MultiJson::Version::PATCH
6
+ PRE = nil unless defined? MultiJson::Version::PRE
7
+
8
+ class << self
9
+
10
+ # @return [String]
11
+ def to_s
12
+ [MAJOR, MINOR, PATCH, PRE].compact.join('.')
13
+ end
14
+
15
+ end
16
+
17
+ end
3
18
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.add_development_dependency 'bundler', '~> 1.0'
8
8
  spec.authors = ["Michael Bleigh", "Josh Kalderimis", "Erik Michaels-Ober", "Pavel Pravosud"]
9
9
  spec.cert_chain = %w(certs/sferik.pem)
10
- spec.description = %q{A gem to provide easy switching between different JSON backends, including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem, and OkJson.}
10
+ spec.description = %q{A common interface to multiple JSON libraries, including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb, JrJackson, and OkJson.}
11
11
  spec.email = ['michael@intridea.com', 'josh.kalderimis@gmail.com', 'sferik@gmail.com']
12
12
  spec.files = Dir['.yardopts', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE.md', 'README.md', 'Rakefile', 'multi_json.gemspec', 'Gemfile', '.document', '.rspec', '.travis.yml' ,'spec/**/*', 'lib/**/*']
13
13
  spec.homepage = 'http://github.com/intridea/multi_json'
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.require_paths = ['lib']
17
17
  spec.required_rubygems_version = '>= 1.3.5'
18
18
  spec.signing_key = File.expand_path("~/.gem/private_key.pem") if $0 =~ /gem\z/
19
- spec.summary = %q{A gem to provide swappable JSON backends.}
19
+ spec.summary = %q{A common interface to multiple JSON libraries.}
20
20
  spec.test_files = Dir['spec/**/*']
21
- spec.version = MultiJson::VERSION
21
+ spec.version = MultiJson::Version
22
22
  end
@@ -5,7 +5,9 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
5
  SimpleCov::Formatter::HTMLFormatter,
6
6
  Coveralls::SimpleCov::Formatter
7
7
  ]
8
- SimpleCov.start
8
+ SimpleCov.start do
9
+ add_filter 'vendor'
10
+ end
9
11
 
10
12
  require 'multi_json'
11
13
  require 'rspec'
@@ -62,25 +62,6 @@ describe 'MultiJson' do
62
62
  end
63
63
  end
64
64
 
65
- context 'with stdlib version' do
66
- around do |example|
67
- version = JSON::VERSION
68
- silence_warnings{ JSON::VERSION = '1.5.5' }
69
- example.call
70
- silence_warnings{ JSON::VERSION = version }
71
- end
72
-
73
- it 'should warn about json' do
74
- Kernel.should_receive(:warn).with(/'json', '~> 1.7.7'/)
75
- MultiJson.use :json_gem
76
- end
77
-
78
- it 'should warn about json/pure' do
79
- Kernel.should_receive(:warn).with(/'json_pure', '~> 1.7.7'/)
80
- MultiJson.use :json_pure
81
- end
82
- end
83
-
84
65
  it 'defaults to the best available gem' do
85
66
  # Clear cache variable already set by previous tests
86
67
  MultiJson.send(:remove_instance_variable, :@adapter)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -39,7 +39,7 @@ cert_chain:
39
39
  U0xxV3ZRUnNCbHlwSGZoczZKSnVMbHlaUEdoVTNSL3YKU2YzbFZLcEJDV2dS
40
40
  cEdUdnk0NVhWcEIrNTl5MzNQSm1FdVExUFRFT1l2UXlhbzlVS01BQWFBTi83
41
41
  cVdRdGpsMApobHc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
42
- date: 2013-05-26 00:00:00.000000000 Z
42
+ date: 2013-06-02 00:00:00.000000000 Z
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: bundler
@@ -57,8 +57,9 @@ dependencies:
57
57
  - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: '1.0'
60
- description: A gem to provide easy switching between different JSON backends, including
61
- Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem, and OkJson.
60
+ description: A common interface to multiple JSON libraries, including Oj, Yajl, the
61
+ JSON gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb,
62
+ JrJackson, and OkJson.
62
63
  email:
63
64
  - michael@intridea.com
64
65
  - josh.kalderimis@gmail.com
@@ -122,7 +123,7 @@ rubyforge_project:
122
123
  rubygems_version: 1.8.23
123
124
  signing_key:
124
125
  specification_version: 3
125
- summary: A gem to provide swappable JSON backends.
126
+ summary: A common interface to multiple JSON libraries.
126
127
  test_files:
127
128
  - spec/adapter_shared_example.rb
128
129
  - spec/has_options.rb
metadata.gz.sig CHANGED
Binary file