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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 151804a96a34d4c2703b0c94482ae3abdee035bc086110b5a4867e1deb84be30
4
- data.tar.gz: 7c3324df0c3e5e253d8994ee0e2d99fab7c1ea42fba891723027eb51479319db
3
+ metadata.gz: 81eada64bf268a7ee4bdec316baf65e2f8ca0ac8cd80120474dfede36d4b4f51
4
+ data.tar.gz: b5a0d11f1eb60c8bfb16ccd66a8d7ee8f09fcaeea8976f47540239725a08d08b
5
5
  SHA512:
6
- metadata.gz: 9b7e893131d386a13c898cedac5e880bf9d6e2a31481b9c7af1dd41926f65385c3c667a9556ec8b349b72648a03be4c9ce8ff3f393bfe94f4c9d2b2b33bb6d5e
7
- data.tar.gz: 910c4e6830b622c404eb9c614b4497eb69e20192f22315fc9d6ab89460fa7602396077ddfe5f000789dd609d4f69a6e126afa4a56bccba2bf8bbc2b06272e685
6
+ metadata.gz: 2cb0a9482b37b1a57bfad86f4213040d27babbf2cd6d4496a93b3260e50435ff1c575d57ba4a0d48b22ada2a3fbda44289283da1032fe3ecdc6010fe39f7646e
7
+ data.tar.gz: b21823474d56cdda6ca816f21d3f76674aa00a4d2636ec0dedc15deecd17469ef55716688306a654952bee4438b5ce338cc2471b4db644852daaa09e0b2bbc4c
@@ -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', '~> 0.21.0'
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
 
@@ -30,5 +30,8 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.add_development_dependency 'bundler', '~> 1.3'
32
32
 
33
- spec.version = "#{spec.version}.1.b#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS_BUILD_NUMBER']
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
@@ -17,26 +17,16 @@ module Acfs
17
17
 
18
18
  def initialize(opts = {})
19
19
  @response = opts[:response]
20
- message = opts[:message] || 'Received erroneous response'
20
+ message = opts[:message]
21
21
  if response
22
- message << ": #{response.code}"
23
- if response.data
24
- message << "\n with content:\n "
25
- message << response.data.map {|k, v| "#{k.inspect}: #{v.inspect}" }.join("\n ")
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
@@ -1,8 +1,8 @@
1
1
  module Acfs
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 2
5
- PATCH = 1
4
+ MINOR = 3
5
+ PATCH = 0
6
6
  STAGE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.')
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.2.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: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport