jsonapi.rb 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Suscov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializer
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ransack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -227,18 +227,8 @@ executables: []
227
227
  extensions: []
228
228
  extra_rdoc_files: []
229
229
  files:
230
- - ".github/ISSUE_TEMPLATE.md"
231
- - ".github/PULL_REQUEST_TEMPLATE.md"
232
- - ".github/workflows/ci.yml"
233
- - ".gitignore"
234
- - ".rspec"
235
- - ".rubocop.yml"
236
- - ".yardstick.yml"
237
- - Gemfile
238
230
  - LICENSE.txt
239
231
  - README.md
240
- - Rakefile
241
- - jsonapi.rb.gemspec
242
232
  - lib/jsonapi.rb
243
233
  - lib/jsonapi/active_model_error_serializer.rb
244
234
  - lib/jsonapi/deserialization.rb
@@ -250,6 +240,13 @@ files:
250
240
  - lib/jsonapi/patches.rb
251
241
  - lib/jsonapi/rails.rb
252
242
  - lib/jsonapi/version.rb
243
+ - spec/deserialization_spec.rb
244
+ - spec/dummy.rb
245
+ - spec/errors_spec.rb
246
+ - spec/fetching_spec.rb
247
+ - spec/filtering_spec.rb
248
+ - spec/pagination_spec.rb
249
+ - spec/spec_helper.rb
253
250
  homepage: https://github.com/stas/jsonapi.rb
254
251
  licenses:
255
252
  - MIT
@@ -269,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
266
  - !ruby/object:Gem::Version
270
267
  version: '0'
271
268
  requirements: []
272
- rubygems_version: 3.1.2
269
+ rubygems_version: 3.2.3
273
270
  signing_key:
274
271
  specification_version: 4
275
272
  summary: So you say you need JSON:API support in your API...
@@ -1,16 +0,0 @@
1
- ## Expected Behavior
2
-
3
-
4
- ## Actual Behavior
5
-
6
-
7
- ## Steps to Reproduce the Problem
8
-
9
- 1.
10
- 2.
11
- 3.
12
-
13
- ## Specifications
14
-
15
- - Version:
16
- - Ruby version:
@@ -1,17 +0,0 @@
1
- ## What is the current behavior?
2
-
3
- <!-- Please describe the current behavior that you are modifying, or link to a
4
- relevant issue. -->
5
-
6
- ## What is the new behavior?
7
-
8
- <!-- Please describe the behavior or changes that are being added here. -->
9
-
10
- ## Checklist
11
-
12
- Please make sure the following requirements are complete:
13
-
14
- - [ ] Tests for the changes have been added (for bug fixes / features)
15
- - [ ] Docs have been reviewed and added / updated if needed (for bug fixes /
16
- features)
17
- - [ ] All automated checks pass (CI/CD)
@@ -1,36 +0,0 @@
1
- name: CI
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- ruby_rails_test_matrix:
7
- runs-on: ubuntu-18.04
8
-
9
- strategy:
10
- matrix:
11
- ruby: [2.4, 2.6]
12
- rails: [4, 5, 6]
13
- exclude:
14
- - ruby: 2.4
15
- rails: 6
16
-
17
- steps:
18
- - uses: actions/checkout@master
19
-
20
- - name: Sets up the environment
21
- uses: actions/setup-ruby@v1
22
- with:
23
- ruby-version: ${{ matrix.ruby }}
24
-
25
- - name: Runs code QA and tests
26
- env:
27
- RAILS_VERSION: ~> ${{ matrix.rails }}
28
- run: |
29
- rm -rf Gemfile.lock
30
- sudo apt-get update
31
- sudo apt-get install libsqlite3-dev
32
- gem uninstall bundler -a --force
33
- gem install bundler -v '~> 1'
34
- echo $RAILS_VERSION | grep -q '4' && export SQLITE3_VERSION='~> 1.3.6'
35
- bundle
36
- rake
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- coverage
2
- pkg
3
- Gemfile.lock
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,36 +0,0 @@
1
- inherit_gem:
2
- rubocop-rails_config:
3
- - config/rails.yml
4
-
5
- require: rubocop-performance
6
-
7
- Performance:
8
- Enabled: true
9
-
10
- Rails:
11
- Enabled: true
12
-
13
- Style/StringLiterals:
14
- Enabled: true
15
- EnforcedStyle: single_quotes
16
-
17
- Style/FrozenStringLiteralComment:
18
- Enabled: false
19
-
20
- Layout/LineLength:
21
- Max: 80
22
-
23
- Layout/IndentationConsistency:
24
- EnforcedStyle: normal
25
-
26
- Style/BlockDelimiters:
27
- Enabled: true
28
-
29
- Rails/ApplicationRecord:
30
- Enabled: false
31
-
32
- Rails/BelongsTo:
33
- Enabled: false
34
-
35
- Rails/ApplicationController:
36
- Enabled: false
data/.yardstick.yml DELETED
@@ -1,29 +0,0 @@
1
- ---
2
- path: ['lib/**/*.rb']
3
- threshold: 100
4
- rules:
5
- ApiTag::Presence:
6
- enabled: false
7
- ApiTag::Inclusion:
8
- enabled: false
9
- ApiTag::ProtectedMethod:
10
- enabled: false
11
- ApiTag::PrivateMethod:
12
- enabled: false
13
- ExampleTag:
14
- enabled: false
15
- ReturnTag:
16
- enabled: true
17
- exclude: []
18
- Summary::Presence:
19
- enabled: true
20
- exclude: []
21
- Summary::Length:
22
- enabled: true
23
- exclude: []
24
- Summary::Delimiter:
25
- enabled: true
26
- exclude: []
27
- Summary::SingleLine:
28
- enabled: true
29
- exclude: []
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in jsonapi.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,34 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'rubocop/rake_task'
4
- require 'yaml'
5
- require 'yardstick'
6
-
7
- desc('Documentation stats and measurements')
8
- task('qa:docs') do
9
- yaml = YAML.load_file(File.expand_path('../.yardstick.yml', __FILE__))
10
- config = Yardstick::Config.coerce(yaml)
11
- measure = Yardstick.measure(config)
12
- measure.puts
13
- coverage = Yardstick.round_percentage(measure.coverage * 100)
14
- exit(1) if coverage < config.threshold
15
- end
16
-
17
- desc('Codestyle check and linter')
18
- RuboCop::RakeTask.new('qa:code') do |task|
19
- task.fail_on_error = true
20
- task.patterns = [
21
- 'lib/**/*.rb',
22
- 'spec/**/*.rb'
23
- ]
24
- end
25
-
26
- desc('Run CI QA tasks')
27
- if ENV['RAILS_VERSION'].to_s.include?('4')
28
- task(qa: ['qa:docs'])
29
- else
30
- task(qa: ['qa:docs', 'qa:code'])
31
- end
32
-
33
- RSpec::Core::RakeTask.new(spec: :qa)
34
- task(default: :spec)
data/jsonapi.rb.gemspec DELETED
@@ -1,40 +0,0 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
-
4
- require 'jsonapi/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'jsonapi.rb'
8
- spec.version = JSONAPI::VERSION
9
- spec.authors = ['Stas Suscov']
10
- spec.email = ['stas@nerd.ro']
11
-
12
- spec.summary = 'So you say you need JSON:API support in your API...'
13
- spec.description = (
14
- 'JSON:API serialization, error handling, filtering and pagination.'
15
- )
16
- spec.homepage = 'https://github.com/stas/jsonapi.rb'
17
- spec.license = 'MIT'
18
-
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
21
- end
22
- spec.require_paths = ['lib']
23
-
24
- spec.add_dependency 'jsonapi-serializer', '~> 2.0'
25
- spec.add_dependency 'ransack'
26
- spec.add_dependency 'rack'
27
-
28
- spec.add_development_dependency 'bundler'
29
- spec.add_development_dependency 'rails', ENV['RAILS_VERSION']
30
- spec.add_development_dependency 'sqlite3', ENV['SQLITE3_VERSION']
31
- spec.add_development_dependency 'ffaker'
32
- spec.add_development_dependency 'rspec', '~> 3.0'
33
- spec.add_development_dependency 'rspec-rails'
34
- spec.add_development_dependency 'jsonapi-rspec'
35
- spec.add_development_dependency 'yardstick'
36
- spec.add_development_dependency 'rubocop-rails_config'
37
- spec.add_development_dependency 'rubocop'
38
- spec.add_development_dependency 'simplecov'
39
- spec.add_development_dependency 'rubocop-performance'
40
- end