Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7db80f673d | ||
|
bcee2b597b | ||
|
44cf8495ea |
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -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 }}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|||||||
|
|
||||||
gem.summary = 'Fast JSON:API serialization library'
|
gem.summary = 'Fast JSON:API serialization library'
|
||||||
gem.description = 'Fast, simple and easy to use '\
|
gem.description = 'Fast, simple and easy to use '\
|
||||||
'JSON:API serialization library (also known as fast_jsonapi).'
|
'JSON:API serialization library (also known as fast_jsonapi).'
|
||||||
gem.homepage = 'https://github.com/jsonapi-serializer/jsonapi-serializer'
|
gem.homepage = 'https://github.com/jsonapi-serializer/jsonapi-serializer'
|
||||||
gem.licenses = ['Apache-2.0']
|
gem.licenses = ['Apache-2.0']
|
||||||
gem.files = Dir['lib/**/*']
|
gem.files = Dir['lib/**/*']
|
||||||
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
require 'active_support'
|
||||||
require 'active_support/notifications'
|
require 'active_support/notifications'
|
||||||
|
|
||||||
module JSONAPI
|
module JSONAPI
|
||||||
|
1
spec/fixtures/_user.rb
vendored
1
spec/fixtures/_user.rb
vendored
@ -1,3 +1,4 @@
|
|||||||
|
require 'active_support'
|
||||||
require 'active_support/cache'
|
require 'active_support/cache'
|
||||||
|
|
||||||
class User
|
class User
|
||||||
|
1
spec/fixtures/actor.rb
vendored
1
spec/fixtures/actor.rb
vendored
@ -1,3 +1,4 @@
|
|||||||
|
require 'active_support'
|
||||||
require 'active_support/cache'
|
require 'active_support/cache'
|
||||||
require 'jsonapi/serializer/instrumentation'
|
require 'jsonapi/serializer/instrumentation'
|
||||||
|
|
||||||
|
@ -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'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user