Skip to content

Commit

Permalink
Merge branch '0-10-stable' into 0-10-stable-wantedly
Browse files Browse the repository at this point in the history
  • Loading branch information
qnighy committed Oct 6, 2023
2 parents e6a85c2 + 524aeef commit fcec3c8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
matrix:
include:
# Recent Rubies and Rails
- ruby-version: '3.1'
rails-version: '7.0'
- ruby-version: '3.0'
rails-version: '7.0'
- ruby-version: '2.7'
rails-version: '7.0'
- ruby-version: '2.6'
rails-version: '6.1'
- ruby-version: '2.6'
Expand Down
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
## 0.10.x

### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.12...0-10-stable)
### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.13...0-10-stable)

Breaking changes:

Features:

Fixes:

- [#2399](https://github.com/rails-api/active_model_serializers/pull/2399) Handles edge case where requested current_page > total_pages (@f3z0)

Misc:

### [v0.10.13 (2022-01013)](https://github.com/rails-api/active_model_serializers/compare/v0.10.12...v0.10.13)

Fixes:

- [#2399](https://github.com/rails-api/active_model_serializers/pull/2399) Handles edge case where requested current_page > total_pages (@f3z0)

### [v0.10.12 (2020-12-10)](https://github.com/rails-api/active_model_serializers/compare/v0.10.11...v0.10.12)

Fixes:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ eval_gemfile local_gemfile if File.readable?(local_gemfile)
# Specify your gem's dependencies in active_model_serializers.gemspec
gemspec

version = ENV['RAILS_VERSION'] || '4.2'
version = ENV['RAILS_VERSION'] || '6.1'

if version == 'master'
gem 'rack', github: 'rack/rack'
Expand Down
2 changes: 1 addition & 1 deletion active_model_serializers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.1'

rails_versions = ['>= 4.1', '< 7.0']
rails_versions = ['>= 4.1', '< 7.1']
spec.add_runtime_dependency 'activemodel', rails_versions
# 'activesupport', rails_versions
# 'builder'
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model/serializer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveModel
class Serializer
VERSION = '0.10.12'.freeze
VERSION = '0.10.13'.freeze
end
end
7 changes: 6 additions & 1 deletion test/action_controller/serialization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Serialization
class ImplicitSerializerTest < ActionController::TestCase
class ImplicitSerializationTestController < ActionController::Base
include SerializationTesting

def render_using_implicit_serializer
@profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
render json: @profile
Expand Down Expand Up @@ -75,8 +76,12 @@ def render_json_array_object_without_serializer
render json: [{ error: 'Result is Invalid' }]
end

# HACK: to prevent the resetting of instance variables after each request in Rails 7
# see https://github.com/rails/rails/pull/43735
def clear_instance_variables_between_requests; end

def update_and_render_object_with_cache_enabled
@post.updated_at = Time.zone.now
@post.updated_at = Time.zone.now # requires hack above to prevent `NoMethodError: undefined method `updated_at=' for nil:NilClass`

generate_cached_serializer(@post)
render json: @post
Expand Down

0 comments on commit fcec3c8

Please sign in to comment.