jsonapi_errors_handler 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +58 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -0
- data/lib/jsonapi_errors_handler/error_mapper.rb +1 -1
- data/lib/jsonapi_errors_handler/error_serializer.rb +1 -1
- data/lib/jsonapi_errors_handler/errors.rb +5 -5
- data/lib/jsonapi_errors_handler/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b564d9bbd8895bf69bb4fe9529179adf982161ed5487b9ab25020aedc8f2156
|
4
|
+
data.tar.gz: faa8c8ceac35f80350aa3c0ec9a4388acf9896f80e492fdb5db8d120c14b0b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c60a80673165135c28ecb6b5c99321100702db140c90450c3db58a5e52d66c3369d7521f33a925263ec940d9a88c4d605d5ea111811d2d9283bce31d92c57ba
|
7
|
+
data.tar.gz: 84882a23b85bb539d8375bb651a019a27fcbff37eba86339b374e5e5a67ca2140361f2eba2cadf4af67cdc435556a35027490a6309a22116a873b99041c60e4a
|
@@ -0,0 +1,58 @@
|
|
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.4.1
|
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
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
|
2
|
+
[](https://circleci.com/gh/driggl/jsonapi_errors_handler/tree/master)
|
3
|
+
|
1
4
|
# JsonapiErrorsHandler
|
2
5
|
|
3
6
|
A convienient way to serialize errors in JsonAPI format (https://jsonapi.org)
|
@@ -58,6 +61,15 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
58
61
|
|
59
62
|
Bug reports and pull requests are welcome on GitHub at https://github.com/driggl/jsonapi_errors_handler.
|
60
63
|
|
64
|
+
**How to contribute:**
|
65
|
+
|
66
|
+
1. Fork repository
|
67
|
+
2. Commit changes
|
68
|
+
- Keep commits small and atomic
|
69
|
+
- Start commit message from keywords (Add/Remove/Change/Refactor/Move/Rename/Upgrade/Downgrade)
|
70
|
+
- Keep commits imperative style
|
71
|
+
3. Create Pull Request
|
72
|
+
|
61
73
|
## License
|
62
74
|
|
63
75
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -4,8 +4,8 @@ module JsonapiErrorsHandler
|
|
4
4
|
end
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
require 'jsonapi_errors_handler/errors/standard_error'
|
8
|
+
require 'jsonapi_errors_handler/errors/forbidden'
|
9
|
+
require 'jsonapi_errors_handler/errors/invalid'
|
10
|
+
require 'jsonapi_errors_handler/errors/not_found'
|
11
|
+
require 'jsonapi_errors_handler/errors/unauthorized'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_errors_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- ".circleci/config.yml"
|
63
64
|
- ".gitignore"
|
64
65
|
- ".rspec"
|
65
66
|
- ".travis.yml"
|