embulk-output-mailchimp 0.3.11 → 0.3.12

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: 1f6739499fc60b1e77a5650d4561debf5982fbff
4
- data.tar.gz: 359052ebd2dc26caaa61b1dd277fa477a4639d23
3
+ metadata.gz: 88a7c2c34660acc5f41bae67c49ef51bf6da4623
4
+ data.tar.gz: 0876a7e5d771137162eebd468128b85e22717257
5
5
  SHA512:
6
- metadata.gz: 0892974311f81524fd4354dc167b0150e596c1f112606846363d0212f322b18a81bd6cafb950f684a9d20200530d16ec0b2a3efe6989c45b5d7fb656a6404938
7
- data.tar.gz: 2ffd8d9f0937d49146894335d418c2183d4ab4f56b00e852cc921c3b2e2c53212a0a9860c04698a014e410a2d4183e1d35dd199003c4d16052ece33a2efd0d75
6
+ metadata.gz: 3bf58d25c81e9ad92cd69a81146b57d87aa771cdfa1d9d1c5045824eb694fa88bfde080f88d3bc13d4d3790a1a9f3fbb8cc2c7ae6fb34ae7a2d9f7b7956f2d3e
7
+ data.tar.gz: 02045e97f6750c51287e2f56ccc96b7a0ffc406153dd4e39a9ff5e5ef8b2416a2e5c4a9e66c20bad1a09deaf1610c3b88c05d6512afb9a437947b1fe6ba76d2c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.3.12 - 2017-06-13
2
+ - Fixed NPE while reading JSON data [#27](https://github.com/treasure-data/embulk-output-mailchimp/pull/27)
3
+
1
4
  ## 0.3.11 - 2017-06-13
2
5
  - Upgraded version of `embulk-base-restclient` to fix IndexOutOfBoundException [#26](https://github.com/treasure-data/embulk-output-mailchimp/pull/26)
3
6
 
data/build.gradle CHANGED
@@ -18,7 +18,7 @@ configurations {
18
18
  provided
19
19
  }
20
20
 
21
- version = "0.3.11"
21
+ version = "0.3.12"
22
22
 
23
23
  sourceCompatibility = 1.7
24
24
  targetCompatibility = 1.7
@@ -267,7 +267,7 @@ public abstract class MailChimpAbstractRecordBuffer
267
267
  property.put("status", task.getDoubleOptIn() ? PENDING.getType() : SUBSCRIBED.getType());
268
268
  ObjectNode mergeFields = JsonNodeFactory.instance.objectNode();
269
269
  for (String allowColumn : allowColumns.keySet()) {
270
- String value = input.findValue(allowColumns.get(allowColumn)).asText();
270
+ String value = input.hasNonNull(allowColumns.get(allowColumn)) ? input.findValue(allowColumns.get(allowColumn)).asText() : "";
271
271
  mergeFields.put(allowColumn, value);
272
272
  }
273
273
 
@@ -275,7 +275,7 @@ public abstract class MailChimpAbstractRecordBuffer
275
275
  if (task.getMergeFields().isPresent() && !task.getMergeFields().get().isEmpty()) {
276
276
  for (final Column column : schema.getColumns()) {
277
277
  if (!"".equals(containsCaseInsensitive(column.getName(), task.getMergeFields().get()))) {
278
- String value = input.findValue(column.getName()).asText();
278
+ String value = input.hasNonNull(column.getName()) ? input.findValue(column.getName()).asText() : "";
279
279
 
280
280
  // Try to convert to Json from string with the merge field's type is address
281
281
  if (availableMergeFields.get(column.getName()).getType()
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.11
4
+ version: 0.3.12
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-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ files:
89
89
  - test/override_assert_raise.rb
90
90
  - test/run-test.rb
91
91
  - classpath/embulk-base-restclient-0.5.2.jar
92
- - classpath/embulk-output-mailchimp-0.3.11.jar
92
+ - classpath/embulk-output-mailchimp-0.3.12.jar
93
93
  - classpath/embulk-util-retryhelper-jetty92-0.5.2.jar
94
94
  - classpath/jetty-client-9.2.14.v20151106.jar
95
95
  - classpath/jetty-http-9.2.14.v20151106.jar