jsonapi.rb 1.6.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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