Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.4, 2.7, '3.0', 3.1, 3.2, truffleruby-head]
ruby: [2.7, '3.0', 3.1, 3.2, 3.3, 3.4, head, truffleruby-head]

steps:
- uses: actions/checkout@v3
Expand All @@ -22,13 +22,13 @@ jobs:
run: |
sudo apt-get install libsqlite3-dev

- name: Install legacy bundler for Ruby 2.4
if: ${{ matrix.ruby == 2.4 }}
- name: Install legacy bundler for Ruby 2.7
if: ${{ matrix.ruby == 2.7 }}
run: |
gem install -q bundler -v 2.3.26
gem install -q bundler -v 2.4.22

- name: Install bundler 2.4+ for modern Rubies
if: ${{ matrix.ruby != 2.4 }}
- name: Install bundler 2.7+ for modern Rubies
if: ${{ matrix.ruby != 2.7 }}
run: |
gem install -q bundler

Expand Down
9 changes: 6 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-performance
- rubocop-rspec

Expand All @@ -23,7 +23,10 @@ Lint/DuplicateMethods:
Exclude:
- 'spec/fixtures/*.rb'

RSpec/FilePath:
RSpec/SpecFilePathFormat:
Enabled: false

RSpec/SpecFilePathSuffix:
Enabled: false

RSpec/DescribedClass:
Expand Down Expand Up @@ -76,7 +79,7 @@ Layout/LineLength:
Exclude:
- 'lib/**/**.rb'

Naming/PredicateName:
Naming/PredicatePrefix:
Exclude:
- 'lib/**/**.rb'

Expand Down
2 changes: 1 addition & 1 deletion jsonapi-serializer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ['lib']
gem.extra_rdoc_files = ['LICENSE.txt', 'README.md']

gem.add_runtime_dependency('activesupport', '>= 4.2')
gem.add_dependency('activesupport', '>= 4.2')

gem.add_development_dependency('activerecord')
gem.add_development_dependency('bundler')
Expand Down
4 changes: 2 additions & 2 deletions lib/fast_jsonapi/object_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def is_collection?(resource, force_is_collection = nil)
end

def inherited(subclass)
super(subclass)
super
subclass.attributes_to_serialize = attributes_to_serialize.dup if attributes_to_serialize.present?
subclass.relationships_to_serialize = relationships_to_serialize.dup if relationships_to_serialize.present?
subclass.cachable_relationships_to_serialize = cachable_relationships_to_serialize.dup if cachable_relationships_to_serialize.present?
Expand Down Expand Up @@ -271,7 +271,7 @@ def create_relationship(base_key, relationship_type, options, block)
name: name,
id_method_name: compute_id_method_name(
options[:id_method_name],
"#{base_serialization_key}#{id_postfix}".to_sym,
:"#{base_serialization_key}#{id_postfix}",
polymorphic,
options[:serializer],
block
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Actor < User
attr_accessor :movies, :movie_ids

def self.fake(id = nil)
faked = super(id)
faked = super
faked.movies = []
faked.movie_ids = []
faked
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
end

require 'active_support'
require 'active_support/core_ext/object'
require 'active_support/core_ext/object/json'
require 'jsonapi/serializer'
require 'ffaker'
Expand Down