party_mixins 0.2.0 → 0.2.1

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: 77f410d5e8c91a83ee76a102a4d491585a1921878e57ef518b78be35a416bc1c
4
- data.tar.gz: cd849b44f606444c6452f7bf29f3ab67bb70144afe2ca68922291ac289d5e6d7
3
+ metadata.gz: 65ebb091060c2a813b8913bb037f48a7b65daac06f9b45a30b8936151a964f6d
4
+ data.tar.gz: 1eb87d51b5138797eec87df8459e4b1eaba7347c22e81b824a007ab10111dcfd
5
5
  SHA512:
6
- metadata.gz: 8f8a4f0d4e3902e27ceb7c842c4b2ccc2551a40816806806335340e4188f8b53b91807a7177dcae8a160edbd264c72a03e70c29ef3c319baf0e9df0c0dde3ca8
7
- data.tar.gz: d4e9c786b6220d1771f47b729384f1f21e07f1f51e0683d25071d9121cef22d4d714d1a598fe0b2037969d84bde363a796d70f359e921e15a21db869ab4dc2d8
6
+ metadata.gz: 40b93d7cd19017b1da75e5c92ece37ea32c54fea2b2e410299a650eb92ef16a9c464d8beba7312a0d89273245a1577f7f892f799075ce0ec8cb35d2d49107cf5
7
+ data.tar.gz: 9cc62dac1a1c8e00f1f062f63dccc413ec250dae6f52849be2c7b96c59f07c692f67b8b55f102e537c8e636c435958a488710cefde4e268fb6da4b6a5e21a3c4
@@ -5,12 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## [0.2.1] - 2021-01-17
9
+
10
+ Fix response ok error and add more detail to message
11
+
12
+ ### Fixed
13
+ - Fix response ok error and add more detail to message
14
+
8
15
  ## [0.2.0] - 2021-01-16
9
16
 
10
17
  ServiceError default message is now the response body
11
18
 
12
- ### Added
13
- - Initial version
19
+ ### Fixed
20
+ - ServiceError default message is now the response body
14
21
 
15
22
  ## [0.1.0] - 2020-12-24
16
23
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- party_mixins (0.2.0)
4
+ party_mixins (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,7 +21,7 @@ module PartyMixins
21
21
 
22
22
  def build_options(method_name, response)
23
23
  {
24
- error_message: response.body
24
+ error_message: "[#{response.code}] #{response.body}"
25
25
  }.merge(party_methods[method_name])
26
26
  end
27
27
 
@@ -42,7 +42,7 @@ module PartyMixins
42
42
  define_method(method_name) do |*args|
43
43
  response = super(*args)
44
44
  options = this.build_options(method_name, response)
45
- raise ServiceError.new(response, options[:error_message]) unless response.ok?
45
+ raise ServiceError.new(response, options[:error_message]) unless response.success?
46
46
 
47
47
  response.parsed_response
48
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PartyMixins
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: party_mixins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Humberto Guerrero
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-16 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: HTTParty mixin extension
14
14
  email: