business_error 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -3
- data/business_error.gemspec +1 -1
- data/lib/business_error/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03f3d6fe7cf150f25957f59b9561a81998fa8e32
|
4
|
+
data.tar.gz: 2fe04dd5482c192c8df84126cfd8f9fde503ac04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dadeb522683dbcf0a4e45aa1244fc23dbc35f293978c539b7a54197a8e625701c8ab36cbf5f1fa9ff5f86575df6f93480488db290f6516078e3e3b2b41a76a86
|
7
|
+
data.tar.gz: db9707231f798b4c07acacc36e4296385ef4996e1e71081ed158b7b0ccb56ee612b16a9cec46f47365a75c87f559b1631be54c43de1bac9aa632f92723f4f15f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# BusinessError
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/business_error.svg)](https://badge.fury.io/rb/business_error)
|
4
|
+
|
3
5
|
Business Error Management by using OOP
|
4
6
|
|
7
|
+
```ruby
|
8
|
+
Error::Api.invalid_token! # raise the error defined
|
9
|
+
```
|
10
|
+
|
5
11
|
## Installation
|
6
12
|
|
7
13
|
Add this line to your application's Gemfile:
|
@@ -106,7 +112,7 @@ group group_name = :private, code_start_at = nil, http: 200, &block
|
|
106
112
|
NOT supported currently. It leads to method override,
|
107
113
|
the last definition will leave.
|
108
114
|
|
109
|
-
#### 3.
|
115
|
+
#### 3.d Skills
|
110
116
|
|
111
117
|
1. Use `mattr_reader` instead of `define` (alias) IF you're using Rubymine.
|
112
118
|
|
@@ -191,7 +197,7 @@ Error::Api.invalid_token.format!(:old)
|
|
191
197
|
Error::Api.invalid_token.format!(:old, hello: 'world') # it's ok
|
192
198
|
```
|
193
199
|
|
194
|
-
the key `only` is for [`output`]()
|
200
|
+
the key `only` is for [`output`](https://github.com/zhandao/out_put)
|
195
201
|
|
196
202
|
More complex formatting is to be done:
|
197
203
|
```ruby
|
@@ -207,7 +213,7 @@ config.formats[:old] = { format: {
|
|
207
213
|
|
208
214
|
`format!` has an alias `render!`
|
209
215
|
|
210
|
-
### 5. Rescue Error and render response by [`OutPut`]()
|
216
|
+
### 5. Rescue Error and render response by [`OutPut`](https://github.com/zhandao/out_put)
|
211
217
|
|
212
218
|
Just do:
|
213
219
|
```ruby
|
data/business_error.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = 'Business Error Management by using OOP'
|
13
13
|
spec.description = 'Business Error Management by using OOP'
|
14
|
-
spec.homepage = "http://github.com"
|
14
|
+
spec.homepage = "http://github.com/zhandao/business_error"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: business_error
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zhandao
|
@@ -75,7 +75,7 @@ files:
|
|
75
75
|
- lib/business_error/config.rb
|
76
76
|
- lib/business_error/error.rb
|
77
77
|
- lib/business_error/version.rb
|
78
|
-
homepage: http://github.com
|
78
|
+
homepage: http://github.com/zhandao/business_error
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata: {}
|