introspective_grape 0.4.1 → 0.5.2

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 +30 -0
  8. data/Gemfile +3 -5
  9. data/README.md +94 -63
  10. data/Rakefile +1 -6
  11. data/introspective_grape.gemspec +63 -53
  12. data/lib/introspective_grape/api.rb +166 -137
  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 +153 -45
  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: 3034e0ca4ea70e3b33f6971169aa59faae640f4d43272fa1152293abf693651b
4
- data.tar.gz: ea99ca40acf330e9a5136ef0789ab59737333b88fdaeec54027b4812aa9669f6
3
+ metadata.gz: 1221cfb7bde9b3896a0c11c595c685198a10a88120cb7ad0711baca8b954e7a0
4
+ data.tar.gz: 18ef790d77cc390818ea413f04c3ffe0f87a60350a5a7157bb73e66ab9693360
5
5
  SHA512:
6
- metadata.gz: 946339968ec6dc500c349751582d2b7c0b280522c2942ed152d8a5f8828b576ed1ddb9b118d849a2e00bbcebb352512ac5fb7465b047552f6269a4e40be2794c
7
- data.tar.gz: 1f14f292c04fb776c12665adb84e46b81d75b26a7ba90cc0187f7b2f9b59a35f0265ead685ba612f5e5b1763a3ff992ddd372ef456db2447a678f0ae5afe1238
6
+ metadata.gz: fdc88a2e154ab024c70c978e553533d79d67b31194ae47e1fa6b923ffa83df585b317aabc2c5159ff9ef63881d235df0ca2cbd9ce28d303213029f6284f8288c
7
+ data.tar.gz: f95cddc2dfe36efb3cf54f572d977c10573d658410a876dcf2adba43fb82ea066c1eea53582fa659079ff3211a638edcb0682b156abf040f8a4469bdd330bf87
@@ -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