embulk-output-mailchimp 0.3.3 → 0.3.4

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: 92e111dbfbaaee02d87b45d1ae39c2e6dd914d02
4
- data.tar.gz: d43b6d2dd64e38d9f7adade36a7150d7797dffbb
3
+ metadata.gz: 743479cc26e1bed837531a34c605df1f27ae1ee8
4
+ data.tar.gz: 5d6af1f50147f6a79447efd2ba118862088b959d
5
5
  SHA512:
6
- metadata.gz: b964ecead23dffe33f4d7d87c423fccc1dbe8e9a6ade2ee8a74cd97aa7835450b71712a6fda217e856318fde7d4c1255dc38e121b57f4662a203c76a24daf57d
7
- data.tar.gz: d9a401164212cb808c217d34ff948eba672bee2105b1ad7f459557d43cf3566e8c75cddd88213526ed33411535d1eca5b557e7da381a3bd21f4b3a84afb2742f
6
+ metadata.gz: 7c79489c197c389155db2a6ef243b78152bc9f51069d81d88c3dd13502d55b254c1de6e6519e93f597619422897888914bad66778cdda4e3b50ac8ebb8ab1183
7
+ data.tar.gz: ccc953a7406261e40cacc0881b4bafe81564381b718781588b870f3502a738d59df19a6b59f31f14253598d62807177c09ccca29c55f85ecd78e9624d3a406bd
@@ -1,3 +1,6 @@
1
+ ## 0.3.4 - 2017-06-01
2
+ - Enable JSON type for `address` MERGE field [#20](https://github.com/treasure-data/embulk-output-mailchimp/pull/20)
3
+
1
4
  ## 0.3.3 - 2017-05-31
2
5
  - Enable multiple values for `interest categories` [#19](https://github.com/treasure-data/embulk-output-mailchimp/pull/19)
3
6
 
@@ -18,7 +18,7 @@ configurations {
18
18
  provided
19
19
  }
20
20
 
21
- version = "0.3.3"
21
+ version = "0.3.4"
22
22
 
23
23
  sourceCompatibility = 1.7
24
24
  targetCompatibility = 1.7
@@ -34,6 +34,7 @@ import static org.embulk.output.mailchimp.helper.MailChimpHelper.containsCaseIns
34
34
  import static org.embulk.output.mailchimp.helper.MailChimpHelper.fromCommaSeparatedString;
35
35
  import static org.embulk.output.mailchimp.model.MemberStatus.PENDING;
36
36
  import static org.embulk.output.mailchimp.model.MemberStatus.SUBSCRIBED;
37
+ import static org.embulk.spi.type.Types.JSON;
37
38
 
38
39
  /**
39
40
  * Created by thangnc on 4/14/17.
@@ -272,8 +273,13 @@ public abstract class MailChimpAbstractRecordBuffer
272
273
  if (task.getMergeFields().isPresent() && !task.getMergeFields().get().isEmpty()) {
273
274
  for (final Column column : schema.getColumns()) {
274
275
  if (!"".equals(containsCaseInsensitive(column.getName(), task.getMergeFields().get()))) {
275
- String value = input.findValue(column.getName()).asText();
276
- mergeFields.put(column.getName().toUpperCase(), value);
276
+ if (column.getType().equals(JSON)) {
277
+ mergeFields.set(column.getName().toUpperCase(), input.findValue(column.getName()));
278
+ }
279
+ else {
280
+ String value = input.findValue(column.getName()).asText();
281
+ mergeFields.put(column.getName().toUpperCase(), value);
282
+ }
277
283
  }
278
284
  }
279
285
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-mailchimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thang Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-31 00:00:00.000000000 Z
11
+ date: 2017-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +86,7 @@ files:
86
86
  - test/override_assert_raise.rb
87
87
  - test/run-test.rb
88
88
  - classpath/embulk-base-restclient-0.5.0.jar
89
- - classpath/embulk-output-mailchimp-0.3.3.jar
89
+ - classpath/embulk-output-mailchimp-0.3.4.jar
90
90
  - classpath/embulk-util-retryhelper-jetty92-0.5.0.jar
91
91
  - classpath/jetty-client-9.2.14.v20151106.jar
92
92
  - classpath/jetty-http-9.2.14.v20151106.jar