introspective_grape 0.4.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +23 -0
  3. data/.github/workflows/security.yml +32 -0
  4. data/.github/workflows/test.yml +18 -0
  5. data/.rubocop.yml +84 -1173
  6. data/.ruby-version +1 -1
  7. data/CHANGELOG.md +35 -0
  8. data/Gemfile +3 -5
  9. data/README.md +94 -63
  10. data/Rakefile +1 -6
  11. data/introspective_grape.gemspec +63 -51
  12. data/lib/introspective_grape/api.rb +167 -136
  13. data/lib/introspective_grape/camel_snake.rb +5 -3
  14. data/lib/introspective_grape/create_helpers.rb +3 -5
  15. data/lib/introspective_grape/doc.rb +19 -5
  16. data/lib/introspective_grape/filters.rb +98 -83
  17. data/lib/introspective_grape/formatter/camel_json.rb +2 -3
  18. data/lib/introspective_grape/helpers.rb +55 -48
  19. data/lib/introspective_grape/snake_params.rb +1 -2
  20. data/lib/introspective_grape/traversal.rb +56 -54
  21. data/lib/introspective_grape/validators.rb +23 -23
  22. data/lib/introspective_grape/version.rb +3 -1
  23. data/spec/dummy/.ruby-version +1 -0
  24. data/spec/dummy/Gemfile +5 -4
  25. data/spec/dummy/app/api/api_helpers.rb +1 -1
  26. data/spec/dummy/app/api/dummy/company_api.rb +10 -1
  27. data/spec/dummy/app/api/dummy/project_api.rb +1 -0
  28. data/spec/dummy/app/api/dummy/sessions.rb +1 -1
  29. data/spec/dummy/app/api/dummy_api.rb +8 -2
  30. data/spec/dummy/app/assets/config/manifest.js +4 -0
  31. data/spec/dummy/app/models/user.rb +1 -1
  32. data/spec/dummy/config/database.yml +1 -1
  33. data/spec/rails_helper.rb +1 -1
  34. data/spec/requests/company_api_spec.rb +9 -0
  35. metadata +150 -42
  36. data/.coveralls.yml +0 -2
  37. data/.travis.yml +0 -40
  38. data/bin/rails +0 -12
  39. data/gemfiles/Gemfile.rails.5.0.0 +0 -14
  40. data/gemfiles/Gemfile.rails.5.0.1 +0 -14
  41. data/gemfiles/Gemfile.rails.5.1.0 +0 -14
  42. data/gemfiles/Gemfile.rails.5.2.0 +0 -14
  43. data/gemfiles/Gemfile.rails.master +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd8453af52e6616722a7899ace0e7b79c9e4129dea63565c99f8f7ba94f77ee9
4
- data.tar.gz: 0e2c0a47ab78f79d37d9a9fec9c861c82421303205084b9168eff6f3a239af2a
3
+ metadata.gz: 18e335c3487696da5b56e184df1b4ad6495c890e72e2652ee3ef14841a786f94
4
+ data.tar.gz: a18f28ce34addce187ed64af8273c5866c68a63463456dc1acc101a2cab349eb
5
5
  SHA512:
6
- metadata.gz: b51e598d1078c423c809c68f75cb52079920ac06f4d4cc634814575c8f24af28296e05bc0de1e77383ece29ef30f03ce90c14d203dda51c6ad510a1fafadb7a3
7
- data.tar.gz: d2916cb32f455dba2f083661c6c90a9190c54b9c10b8f5c8dc1c159f11a1a4227ae54c6b9878beb39a4cca7631095fc1539c4c0437dfc89a239880c854671dae
6
+ metadata.gz: 77b1c4910e315342e2febc3bcca3a0b7b2eb59d1c7b762325a7da6bc60f0f8e69e34ddb2907b2cc76ce0b824367f10d365c7899ffb1f95f3f10444173c9bd3c8
7
+ data.tar.gz: b13267c8b605afa2a4daa6b5620f87e628a105f9271cb8bc437e579bbf3a4f9fe451f4e1935623338c0bd1ec2a205c72275fce27e0b1cf7e2124cc4232553e25
@@ -0,0 +1,23 @@
1
+ name: lint
2
+ on: push
3
+
4
+ jobs:
5
+ linters:
6
+ name: Linters
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout code
10
+ uses: actions/checkout@v2
11
+
12
+ - name: Setup Ruby and install gems
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ bundler-cache: true
16
+
17
+ - name: Run linters
18
+ run: |
19
+ bundle exec rubocop --parallel
20
+ - name: Run security checks
21
+ run: |
22
+ bundle exec bundler-audit --update
23
+ bundle exec brakeman -q -w2
@@ -0,0 +1,32 @@
1
+ name: security
2
+ on: push
3
+ jobs:
4
+ security:
5
+ name: Security
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - name: Checkout Repository
9
+ uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.6.2
14
+ - name: Cache Ruby Gems
15
+ uses: actions/cache@v2
16
+ with:
17
+ path: vendor/bundle
18
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
19
+ restore-keys: |
20
+ ${{ runner.os }}-gems-
21
+ - name: Bundle Install
22
+ run: |
23
+ gem install bundler
24
+ bundle config path vendor/bundle
25
+ bundle install --jobs 4 --retry 3
26
+ - name: Security Checks
27
+ run: |
28
+ bundle exec brakeman -z
29
+ gem install bundle-audit
30
+ bundle-audit update
31
+ bundle-audit
32
+
@@ -0,0 +1,18 @@
1
+ name: test
2
+ on: push
3
+
4
+ jobs:
5
+ tests:
6
+ name: Tests
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout code
10
+ uses: actions/checkout@v2
11
+
12
+ - name: Setup Ruby and install gems
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ bundler-cache: true
16
+
17
+ - name: Run tests
18
+ run: bundle exec rspec