acfs 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -3
- data/acfs.gemspec +4 -1
- data/lib/acfs/errors.rb +8 -18
- data/lib/acfs/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81eada64bf268a7ee4bdec316baf65e2f8ca0ac8cd80120474dfede36d4b4f51
|
4
|
+
data.tar.gz: b5a0d11f1eb60c8bfb16ccd66a8d7ee8f09fcaeea8976f47540239725a08d08b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb0a9482b37b1a57bfad86f4213040d27babbf2cd6d4496a93b3260e50435ff1c575d57ba4a0d48b22ada2a3fbda44289283da1032fe3ecdc6010fe39f7646e
|
7
|
+
data.tar.gz: b21823474d56cdda6ca816f21d3f76674aa00a4d2636ec0dedc15deecd17469ef55716688306a654952bee4438b5ce338cc2471b4db644852daaa09e0b2bbc4c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.3.0
|
4
|
+
|
5
|
+
* Change default error messages to a more compact representation to ease integration with error reporting services.
|
6
|
+
|
3
7
|
## 1.2.1
|
4
8
|
|
5
9
|
* Fix issues with resources errors if response payload differs from the expected `field => [messages]`, such as `field => message` or `[messages]`.
|
data/README.md
CHANGED
@@ -15,9 +15,7 @@ Acfs covers model and service abstraction, convenient query and filter methods,
|
|
15
15
|
|
16
16
|
Add this line to your application's Gemfile:
|
17
17
|
|
18
|
-
gem 'acfs', '~>
|
19
|
-
|
20
|
-
**Note:** Acfs is under development. I'll try to avoid changes to the public API but internal APIs may change quite often.
|
18
|
+
gem 'acfs', '~> 1.3'
|
21
19
|
|
22
20
|
And then execute:
|
23
21
|
|
data/acfs.gemspec
CHANGED
@@ -30,5 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
32
32
|
|
33
|
-
|
33
|
+
if ENV['TRAVIS_BUILD_NUMBER'] && !ENV['TRAVIS_TAG']
|
34
|
+
# Append travis build number for auto-releases
|
35
|
+
spec.version = "#{spec.version}.1.b#{ENV['TRAVIS_BUILD_NUMBER']}"
|
36
|
+
end
|
34
37
|
end
|
data/lib/acfs/errors.rb
CHANGED
@@ -17,26 +17,16 @@ module Acfs
|
|
17
17
|
|
18
18
|
def initialize(opts = {})
|
19
19
|
@response = opts[:response]
|
20
|
-
message = opts[:message]
|
20
|
+
message = opts[:message]
|
21
21
|
if response
|
22
|
-
message
|
23
|
-
|
24
|
-
|
25
|
-
message
|
26
|
-
end
|
27
|
-
if response.headers.any?
|
28
|
-
message << "\n with headers:\n "
|
29
|
-
message << response.headers.map {|k, v| "#{k}: #{v}" }.join("\n ")
|
30
|
-
end
|
31
|
-
message << "\nbased on request: #{response.request.method.upcase} #{response.request.url} #{response.request.format}"
|
32
|
-
if response.request.data
|
33
|
-
message << "\n with content:\n "
|
34
|
-
message << response.request.data.map {|k, v| "#{k.inspect}: #{v.inspect}" }.join("\n ")
|
35
|
-
end
|
36
|
-
if response.request.headers.any?
|
37
|
-
message << "\n with headers:\n "
|
38
|
-
message << response.request.headers.map {|k, v| "#{k}: #{v}" }.join("\n ")
|
22
|
+
if message
|
23
|
+
message << ':'
|
24
|
+
else
|
25
|
+
message = 'Received'
|
39
26
|
end
|
27
|
+
message << " #{response.code} for #{response.request.method.upcase} #{response.request.url} #{response.request.format}"
|
28
|
+
else
|
29
|
+
message ||= 'Received erroneous response'
|
40
30
|
end
|
41
31
|
super opts, message
|
42
32
|
end
|
data/lib/acfs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|