embulk-output-kintone 0.3.2 → 0.3.3

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: 12557e033d23e679cb3b6c54b74187083a36d9c4
4
- data.tar.gz: 11bdecefdebb13d075410e56ed9ba3e42bdb51b7
3
+ metadata.gz: 7107e79ed02bf30d233e34a3606bc84851e65b04
4
+ data.tar.gz: 4c8c90cd5f2e3c72a3b1cb10f4b0f3373c626a06
5
5
  SHA512:
6
- metadata.gz: 9000840a27d24ad547435f6be018036c8958a522373d5bec83505ab14b05a26050c415e638b9c583fd19b400fb9b3a00599307805c4e7ad3a4134336ef57290a
7
- data.tar.gz: 6e750bff291b90df9f7c90225b1f324d9c27289c3e487d856a607a6e5605dcb612c9fdecb33809e9c46970bb3686b2ac0c389b9a6c1bba8b68d5a6b9230507fd
6
+ metadata.gz: ec15b3471eb9cca3b7804a62f3beed3242e6ef8c4b547d5995f826fb9840f0505e5705ae26856a27dea5653caf0500d9bde3e58de39e0f385ec51a428d024379
7
+ data.tar.gz: ab6ea4f392578a902bd778136e5b2b9972f93b0836aa515db48110001e6b984c867a11c7fb2cb08192afb3d8eda334b8e72ff007b7704984f98ea84cc4d91e08
data/build.gradle CHANGED
@@ -4,6 +4,7 @@ plugins {
4
4
  id "com.github.johnrengelman.shadow" version "4.0.3"
5
5
  id "java"
6
6
  id "checkstyle"
7
+ id "com.palantir.git-version" version "0.12.3"
7
8
  }
8
9
  import com.github.jrubygradle.JRubyExec
9
10
  repositories {
@@ -14,7 +15,15 @@ configurations {
14
15
  provided
15
16
  }
16
17
 
17
- version = "0.3.2"
18
+ version = {
19
+ def vd = versionDetails()
20
+ if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]$/) {
21
+ vd.lastTag
22
+ } else {
23
+ "0.0.0.${vd.gitHash}"
24
+ }
25
+ }()
26
+
18
27
 
19
28
  sourceCompatibility = 1.8
20
29
  targetCompatibility = 1.8
@@ -193,11 +193,17 @@ public class KintoneColumnVisitor
193
193
  {
194
194
  String fieldCode = getFieldCode(column);
195
195
  FieldType type = getType(column, FieldType.MULTI_LINE_TEXT);
196
+ Object value = pageReader.getString(column);
196
197
  if (type == FieldType.CHECK_BOX) {
197
- setCheckBoxValue(fieldCode, pageReader.getString(column), getValueSeparator(column));
198
+ String stringValue = Objects.toString(value, "");
199
+ if (stringValue == "") {
200
+ return;
201
+ } else {
202
+ setCheckBoxValue(fieldCode, value, getValueSeparator(column));
203
+ }
198
204
  return;
199
205
  }
200
- setValue(fieldCode, pageReader.getString(column), type, isUpdateKey(column));
206
+ setValue(fieldCode, value, type, isUpdateKey(column));
201
207
  }
202
208
 
203
209
  @Override
@@ -119,7 +119,11 @@ public class KintonePageOutput
119
119
  private void execute(Consumer<KintoneClient> operation)
120
120
  {
121
121
  connect(task);
122
- operation.accept(this.client);
122
+ if (this.client != null) {
123
+ operation.accept(this.client);
124
+ } else {
125
+ throw new RuntimeException("Failed to connect to kintone.");
126
+ }
123
127
  }
124
128
 
125
129
  private void insertPage(final Page page)
@@ -45,7 +45,7 @@ public interface PluginTask
45
45
  Map<String, KintoneColumnOption> getColumnOptions();
46
46
 
47
47
  @Config("mode")
48
- @ConfigDefault("insert")
48
+ @ConfigDefault("\"insert\"")
49
49
  String getMode();
50
50
 
51
51
  @Config("update_key")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-kintone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - takeshi fujita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-23 00:00:00.000000000 Z
11
+ date: 2023-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ files:
52
52
  - README.md
53
53
  - Rakefile
54
54
  - build.gradle
55
- - classpath/embulk-output-kintone-0.3.2.jar
55
+ - classpath/embulk-output-kintone-0.3.3.jar
56
56
  - config/checkstyle/checkstyle.xml
57
57
  - config/checkstyle/default.xml
58
58
  - gradle/wrapper/gradle-wrapper.jar