action_kit_rest 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +26 -0
- data/.travis.yml +7 -1
- data/Gemfile +11 -9
- data/Rakefile +15 -18
- data/action_kit_rest.gemspec +30 -26
- data/lib/action_kit_rest.rb +2 -0
- data/lib/action_kit_rest/action.rb +3 -1
- data/lib/action_kit_rest/actions/event_create_action.rb +5 -3
- data/lib/action_kit_rest/actions/event_signup_action.rb +6 -3
- data/lib/action_kit_rest/actions/unsubscribe_action.rb +3 -1
- data/lib/action_kit_rest/allowed_user_field.rb +3 -1
- data/lib/action_kit_rest/api.rb +9 -7
- data/lib/action_kit_rest/base.rb +5 -4
- data/lib/action_kit_rest/client.rb +5 -3
- data/lib/action_kit_rest/event.rb +3 -1
- data/lib/action_kit_rest/event_signup.rb +3 -1
- data/lib/action_kit_rest/language.rb +3 -1
- data/lib/action_kit_rest/list.rb +3 -1
- data/lib/action_kit_rest/page.rb +4 -2
- data/lib/action_kit_rest/pages/base.rb +4 -5
- data/lib/action_kit_rest/pages/donation_page.rb +3 -1
- data/lib/action_kit_rest/pages/event_campaign_page.rb +4 -2
- data/lib/action_kit_rest/pages/import_page.rb +3 -1
- data/lib/action_kit_rest/pages/signup_page.rb +3 -1
- data/lib/action_kit_rest/pages/unsubscribe_page.rb +3 -1
- data/lib/action_kit_rest/phone.rb +2 -0
- data/lib/action_kit_rest/railties.rb +3 -1
- data/lib/action_kit_rest/response/collection.rb +4 -4
- data/lib/action_kit_rest/response/raise_error.rb +15 -12
- data/lib/action_kit_rest/response/validation_error.rb +8 -8
- data/lib/action_kit_rest/response/wrapper.rb +10 -10
- data/lib/action_kit_rest/tag.rb +6 -6
- data/lib/action_kit_rest/user.rb +3 -1
- data/lib/action_kit_rest/version.rb +3 -1
- data/spec/lib/action_kit_rest/actions/event_create_action_spec.rb +6 -4
- data/spec/lib/action_kit_rest/actions/event_signup_action_spec.rb +6 -4
- data/spec/lib/action_kit_rest/allowed_user_field_spec.rb +9 -7
- data/spec/lib/action_kit_rest/logger_spec.rb +7 -5
- data/spec/lib/action_kit_rest/page_spec.rb +28 -28
- data/spec/lib/action_kit_rest/pages/event_campaign_page_spec.rb +25 -20
- data/spec/lib/action_kit_rest/pages/import_page_spec.rb +21 -17
- data/spec/lib/action_kit_rest/response/collection_spec.rb +13 -11
- data/spec/lib/action_kit_rest/response/validation_error_spec.rb +6 -4
- data/spec/lib/action_kit_rest/response/wrapper_spec.rb +6 -4
- data/spec/lib/action_kit_rest/user_spec.rb +11 -9
- data/spec/spec_helper.rb +6 -4
- data/spec/support/shared_contexts/stub_logger.rb +4 -2
- metadata +65 -56
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rspec'
|
2
4
|
require 'webmock/rspec'
|
3
5
|
|
@@ -16,11 +18,11 @@ RSpec.configure do |config|
|
|
16
18
|
end
|
17
19
|
|
18
20
|
config.mock_with :rspec do |mocks|
|
19
|
-
mocks.syntax = [
|
21
|
+
mocks.syntax = %i[should expect]
|
20
22
|
end
|
21
23
|
|
22
24
|
config.expect_with :rspec do |c|
|
23
|
-
c.syntax = [
|
25
|
+
c.syntax = %i[should expect]
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
@@ -37,11 +39,11 @@ def stub_put(path)
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def stub_action_kit_request(method, path)
|
40
|
-
stub_request(method,
|
42
|
+
stub_request(method, "https://test.com/rest/v1/#{path}")
|
41
43
|
end
|
42
44
|
|
43
45
|
def fixture_path
|
44
|
-
File.expand_path(
|
46
|
+
File.expand_path('fixtures', __dir__)
|
45
47
|
end
|
46
48
|
|
47
49
|
def fixture(file)
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_context 'stub_logger' do
|
2
4
|
before(:each) do
|
3
5
|
logger = double
|
4
6
|
allow(logger).to receive(:debug).and_return(true)
|
@@ -6,4 +8,4 @@ shared_context "stub_logger" do
|
|
6
8
|
allow(ActionKitRest).to receive(:logger).and_return(logger)
|
7
9
|
allow(Vertebrae::Base).to receive(:logger).and_return(logger)
|
8
10
|
end
|
9
|
-
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,59 +1,51 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Woodhull
|
8
8
|
- Diego Marcet
|
9
|
-
-
|
10
|
-
autorequire:
|
9
|
+
- Grey Moore
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: vertebrae
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.6.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.6.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
|
-
name:
|
30
|
+
name: bundler
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - "
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '3.7'
|
36
|
-
type: :development
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - "~>"
|
33
|
+
- - ">="
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
43
|
-
-
|
44
|
-
name: webmock
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
35
|
+
version: '2.0'
|
36
|
+
- - "<"
|
48
37
|
- !ruby/object:Gem::Version
|
49
|
-
version: '3.
|
38
|
+
version: '3.0'
|
50
39
|
type: :development
|
51
40
|
prerelease: false
|
52
41
|
version_requirements: !ruby/object:Gem::Requirement
|
53
42
|
requirements:
|
54
|
-
- - "
|
43
|
+
- - ">="
|
55
44
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
45
|
+
version: '2.0'
|
46
|
+
- - "<"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.0'
|
57
49
|
- !ruby/object:Gem::Dependency
|
58
50
|
name: byebug
|
59
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,32 +61,32 @@ dependencies:
|
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '0'
|
71
63
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
64
|
+
name: em-http-request
|
73
65
|
requirement: !ruby/object:Gem::Requirement
|
74
66
|
requirements:
|
75
67
|
- - ">="
|
76
68
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
69
|
+
version: 1.1.5
|
78
70
|
- - "<"
|
79
71
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
72
|
+
version: '2.0'
|
81
73
|
type: :development
|
82
74
|
prerelease: false
|
83
75
|
version_requirements: !ruby/object:Gem::Requirement
|
84
76
|
requirements:
|
85
77
|
- - ">="
|
86
78
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
79
|
+
version: 1.1.5
|
88
80
|
- - "<"
|
89
81
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
82
|
+
version: '2.0'
|
91
83
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
84
|
+
name: em-synchrony
|
93
85
|
requirement: !ruby/object:Gem::Requirement
|
94
86
|
requirements:
|
95
87
|
- - ">="
|
96
88
|
- !ruby/object:Gem::Version
|
97
|
-
version: 1.
|
89
|
+
version: 1.0.6
|
98
90
|
- - "<"
|
99
91
|
- !ruby/object:Gem::Version
|
100
92
|
version: '2.0'
|
@@ -104,17 +96,17 @@ dependencies:
|
|
104
96
|
requirements:
|
105
97
|
- - ">="
|
106
98
|
- !ruby/object:Gem::Version
|
107
|
-
version: 1.
|
99
|
+
version: 1.0.6
|
108
100
|
- - "<"
|
109
101
|
- !ruby/object:Gem::Version
|
110
102
|
version: '2.0'
|
111
103
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
104
|
+
name: eventmachine
|
113
105
|
requirement: !ruby/object:Gem::Requirement
|
114
106
|
requirements:
|
115
107
|
- - ">="
|
116
108
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
109
|
+
version: 1.2.5
|
118
110
|
- - "<"
|
119
111
|
- !ruby/object:Gem::Version
|
120
112
|
version: '2.0'
|
@@ -124,50 +116,66 @@ dependencies:
|
|
124
116
|
requirements:
|
125
117
|
- - ">="
|
126
118
|
- !ruby/object:Gem::Version
|
127
|
-
version: 1.
|
119
|
+
version: 1.2.5
|
128
120
|
- - "<"
|
129
121
|
- !ruby/object:Gem::Version
|
130
122
|
version: '2.0'
|
131
123
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
124
|
+
name: juwelier
|
133
125
|
requirement: !ruby/object:Gem::Requirement
|
134
126
|
requirements:
|
135
127
|
- - ">="
|
136
128
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
138
|
-
- - "<"
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: '2.0'
|
129
|
+
version: '0'
|
141
130
|
type: :development
|
142
131
|
prerelease: false
|
143
132
|
version_requirements: !ruby/object:Gem::Requirement
|
144
133
|
requirements:
|
145
134
|
- - ">="
|
146
135
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
148
|
-
|
136
|
+
version: '0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: rspec
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
149
142
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
143
|
+
version: '3.7'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '3.7'
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
|
-
name:
|
152
|
+
name: rubocop
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
155
|
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
158
|
-
- - "<"
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '3.0'
|
157
|
+
version: '0'
|
161
158
|
type: :development
|
162
159
|
prerelease: false
|
163
160
|
version_requirements: !ruby/object:Gem::Requirement
|
164
161
|
requirements:
|
165
162
|
- - ">="
|
166
163
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
168
|
-
|
164
|
+
version: '0'
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: webmock
|
167
|
+
requirement: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - "~>"
|
169
170
|
- !ruby/object:Gem::Version
|
170
|
-
version: '3.
|
171
|
+
version: '3.3'
|
172
|
+
type: :development
|
173
|
+
prerelease: false
|
174
|
+
version_requirements: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '3.3'
|
171
179
|
description: Gem for interacting with the ActionKit API
|
172
180
|
email: systems@controlshiftlabs.com
|
173
181
|
executables: []
|
@@ -178,6 +186,7 @@ extra_rdoc_files:
|
|
178
186
|
files:
|
179
187
|
- ".document"
|
180
188
|
- ".rspec"
|
189
|
+
- ".rubocop.yml"
|
181
190
|
- ".ruby-gemset"
|
182
191
|
- ".ruby-version"
|
183
192
|
- ".travis.yml"
|
@@ -247,7 +256,7 @@ homepage: http://github.com/controlshift/action_kit_rest
|
|
247
256
|
licenses:
|
248
257
|
- MIT
|
249
258
|
metadata: {}
|
250
|
-
post_install_message:
|
259
|
+
post_install_message:
|
251
260
|
rdoc_options: []
|
252
261
|
require_paths:
|
253
262
|
- lib
|
@@ -262,8 +271,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
271
|
- !ruby/object:Gem::Version
|
263
272
|
version: '0'
|
264
273
|
requirements: []
|
265
|
-
rubygems_version: 3.0.
|
266
|
-
signing_key:
|
274
|
+
rubygems_version: 3.0.8
|
275
|
+
signing_key:
|
267
276
|
specification_version: 4
|
268
277
|
summary: A wrapper for the ActionKit REST API
|
269
278
|
test_files: []
|