brianmario-yajl-ruby 0.5.5 → 0.5.6
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/.gitignore +1 -0
- data/CHANGELOG.md +8 -1
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/benchmark/encode.rb +1 -1
- data/benchmark/encode_json_and_marshal.rb +1 -1
- data/benchmark/encode_json_and_yaml.rb +1 -1
- data/benchmark/parse.rb +1 -1
- data/benchmark/parse_json_and_marshal.rb +2 -2
- data/benchmark/parse_json_and_yaml.rb +1 -1
- data/benchmark/subjects/ohai.marshal_dump +0 -0
- data/benchmark/subjects/ohai.yml +975 -0
- data/lib/yajl/json_gem/encoding.rb +40 -0
- data/lib/yajl/json_gem/parsing.rb +26 -0
- data/lib/yajl/json_gem.rb +3 -58
- data/lib/yajl.rb +1 -1
- data/spec/json_gem_compatibility/compatibility_spec.rb +8 -0
- data/yajl-ruby.gemspec +7 -5
- metadata +7 -6
- data/benchmark/subjects/contacts.json +0 -1
- data/benchmark/subjects/contacts.marshal_dump +0 -0
- data/benchmark/subjects/contacts.yml +0 -114685
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.5.6 (June 19th, 2009)
|
4
|
+
* Added JSON.default_options hash to the JSON gem compatibility API
|
5
|
+
* Split out the JSON gem compatibility API's parsing and encoding methods into individually includable files
|
6
|
+
** the use case here is if you *only* want parsing, or *only* want encoding
|
7
|
+
** also, if you don't include encoding it won't include the #to_json overrides which tend to cause problems in some environments.
|
8
|
+
* Removed some large benchmark test files to reduce the size of the packaged gem by 1.5MB!
|
9
|
+
|
3
10
|
## 0.5.5 (June 17th, 2009)
|
4
|
-
* Introduction of the JSON gem
|
11
|
+
* Introduction of the JSON gem compatibility API
|
5
12
|
** NOTE: this isn't a 1:1 compatibility API, the goal was to be compatible with as many of the projects using the JSON gem as possible - not the JSON gem API itself
|
6
13
|
** the compatibility API must be explicitly enabled by requiring 'yajl/json_gem' in your project
|
7
14
|
** JSON.parse, JSON.generate, and the #to_json instance method extension to ruby's primitive classes are all included
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
gem.files = `git ls-files`.split("\n")
|
13
13
|
gem.extensions = ["ext/extconf.rb"]
|
14
14
|
gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
|
15
|
-
|
15
|
+
gem.rubyforge_project = "yajl-ruby"
|
16
16
|
end
|
17
17
|
rescue LoadError
|
18
18
|
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION.yml
CHANGED
data/benchmark/encode.rb
CHANGED
@@ -7,7 +7,7 @@ require 'json'
|
|
7
7
|
# Can't use ActiveSuport::JSON.encode with the JSON gem loaded
|
8
8
|
# require 'activesupport'
|
9
9
|
|
10
|
-
filename = ARGV[0] || 'benchmark/subjects/
|
10
|
+
filename = ARGV[0] || 'benchmark/subjects/ohai.json'
|
11
11
|
json = File.new(filename, 'r')
|
12
12
|
hash = Yajl::Parser.new.parse(json)
|
13
13
|
json.close
|
data/benchmark/parse.rb
CHANGED
@@ -5,8 +5,8 @@ require 'yajl_ext'
|
|
5
5
|
require 'json'
|
6
6
|
|
7
7
|
# JSON section
|
8
|
-
filename = 'benchmark/subjects/
|
9
|
-
marshal_filename = 'benchmark/subjects/
|
8
|
+
filename = 'benchmark/subjects/ohai.json'
|
9
|
+
marshal_filename = 'benchmark/subjects/ohai.marshal_dump'
|
10
10
|
json = File.new(filename, 'r')
|
11
11
|
marshal_file = File.new(marshal_filename, 'r')
|
12
12
|
|
Binary file
|