mrkt 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/ruby.yml +2 -2
- data/.rubocop.yml +14 -1
- data/Gemfile.lock +16 -13
- data/lib/mrkt/concerns/crud_program_members.rb +31 -0
- data/lib/mrkt/version.rb +1 -1
- data/lib/mrkt.rb +2 -0
- data/mrkt.gemspec +4 -1
- data/spec/concerns/authentication_spec.rb +31 -34
- data/spec/concerns/crud_activities_spec.rb +20 -13
- data/spec/concerns/crud_asset_folders_spec.rb +12 -12
- data/spec/concerns/crud_asset_static_lists_spec.rb +4 -4
- data/spec/concerns/crud_campaigns_spec.rb +18 -17
- data/spec/concerns/crud_custom_activities_spec.rb +14 -15
- data/spec/concerns/crud_custom_objects_spec.rb +15 -15
- data/spec/concerns/crud_leads_spec.rb +17 -14
- data/spec/concerns/crud_lists_spec.rb +7 -5
- data/spec/concerns/crud_program_members_spec.rb +141 -0
- data/spec/concerns/crud_programs_spec.rb +5 -5
- data/spec/concerns/import_custom_objects_spec.rb +9 -5
- data/spec/concerns/import_leads_spec.rb +9 -5
- data/spec/errors_spec.rb +9 -11
- data/spec/faraday/params_encoder_spec.rb +4 -4
- data/spec/mkto_rest_spec.rb +1 -1
- data/spec/support/initialized_client.rb +3 -3
- metadata +23 -5
@@ -1,5 +1,7 @@
|
|
1
1
|
describe Mrkt::Faraday::ParamsEncoder do
|
2
2
|
describe '.encode' do
|
3
|
+
subject { described_class.encode(params) }
|
4
|
+
|
3
5
|
let(:params) do
|
4
6
|
{
|
5
7
|
string: 'foobar',
|
@@ -9,16 +11,14 @@ describe Mrkt::Faraday::ParamsEncoder do
|
|
9
11
|
}
|
10
12
|
end
|
11
13
|
|
12
|
-
subject { described_class.encode(params) }
|
13
|
-
|
14
14
|
it { is_expected.to eq(Faraday::Utils::ParamsHash.new.merge(params.merge(array: '1,2,3')).to_query) }
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '.decode' do
|
18
|
-
let(:value) { 'foo=foo&bar=bar' }
|
19
|
-
|
20
18
|
subject { described_class.decode(value) }
|
21
19
|
|
20
|
+
let(:value) { 'foo=foo&bar=bar' }
|
21
|
+
|
22
22
|
it { is_expected.to eq('foo' => 'foo', 'bar' => 'bar') }
|
23
23
|
end
|
24
24
|
end
|
data/spec/mkto_rest_spec.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'securerandom'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
shared_context 'initialized client' do
|
4
|
+
shared_context 'with an initialized client' do
|
5
|
+
subject(:client) { Mrkt::Client.new(host: host, client_id: client_id, client_secret: client_secret) }
|
6
|
+
|
5
7
|
let(:host) { '0-KBZ-0.mktorest.com' }
|
6
8
|
let(:client_id) { SecureRandom.uuid }
|
7
9
|
let(:client_secret) { SecureRandom.hex }
|
@@ -9,8 +11,6 @@ shared_context 'initialized client' do
|
|
9
11
|
{ access_token: SecureRandom.uuid, token_type: 'bearer', expires_in: 2241, scope: 'RestClient' }
|
10
12
|
end
|
11
13
|
|
12
|
-
subject(:client) { Mrkt::Client.new(host: host, client_id: client_id, client_secret: client_secret) }
|
13
|
-
|
14
14
|
before do
|
15
15
|
@authentication_request_stub = stub_request(:get, "https://#{host}/identity/oauth/token")
|
16
16
|
.with(query: { client_id: client_id, client_secret: client_secret, grant_type: 'client_credentials' })
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mrkt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KARASZI István
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 1.
|
118
|
+
version: 1.23.0
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 1.
|
125
|
+
version: 1.23.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rubocop-rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,6 +137,20 @@ dependencies:
|
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 0.6.0
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rubocop-rspec
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '2.6'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '2.6'
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
155
|
name: simplecov
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +210,7 @@ files:
|
|
196
210
|
- lib/mrkt/concerns/crud_helpers.rb
|
197
211
|
- lib/mrkt/concerns/crud_leads.rb
|
198
212
|
- lib/mrkt/concerns/crud_lists.rb
|
213
|
+
- lib/mrkt/concerns/crud_program_members.rb
|
199
214
|
- lib/mrkt/concerns/crud_programs.rb
|
200
215
|
- lib/mrkt/concerns/import_custom_objects.rb
|
201
216
|
- lib/mrkt/concerns/import_leads.rb
|
@@ -215,6 +230,7 @@ files:
|
|
215
230
|
- spec/concerns/crud_custom_objects_spec.rb
|
216
231
|
- spec/concerns/crud_leads_spec.rb
|
217
232
|
- spec/concerns/crud_lists_spec.rb
|
233
|
+
- spec/concerns/crud_program_members_spec.rb
|
218
234
|
- spec/concerns/crud_programs_spec.rb
|
219
235
|
- spec/concerns/import_custom_objects_spec.rb
|
220
236
|
- spec/concerns/import_leads_spec.rb
|
@@ -227,7 +243,8 @@ files:
|
|
227
243
|
homepage: https://github.com/raszi/mrkt
|
228
244
|
licenses:
|
229
245
|
- MIT
|
230
|
-
metadata:
|
246
|
+
metadata:
|
247
|
+
rubygems_mfa_required: 'true'
|
231
248
|
post_install_message:
|
232
249
|
rdoc_options: []
|
233
250
|
require_paths:
|
@@ -257,6 +274,7 @@ test_files:
|
|
257
274
|
- spec/concerns/crud_custom_objects_spec.rb
|
258
275
|
- spec/concerns/crud_leads_spec.rb
|
259
276
|
- spec/concerns/crud_lists_spec.rb
|
277
|
+
- spec/concerns/crud_program_members_spec.rb
|
260
278
|
- spec/concerns/crud_programs_spec.rb
|
261
279
|
- spec/concerns/import_custom_objects_spec.rb
|
262
280
|
- spec/concerns/import_leads_spec.rb
|