embulk-output-gcs 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build.gradle +5 -5
- data/src/main/java/org/embulk/output/GcsAuthentication.java +2 -2
- data/src/main/java/org/embulk/output/GcsOutputPlugin.java +4 -4
- data/src/main/java/org/embulk/output/PluginTask.java +2 -1
- data/src/test/java/org/embulk/output/TestGcsAuthentication.java +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32dea7ae4556f71bef945eaf868b6a57721120c9
|
4
|
+
data.tar.gz: 48631287b5c928cc35f1d5c68a8ae6e2f60843b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b34b7724fd0064692411f1f449e2e4930ba4b931e83a5c2cde1c4241de07f1897077cd8c73cba743508a358d37a842e907b4f9b791d6f406d057f7b91f9eabf7
|
7
|
+
data.tar.gz: f5c2b60c384b9bcff1cc124995bf6707c448fb02468dc8a5b024d6864a6a4ce88b6656e99db5d69e862b4e2a6255a25ccbf7c3da6a914c0c80e90be782464203
|
data/build.gradle
CHANGED
@@ -17,18 +17,18 @@ configurations {
|
|
17
17
|
sourceCompatibility = 1.8
|
18
18
|
targetCompatibility = 1.8
|
19
19
|
|
20
|
-
version = "0.4.
|
20
|
+
version = "0.4.3"
|
21
21
|
|
22
22
|
dependencies {
|
23
|
-
compile "org.embulk:embulk-core:0.
|
24
|
-
provided "org.embulk:embulk-core:0.
|
23
|
+
compile "org.embulk:embulk-core:0.9.11"
|
24
|
+
provided "org.embulk:embulk-core:0.9.11"
|
25
25
|
|
26
26
|
compile "com.google.http-client:google-http-client-jackson2:1.19.0"
|
27
27
|
compile ("com.google.apis:google-api-services-storage:v1-rev28-1.19.1") {exclude module: "guava-jdk5"}
|
28
28
|
|
29
29
|
testCompile "junit:junit:4.12"
|
30
|
-
testCompile "org.embulk:embulk-core:0.
|
31
|
-
testCompile "org.embulk:embulk-standards:0.
|
30
|
+
testCompile "org.embulk:embulk-core:0.9.11:tests"
|
31
|
+
testCompile "org.embulk:embulk-standards:0.9.11"
|
32
32
|
}
|
33
33
|
|
34
34
|
task classpath(type: Copy, dependsOn: ["jar"]) {
|
@@ -11,7 +11,6 @@ import com.google.api.client.json.JsonFactory;
|
|
11
11
|
import com.google.api.client.json.jackson2.JacksonFactory;
|
12
12
|
import com.google.api.services.storage.Storage;
|
13
13
|
import com.google.api.services.storage.StorageScopes;
|
14
|
-
import com.google.common.base.Optional;
|
15
14
|
import com.google.common.base.Throwables;
|
16
15
|
import com.google.common.collect.ImmutableList;
|
17
16
|
import org.embulk.config.ConfigException;
|
@@ -28,6 +27,7 @@ import java.io.IOException;
|
|
28
27
|
import java.io.InterruptedIOException;
|
29
28
|
import java.security.GeneralSecurityException;
|
30
29
|
import java.util.Collections;
|
30
|
+
import java.util.Optional;
|
31
31
|
|
32
32
|
public class GcsAuthentication
|
33
33
|
{
|
@@ -74,7 +74,7 @@ public class GcsAuthentication
|
|
74
74
|
return new GoogleCredential.Builder()
|
75
75
|
.setTransport(httpTransport)
|
76
76
|
.setJsonFactory(jsonFactory)
|
77
|
-
.setServiceAccountId(serviceAccountEmail.
|
77
|
+
.setServiceAccountId(serviceAccountEmail.orElse(null))
|
78
78
|
.setServiceAccountScopes(
|
79
79
|
ImmutableList.of(
|
80
80
|
StorageScopes.DEVSTORAGE_READ_WRITE
|
@@ -1,8 +1,6 @@
|
|
1
1
|
package org.embulk.output;
|
2
2
|
|
3
3
|
import com.google.api.services.storage.Storage;
|
4
|
-
import com.google.common.base.Function;
|
5
|
-
import com.google.common.base.Optional;
|
6
4
|
import com.google.common.base.Throwables;
|
7
5
|
import org.embulk.config.ConfigDiff;
|
8
6
|
import org.embulk.config.ConfigException;
|
@@ -17,6 +15,8 @@ import org.embulk.spi.unit.LocalFile;
|
|
17
15
|
import java.io.IOException;
|
18
16
|
import java.security.GeneralSecurityException;
|
19
17
|
import java.util.List;
|
18
|
+
import java.util.Optional;
|
19
|
+
import java.util.function.Function;
|
20
20
|
|
21
21
|
public class GcsOutputPlugin implements FileOutputPlugin
|
22
22
|
{
|
@@ -84,8 +84,8 @@ public class GcsOutputPlugin implements FileOutputPlugin
|
|
84
84
|
return new GcsAuthentication(
|
85
85
|
task.getAuthMethod().getString(),
|
86
86
|
task.getServiceAccountEmail(),
|
87
|
-
task.getP12Keyfile().
|
88
|
-
task.getJsonKeyfile().
|
87
|
+
task.getP12Keyfile().map(localFileToPathString()),
|
88
|
+
task.getJsonKeyfile().map(localFileToPathString()),
|
89
89
|
task.getApplicationName()
|
90
90
|
);
|
91
91
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
package org.embulk.output;
|
2
2
|
|
3
|
-
import com.google.common.base.Optional;
|
4
3
|
import org.embulk.config.Config;
|
5
4
|
import org.embulk.config.ConfigDefault;
|
6
5
|
import org.embulk.config.Task;
|
7
6
|
import org.embulk.spi.unit.LocalFile;
|
8
7
|
|
8
|
+
import java.util.Optional;
|
9
|
+
|
9
10
|
public interface PluginTask extends Task
|
10
11
|
{
|
11
12
|
@Config("bucket")
|
@@ -2,7 +2,6 @@ package org.embulk.output;
|
|
2
2
|
|
3
3
|
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
4
4
|
import com.google.api.services.storage.Storage;
|
5
|
-
import com.google.common.base.Optional;
|
6
5
|
|
7
6
|
import org.embulk.EmbulkTestRuntime;
|
8
7
|
|
@@ -18,6 +17,7 @@ import java.io.FileNotFoundException;
|
|
18
17
|
import java.io.IOException;
|
19
18
|
import java.lang.reflect.Field;
|
20
19
|
import java.security.GeneralSecurityException;
|
20
|
+
import java.util.Optional;
|
21
21
|
|
22
22
|
public class TestGcsAuthentication
|
23
23
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-gcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuyuki Honda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,9 +73,9 @@ files:
|
|
73
73
|
- src/test/resources/sample_01.csv
|
74
74
|
- src/test/resources/sample_02.csv
|
75
75
|
- classpath/google-api-services-storage-v1-rev28-1.19.1.jar
|
76
|
+
- classpath/embulk-output-gcs-0.4.3.jar
|
76
77
|
- classpath/httpclient-4.0.1.jar
|
77
78
|
- classpath/jsr305-1.3.9.jar
|
78
|
-
- classpath/embulk-output-gcs-0.4.2.jar
|
79
79
|
- classpath/commons-logging-1.1.1.jar
|
80
80
|
- classpath/google-http-client-1.19.0.jar
|
81
81
|
- classpath/google-api-client-1.19.1.jar
|