embulk-input-marketo 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: 91632886c4d5a336024869408d4d1d877aa05882
4
- data.tar.gz: 22c4f6b1fdba1db3ff1f00898becd767f91655c8
3
+ metadata.gz: cd2aca4cc3202db0cc6da4d33a1d564ad601ec15
4
+ data.tar.gz: c0b2a2bec618d140967d54f054c6efe0c40e25ee
5
5
  SHA512:
6
- metadata.gz: 3aef455faff03669b183c791c58d9643e180d29ec2d87c103dcaf6833129e9fa5efe45d970d639c65244a67324fd32b1e7c91f236be6cfbc83bb957a2082891a
7
- data.tar.gz: 61dfcebdd98dbfccd44b0842b88a4aee32b01311bb40853e3bc9dd71b9cfe5435373d504550ebf188076a18b10db15a0d0f1cbde18e06f976a7112f7f05067f4
6
+ metadata.gz: 0b2aeaf51b0d648b8b0ea0c14f43caa6df2931bc732ea47d65d5829e99cb3378ccd12a634ffb579b643a30d629554559a449fbc30b994fb594e29d8c9cd735fe
7
+ data.tar.gz: efb4857536cd3050527a1eb9f13a040cdc91268fe7569bc3a3006fd93abf3855876078b06ba555902eb704b1abc1aa54e26069ea963310c26f00c31ce14a5a1b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.5 - 2015-09-28
2
+
3
+ * [fixed] lead: Fix the bug when `from_datetime` and `to_datetime` are same [#37](https://github.com/treasure-data/embulk-input-marketo/pull/37)
4
+
1
5
  ## 0.2.4 - 2015-09-17
2
6
 
3
7
  * [enhancement] Retry to call API until 5 times when Timeout [#36](https://github.com/treasure-data/embulk-input-marketo/pull/36) [[Reported by @muga](https://github.com/treasure-data/embulk-input-marketo/issues/34). Thanks!]
data/README.md CHANGED
@@ -34,7 +34,7 @@ $ embulk gem install embulk-input-marketo
34
34
 
35
35
  Below parameters are shown in "Admin" > "Web Services" page in Marketo.
36
36
 
37
- ### market/lead
37
+ ### marketo/lead
38
38
 
39
39
  **NOTE: If you use feature of scheduled execution (resume) with marketo/lead, you should not specify `to_datetime` because this plugin can't place next to_datetime (can't know the date to run with new config).**
40
40
 
@@ -45,7 +45,7 @@ Below parameters are shown in "Admin" > "Web Services" page in Marketo.
45
45
  - **from_datetime** Fetch leads since this time (string, required)
46
46
  - **to_datetime** Fetch leads until this time (string, default: Time.now)
47
47
 
48
- ### market/activity_log
48
+ ### marketo/activity_log
49
49
 
50
50
  - **endpoint** SOAP endpoint URL for your account (string, required)
51
51
  - **wsdl** SOAP endpoint URL for your account (string, default: endpoint + "?WSDL")
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-input-marketo"
3
- spec.version = "0.2.4"
3
+ spec.version = "0.2.5"
4
4
  spec.authors = ["uu59", "yoshihara"]
5
5
  spec.summary = "Marketo input plugin for Embulk"
6
6
  spec.description = "Loads records from Marketo."
@@ -42,7 +42,6 @@ module Embulk
42
42
  end
43
43
 
44
44
  def init
45
- @last_updated_at = task[:last_updated_at]
46
45
  @columns = task[:columns]
47
46
  @ranges = task[:ranges][index]
48
47
  @soap = MarketoApi.soap_client(task, target)
@@ -107,6 +107,8 @@ module Embulk
107
107
  def resume(task, columns, count, &control)
108
108
  commit_reports = yield(task, columns, count)
109
109
 
110
+ # When no task ran, commit_reports is empty
111
+ return {} if commit_reports.empty?
110
112
  # all task returns same report as {from_datetime: to_datetime}
111
113
  return commit_reports.first
112
114
  end
@@ -93,6 +93,26 @@ module Embulk
93
93
  end
94
94
  end
95
95
 
96
+ def test_same_datetimes_given
97
+ control = proc { [] } # dummy (#resume method returns [])
98
+ datetime = Time.now.to_s
99
+
100
+ settings = {
101
+ endpoint: "https://marketo.example.com",
102
+ wsdl: "https://marketo.example.com/?wsdl",
103
+ user_id: "user_id",
104
+ encryption_key: "TOPSECRET",
105
+ from_datetime: datetime,
106
+ to_datetime: datetime,
107
+ columns: [
108
+ {"name" => "Name", "type" => "string"},
109
+ ]
110
+ }
111
+ config = DataSource[settings.to_a]
112
+
113
+ assert_equal({}, Lead.transaction(config, &control))
114
+ end
115
+
96
116
  class RunTest < self
97
117
  def setup
98
118
  setup_soap
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-marketo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - uu59
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-17 00:00:00.000000000 Z
12
+ date: 2015-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement