embulk-input-sftp 0.2.10 → 0.2.11

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: 9c33467b7d6bc31212b8814d3705f257ffd093ce
4
- data.tar.gz: 1e7004637de8d3c897743eaebf6084356ef8b1eb
3
+ metadata.gz: 525f2176e7c9834fb4ed151c692f7f8f445a2e8f
4
+ data.tar.gz: ed2a712f5da1a3ad32427fb1663129b370f30228
5
5
  SHA512:
6
- metadata.gz: 3bc6eeec14c63504e2f74096e9f4e25fab4e709ad982cab68bf817f6c1b03da9c76fcdd2753c4324b026f9d22bfb5ce0ac538acfc91a3916aeca54a4233741ec
7
- data.tar.gz: 2675cda9d5683cb89a742e39ee9c418778670d4bf81845db215ac2c5e4898c46888c2fdd411d19a8313664870e68ba970059fa184654a23ad00ad2728f76ef08
6
+ metadata.gz: b143a20f5ab3bf1d9c2a5d8e33935b684c005d6785b84f1d7e8f95de562ba7f7e3904d52ac980dce21581bb502f710e023bc41db1b61487d997500c5a523bd36
7
+ data.tar.gz: ff8557ec6c892adc565ed7512661b3dadd29ab55ca3b3f51311baed04f760cea45973e9abac091144e7435ab35fb746d6dce3bbe691ae54b4a8a78793f0282b1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.11 - 2018-05-07
2
+ * [maintenance] Use java.util.regex.Pattern for host name validation [#32](https://github.com/embulk/embulk-input-sftp/pull/32)
3
+
1
4
  ## 0.2.10 - 2018-04-26
2
5
  * [maintenance] Add validation for "host" and "proxy.host" [#31](https://github.com/embulk/embulk-input-sftp/pull/31)
3
6
 
data/build.gradle CHANGED
@@ -16,7 +16,7 @@ configurations {
16
16
  }
17
17
 
18
18
  group = "org.embulk.input.sftp"
19
- version = "0.2.10"
19
+ version = "0.2.11"
20
20
 
21
21
  sourceCompatibility = 1.7
22
22
  targetCompatibility = 1.7
@@ -29,6 +29,7 @@ import java.io.IOException;
29
29
  import java.net.URI;
30
30
  import java.net.URISyntaxException;
31
31
  import java.util.Arrays;
32
+ import java.util.regex.Pattern;
32
33
 
33
34
  import static org.embulk.spi.util.RetryExecutor.retryExecutor;
34
35
 
@@ -139,13 +140,14 @@ public class SftpFileInput
139
140
 
140
141
  public static void validateHost(PluginTask task)
141
142
  {
142
- if (task.getHost().contains("%s")) {
143
+ Pattern pattern = Pattern.compile("\\s");
144
+ if (pattern.matcher(task.getHost()).find()) {
143
145
  throw new ConfigException("'host' can't contain spaces");
144
146
  }
145
147
  getSftpFileUri(task, "/");
146
148
 
147
149
  if (task.getProxy().isPresent() && task.getProxy().get().getHost().isPresent()) {
148
- if (task.getProxy().get().getHost().get().contains("%s")) {
150
+ if (pattern.matcher(task.getProxy().get().getHost().get()).find()) {
149
151
  throw new ConfigException("'proxy.host' can't contains spaces");
150
152
  }
151
153
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-sftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Akama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-26 00:00:00.000000000 Z
11
+ date: 2018-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ files:
72
72
  - classpath/commons-io-2.6.jar
73
73
  - classpath/commons-logging-1.2.jar
74
74
  - classpath/commons-vfs2-2.2.jar
75
- - classpath/embulk-input-sftp-0.2.10.jar
75
+ - classpath/embulk-input-sftp-0.2.11.jar
76
76
  - classpath/jsch-0.1.54.jar
77
77
  homepage: https://github.com/embulk/embulk-input-sftp
78
78
  licenses: