embulk-output-sftp 0.2.0 → 0.2.1

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: 3140b0cc46176332801c67fbf286548785e5c5a3
4
- data.tar.gz: a4fa818bcc4970eaf17e6a8b255ff06e35d605de
3
+ metadata.gz: 240c94805c37b60dab3cbd3fa4f56e7f4425ccd5
4
+ data.tar.gz: e7c12ffd35503919c9cbe6ae5d94e0eb57e5dd29
5
5
  SHA512:
6
- metadata.gz: e4a07a88cf20aebd20e14302d2f504809d509b630ed7c7dfc0e2de48d8d5f51d6b7172e8f9b86540a24dca1f1f2e4f32da92005b43f2a5fa88c3a5c55a390469
7
- data.tar.gz: c71a56791aac8f6a68b6de286af446651e60719fe11996fa91d7a95ae356de87f1814dc068c84df7bb319d77262d6438f46d5e68163c1498a2c5dd62b7f461b8
6
+ metadata.gz: 9daa772b09637ce0054f1ec9637fdc8f6ea7f7d989968bbaee32616c80fc7e2d711598b6d27b02a7931ace5012e87b2b373cc4d9caeac2a00345a600925854ac
7
+ data.tar.gz: 9c4d21f588162ff7c9b3cf97acf8f83fae4ba373b1160aef490b9b6f8316984d18d9a9b831b101c276e41a25fa39b607a015cfe7786d9f73cb7ad363cea32d19
@@ -1,3 +1,6 @@
1
+ 0.2.1 (2018-10-23)
2
+ - Improved logic that detects exception is retryable or not
3
+ - https://github.com/embulk/embulk-output-sftp/pull/52
1
4
  0.2.0 (2018-08-29)
2
5
  - Fix bug of stalling when closing `remoteFile`, this version is recommended over 0.1.11
3
6
  - https://github.com/embulk/embulk-output-sftp/pull/51
@@ -17,7 +17,7 @@ configurations {
17
17
  }
18
18
 
19
19
  group = "org.embulk.output.sftp"
20
- version = "0.2.0"
20
+ version = "0.2.1"
21
21
  sourceCompatibility = 1.7
22
22
  targetCompatibility = 1.7
23
23
 
@@ -42,7 +42,7 @@ public abstract class DefaultRetry<T> implements RetryExecutor.Retryable<T>
42
42
 
43
43
  private static boolean isAuthFail(Throwable e)
44
44
  {
45
- return e instanceof JSchException && "USERAUTH fail".equals(e.getMessage());
45
+ return e instanceof JSchException && (e.getMessage().contains("Auth fail") || e.getMessage().contains("USERAUTH fail"));
46
46
  }
47
47
 
48
48
  private static boolean hasRootCauseAuthFail(Throwable e)
@@ -612,7 +612,7 @@ public class TestSftpFileOutputPlugin
612
612
  SftpUtils utils = Mockito.spy(new SftpUtils(task));
613
613
 
614
614
  // append throws exception
615
- Mockito.doThrow(new IOException(new JSchException("USERAUTH fail")))
615
+ Mockito.doThrow(new IOException(new JSchException("Auth fail")))
616
616
  .doCallRealMethod()
617
617
  .when(utils)
618
618
  .appendFile(Mockito.any(File.class), Mockito.any(FileObject.class), Mockito.any(BufferedOutputStream.class));
@@ -627,7 +627,7 @@ public class TestSftpFileOutputPlugin
627
627
  assertThat(e, CoreMatchers.<Exception>instanceOf(RuntimeException.class));
628
628
  assertThat(e.getCause(), CoreMatchers.<Throwable>instanceOf(IOException.class));
629
629
  assertThat(e.getCause().getCause(), CoreMatchers.<Throwable>instanceOf(JSchException.class));
630
- assertEquals(e.getCause().getCause().getMessage(), "USERAUTH fail");
630
+ assertEquals(e.getCause().getCause().getMessage(), "Auth fail");
631
631
  // assert no retry
632
632
  Mockito.verify(utils, Mockito.times(1)).appendFile(Mockito.any(File.class), Mockito.any(FileObject.class), Mockito.any(BufferedOutputStream.class));
633
633
  assertEmptyUploadedFile(defaultPathPrefix);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-sftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Civitaspo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-29 00:00:00.000000000 Z
12
+ date: 2018-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ files:
83
83
  - src/test/resources/id_rsa.pub
84
84
  - classpath/commons-logging-1.2.jar
85
85
  - classpath/commons-vfs2-2.2.jar
86
- - classpath/embulk-output-sftp-0.2.0.jar
86
+ - classpath/embulk-output-sftp-0.2.1.jar
87
87
  - classpath/commons-io-2.6.jar
88
88
  - classpath/jsch-0.1.54.jar
89
89
  homepage: https://github.com/embulk/embulk-output-sftp