embulk-input-gcs 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9113cbc31b8a47e6dbb6377c3ae7dcbb3d4f03e5
|
4
|
+
data.tar.gz: 60744784255a366230bce11a16632b42df6c08f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e1f54da44d5ae5cc84815a76a3a13c9d289be3844ff322c49f3463ac918140193a9eef35d21b319b792c4149c5c03498dbbf0d9ca7123d782608971aaa40251
|
7
|
+
data.tar.gz: f66b8c1bc9d6d0ed8663b19edfbb815850cf2dd24bb3fc60e1c7cb20a4381a1967d4aef35a05ab3633717d3fb16da616cbf70687e0f74f354fb1b992e1dd55f2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.2.2 - 2016-08-08
|
2
|
+
* [maintenance] Fix validation logic for `path_prefix` and `paths` options [#23](https://github.com/embulk/embulk-input-gcs/pull/23)
|
3
|
+
|
1
4
|
## 0.2.1 - 2016-08-04
|
2
5
|
* [maintenance] Use retry logic when generate GCS client [#21](https://github.com/embulk/embulk-input-gcs/pull/21)
|
3
6
|
|
data/build.gradle
CHANGED
@@ -142,8 +142,10 @@ public class GcsFileInputPlugin
|
|
142
142
|
if (task.getPathPrefix().isPresent()) {
|
143
143
|
task.setFiles(listFiles(task, client));
|
144
144
|
}
|
145
|
-
|
146
|
-
|
145
|
+
else {
|
146
|
+
if (task.getFiles().isEmpty()) {
|
147
|
+
throw new ConfigException("No file is found. Confirm paths option isn't empty");
|
148
|
+
}
|
147
149
|
}
|
148
150
|
// number of processors is same with number of files
|
149
151
|
return resume(task.dump(), task.getFiles().size(), control);
|
@@ -315,6 +315,42 @@ public class TestGcsFileInputPlugin
|
|
315
315
|
plugin.listGcsFilesByPrefix(client, "non-exists-bucket", "prefix", Optional.<String>absent()); // no errors happens
|
316
316
|
}
|
317
317
|
|
318
|
+
@Test
|
319
|
+
public void testNonExistingFilesWithPathPrefix() throws Exception
|
320
|
+
{
|
321
|
+
ConfigSource config = Exec.newConfigSource()
|
322
|
+
.set("bucket", GCP_BUCKET)
|
323
|
+
.set("path_prefix", "/path/to/notfound")
|
324
|
+
.set("auth_method", "private_key")
|
325
|
+
.set("service_account_email", GCP_EMAIL)
|
326
|
+
.set("p12_keyfile", GCP_P12_KEYFILE)
|
327
|
+
.set("json_keyfile", GCP_JSON_KEYFILE)
|
328
|
+
.set("application_name", GCP_APPLICATION_NAME)
|
329
|
+
.set("last_path", "")
|
330
|
+
.set("parser", parserConfig(schemaConfig()));
|
331
|
+
|
332
|
+
ConfigDiff configDiff = runner.transaction(config, new Control());
|
333
|
+
|
334
|
+
assertEquals("", configDiff.get(String.class, "last_path"));
|
335
|
+
}
|
336
|
+
|
337
|
+
@Test(expected = ConfigException.class)
|
338
|
+
public void testNonExistingFilesWithPaths() throws Exception
|
339
|
+
{
|
340
|
+
ConfigSource config = Exec.newConfigSource()
|
341
|
+
.set("bucket", GCP_BUCKET)
|
342
|
+
.set("paths", Arrays.asList())
|
343
|
+
.set("auth_method", "private_key")
|
344
|
+
.set("service_account_email", GCP_EMAIL)
|
345
|
+
.set("p12_keyfile", GCP_P12_KEYFILE)
|
346
|
+
.set("json_keyfile", GCP_JSON_KEYFILE)
|
347
|
+
.set("application_name", GCP_APPLICATION_NAME)
|
348
|
+
.set("last_path", "")
|
349
|
+
.set("parser", parserConfig(schemaConfig()));
|
350
|
+
|
351
|
+
runner.transaction(config, new Control());
|
352
|
+
}
|
353
|
+
|
318
354
|
@Test
|
319
355
|
public void testGcsFileInputByOpen()
|
320
356
|
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-gcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Akama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- src/test/resources/secretkeys.tar.enc
|
68
68
|
- classpath/commons-codec-1.3.jar
|
69
69
|
- classpath/commons-logging-1.1.1.jar
|
70
|
-
- classpath/embulk-input-gcs-0.2.
|
70
|
+
- classpath/embulk-input-gcs-0.2.2.jar
|
71
71
|
- classpath/google-api-client-1.21.0.jar
|
72
72
|
- classpath/google-api-services-storage-v1-rev59-1.21.0.jar
|
73
73
|
- classpath/google-http-client-1.21.0.jar
|