action_kit_rest 0.4.7 → 0.4.8

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: 1817fcc57f6d22b7c399e0face9405049f77417e6ea2b27c9e32218be76af124
4
- data.tar.gz: 0eb382953e3c3c691191ce9f9c0ff61f5d39cefac40e77921ba2bc4d5366068f
3
+ metadata.gz: 48de2f5ea6be39c19b8d17dcf608e48fb34667be18ccb03d725f5c31e9f70ccf
4
+ data.tar.gz: cbb7ff2006d5156b254a903d2f1594aac5399fdc32830cf55fb1719913a00b62
5
5
  SHA512:
6
- metadata.gz: f07602cc5779ae7eb6c7cfd5bad09ec780443c8b0e702a36264035a92add5b4ca06135196e4ea41aa6dcfa0e2d8ea7effa4777adc57e0842666199989db9bd39
7
- data.tar.gz: cd5c4e3b3e70f5979cd42981b9c116ef475cf9af06ebd8e8c857b594d7a43f15dc9e12fec86de117adda5b691cc0b52571c461ef46035bee8ab97b09742e76ee
6
+ metadata.gz: 9743a40e310c262790a11f011ef1c9d3c8bfe0a05df0633894200b1e8330aa990e7b57aebac1dac0d3ce455e0ddd14a3b57ff4f5a82e5a357b61be9e51b4c65b
7
+ data.tar.gz: f6764a07deca62c39b3005aecadfc2cc0c8276c6e68bf1294960376155e3bb3773a4e18e079afa0b561435c7f7b8bd8c5e0c98b63246362ffd2c56a916513eaf
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: action_kit_rest 0.4.7 ruby lib
5
+ # stub: action_kit_rest 0.4.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "action_kit_rest".freeze
9
- s.version = "0.4.7"
9
+ s.version = "0.4.8"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Nathan Woodhull".freeze, "Diego Marcet".freeze, "Grey Moore".freeze]
14
- s.date = "2021-10-05"
14
+ s.date = "2021-10-07"
15
15
  s.description = "Gem for interacting with the ActionKit API".freeze
16
16
  s.email = "systems@controlshiftlabs.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -27,7 +27,7 @@ module ActionKitRest
27
27
  'לא הצלחנו לקשר בין מספר הזיהוי של רשימת הדיוור הזו לבין החשבון.'].freeze
28
28
 
29
29
  def self.matches?(errors)
30
- return false unless errors.keys == ['mailing_id']
30
+ return false unless errors&.keys == ['mailing_id']
31
31
 
32
32
  mailing_id_errors = errors['mailing_id']
33
33
  return false unless mailing_id_errors.size == 1
@@ -4,7 +4,7 @@ module ActionKitRest
4
4
  module VERSION
5
5
  MAJOR = 0
6
6
  MINOR = 4
7
- PATCH = 7
7
+ PATCH = 8
8
8
  BUILD = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -52,6 +52,14 @@ describe ActionKitRest::API do
52
52
  expect{ subject.post_request('something/', request_body) }.to raise_error(ActionKitRest::Response::ValidationError)
53
53
  end
54
54
  end
55
+
56
+ context 'no errors key in response' do
57
+ let(:response_body) { '{"strange": "things are happening here"}' }
58
+
59
+ it 'sould raise a ValidationError' do
60
+ expect{ subject.post_request('something/', request_body) }.to raise_error(ActionKitRest::Response::ValidationError)
61
+ end
62
+ end
55
63
  end
56
64
 
57
65
  context '401 response' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_kit_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-10-05 00:00:00.000000000 Z
13
+ date: 2021-10-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: vertebrae