mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Stick to bundle < 2
This commit is contained in:
parent
1ebdda331a
commit
4a4a0f263e
@ -4,6 +4,7 @@ skip_tags: true
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
JRUBY_OPTS: "--dev -J-Xmx1024M --debug"
|
JRUBY_OPTS: "--dev -J-Xmx1024M --debug"
|
||||||
|
RAILS_VERSION: 5.2
|
||||||
matrix:
|
matrix:
|
||||||
- ruby_version: "Ruby23"
|
- ruby_version: "Ruby23"
|
||||||
- ruby_version: "Ruby23-x64"
|
- ruby_version: "Ruby23-x64"
|
||||||
@ -13,6 +14,9 @@ cache:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- SET PATH=C:\%ruby_version%\bin;%PATH%
|
- SET PATH=C:\%ruby_version%\bin;%PATH%
|
||||||
|
- gem uninstall bundler -a -x -I
|
||||||
|
- gem update --system 2.7.9
|
||||||
|
- # gem install bundler -v '1.17.3'
|
||||||
- bundle env
|
- bundle env
|
||||||
- bundle check || bundle install --path=vendor/bundle --retry=3 --jobs=3
|
- bundle check || bundle install --path=vendor/bundle --retry=3 --jobs=3
|
||||||
- bundle clean --force
|
- bundle clean --force
|
||||||
|
|||||||
@ -164,7 +164,7 @@ module ActiveModelSerializers
|
|||||||
|
|
||||||
assert_equal 'Foo', author_json[:name]
|
assert_equal 'Foo', author_json[:name]
|
||||||
|
|
||||||
author.update_attributes(name: 'Bar')
|
author.update(name: 'Bar')
|
||||||
author_json = AuthorSerializerWithCache.new(author).as_json
|
author_json = AuthorSerializerWithCache.new(author).as_json
|
||||||
|
|
||||||
expected = 'Bar'
|
expected = 'Bar'
|
||||||
@ -202,10 +202,12 @@ module ActiveModelSerializers
|
|||||||
end
|
end
|
||||||
|
|
||||||
bar = 'Bar'
|
bar = 'Bar'
|
||||||
|
Timecop.travel(10.seconds.from_now) do
|
||||||
author.update!(name: bar)
|
author.update!(name: bar)
|
||||||
|
|
||||||
collection_json = render_object_with_cache(author_collection, each_serializer: AuthorSerializerWithCache)
|
collection_json = render_object_with_cache(author_collection, each_serializer: AuthorSerializerWithCache)
|
||||||
assert_equal [{ name: bar }, { name: bar }, { name: foo2 }], collection_json
|
assert_equal [{ name: bar }, { name: bar }, { name: foo2 }], collection_json
|
||||||
|
end
|
||||||
ensure
|
ensure
|
||||||
ARModels::Author.cache_versioning = original_cache_versioning unless original_cache_versioning == :none
|
ARModels::Author.cache_versioning = original_cache_versioning unless original_cache_versioning == :none
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user