jsonapi_errors_handler 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +31 -0
- data/.github/workflows/gem-test.yml +29 -0
- data/.rubocop.yml +11 -0
- data/.ruby-version +1 -1
- data/CONTRIBUTING.md +21 -13
- data/Gemfile.lock +27 -18
- data/README.md +14 -8
- data/jsonapi_errors_handler.gemspec +8 -3
- data/lib/jsonapi_errors_handler.rb +15 -7
- data/lib/jsonapi_errors_handler/configuration.rb +8 -0
- data/lib/jsonapi_errors_handler/error_mapper.rb +10 -4
- data/lib/jsonapi_errors_handler/error_serializer.rb +2 -0
- data/lib/jsonapi_errors_handler/errors.rb +2 -0
- data/lib/jsonapi_errors_handler/errors/forbidden.rb +2 -0
- data/lib/jsonapi_errors_handler/errors/invalid.rb +2 -0
- data/lib/jsonapi_errors_handler/errors/not_found.rb +2 -0
- data/lib/jsonapi_errors_handler/errors/standard_error.rb +8 -3
- data/lib/jsonapi_errors_handler/errors/unauthorized.rb +2 -0
- data/lib/jsonapi_errors_handler/keys_stringifier.rb +2 -0
- data/lib/jsonapi_errors_handler/version.rb +1 -1
- data/package-lock.json +631 -2041
- data/package.json +8 -1
- metadata +47 -17
- data/.circleci/config.yml +0 -58
data/package.json
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
"lint-md": "remark ."
|
4
4
|
},
|
5
5
|
"remarkConfig": {
|
6
|
-
"plugins": [
|
6
|
+
"plugins": [
|
7
|
+
"remark-preset-lint-recommended"
|
8
|
+
]
|
9
|
+
},
|
10
|
+
"dependencies": {
|
11
|
+
"remark-cli": "^8.0.1",
|
12
|
+
"remark-lint": "^7.0.1",
|
13
|
+
"remark-preset-lint-recommended": "^4.0.1"
|
7
14
|
}
|
8
15
|
}
|
metadata
CHANGED
@@ -1,57 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_errors_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
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: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov-cobertura
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
55
83
|
description: |
|
56
84
|
This gem is a convienient wrapper for your application errors.
|
57
85
|
It allows you to map any error to a nicely formatted standard HTTP error response.
|
@@ -61,9 +89,11 @@ executables: []
|
|
61
89
|
extensions: []
|
62
90
|
extra_rdoc_files: []
|
63
91
|
files:
|
64
|
-
- ".
|
92
|
+
- ".github/workflows/gem-push.yml"
|
93
|
+
- ".github/workflows/gem-test.yml"
|
65
94
|
- ".gitignore"
|
66
95
|
- ".rspec"
|
96
|
+
- ".rubocop.yml"
|
67
97
|
- ".ruby-gemset"
|
68
98
|
- ".ruby-version"
|
69
99
|
- ".travis.yml"
|
@@ -104,14 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
134
|
requirements:
|
105
135
|
- - ">="
|
106
136
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
137
|
+
version: 2.4.0
|
108
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
139
|
requirements:
|
110
140
|
- - ">="
|
111
141
|
- !ruby/object:Gem::Version
|
112
142
|
version: '0'
|
113
143
|
requirements: []
|
114
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.1.2
|
115
145
|
signing_key:
|
116
146
|
specification_version: 4
|
117
147
|
summary: A JSON API error handler for ruby applications.
|
data/.circleci/config.yml
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
# Ruby CircleCI 2.0 configuration file
|
2
|
-
#
|
3
|
-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
-
#
|
5
|
-
version: 2
|
6
|
-
jobs:
|
7
|
-
build:
|
8
|
-
docker:
|
9
|
-
# specify the version you desire here
|
10
|
-
- image: circleci/ruby:2.6.3
|
11
|
-
|
12
|
-
# Specify service dependencies here if necessary
|
13
|
-
# CircleCI maintains a library of pre-built images
|
14
|
-
# documented at https://circleci.com/docs/2.0/circleci-images/
|
15
|
-
# - image: circleci/postgres:9.4
|
16
|
-
|
17
|
-
working_directory: ~/repo
|
18
|
-
|
19
|
-
steps:
|
20
|
-
- checkout
|
21
|
-
|
22
|
-
# Download and cache dependencies
|
23
|
-
- restore_cache:
|
24
|
-
keys:
|
25
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
26
|
-
# fallback to using the latest cache if no exact match is found
|
27
|
-
- v1-dependencies-
|
28
|
-
|
29
|
-
- run:
|
30
|
-
name: install dependencies
|
31
|
-
command: |
|
32
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
33
|
-
|
34
|
-
- save_cache:
|
35
|
-
paths:
|
36
|
-
- ./vendor/bundle
|
37
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
38
|
-
|
39
|
-
# run tests!
|
40
|
-
- run:
|
41
|
-
name: run tests
|
42
|
-
command: |
|
43
|
-
mkdir /tmp/test-results
|
44
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
45
|
-
circleci tests split --split-by=timings)"
|
46
|
-
|
47
|
-
bundle exec rspec \
|
48
|
-
--format progress \
|
49
|
-
--out /tmp/test-results/rspec.xml \
|
50
|
-
--format progress \
|
51
|
-
$TEST_FILES
|
52
|
-
|
53
|
-
# collect reports
|
54
|
-
- store_test_results:
|
55
|
-
path: /tmp/test-results
|
56
|
-
- store_artifacts:
|
57
|
-
path: /tmp/test-results
|
58
|
-
destination: test-results
|