embulk-input-marketo 0.5.6 → 0.5.7.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +37 -0
- data/.gitignore +11 -2
- data/.travis.yml +5 -45
- data/LICENSE.txt +21 -0
- data/README.md +14 -65
- data/build.gradle +102 -0
- data/config/checkstyle/checkstyle.xml +128 -0
- data/config/checkstyle/default.xml +108 -0
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +6 -0
- data/gradlew +169 -0
- data/gradlew.bat +84 -0
- data/lib/embulk/input/marketo.rb +3 -0
- data/settings.gradle +1 -0
- data/src/main/java/org/embulk/input/marketo/CsvTokenizer.java +677 -0
- data/src/main/java/org/embulk/input/marketo/MarketoInputPlugin.java +15 -0
- data/src/main/java/org/embulk/input/marketo/MarketoInputPluginDelegate.java +77 -0
- data/src/main/java/org/embulk/input/marketo/MarketoService.java +30 -0
- data/src/main/java/org/embulk/input/marketo/MarketoServiceImpl.java +176 -0
- data/src/main/java/org/embulk/input/marketo/MarketoUtils.java +172 -0
- data/src/main/java/org/embulk/input/marketo/delegate/ActivityBulkExtractInputPlugin.java +63 -0
- data/src/main/java/org/embulk/input/marketo/delegate/CampaignInputPlugin.java +67 -0
- data/src/main/java/org/embulk/input/marketo/delegate/LeadBulkExtractInputPlugin.java +61 -0
- data/src/main/java/org/embulk/input/marketo/delegate/LeadWithListInputPlugin.java +58 -0
- data/src/main/java/org/embulk/input/marketo/delegate/LeadWithProgramInputPlugin.java +56 -0
- data/src/main/java/org/embulk/input/marketo/delegate/MarketoBaseBulkExtractInputPlugin.java +260 -0
- data/src/main/java/org/embulk/input/marketo/delegate/MarketoBaseInputPluginDelegate.java +69 -0
- data/src/main/java/org/embulk/input/marketo/exception/MarketoAPIException.java +30 -0
- data/src/main/java/org/embulk/input/marketo/model/MarketoAccessTokenResponse.java +92 -0
- data/src/main/java/org/embulk/input/marketo/model/MarketoBulkExtractRequest.java +59 -0
- data/src/main/java/org/embulk/input/marketo/model/MarketoError.java +40 -0
- data/src/main/java/org/embulk/input/marketo/model/MarketoField.java +91 -0
- data/src/main/java/org/embulk/input/marketo/model/MarketoResponse.java +81 -0
- data/src/main/java/org/embulk/input/marketo/model/filter/DateRangeFilter.java +31 -0
- data/src/main/java/org/embulk/input/marketo/model/filter/ListFilter.java +10 -0
- data/src/main/java/org/embulk/input/marketo/model/filter/MarketoFilter.java +8 -0
- data/src/main/java/org/embulk/input/marketo/rest/MarketoBaseRestClient.java +226 -0
- data/src/main/java/org/embulk/input/marketo/rest/MarketoFileResponseEntityReader.java +69 -0
- data/src/main/java/org/embulk/input/marketo/rest/MarketoRESTEndpoint.java +44 -0
- data/src/main/java/org/embulk/input/marketo/rest/MarketoResponseJetty92EntityReader.java +88 -0
- data/src/main/java/org/embulk/input/marketo/rest/MarketoRestClient.java +332 -0
- data/src/main/java/org/embulk/input/marketo/rest/RecordPagingIterable.java +130 -0
- data/src/test/java/org/embulk/input/marketo/TestMarketoInputPlugin.java +5 -0
- data/src/test/java/org/embulk/input/marketo/rest/MarketoBaseRestClientTest.java +220 -0
- metadata +65 -222
- data/.ruby-version +0 -1
- data/.travis.yml.erb +0 -42
- data/Gemfile +0 -3
- data/LICENSE +0 -13
- data/Rakefile +0 -20
- data/embulk-input-marketo.gemspec +0 -28
- data/gemfiles/embulk-latest +0 -4
- data/gemfiles/template.erb +0 -4
- data/lib/embulk/input/marketo/activity_log.rb +0 -103
- data/lib/embulk/input/marketo/base.rb +0 -139
- data/lib/embulk/input/marketo/lead.rb +0 -143
- data/lib/embulk/input/marketo_api.rb +0 -22
- data/lib/embulk/input/marketo_api/soap/activity_log.rb +0 -103
- data/lib/embulk/input/marketo_api/soap/base.rb +0 -135
- data/lib/embulk/input/marketo_api/soap/lead.rb +0 -91
- data/test/activity_log_fixtures.rb +0 -216
- data/test/embulk/input/marketo/test_activity_log.rb +0 -444
- data/test/embulk/input/marketo/test_base.rb +0 -76
- data/test/embulk/input/marketo/test_lead.rb +0 -605
- data/test/embulk/input/marketo_api/soap/test_activity_log.rb +0 -154
- data/test/embulk/input/marketo_api/soap/test_base.rb +0 -96
- data/test/embulk/input/marketo_api/soap/test_lead.rb +0 -139
- data/test/embulk/input/test_marketo_api.rb +0 -28
- data/test/lead_fixtures.rb +0 -111
- data/test/mute_logger.rb +0 -7
- data/test/override_assert_raise.rb +0 -18
- data/test/prepare_embulk.rb +0 -15
- data/test/run-test.rb +0 -26
- data/test/savon_helper.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b3e412c76a242171826a25d62d41126de0ec2bb
|
4
|
+
data.tar.gz: 97f8c071357997a07347e03c28ffa58b5d90cb4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2969c47bc9ce9fe7968f2dcf256709c25d506ccf2e0d6e5c7510635f6220fa1df339f9b6af341f6a5204be7e66b332e6d8040b0b64213137ca0adf6f0a06a1b
|
7
|
+
data.tar.gz: 63d3dc7bed1e6930fa8c03584bcf4b83077c8e0b08ff7c8517fc92034debff28918bbfbcd86a1a0c8233d33f51b3d08c1f4b35206072b92279501f38d40465a8
|
@@ -0,0 +1,37 @@
|
|
1
|
+
### Are all connections created by the plugin secure?
|
2
|
+
|
3
|
+
- [ ] Does it opt secure communication standard? Such as HTTPS, SSH, SFTP, SMTP STARTTLS. If not check with CISO to decide we can deploy the plugin.
|
4
|
+
- [ ] Does support both authentication and encryption appropriately? Such as: "just encrypting without authentication" that is insecure.
|
5
|
+
|
6
|
+
### Does the plugin connect only to its expected external site which the customer explicitly set in their config file?
|
7
|
+
|
8
|
+
- [ ] Does NOT connect unexpected external site and our internal endpoints? Such as: “v3/job/:id/set_started” callback endpoint.
|
9
|
+
|
10
|
+
### Does NOT the plugin persist any customers' private information? Identify the private information beforehand.
|
11
|
+
|
12
|
+
- [ ] Does NOT include them in (temporary) files?
|
13
|
+
- [ ] Does NOT include them in log messages and exception messages?
|
14
|
+
|
15
|
+
### What kind of environments does the plugin interact with?
|
16
|
+
|
17
|
+
- [ ] Does NOT execute any shell command?
|
18
|
+
- [ ] Does NOT read any files on the running instance? Such as: "/etc/passwords". It’s ok to read temporary files that the plugin wrote.
|
19
|
+
- [ ] Does use to create temporary files by spi.TempFileSpace utility to avoid the conflict of the file names.
|
20
|
+
- [ ] Does NOT get environment variables or JVM system properties at runtime? Such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in environment variables
|
21
|
+
|
22
|
+
### Does NOT the plugin use insecure libraries?
|
23
|
+
|
24
|
+
- [ ] Line up all depending library so that we can identify the impact of security incident of those library if any.
|
25
|
+
- [ ] Check libraries usage of the plugin; all security check list must apply to the library usages. Such as "Are all connections created by the library secure?"
|
26
|
+
|
27
|
+
### Does NOT the plugin source code repository contain kinds of credentials
|
28
|
+
|
29
|
+
- [ ] API keys
|
30
|
+
- [ ] Passwords
|
31
|
+
|
32
|
+
### Make sure to free up all resources allocated during Embulk transaction “committing” or “rolling back”or before.
|
33
|
+
|
34
|
+
- [ ] Network (connections, pooled connections)
|
35
|
+
- [ ] Memory (cache in static variables)
|
36
|
+
- [ ] File (temporary files)
|
37
|
+
- [ ] CPU (threads, processes)
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,45 +1,5 @@
|
|
1
|
-
language:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
secure: "cYPXD2Dv1VOU0rdUSsevrGuHcjBajCTq8s961R8d2pPkX+V1AbmIMKK0if00qMgqR7D65p6jOnfiuZfXolF1z4awqLXNu7LhP6zOr1hMRCOHOfjj/SJLbm5MFreN81G+6k4XpfBlA9YShA9E/nNVxBmakxC8aCnlJHGfDUbkb9kmNX/LXSNf0efZMRVr3vN8tP6tHP0TUCx90A2FNols9qHgl+boxF090OpgFTspyeqC6K82Q4D97RwajnM+oKIBMfxuc4Pc1n+PZ+mQQfYNK7ze4WszXRtQydwDD7rtF5d6IwczElZ243GjXxdJWL6inUvcMJQogC5X8ayh7m0ZNT2awfbJXT1tsLte42j+/eUAPaCD07bE8XzgdmfTdmpxP6nHasAMkleDMlcBRrxht+cGD61qEXcsSKd0c7mnvg35L+hl39NGFde0yz1Xxx/D69p9KHE0pa7cZNC7D8n1w9AUxFdl8OX6rfDlgiapIonAF/QG/5Z3ltHDzZu6XK1MMFugrdV7SxuSepL3xgBv5jN0jMA/GVmvFbXf6FGDXxt/bhSUCZoTJ/c8BaRnIM+QTkBts6TqgQ6BeUQNAe5p0TtssNwMW8RC4DpkaLDeQRSScJJ6V6UDpjsPJ3hcozpzrCVwy/5F72MYzcHeKg85EF30aA94Q+EDbsKUR0BEeGo="
|
7
|
-
|
8
|
-
before_install:
|
9
|
-
- |
|
10
|
-
# Currently, Travis can't treat jruby 9.0.1.0
|
11
|
-
ruby -v
|
12
|
-
rvm get head
|
13
|
-
rvm use jruby-9.0.5.0 --install
|
14
|
-
ruby -v
|
15
|
-
gem i bundler
|
16
|
-
bundle install
|
17
|
-
|
18
|
-
jdk: oraclejdk8
|
19
|
-
|
20
|
-
rvm:
|
21
|
-
- jruby-9.0.5.0
|
22
|
-
|
23
|
-
script: bundle exec rake cov
|
24
|
-
|
25
|
-
gemfile:
|
26
|
-
- gemfiles/embulk-0.8.0-latest
|
27
|
-
- gemfiles/embulk-0.8.7
|
28
|
-
- gemfiles/embulk-0.8.8
|
29
|
-
- gemfiles/embulk-latest
|
30
|
-
|
31
|
-
matrix:
|
32
|
-
exclude:
|
33
|
-
- jdk: oraclejdk8 # Ignore all matrix at first, use `include` to allow build
|
34
|
-
include:
|
35
|
-
- {rvm: jruby-9.0.0.0, gemfile: gemfiles/embulk-0.8.0-latest}
|
36
|
-
- {rvm: jruby-9.0.0.0, gemfile: gemfiles/embulk-0.8.7}
|
37
|
-
- {rvm: jruby-9.0.0.0, gemfile: gemfiles/embulk-0.8.8}
|
38
|
-
- {rvm: jruby-9.0.0.0, gemfile: gemfiles/embulk-latest}
|
39
|
-
|
40
|
-
|
41
|
-
allow_failures:
|
42
|
-
# Ignore failure for *-latest
|
43
|
-
- gemfile: embulk-0.8.0-latest
|
44
|
-
- gemfile: embulk-latest
|
45
|
-
|
1
|
+
language: java
|
2
|
+
jdk:
|
3
|
+
- oraclejdk8
|
4
|
+
script:
|
5
|
+
- ./gradlew --info check jacocoTestReport
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
MIT License
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,83 +1,32 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/treasure-data/embulk-input-marketo.svg?branch=master)](https://travis-ci.org/treasure-data/embulk-input-marketo)
|
2
|
-
[![Code Climate](https://codeclimate.com/github/treasure-data/embulk-input-marketo/badges/gpa.svg)](https://codeclimate.com/github/treasure-data/embulk-input-marketo)
|
3
|
-
[![Test Coverage](https://codeclimate.com/github/treasure-data/embulk-input-marketo/badges/coverage.svg)](https://codeclimate.com/github/treasure-data/embulk-input-marketo/coverage)
|
4
|
-
[![Gem Version](https://badge.fury.io/rb/embulk-input-marketo.svg)](http://badge.fury.io/rb/embulk-input-marketo)
|
5
|
-
|
6
1
|
# Marketo input plugin for Embulk
|
7
2
|
|
8
|
-
|
9
|
-
|
10
|
-
- Lead
|
11
|
-
- Activity log
|
12
|
-
|
13
|
-
This plugin uses Marketo SOAP API.
|
3
|
+
TODO: Write short description here and build.gradle file.
|
14
4
|
|
15
5
|
## Overview
|
16
6
|
|
17
|
-
Required Embulk version >= 0.8.7 (since 0.5.0).
|
18
|
-
|
19
7
|
* **Plugin type**: input
|
20
|
-
* **Resume supported**:
|
21
|
-
* **Cleanup supported**:
|
22
|
-
* **Guess supported**:
|
23
|
-
|
24
|
-
## Install
|
25
|
-
|
26
|
-
```
|
27
|
-
$ embulk gem install embulk-input-marketo
|
28
|
-
```
|
8
|
+
* **Resume supported**: yes
|
9
|
+
* **Cleanup supported**: yes
|
10
|
+
* **Guess supported**: no
|
29
11
|
|
30
12
|
## Configuration
|
31
13
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
### marketo/lead
|
37
|
-
|
38
|
-
- **endpoint** SOAP endpoint URL for your account (string, required)
|
39
|
-
- **wsdl** SOAP endpoint URL for your account (string, default: endpoint + "?WSDL")
|
40
|
-
- **user_id** Your user id (string, reqiured)
|
41
|
-
- **encryption_key** Your encryption key (string, reqiured)
|
42
|
-
- **from_datetime** Fetch leads since this time (string, required)
|
43
|
-
- **to_datetime** Fetch leads until this time (string, default: Time.now)
|
44
|
-
- **retry_initial_wait_sec** Wait seconds for exponential backoff initial value (integer, default: 1)
|
45
|
-
- **retry_limit**: Try to retry this times (integer, default: 5)
|
46
|
-
- **append_processed_time_column**: If you want the column for processed time (boolean, default: true)
|
47
|
-
|
48
|
-
### marketo/activity_log
|
49
|
-
|
50
|
-
- **endpoint** SOAP endpoint URL for your account (string, required)
|
51
|
-
- **wsdl** SOAP endpoint URL for your account (string, default: endpoint + "?WSDL")(Note "?WSDL" needs to be in all caps)
|
52
|
-
- **user_id** Your user id (string, reqiured)
|
53
|
-
- **encryption_key** Your encryption key (string, reqiured)
|
54
|
-
- **from_datetime** Fetch activity_logs since this time (string, required)
|
55
|
-
- **to_datetime** Fetch activity_logs until this time (string, default: Time.now)
|
56
|
-
- **retry_initial_wait_sec** Wait seconds for exponential backoff initial value (integer, default: 1)
|
57
|
-
- **retry_limit**: Try to retry this times (integer, default: 5)
|
58
|
-
|
59
|
-
### Selecting plugin type
|
60
|
-
|
61
|
-
You should specify `type: marketo/lead` or `type: marketo/activity_log` on your demand.
|
62
|
-
|
14
|
+
- **option1**: description (integer, required)
|
15
|
+
- **option2**: description (string, default: `"myvalue"`)
|
16
|
+
- **option3**: description (string, default: `null`)
|
63
17
|
|
64
18
|
## Example
|
65
19
|
|
66
|
-
For lead, you have `partial-config.yml` like below:
|
67
|
-
|
68
20
|
```yaml
|
69
21
|
in:
|
70
|
-
type: marketo
|
71
|
-
|
72
|
-
|
73
|
-
user_id: user_ABC123
|
74
|
-
encryption_key: TOPSECRET
|
75
|
-
from_datetime: "2015-06-30"
|
76
|
-
out:
|
77
|
-
type: stdout
|
22
|
+
type: marketo
|
23
|
+
option1: example1
|
24
|
+
option2: example2
|
78
25
|
```
|
79
26
|
|
80
|
-
You can run `embulk guess partial-config.yml -o lead-config.yml` and got `lead-config.yml`. `lead-config.yml` includes a schema for Lead.
|
81
27
|
|
82
|
-
|
28
|
+
## Build
|
83
29
|
|
30
|
+
```
|
31
|
+
$ ./gradlew gem # -t to watch change of files and rebuild continuously
|
32
|
+
```
|
data/build.gradle
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
plugins {
|
2
|
+
id "com.jfrog.bintray" version "1.1"
|
3
|
+
id "com.github.jruby-gradle.base" version "0.1.5"
|
4
|
+
id "java"
|
5
|
+
id "checkstyle"
|
6
|
+
id "jacoco"
|
7
|
+
}
|
8
|
+
import com.github.jrubygradle.JRubyExec
|
9
|
+
repositories {
|
10
|
+
mavenCentral()
|
11
|
+
jcenter()
|
12
|
+
maven {
|
13
|
+
url "https://dl.bintray.com/embulk-base-restclient/maven"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
configurations {
|
17
|
+
provided
|
18
|
+
}
|
19
|
+
version = "0.5.7.alpha.1"
|
20
|
+
sourceCompatibility = 1.7
|
21
|
+
targetCompatibility = 1.7
|
22
|
+
|
23
|
+
dependencies {
|
24
|
+
compile "org.embulk:embulk-core:0.8.33"
|
25
|
+
provided "org.embulk:embulk-core:0.8.33"
|
26
|
+
compile "org.embulk.base.restclient:embulk-base-restclient:0.5.3"
|
27
|
+
compile "org.embulk.base.restclient:embulk-util-retryhelper-jetty92:0.5.3"
|
28
|
+
testCompile "junit:junit:4.+"
|
29
|
+
testCompile "org.embulk:embulk-core:0.8.16:tests"
|
30
|
+
testCompile "org.embulk:embulk-test:0.8.16"
|
31
|
+
testCompile "org.mockito:mockito-core:2.+"
|
32
|
+
}
|
33
|
+
|
34
|
+
task classpath(type: Copy, dependsOn: ["jar"]) {
|
35
|
+
doFirst { file("classpath").deleteDir() }
|
36
|
+
from (configurations.runtime - configurations.provided + files(jar.archivePath))
|
37
|
+
into "classpath"
|
38
|
+
}
|
39
|
+
clean { delete "classpath" }
|
40
|
+
|
41
|
+
checkstyle {
|
42
|
+
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
|
43
|
+
toolVersion = '6.14.1'
|
44
|
+
}
|
45
|
+
checkstyleMain {
|
46
|
+
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
|
47
|
+
ignoreFailures = true
|
48
|
+
}
|
49
|
+
checkstyleTest {
|
50
|
+
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
|
51
|
+
ignoreFailures = true
|
52
|
+
}
|
53
|
+
task checkstyle(type: Checkstyle) {
|
54
|
+
classpath = sourceSets.main.output + sourceSets.test.output
|
55
|
+
source = sourceSets.main.allJava + sourceSets.test.allJava
|
56
|
+
}
|
57
|
+
|
58
|
+
task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) {
|
59
|
+
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "build"
|
60
|
+
script "${project.name}.gemspec"
|
61
|
+
doLast { ant.move(file: "${project.name}-${project.version}.gem", todir: "pkg") }
|
62
|
+
}
|
63
|
+
|
64
|
+
task gemPush(type: JRubyExec, dependsOn: ["gem"]) {
|
65
|
+
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "push"
|
66
|
+
script "pkg/${project.name}-${project.version}.gem"
|
67
|
+
}
|
68
|
+
|
69
|
+
task "package"(dependsOn: ["gemspec", "classpath"]) {
|
70
|
+
doLast {
|
71
|
+
println "> Build succeeded."
|
72
|
+
println "> You can run embulk with '-L ${file(".").absolutePath}' argument."
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
task gemspec {
|
77
|
+
ext.gemspecFile = file("${project.name}.gemspec")
|
78
|
+
inputs.file "build.gradle"
|
79
|
+
outputs.file gemspecFile
|
80
|
+
doLast { gemspecFile.write($/
|
81
|
+
Gem::Specification.new do |spec|
|
82
|
+
spec.name = "${project.name}"
|
83
|
+
spec.version = "${project.version}"
|
84
|
+
spec.authors = ["Tai Khuu"]
|
85
|
+
spec.summary = %[Marketo input plugin for Embulk]
|
86
|
+
spec.description = %[Loads records from Marketo.]
|
87
|
+
spec.email = ["tai@treasuredata.com"]
|
88
|
+
spec.licenses = ["MIT"]
|
89
|
+
# TODO set this: spec.homepage = "https://github.com/khuutantai/embulk-input-marketo"
|
90
|
+
|
91
|
+
spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
|
92
|
+
spec.test_files = spec.files.grep(%r"^(test|spec)/")
|
93
|
+
spec.require_paths = ["lib"]
|
94
|
+
|
95
|
+
#spec.add_dependency 'YOUR_GEM_DEPENDENCY', ['~> YOUR_GEM_DEPENDENCY_VERSION']
|
96
|
+
spec.add_development_dependency 'bundler', ['~> 1.0']
|
97
|
+
spec.add_development_dependency 'rake', ['>= 10.0']
|
98
|
+
end
|
99
|
+
/$)
|
100
|
+
}
|
101
|
+
}
|
102
|
+
clean { delete "${project.name}.gemspec" }
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE module PUBLIC
|
3
|
+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
4
|
+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
5
|
+
<module name="Checker">
|
6
|
+
<!-- https://github.com/facebook/presto/blob/master/src/checkstyle/checks.xml -->
|
7
|
+
<module name="FileTabCharacter"/>
|
8
|
+
<module name="NewlineAtEndOfFile">
|
9
|
+
<property name="lineSeparator" value="lf"/>
|
10
|
+
</module>
|
11
|
+
<module name="RegexpMultiline">
|
12
|
+
<property name="format" value="\r"/>
|
13
|
+
<property name="message" value="Line contains carriage return"/>
|
14
|
+
</module>
|
15
|
+
<module name="RegexpMultiline">
|
16
|
+
<property name="format" value=" \n"/>
|
17
|
+
<property name="message" value="Line has trailing whitespace"/>
|
18
|
+
</module>
|
19
|
+
<module name="RegexpMultiline">
|
20
|
+
<property name="format" value="\{\n\n"/>
|
21
|
+
<property name="message" value="Blank line after opening brace"/>
|
22
|
+
</module>
|
23
|
+
<module name="RegexpMultiline">
|
24
|
+
<property name="format" value="\n\n\s*\}"/>
|
25
|
+
<property name="message" value="Blank line before closing brace"/>
|
26
|
+
</module>
|
27
|
+
<module name="RegexpMultiline">
|
28
|
+
<property name="format" value="\n\n\n"/>
|
29
|
+
<property name="message" value="Multiple consecutive blank lines"/>
|
30
|
+
</module>
|
31
|
+
<module name="RegexpMultiline">
|
32
|
+
<property name="format" value="\n\n\Z"/>
|
33
|
+
<property name="message" value="Blank line before end of file"/>
|
34
|
+
</module>
|
35
|
+
<module name="RegexpMultiline">
|
36
|
+
<property name="format" value="Preconditions\.checkNotNull"/>
|
37
|
+
<property name="message" value="Use of checkNotNull"/>
|
38
|
+
</module>
|
39
|
+
|
40
|
+
<module name="TreeWalker">
|
41
|
+
<module name="EmptyBlock">
|
42
|
+
<property name="option" value="text"/>
|
43
|
+
<property name="tokens" value="
|
44
|
+
LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF,
|
45
|
+
LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT, STATIC_INIT"/>
|
46
|
+
</module>
|
47
|
+
<module name="EmptyStatement"/>
|
48
|
+
<module name="EmptyForInitializerPad"/>
|
49
|
+
<module name="EmptyForIteratorPad">
|
50
|
+
<property name="option" value="space"/>
|
51
|
+
</module>
|
52
|
+
<module name="MethodParamPad">
|
53
|
+
<property name="allowLineBreaks" value="true"/>
|
54
|
+
<property name="option" value="nospace"/>
|
55
|
+
</module>
|
56
|
+
<module name="ParenPad"/>
|
57
|
+
<module name="TypecastParenPad"/>
|
58
|
+
<module name="NeedBraces"/>
|
59
|
+
<module name="LeftCurly">
|
60
|
+
<property name="option" value="nl"/>
|
61
|
+
<property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, METHOD_DEF"/>
|
62
|
+
</module>
|
63
|
+
<module name="LeftCurly">
|
64
|
+
<property name="option" value="eol"/>
|
65
|
+
<property name="tokens" value="
|
66
|
+
LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR,
|
67
|
+
LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE"/>
|
68
|
+
</module>
|
69
|
+
<module name="RightCurly">
|
70
|
+
<property name="option" value="alone"/>
|
71
|
+
</module>
|
72
|
+
<module name="GenericWhitespace"/>
|
73
|
+
<module name="WhitespaceAfter"/>
|
74
|
+
<module name="NoWhitespaceBefore"/>
|
75
|
+
|
76
|
+
<module name="UpperEll"/>
|
77
|
+
<module name="DefaultComesLast"/>
|
78
|
+
<module name="ArrayTypeStyle"/>
|
79
|
+
<module name="MultipleVariableDeclarations"/>
|
80
|
+
<module name="ModifierOrder"/>
|
81
|
+
<module name="OneStatementPerLine"/>
|
82
|
+
<module name="StringLiteralEquality"/>
|
83
|
+
<module name="MutableException"/>
|
84
|
+
<module name="EqualsHashCode"/>
|
85
|
+
<module name="InnerAssignment"/>
|
86
|
+
<module name="InterfaceIsType"/>
|
87
|
+
<module name="HideUtilityClassConstructor"/>
|
88
|
+
|
89
|
+
<module name="MemberName"/>
|
90
|
+
<module name="LocalVariableName"/>
|
91
|
+
<module name="LocalFinalVariableName"/>
|
92
|
+
<module name="TypeName"/>
|
93
|
+
<module name="PackageName"/>
|
94
|
+
<module name="ParameterName"/>
|
95
|
+
<module name="StaticVariableName"/>
|
96
|
+
<module name="ClassTypeParameterName">
|
97
|
+
<property name="format" value="^[A-Z][0-9]?$"/>
|
98
|
+
</module>
|
99
|
+
<module name="MethodTypeParameterName">
|
100
|
+
<property name="format" value="^[A-Z][0-9]?$"/>
|
101
|
+
</module>
|
102
|
+
|
103
|
+
<module name="AvoidStarImport"/>
|
104
|
+
<module name="RedundantImport"/>
|
105
|
+
<module name="UnusedImports"/>
|
106
|
+
<module name="ImportOrder">
|
107
|
+
<property name="groups" value="*,javax,java"/>
|
108
|
+
<property name="separated" value="true"/>
|
109
|
+
<property name="option" value="bottom"/>
|
110
|
+
<property name="sortStaticImportsAlphabetically" value="true"/>
|
111
|
+
</module>
|
112
|
+
|
113
|
+
<module name="WhitespaceAround">
|
114
|
+
<property name="allowEmptyConstructors" value="true"/>
|
115
|
+
<property name="allowEmptyMethods" value="true"/>
|
116
|
+
<property name="ignoreEnhancedForColon" value="false"/>
|
117
|
+
<property name="tokens" value="
|
118
|
+
ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
|
119
|
+
BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE,
|
120
|
+
LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
|
121
|
+
LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
|
122
|
+
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
|
123
|
+
LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL,
|
124
|
+
PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN,
|
125
|
+
STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
|
126
|
+
</module>
|
127
|
+
</module>
|
128
|
+
</module>
|