diff --git a/Gemfile.lock b/Gemfile.lock index 5e082ef..5a3cb84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - fast_jsonapi (1.0.17) + fast_jsonapi (1.1.0) activesupport (>= 4.2) GEM diff --git a/README.md b/README.md index 4b078b1..90dca72 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ $ bundle install You can use the bundled generator if you are using the library inside of a Rails project: - rails g Serializer Movie name year + rails g serializer Movie name year This will create a new serializer in `app/serializers/movie_serializer.rb` diff --git a/fast_jsonapi.gemspec b/fast_jsonapi.gemspec index 302c0a5..24edd23 100644 --- a/fast_jsonapi.gemspec +++ b/fast_jsonapi.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |gem| gem.name = "fast_jsonapi" - gem.version = "1.0.17" + gem.version = "1.1.0" gem.required_rubygems_version = Gem::Requirement.new(">= 0") if gem.respond_to? :required_rubygems_version= gem.metadata = { "allowed_push_host" => "https://rubygems.org" } if gem.respond_to? :metadata= diff --git a/spec/lib/object_serializer_performance_spec.rb b/spec/lib/object_serializer_performance_spec.rb index e718953..8e52dd2 100644 --- a/spec/lib/object_serializer_performance_spec.rb +++ b/spec/lib/object_serializer_performance_spec.rb @@ -103,6 +103,7 @@ describe FastJsonapi::ObjectSerializer, performance: true do data = Hash[serializers.keys.collect { |k| [ k, { json: nil, time: nil, speed_factor: nil }] }] serializers.each_pair do |k,v| + ams_json = nil json_method = SERIALIZERS[k].key?(:json_method) ? SERIALIZERS[k][:json_method] : :to_json data[k][:time] = Benchmark.measure { data[k][:json] = v.send(json_method) }.real * 1000 end