Compare commits

...

3 Commits

Author SHA1 Message Date
Clemens Kofler
7db80f673d Clarify README wording related to contributions 2022-04-04 18:52:58 +01:00
Peter Goldstein
bcee2b597b Add Ruby 3.1 to CI
Also fixes the unquoted 3.0, which needs to be quoted to avoid truncation
Addresses a few Rubocop issues and an active_support require issue on Rails 7 w/Zeitwerk
2022-02-02 21:40:34 +00:00
Igor Victor
44cf8495ea Update ci.yml 2021-04-12 11:50:08 +01:00
10 changed files with 20 additions and 8 deletions

View File

@ -4,16 +4,16 @@ on: [push, pull_request]
jobs: jobs:
tests: tests:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
ruby: [2.4, 2.7, 3.0] ruby: [2.4, 2.7, '3.0', 3.1, truffleruby-head]
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Sets up the Ruby version - name: Sets up the Ruby version
uses: actions/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: ${{ matrix.ruby }} ruby-version: ${{ matrix.ruby }}

View File

@ -42,6 +42,9 @@ Performance/TimesMap:
Exclude: Exclude:
- 'spec/**/**.rb' - 'spec/**/**.rb'
Gemspec/RequiredRubyVersion:
Enabled: false
# TODO: Fix these... # TODO: Fix these...
Style/Documentation: Style/Documentation:
Enabled: false Enabled: false

View File

@ -1,6 +1,10 @@
# JSON:API Serialization Library # JSON:API Serialization Library
## :warning: :construction: [At the moment, contributions are welcome only for v3](https://github.com/jsonapi-serializer/jsonapi-serializer/pull/141)! :construction: :warning: ## :warning: :construction: v2 (the `master` branch) is in maintenance mode! :construction: :warning:
We'll gladly accept bugfixes and security-related fixes for v2 (the `master` branch), but at this stage, contributions for new features/improvements are welcome only for v3. Please feel free to leave comments in the [v3 Pull Request](https://github.com/jsonapi-serializer/jsonapi-serializer/pull/141).
---
A fast [JSON:API](https://jsonapi.org/) serializer for Ruby Objects. A fast [JSON:API](https://jsonapi.org/) serializer for Ruby Objects.

View File

@ -33,4 +33,5 @@ Gem::Specification.new do |gem|
gem.add_development_dependency('rubocop-rspec') gem.add_development_dependency('rubocop-rspec')
gem.add_development_dependency('simplecov') gem.add_development_dependency('simplecov')
gem.add_development_dependency('sqlite3') gem.add_development_dependency('sqlite3')
gem.metadata['rubygems_mfa_required'] = 'true'
end end

View File

@ -1,5 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'active_support'
require 'active_support/time' require 'active_support/time'
require 'active_support/concern' require 'active_support/concern'
require 'active_support/inflector' require 'active_support/inflector'
@ -133,9 +134,7 @@ module FastJsonapi
def reflected_record_type def reflected_record_type
return @reflected_record_type if defined?(@reflected_record_type) return @reflected_record_type if defined?(@reflected_record_type)
@reflected_record_type ||= begin @reflected_record_type ||= (name.split('::').last.chomp('Serializer').underscore.to_sym if name&.end_with?('Serializer'))
name.split('::').last.chomp('Serializer').underscore.to_sym if name&.end_with?('Serializer')
end
end end
def set_key_transform(transform_name) def set_key_transform(transform_name)

View File

@ -1,5 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'active_support'
require 'active_support/concern' require 'active_support/concern'
require 'digest/sha1' require 'digest/sha1'

View File

@ -1,3 +1,4 @@
require 'active_support'
require 'active_support/notifications' require 'active_support/notifications'
module JSONAPI module JSONAPI

View File

@ -1,3 +1,4 @@
require 'active_support'
require 'active_support/cache' require 'active_support/cache'
class User class User

View File

@ -1,3 +1,4 @@
require 'active_support'
require 'active_support/cache' require 'active_support/cache'
require 'jsonapi/serializer/instrumentation' require 'jsonapi/serializer/instrumentation'

View File

@ -6,6 +6,7 @@ SimpleCov.start do
end end
SimpleCov.minimum_coverage 90 SimpleCov.minimum_coverage 90
require 'active_support'
require 'active_support/core_ext/object/json' require 'active_support/core_ext/object/json'
require 'jsonapi/serializer' require 'jsonapi/serializer'
require 'ffaker' require 'ffaker'