upland_mobile_commons_rest 0.3.0 → 0.3.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: 6af9508f63531c934fab5b8d4129d5132609bf316e846cc7dedc02e255b8f809
4
- data.tar.gz: 36186a816bdcb8841f48d2f5f9af4c484c0c516af6529b4c255bbac42101b0ea
3
+ metadata.gz: 544851dec6a2d0672db3aebafda5eb5dd32d1ec0c826303964881a0ac46b98c2
4
+ data.tar.gz: e65135c45c4627f8020df3da0d085f3af643f23129a60eee3a2ba8419f1e568b
5
5
  SHA512:
6
- metadata.gz: 74ac3b2e39fd5e888c4d0b66097dfab977306a23b353a667a9eb5d51df74ac4945542cfd35ea3e951a928dfa45382ab4e280e18e0257bd92cf5d0c19e4bdb270
7
- data.tar.gz: 0037b025610ce66dbdb592e8e4b8010085d1c2fc30b9ff0ee3c0cc96b8af00771e04fc5fe0f222dfff756a2061e4eb126eb635238eef967c5c95f67a4f79256b
6
+ metadata.gz: cf37bb58c40c5960655f1712ea220ecaa54b82d22858ddff256ef4ab76aabaedb7332f9615ca8e486ed7292df57099856ce6d7b84e56a8ae6ed8fd76b998e17f
7
+ data.tar.gz: 3b84ead426b2c929209ec07b04314f027742d8c5e78f039aaa38c6321394b73109b402a1f894ef27b30427014787650d8d07be007fac4b284e99b3b1797ff16c
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.4
1
+ 3.1.2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -36,6 +36,8 @@ module UplandMobileCommonsRest
36
36
  when 503
37
37
  if /This website is under heavy load/.match?(response.body)
38
38
  raise HeavyLoadError, response.body
39
+ elsif /Site Maintenance/.match?(response.body)
40
+ raise SiteMaintenanceError, response.body
39
41
  else
40
42
  raise UnknownError, response.body
41
43
  end
@@ -55,6 +57,8 @@ module UplandMobileCommonsRest
55
57
 
56
58
  class HeavyLoadError < MobileCommonsError; end
57
59
 
60
+ class SiteMaintenanceError < MobileCommonsError; end
61
+
58
62
  class UnknownError < MobileCommonsError; end
59
63
 
60
64
  class InvalidCampaignId < MobileCommonsError; end
data/spec/client_spec.rb CHANGED
@@ -119,6 +119,18 @@ describe UplandMobileCommonsRest::Client do
119
119
  end
120
120
  end
121
121
  end
122
+
123
+ context 'with Site Maintenance message' do
124
+ let(:response_body) { "<title>Site Maintenance</title><p>Sorry for the inconvenience but we're performing some maintenance at the moment. If you need to you can always <a href=\"mailto:mc_support@uplandsoftware.com\">contact us</a>, otherwise we'll be back online shortly!</p>" }
125
+
126
+ it 'should raise a SiteMaintenanceError' do
127
+ expect do
128
+ subject.post_request('do_something', request_params)
129
+ end.to raise_error(UplandMobileCommonsRest::SiteMaintenanceError) do |error|
130
+ expect(error.to_s).to include(response_body)
131
+ end
132
+ end
133
+ end
122
134
  end
123
135
 
124
136
  context '504 status response' do
@@ -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: upland_mobile_commons_rest 0.3.0 ruby lib
5
+ # stub: upland_mobile_commons_rest 0.3.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "upland_mobile_commons_rest".freeze
9
- s.version = "0.3.0"
9
+ s.version = "0.3.1"
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 = ["Kathy Lu".freeze, "Diego Marcet".freeze, "Grey Moore".freeze, "Nathan Woodhull".freeze]
14
- s.date = "2022-07-05"
14
+ s.date = "2022-07-29"
15
15
  s.description = "A simple ruby API client gem for the Upland Mobile Commons REST API".freeze
16
16
  s.email = "team@controlshiftlabs.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -57,7 +57,7 @@ Gem::Specification.new do |s|
57
57
  ]
58
58
  s.homepage = "http://github.com/controlshift/upland_mobile_commons_rest".freeze
59
59
  s.licenses = ["MIT".freeze]
60
- s.rubygems_version = "3.1.6".freeze
60
+ s.rubygems_version = "3.3.7".freeze
61
61
  s.summary = "API client gem for Upland Mobile Commons".freeze
62
62
 
63
63
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upland_mobile_commons_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kathy Lu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-07-05 00:00:00.000000000 Z
14
+ date: 2022-07-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: vertebrae
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.1.6
232
+ rubygems_version: 3.3.7
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: API client gem for Upland Mobile Commons