mrkt 0.6.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/ruby.yml +41 -0
- data/.rubocop.yml +31 -6
- data/Gemfile.lock +95 -69
- data/LICENSE +21 -0
- data/README.md +35 -7
- data/lib/mrkt/concerns/authentication.rb +32 -6
- data/lib/mrkt/concerns/connection.rb +13 -4
- data/lib/mrkt/concerns/crud_activities.rb +32 -0
- data/lib/mrkt/concerns/crud_asset_folders.rb +43 -0
- data/lib/mrkt/concerns/crud_asset_static_lists.rb +30 -0
- data/lib/mrkt/concerns/crud_campaigns.rb +2 -4
- data/lib/mrkt/concerns/crud_custom_activities.rb +36 -0
- data/lib/mrkt/concerns/crud_custom_objects.rb +14 -15
- data/lib/mrkt/concerns/crud_helpers.rb +7 -0
- data/lib/mrkt/concerns/crud_leads.rb +41 -15
- data/lib/mrkt/concerns/crud_lists.rb +13 -10
- data/lib/mrkt/concerns/crud_programs.rb +6 -5
- data/lib/mrkt/concerns/import_custom_objects.rb +24 -0
- data/lib/mrkt/concerns/import_leads.rb +8 -5
- data/lib/mrkt/errors.rb +23 -3
- data/lib/mrkt/faraday/params_encoder.rb +20 -0
- data/lib/mrkt/faraday.rb +4 -0
- data/lib/mrkt/faraday_middleware/response.rb +4 -4
- data/lib/mrkt/faraday_middleware.rb +3 -7
- data/lib/mrkt/version.rb +1 -1
- data/lib/mrkt.rb +29 -3
- data/mrkt.gemspec +13 -12
- data/spec/concerns/authentication_spec.rb +95 -0
- data/spec/concerns/crud_activities_spec.rb +279 -0
- data/spec/concerns/crud_asset_folders_spec.rb +273 -0
- data/spec/concerns/crud_asset_static_lists_spec.rb +183 -0
- data/spec/concerns/crud_custom_activities_spec.rb +172 -0
- data/spec/concerns/crud_custom_objects_spec.rb +99 -89
- data/spec/concerns/crud_leads_spec.rb +151 -1
- data/spec/concerns/crud_lists_spec.rb +33 -0
- data/spec/concerns/import_custom_objects_spec.rb +89 -0
- data/spec/concerns/import_leads_spec.rb +3 -3
- data/spec/faraday/params_encoder_spec.rb +24 -0
- data/spec/spec_helper.rb +3 -6
- data/spec/support/initialized_client.rb +1 -1
- data/spec/support/webmock.rb +1 -7
- metadata +82 -40
- data/.travis.yml +0 -8
@@ -1,9 +1,63 @@
|
|
1
1
|
describe Mrkt::CrudLeads do
|
2
2
|
include_context 'initialized client'
|
3
3
|
|
4
|
+
describe 'get_lead_by_id' do
|
5
|
+
subject { client.get_lead_by_id(id, fields: fields) }
|
6
|
+
|
7
|
+
let(:id) { 200 }
|
8
|
+
|
9
|
+
let(:fields_query) { fields ? "fields=#{fields.join(',')}" : nil }
|
10
|
+
|
11
|
+
before do
|
12
|
+
stub_request(:get, "https://#{host}/rest/v1/lead/#{id}.json?#{fields_query}")
|
13
|
+
.to_return(json_stub(response_stub))
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'when no fields are given' do
|
17
|
+
let(:fields) { nil }
|
18
|
+
let(:response_stub) do
|
19
|
+
{
|
20
|
+
requestId: '1134#169a69aae86',
|
21
|
+
result: [
|
22
|
+
{
|
23
|
+
id: id,
|
24
|
+
firstName: 'John',
|
25
|
+
lastName: 'Snow',
|
26
|
+
email: 'jfrost@mrkt.com',
|
27
|
+
updatedAt: '2019-03-19T20:39:23Z',
|
28
|
+
createdAt: '2019-03-14T13:41:37Z'
|
29
|
+
}
|
30
|
+
],
|
31
|
+
success: true
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
it { is_expected.to eq(response_stub) }
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when an array of fields is given' do
|
39
|
+
let(:fields) { %w[email dateOfBirth] }
|
40
|
+
let(:response_stub) do
|
41
|
+
{
|
42
|
+
requestId: '33dd#169a6b5ba65',
|
43
|
+
result: [
|
44
|
+
{
|
45
|
+
id: id,
|
46
|
+
email: 'jfrost@mrkt.com',
|
47
|
+
dateOfBirth: '1813-03-15'
|
48
|
+
}
|
49
|
+
],
|
50
|
+
success: true
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
it { is_expected.to eq(response_stub) }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
4
58
|
describe '#get_leads' do
|
5
59
|
let(:filter_type) { 'email' }
|
6
|
-
let(:filter_values) { %w
|
60
|
+
let(:filter_values) { %w[user@example.com] }
|
7
61
|
let(:response_stub) do
|
8
62
|
{
|
9
63
|
requestId: 'c245#14cd6830ae2',
|
@@ -148,4 +202,100 @@ describe Mrkt::CrudLeads do
|
|
148
202
|
end
|
149
203
|
end
|
150
204
|
end
|
205
|
+
|
206
|
+
describe '#merge_leads' do
|
207
|
+
let(:id) { 1 }
|
208
|
+
let(:losing_lead_ids) { [2, 3, 4] }
|
209
|
+
let(:request_stub) { {} }
|
210
|
+
|
211
|
+
subject { client.merge_leads(id, losing_lead_ids) }
|
212
|
+
|
213
|
+
before do
|
214
|
+
params = ::Faraday::Utils::ParamsHash.new
|
215
|
+
params[:mergeInCRM] = false
|
216
|
+
params[:leadIds] = losing_lead_ids.join(',') if losing_lead_ids
|
217
|
+
|
218
|
+
stub_request(:post, "https://#{host}/rest/v1/leads/#{id}/merge.json?#{params.to_query}")
|
219
|
+
.with(json_stub(request_stub))
|
220
|
+
.to_return(json_stub(response_stub))
|
221
|
+
end
|
222
|
+
|
223
|
+
context 'with existing leads' do
|
224
|
+
let(:response_stub) do
|
225
|
+
{
|
226
|
+
requestId: 'c245#14cd6830ae2',
|
227
|
+
success: true
|
228
|
+
}
|
229
|
+
end
|
230
|
+
|
231
|
+
it { is_expected.to eq(response_stub) }
|
232
|
+
end
|
233
|
+
|
234
|
+
context 'with a non-existing lead id' do
|
235
|
+
let(:response_stub) do
|
236
|
+
{
|
237
|
+
requestId: 'c245#14cd6830ae2',
|
238
|
+
success: false,
|
239
|
+
errors: [
|
240
|
+
{
|
241
|
+
code: '1004',
|
242
|
+
message: "Lead '1' not found"
|
243
|
+
}
|
244
|
+
]
|
245
|
+
}
|
246
|
+
end
|
247
|
+
|
248
|
+
it 'should raise an Error' do
|
249
|
+
expect { subject }.to raise_error(Mrkt::Errors::LeadNotFound)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
describe '#describe_lead' do
|
255
|
+
let(:response_stub) do
|
256
|
+
{
|
257
|
+
requestId: '5c9e#169a68fa806',
|
258
|
+
result: [
|
259
|
+
{
|
260
|
+
id: 4,
|
261
|
+
displayName: 'Company Name',
|
262
|
+
dataType: 'string',
|
263
|
+
length: 255,
|
264
|
+
rest: {
|
265
|
+
name: 'company',
|
266
|
+
readOnly: false
|
267
|
+
},
|
268
|
+
soap: {
|
269
|
+
name: 'Company',
|
270
|
+
readOnly: false
|
271
|
+
}
|
272
|
+
},
|
273
|
+
{
|
274
|
+
id: 56,
|
275
|
+
displayName: 'Email Address',
|
276
|
+
dataType: 'email',
|
277
|
+
length: 255,
|
278
|
+
rest: {
|
279
|
+
name: 'email',
|
280
|
+
readOnly: false
|
281
|
+
},
|
282
|
+
soap: {
|
283
|
+
name: 'Email',
|
284
|
+
readOnly: false
|
285
|
+
}
|
286
|
+
}
|
287
|
+
],
|
288
|
+
success: true
|
289
|
+
}
|
290
|
+
end
|
291
|
+
|
292
|
+
subject { client.describe_lead }
|
293
|
+
|
294
|
+
before do
|
295
|
+
stub_request(:get, "https://#{host}/rest/v1/leads/describe.json")
|
296
|
+
.to_return(json_stub(response_stub))
|
297
|
+
end
|
298
|
+
|
299
|
+
it { is_expected.to eq(response_stub) }
|
300
|
+
end
|
151
301
|
end
|
@@ -63,4 +63,37 @@ describe Mrkt::CrudLists do
|
|
63
63
|
|
64
64
|
it { is_expected.to eq(response_stub) }
|
65
65
|
end
|
66
|
+
|
67
|
+
describe '#remove_leads_from_list' do
|
68
|
+
let(:list_id) { '1001' }
|
69
|
+
let(:lead_ids) { ['1'] }
|
70
|
+
let(:request_body) do
|
71
|
+
{
|
72
|
+
input: [
|
73
|
+
{ id: '1' }
|
74
|
+
]
|
75
|
+
}
|
76
|
+
end
|
77
|
+
let(:response_stub) do
|
78
|
+
{
|
79
|
+
requestId: '10de4#1697e81c821',
|
80
|
+
result: [
|
81
|
+
{
|
82
|
+
id: 1,
|
83
|
+
status: 'removed'
|
84
|
+
}
|
85
|
+
],
|
86
|
+
success: true
|
87
|
+
}
|
88
|
+
end
|
89
|
+
subject { client.remove_leads_from_list(list_id, lead_ids) }
|
90
|
+
|
91
|
+
before do
|
92
|
+
stub_request(:delete, "https://#{host}/rest/v1/lists/#{list_id}/leads.json")
|
93
|
+
.with(json_stub(request_body))
|
94
|
+
.to_return(json_stub(response_stub))
|
95
|
+
end
|
96
|
+
|
97
|
+
it { is_expected.to eq(response_stub) }
|
98
|
+
end
|
66
99
|
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
|
3
|
+
describe Mrkt::ImportCustomObjects do
|
4
|
+
include_context 'initialized client'
|
5
|
+
let(:custom_object) { 'car_c' }
|
6
|
+
|
7
|
+
describe '#import_custom_object' do
|
8
|
+
let(:file) { StringIO.new }
|
9
|
+
let(:response_stub) do
|
10
|
+
{
|
11
|
+
requestId: 'c015#15a68a23418',
|
12
|
+
success: true,
|
13
|
+
result: [
|
14
|
+
{
|
15
|
+
batchId: 1,
|
16
|
+
status: 'Importing',
|
17
|
+
objectApiName: custom_object
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
21
|
+
end
|
22
|
+
subject { client.import_custom_object(file, custom_object) }
|
23
|
+
|
24
|
+
before do
|
25
|
+
stub_request(:post, "https://#{host}/bulk/v1/customobjects/#{custom_object}/import.json")
|
26
|
+
.with(headers: { content_type: %r{multipart/form-data; boundary=\S+} })
|
27
|
+
.to_return(json_stub(response_stub))
|
28
|
+
end
|
29
|
+
|
30
|
+
it { is_expected.to eq(response_stub) }
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#import_custom_object_status' do
|
34
|
+
let(:id) { 1 }
|
35
|
+
let(:response_stub) do
|
36
|
+
{
|
37
|
+
requestId: '2a5#15a68dd9be1',
|
38
|
+
result: [
|
39
|
+
{
|
40
|
+
batchId: id,
|
41
|
+
operation: 'import',
|
42
|
+
status: 'Complete',
|
43
|
+
objectApiName: 'car_c',
|
44
|
+
numOfObjectsProcessed: 3,
|
45
|
+
numOfRowsFailed: 0,
|
46
|
+
numOfRowsWithWarning: 0,
|
47
|
+
importTime: '2 second(s)',
|
48
|
+
message: 'Import succeeded, 3 records imported (3 members)'
|
49
|
+
}
|
50
|
+
],
|
51
|
+
success: true
|
52
|
+
}
|
53
|
+
end
|
54
|
+
subject { client.import_custom_object_status(1, custom_object) }
|
55
|
+
|
56
|
+
before do
|
57
|
+
stub_request(:get, "https://#{host}/bulk/v1/customobjects/#{custom_object}/import/#{id}/status.json")
|
58
|
+
.to_return(json_stub(response_stub))
|
59
|
+
end
|
60
|
+
|
61
|
+
it { is_expected.to eq(response_stub) }
|
62
|
+
end
|
63
|
+
|
64
|
+
describe '#import_custom_object_failures' do
|
65
|
+
let(:id) { 1 }
|
66
|
+
let(:response_stub) { '' }
|
67
|
+
subject { client.import_custom_object_failures(1, custom_object) }
|
68
|
+
|
69
|
+
before do
|
70
|
+
stub_request(:get, "https://#{host}/bulk/v1/customobjects/#{custom_object}/import/#{id}/failures.json")
|
71
|
+
.to_return(headers: { content_length: 0 })
|
72
|
+
end
|
73
|
+
|
74
|
+
it { is_expected.to eq(response_stub) }
|
75
|
+
end
|
76
|
+
|
77
|
+
describe '#import_custom_object_warnings' do
|
78
|
+
let(:id) { 1 }
|
79
|
+
let(:response_stub) { '' }
|
80
|
+
subject { client.import_custom_object_warnings(1, custom_object) }
|
81
|
+
|
82
|
+
before do
|
83
|
+
stub_request(:get, "https://#{host}/bulk/v1/customobjects/#{custom_object}/import/#{id}/warnings.json")
|
84
|
+
.to_return(headers: { content_length: 0 })
|
85
|
+
end
|
86
|
+
|
87
|
+
it { is_expected.to eq(response_stub) }
|
88
|
+
end
|
89
|
+
end
|
@@ -5,7 +5,7 @@ describe Mrkt::ImportLeads do
|
|
5
5
|
include_context 'initialized client'
|
6
6
|
|
7
7
|
describe '#import_lead' do
|
8
|
-
let(:tempfile) { Tempfile.new([
|
8
|
+
let(:tempfile) { Tempfile.new(%w[import-leads csv]) }
|
9
9
|
let(:response_stub) do
|
10
10
|
{
|
11
11
|
requestId: 'c245#14cd6830ae2',
|
@@ -22,8 +22,8 @@ describe Mrkt::ImportLeads do
|
|
22
22
|
|
23
23
|
before do
|
24
24
|
CSV.open(tempfile, 'wb') do |csv|
|
25
|
-
csv << %w
|
26
|
-
csv << %w
|
25
|
+
csv << %w[email firstName lastName]
|
26
|
+
csv << %w[sample@example.com John Snow]
|
27
27
|
end
|
28
28
|
|
29
29
|
stub_request(:post, "https://#{host}/bulk/v1/leads.json")
|
@@ -0,0 +1,24 @@
|
|
1
|
+
describe Mrkt::Faraday::ParamsEncoder do
|
2
|
+
describe '.encode' do
|
3
|
+
let(:params) do
|
4
|
+
{
|
5
|
+
string: 'foobar',
|
6
|
+
number: 1,
|
7
|
+
boolean: true,
|
8
|
+
array: [1, 2, 3]
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
subject { described_class.encode(params) }
|
13
|
+
|
14
|
+
it { is_expected.to eq(Faraday::Utils::ParamsHash.new.merge(params.merge(array: '1,2,3')).to_query) }
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '.decode' do
|
18
|
+
let(:value) { 'foo=foo&bar=bar' }
|
19
|
+
|
20
|
+
subject { described_class.decode(value) }
|
21
|
+
|
22
|
+
it { is_expected.to eq('foo' => 'foo', 'bar' => 'bar') }
|
23
|
+
end
|
24
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,17 +3,14 @@ if ENV['COVERAGE']
|
|
3
3
|
SimpleCov.start
|
4
4
|
end
|
5
5
|
|
6
|
-
if ENV['CODECLIMATE_REPO_TOKEN']
|
7
|
-
require 'codeclimate-test-reporter'
|
8
|
-
CodeClimate::TestReporter.start
|
9
|
-
end
|
10
|
-
|
11
6
|
require 'bundler/setup'
|
12
7
|
Bundler.setup
|
13
8
|
|
14
9
|
require 'mrkt'
|
15
10
|
|
16
|
-
Dir[File.expand_path('spec/support/**/*.rb')].each
|
11
|
+
Dir[File.expand_path('spec/support/**/*.rb')].sort.each do |file|
|
12
|
+
require file
|
13
|
+
end
|
17
14
|
|
18
15
|
RSpec.configure do |config|
|
19
16
|
config.default_formatter = :doc if config.files_to_run.one?
|
@@ -12,7 +12,7 @@ shared_context 'initialized client' do
|
|
12
12
|
subject(:client) { Mrkt::Client.new(host: host, client_id: client_id, client_secret: client_secret) }
|
13
13
|
|
14
14
|
before do
|
15
|
-
stub_request(:get, "https://#{host}/identity/oauth/token")
|
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' })
|
17
17
|
.to_return(json_stub(authentication_stub))
|
18
18
|
end
|
data/spec/support/webmock.rb
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
require 'webmock/rspec'
|
2
2
|
|
3
|
-
RSpec.configure do
|
3
|
+
RSpec.configure do
|
4
4
|
def json_stub(content_stub)
|
5
5
|
{
|
6
6
|
headers: { content_type: 'application/json' },
|
7
7
|
body: JSON.generate(content_stub)
|
8
8
|
}
|
9
9
|
end
|
10
|
-
|
11
|
-
if ENV['CODECLIMATE_REPO_TOKEN']
|
12
|
-
config.after(:suite) do
|
13
|
-
WebMock.disable_net_connect!(allow: 'codeclimate.com')
|
14
|
-
end
|
15
|
-
end
|
16
10
|
end
|
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:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KARASZI István
|
@@ -9,140 +9,162 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 0.9.0
|
21
|
-
- - "<"
|
18
|
+
- - "~>"
|
22
19
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
20
|
+
version: '1.0'
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
|
-
- - "
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
31
|
-
|
27
|
+
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: faraday_middleware
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
32
40
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
41
|
+
version: '1.0'
|
34
42
|
- !ruby/object:Gem::Dependency
|
35
43
|
name: bundler
|
36
44
|
requirement: !ruby/object:Gem::Requirement
|
37
45
|
requirements:
|
38
46
|
- - "~>"
|
39
47
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
48
|
+
version: '2.0'
|
41
49
|
type: :development
|
42
50
|
prerelease: false
|
43
51
|
version_requirements: !ruby/object:Gem::Requirement
|
44
52
|
requirements:
|
45
53
|
- - "~>"
|
46
54
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
55
|
+
version: '2.0'
|
48
56
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
57
|
+
name: gem-release
|
50
58
|
requirement: !ruby/object:Gem::Requirement
|
51
59
|
requirements:
|
52
60
|
- - "~>"
|
53
61
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
62
|
+
version: '2.1'
|
55
63
|
type: :development
|
56
64
|
prerelease: false
|
57
65
|
version_requirements: !ruby/object:Gem::Requirement
|
58
66
|
requirements:
|
59
67
|
- - "~>"
|
60
68
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
69
|
+
version: '2.1'
|
62
70
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
71
|
+
name: pry-byebug
|
64
72
|
requirement: !ruby/object:Gem::Requirement
|
65
73
|
requirements:
|
66
74
|
- - "~>"
|
67
75
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
76
|
+
version: '3.7'
|
69
77
|
type: :development
|
70
78
|
prerelease: false
|
71
79
|
version_requirements: !ruby/object:Gem::Requirement
|
72
80
|
requirements:
|
73
81
|
- - "~>"
|
74
82
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
83
|
+
version: '3.7'
|
76
84
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
85
|
+
name: rake
|
78
86
|
requirement: !ruby/object:Gem::Requirement
|
79
87
|
requirements:
|
80
88
|
- - "~>"
|
81
89
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
90
|
+
version: '13.0'
|
83
91
|
type: :development
|
84
92
|
prerelease: false
|
85
93
|
version_requirements: !ruby/object:Gem::Requirement
|
86
94
|
requirements:
|
87
95
|
- - "~>"
|
88
96
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
97
|
+
version: '13.0'
|
90
98
|
- !ruby/object:Gem::Dependency
|
91
|
-
name:
|
99
|
+
name: rspec
|
92
100
|
requirement: !ruby/object:Gem::Requirement
|
93
101
|
requirements:
|
94
102
|
- - "~>"
|
95
103
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
104
|
+
version: '3.2'
|
97
105
|
type: :development
|
98
106
|
prerelease: false
|
99
107
|
version_requirements: !ruby/object:Gem::Requirement
|
100
108
|
requirements:
|
101
109
|
- - "~>"
|
102
110
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
111
|
+
version: '3.2'
|
104
112
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
113
|
+
name: rubocop
|
106
114
|
requirement: !ruby/object:Gem::Requirement
|
107
115
|
requirements:
|
108
116
|
- - "~>"
|
109
117
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
118
|
+
version: 1.20.0
|
111
119
|
type: :development
|
112
120
|
prerelease: false
|
113
121
|
version_requirements: !ruby/object:Gem::Requirement
|
114
122
|
requirements:
|
115
123
|
- - "~>"
|
116
124
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
125
|
+
version: 1.20.0
|
118
126
|
- !ruby/object:Gem::Dependency
|
119
|
-
name:
|
127
|
+
name: rubocop-rake
|
120
128
|
requirement: !ruby/object:Gem::Requirement
|
121
129
|
requirements:
|
122
130
|
- - "~>"
|
123
131
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
132
|
+
version: 0.6.0
|
125
133
|
type: :development
|
126
134
|
prerelease: false
|
127
135
|
version_requirements: !ruby/object:Gem::Requirement
|
128
136
|
requirements:
|
129
137
|
- - "~>"
|
130
138
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
139
|
+
version: 0.6.0
|
132
140
|
- !ruby/object:Gem::Dependency
|
133
|
-
name:
|
141
|
+
name: simplecov
|
134
142
|
requirement: !ruby/object:Gem::Requirement
|
135
143
|
requirements:
|
136
144
|
- - "~>"
|
137
145
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
146
|
+
version: 0.21.2
|
139
147
|
type: :development
|
140
148
|
prerelease: false
|
141
149
|
version_requirements: !ruby/object:Gem::Requirement
|
142
150
|
requirements:
|
143
151
|
- - "~>"
|
144
152
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
153
|
+
version: 0.21.2
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: webmock
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - "~>"
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '3.1'
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '3.1'
|
146
168
|
description: This gem helps you to use the Marketo REST API
|
147
169
|
email:
|
148
170
|
- github@spam.raszi.hu
|
@@ -151,38 +173,53 @@ executables: []
|
|
151
173
|
extensions: []
|
152
174
|
extra_rdoc_files: []
|
153
175
|
files:
|
176
|
+
- ".github/dependabot.yml"
|
177
|
+
- ".github/workflows/ruby.yml"
|
154
178
|
- ".gitignore"
|
155
179
|
- ".rspec"
|
156
180
|
- ".rubocop.yml"
|
157
|
-
- ".travis.yml"
|
158
181
|
- Gemfile
|
159
182
|
- Gemfile.lock
|
183
|
+
- LICENSE
|
160
184
|
- LICENSE.txt
|
161
185
|
- README.md
|
162
186
|
- Rakefile
|
163
187
|
- lib/mrkt.rb
|
164
188
|
- lib/mrkt/concerns/authentication.rb
|
165
189
|
- lib/mrkt/concerns/connection.rb
|
190
|
+
- lib/mrkt/concerns/crud_activities.rb
|
191
|
+
- lib/mrkt/concerns/crud_asset_folders.rb
|
192
|
+
- lib/mrkt/concerns/crud_asset_static_lists.rb
|
166
193
|
- lib/mrkt/concerns/crud_campaigns.rb
|
194
|
+
- lib/mrkt/concerns/crud_custom_activities.rb
|
167
195
|
- lib/mrkt/concerns/crud_custom_objects.rb
|
168
196
|
- lib/mrkt/concerns/crud_helpers.rb
|
169
197
|
- lib/mrkt/concerns/crud_leads.rb
|
170
198
|
- lib/mrkt/concerns/crud_lists.rb
|
171
199
|
- lib/mrkt/concerns/crud_programs.rb
|
200
|
+
- lib/mrkt/concerns/import_custom_objects.rb
|
172
201
|
- lib/mrkt/concerns/import_leads.rb
|
173
202
|
- lib/mrkt/errors.rb
|
203
|
+
- lib/mrkt/faraday.rb
|
204
|
+
- lib/mrkt/faraday/params_encoder.rb
|
174
205
|
- lib/mrkt/faraday_middleware.rb
|
175
206
|
- lib/mrkt/faraday_middleware/response.rb
|
176
207
|
- lib/mrkt/version.rb
|
177
208
|
- mrkt.gemspec
|
178
209
|
- spec/concerns/authentication_spec.rb
|
210
|
+
- spec/concerns/crud_activities_spec.rb
|
211
|
+
- spec/concerns/crud_asset_folders_spec.rb
|
212
|
+
- spec/concerns/crud_asset_static_lists_spec.rb
|
179
213
|
- spec/concerns/crud_campaigns_spec.rb
|
214
|
+
- spec/concerns/crud_custom_activities_spec.rb
|
180
215
|
- spec/concerns/crud_custom_objects_spec.rb
|
181
216
|
- spec/concerns/crud_leads_spec.rb
|
182
217
|
- spec/concerns/crud_lists_spec.rb
|
183
218
|
- spec/concerns/crud_programs_spec.rb
|
219
|
+
- spec/concerns/import_custom_objects_spec.rb
|
184
220
|
- spec/concerns/import_leads_spec.rb
|
185
221
|
- spec/errors_spec.rb
|
222
|
+
- spec/faraday/params_encoder_spec.rb
|
186
223
|
- spec/mkto_rest_spec.rb
|
187
224
|
- spec/spec_helper.rb
|
188
225
|
- spec/support/initialized_client.rb
|
@@ -197,29 +234,34 @@ require_paths:
|
|
197
234
|
- lib
|
198
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
236
|
requirements:
|
200
|
-
- - "
|
237
|
+
- - ">="
|
201
238
|
- !ruby/object:Gem::Version
|
202
|
-
version: '2.
|
239
|
+
version: '2.5'
|
203
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
241
|
requirements:
|
205
242
|
- - ">="
|
206
243
|
- !ruby/object:Gem::Version
|
207
244
|
version: '0'
|
208
245
|
requirements: []
|
209
|
-
|
210
|
-
rubygems_version: 2.5.1
|
246
|
+
rubygems_version: 3.1.4
|
211
247
|
signing_key:
|
212
248
|
specification_version: 4
|
213
249
|
summary: Marketo REST API Facade
|
214
250
|
test_files:
|
215
251
|
- spec/concerns/authentication_spec.rb
|
252
|
+
- spec/concerns/crud_activities_spec.rb
|
253
|
+
- spec/concerns/crud_asset_folders_spec.rb
|
254
|
+
- spec/concerns/crud_asset_static_lists_spec.rb
|
216
255
|
- spec/concerns/crud_campaigns_spec.rb
|
256
|
+
- spec/concerns/crud_custom_activities_spec.rb
|
217
257
|
- spec/concerns/crud_custom_objects_spec.rb
|
218
258
|
- spec/concerns/crud_leads_spec.rb
|
219
259
|
- spec/concerns/crud_lists_spec.rb
|
220
260
|
- spec/concerns/crud_programs_spec.rb
|
261
|
+
- spec/concerns/import_custom_objects_spec.rb
|
221
262
|
- spec/concerns/import_leads_spec.rb
|
222
263
|
- spec/errors_spec.rb
|
264
|
+
- spec/faraday/params_encoder_spec.rb
|
223
265
|
- spec/mkto_rest_spec.rb
|
224
266
|
- spec/spec_helper.rb
|
225
267
|
- spec/support/initialized_client.rb
|