Fix typo in the readme sample command (#131)
fix typo in the readme sample command
This commit is contained in:
parent
88553cf9ab
commit
b387f94a13
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
fast_jsonapi (1.0.17)
|
fast_jsonapi (1.1.0)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|||||||
@ -60,7 +60,7 @@ $ bundle install
|
|||||||
You can use the bundled generator if you are using the library inside of
|
You can use the bundled generator if you are using the library inside of
|
||||||
a Rails project:
|
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`
|
This will create a new serializer in `app/serializers/movie_serializer.rb`
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Gem::Specification.new do |gem|
|
Gem::Specification.new do |gem|
|
||||||
gem.name = "fast_jsonapi"
|
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.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=
|
gem.metadata = { "allowed_push_host" => "https://rubygems.org" } if gem.respond_to? :metadata=
|
||||||
|
|||||||
@ -103,6 +103,7 @@ describe FastJsonapi::ObjectSerializer, performance: true do
|
|||||||
data = Hash[serializers.keys.collect { |k| [ k, { json: nil, time: nil, speed_factor: nil }] }]
|
data = Hash[serializers.keys.collect { |k| [ k, { json: nil, time: nil, speed_factor: nil }] }]
|
||||||
|
|
||||||
serializers.each_pair do |k,v|
|
serializers.each_pair do |k,v|
|
||||||
|
ams_json = nil
|
||||||
json_method = SERIALIZERS[k].key?(:json_method) ? SERIALIZERS[k][:json_method] : :to_json
|
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
|
data[k][:time] = Benchmark.measure { data[k][:json] = v.send(json_method) }.real * 1000
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user