action_kit_rest 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9e054d6149504eb67b5396a47652ef4a967492d3272bc00223fdafbb8abe7c9
|
|
4
|
+
data.tar.gz: 6dc40c7e2a42e04ca3c908e7dc1962695747fbc19a39e7e289138725a399f3ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b214c2182a621872747067d02c7f2d317dc9cb376e14e1c5dd9d3d90be31a170d2c52305719078233c1b486695cd2ad1372067f641de8ec389d0eb574814403
|
|
7
|
+
data.tar.gz: b97e261b7a52b32982feb5976a67e7d9dd155832e964dd1161e7ece6db573cef001fea03b7f1c386b7055bd96b2abf5aa8a255e2c97d0bb7bc5f54c85248f09c
|
data/action_kit_rest.gemspec
CHANGED
|
@@ -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.
|
|
5
|
+
# stub: action_kit_rest 0.4.3 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "action_kit_rest".freeze
|
|
9
|
-
s.version = "0.4.
|
|
9
|
+
s.version = "0.4.3"
|
|
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, "Jacinda Moore".freeze]
|
|
14
|
-
s.date = "2020-
|
|
14
|
+
s.date = "2020-04-24"
|
|
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 = [
|
|
@@ -81,6 +81,7 @@ Gem::Specification.new do |s|
|
|
|
81
81
|
"spec/lib/action_kit_rest/pages/event_campaign_page_spec.rb",
|
|
82
82
|
"spec/lib/action_kit_rest/pages/import_page_spec.rb",
|
|
83
83
|
"spec/lib/action_kit_rest/response/collection_spec.rb",
|
|
84
|
+
"spec/lib/action_kit_rest/response/validation_error_spec.rb",
|
|
84
85
|
"spec/lib/action_kit_rest/response/wrapper_spec.rb",
|
|
85
86
|
"spec/lib/action_kit_rest/user_spec.rb",
|
|
86
87
|
"spec/spec_helper.rb",
|
|
@@ -88,23 +89,33 @@ Gem::Specification.new do |s|
|
|
|
88
89
|
]
|
|
89
90
|
s.homepage = "http://github.com/controlshift/action_kit_rest".freeze
|
|
90
91
|
s.licenses = ["MIT".freeze]
|
|
91
|
-
s.rubygems_version = "3.
|
|
92
|
+
s.rubygems_version = "3.0.8".freeze
|
|
92
93
|
s.summary = "A wrapper for the ActionKit REST API".freeze
|
|
93
94
|
|
|
94
95
|
if s.respond_to? :specification_version then
|
|
95
96
|
s.specification_version = 4
|
|
96
|
-
end
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
98
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
99
|
+
s.add_runtime_dependency(%q<vertebrae>.freeze, ["~> 0.5.0"])
|
|
100
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
|
|
101
|
+
s.add_development_dependency(%q<webmock>.freeze, ["~> 3.3"])
|
|
102
|
+
s.add_development_dependency(%q<byebug>.freeze, [">= 10.0.2", "< 11.0"])
|
|
103
|
+
s.add_development_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
|
|
104
|
+
s.add_development_dependency(%q<eventmachine>.freeze, [">= 1.2.5", "< 2.0"])
|
|
105
|
+
s.add_development_dependency(%q<em-synchrony>.freeze, [">= 1.0.6", "< 2.0"])
|
|
106
|
+
s.add_development_dependency(%q<em-http-request>.freeze, [">= 1.1.5", "< 2.0"])
|
|
107
|
+
s.add_development_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0"])
|
|
108
|
+
else
|
|
109
|
+
s.add_dependency(%q<vertebrae>.freeze, ["~> 0.5.0"])
|
|
110
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
|
|
111
|
+
s.add_dependency(%q<webmock>.freeze, ["~> 3.3"])
|
|
112
|
+
s.add_dependency(%q<byebug>.freeze, [">= 10.0.2", "< 11.0"])
|
|
113
|
+
s.add_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
|
|
114
|
+
s.add_dependency(%q<eventmachine>.freeze, [">= 1.2.5", "< 2.0"])
|
|
115
|
+
s.add_dependency(%q<em-synchrony>.freeze, [">= 1.0.6", "< 2.0"])
|
|
116
|
+
s.add_dependency(%q<em-http-request>.freeze, [">= 1.1.5", "< 2.0"])
|
|
117
|
+
s.add_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0"])
|
|
118
|
+
end
|
|
108
119
|
else
|
|
109
120
|
s.add_dependency(%q<vertebrae>.freeze, ["~> 0.5.0"])
|
|
110
121
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
|
|
@@ -11,7 +11,14 @@ module ActionKitRest
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def to_s
|
|
14
|
-
|
|
14
|
+
begin
|
|
15
|
+
"#{super()} \n url: #{url} \n body: #{body} \n errors: #{errors}"
|
|
16
|
+
rescue Encoding::CompatibilityError
|
|
17
|
+
# Something went gravely wrong trying to construct the error message, so give up on the extra info
|
|
18
|
+
# and just raise the name of the exception.
|
|
19
|
+
# This will let us at least raise with a backtrace.
|
|
20
|
+
super
|
|
21
|
+
end
|
|
15
22
|
end
|
|
16
23
|
end
|
|
17
24
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe ActionKitRest::Response::ValidationError do
|
|
4
|
+
describe '#to_s' do
|
|
5
|
+
subject { ActionKitRest::Response::ValidationError.new(url: url, body: body) }
|
|
6
|
+
|
|
7
|
+
context 'with a normal URL and body' do
|
|
8
|
+
let(:url) { 'https://actionkit.example.com/rest/v1/page/1' }
|
|
9
|
+
let(:errors) { {'zip' => 'invalid zip code'} }
|
|
10
|
+
let(:body) { {errors: errors}.to_json }
|
|
11
|
+
|
|
12
|
+
it 'should put information in the string' do
|
|
13
|
+
expect(subject.to_s).to eq "ActionKitRest::Response::ValidationError \n url: #{url} \n body: #{body} \n errors: #{errors.inspect}"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
context 'with special characters in the body' do
|
|
18
|
+
let(:url) { 'https://actionkit.example.com/rest/v1/page/1' }
|
|
19
|
+
let(:errors) { {'zip' => '☃'} }
|
|
20
|
+
let(:body) { {errors: errors}.to_json }
|
|
21
|
+
|
|
22
|
+
it 'should put information in the string' do
|
|
23
|
+
expect(subject.to_s).to eq "ActionKitRest::Response::ValidationError \n url: #{url} \n body: #{body} \n errors: #{errors.inspect}"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
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.
|
|
4
|
+
version: 0.4.3
|
|
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: 2020-
|
|
13
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: vertebrae
|
|
@@ -244,6 +244,7 @@ files:
|
|
|
244
244
|
- spec/lib/action_kit_rest/pages/event_campaign_page_spec.rb
|
|
245
245
|
- spec/lib/action_kit_rest/pages/import_page_spec.rb
|
|
246
246
|
- spec/lib/action_kit_rest/response/collection_spec.rb
|
|
247
|
+
- spec/lib/action_kit_rest/response/validation_error_spec.rb
|
|
247
248
|
- spec/lib/action_kit_rest/response/wrapper_spec.rb
|
|
248
249
|
- spec/lib/action_kit_rest/user_spec.rb
|
|
249
250
|
- spec/spec_helper.rb
|
|
@@ -267,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
267
268
|
- !ruby/object:Gem::Version
|
|
268
269
|
version: '0'
|
|
269
270
|
requirements: []
|
|
270
|
-
rubygems_version: 3.
|
|
271
|
+
rubygems_version: 3.0.8
|
|
271
272
|
signing_key:
|
|
272
273
|
specification_version: 4
|
|
273
274
|
summary: A wrapper for the ActionKit REST API
|