travis 1.6.14.travis.543.6 → 1.6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +3 -3
- data/assets/travis.sh +6 -3
- data/lib/travis/cli/lint.rb +49 -0
- data/lib/travis/client/lint_result.rb +25 -0
- data/lib/travis/version.rb +1 -1
- data/travis.gemspec +3 -1
- metadata +38 -36
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
OTVkY2E3NDljOTY5NGMzMWNjNTA5ZTlmY2VjMTdhOGFhNDlkNzc1Nw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d8a12507965f668fc6c0c820f85e4a4ada9be8e2
|
4
|
+
data.tar.gz: 6458842012874482bd882cf440c8c72a137f344f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MTIyMjI3ZWQzMTFiZmRjOTAxNjQ0NzkyMjlkNjNhYjQ4ODAzODhmNTA2MzQ4
|
11
|
-
NGY3YTU1ZTE2ZGEzZGI3ODdlZDQyYjMzZGVkNzQwYmIxMzI0NTA=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
N2U3NGMzMjY2NzU3M2U0NGIyMDYwYmY3ODY4MDYyMzRkOTlhMWVlM2E2NDI2
|
14
|
-
YjAzZDU1ZjM3YTFiM2YzZjUzZGVmMzE1M2JkY2IyOTE5ZTdiMmIyZjRiMTgx
|
15
|
-
YWMzNDE1N2JiNzI3YjFlMzIyZjg4NzE1YjM0YTE4MTJlNGUxMDY=
|
6
|
+
metadata.gz: 7c186e2b418e749a3d6ad0bb562216c112ba2bd50f764074982019c20ee068a795942eb589e7cc941f463f61ea4d2871048ac7d671bdbff35720371f183b0877
|
7
|
+
data.tar.gz: 369e7cdcc0fed1ec9cd3bbd80888ba147ca951aecfc8a440ea5479b5034f41ff7e10f4526c3a6b0f14b5afc707bed8a306354f4d49087fbbf0799799740e73a4
|
data/README.md
CHANGED
@@ -1553,12 +1553,12 @@ You can check your Ruby version by running `ruby -v`:
|
|
1553
1553
|
|
1554
1554
|
Then run:
|
1555
1555
|
|
1556
|
-
$ gem install travis -v 1.6.
|
1556
|
+
$ gem install travis -v 1.6.14 --no-rdoc --no-ri
|
1557
1557
|
|
1558
1558
|
Now make sure everything is working:
|
1559
1559
|
|
1560
1560
|
$ travis version
|
1561
|
-
1.6.
|
1561
|
+
1.6.14
|
1562
1562
|
|
1563
1563
|
See also [Note on Ubuntu](#note-on-ubuntu) below.
|
1564
1564
|
|
@@ -1643,7 +1643,7 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
|
|
1643
1643
|
|
1644
1644
|
## Version History
|
1645
1645
|
|
1646
|
-
**1.6.14** (
|
1646
|
+
**1.6.14** (June 17, 2014)
|
1647
1647
|
* Add `travis lint` command and Ruby API.
|
1648
1648
|
|
1649
1649
|
**1.6.13** (June 15, 2014)
|
data/assets/travis.sh
CHANGED
@@ -20,7 +20,7 @@ _travis_complete() {
|
|
20
20
|
if type compdef 1>/dev/null 2>/dev/null; then
|
21
21
|
compdef _travis travis
|
22
22
|
_travis() { _travis_complete $((${#words} - 1)) "${words[2]}"; }
|
23
|
-
_travis_commands() { list=(accounts:"displays accounts and their subscription status" branches:"displays the most recent build for each branch" cache:"lists or deletes repository caches" cancel:"cancels a job or build" console:"interactive shell" disable:"disables a project" enable:"enables a project" encrypt:"encrypts values for the .travis.yml" endpoint:"displays or changes the API endpoint" help:"helps you out when in dire need of information" history:"displays a projects build history" init:"generates a .travis.yml and enables the project" login:"authenticates against the API and stores the token" logout:"deletes the stored API token" logs:"streams test logs" monitor:"live monitor for what's going on" open:"opens a build or job in the browser" pubkey:"prints out a repository's public key" raw:"makes an (authenticated) API call and prints out the result" report:"generates a report useful for filing issues" repos:"lists repositories the user has certain permissions on" requests:"lists recent requests" restart:"restarts a build or job" settings:"access repository settings" setup:"sets up an addon or deploy target" show:"displays a build or job" status:"checks status of the latest build" sync:"triggers a new sync with GitHub" token:"outputs the secret API token" version:"outputs the client version" whatsup:"lists most recent builds" whoami:"outputs the current user") _describe -t common-commands 'common commands' list; }
|
23
|
+
_travis_commands() { list=(accounts:"displays accounts and their subscription status" branches:"displays the most recent build for each branch" cache:"lists or deletes repository caches" cancel:"cancels a job or build" console:"interactive shell" disable:"disables a project" enable:"enables a project" encrypt:"encrypts values for the .travis.yml" endpoint:"displays or changes the API endpoint" help:"helps you out when in dire need of information" history:"displays a projects build history" init:"generates a .travis.yml and enables the project" lint:"display warnings for a .travis.yml" login:"authenticates against the API and stores the token" logout:"deletes the stored API token" logs:"streams test logs" monitor:"live monitor for what's going on" open:"opens a build or job in the browser" pubkey:"prints out a repository's public key" raw:"makes an (authenticated) API call and prints out the result" report:"generates a report useful for filing issues" repos:"lists repositories the user has certain permissions on" requests:"lists recent requests" restart:"restarts a build or job" settings:"access repository settings" setup:"sets up an addon or deploy target" show:"displays a build or job" status:"checks status of the latest build" sync:"triggers a new sync with GitHub" token:"outputs the secret API token" version:"outputs the client version" whatsup:"lists most recent builds" whoami:"outputs the current user") _describe -t common-commands 'common commands' list; }
|
24
24
|
_travis_setup() { list=(appfog:"automatic deployment to Appfog" artifacts:"automatic artifact shipping to S3" cloudcontrol:"automatic deployment to cloudControl" cloudfiles:"automatic pushing to Rackspace Cloud Files" cloudfoundry:"automatic deployment to Cloud Foundry" cloud66:"Automatic deployment to Cloud 66" deis:"automatic deployment to a deis app" divshot:"deployment to Divshot.io" engineyard:"automatic deployment to Engine Yard" hackage:"automatic deployment of hackage packages" heroku:"automatic deployment to Heroku" modulus:"deployment to Modulus" npm:"automatic release to NPM" ninefold:"Automatic deployment to Ninefold" nodejitsu:"automatic deployment to Nodejitsu" openshift:"automatic deployment to OpenShfit" opsworks:"deployment to OpsWorks" pypi:"automatic deployment to PyPI" releases:"Upload Assets to GitHub Releases" rubygems:"automatic release to RubyGems" s:"automatic pushing to S3" sauce_connect:"Sauce Connet addon for Sauce Labs integration") _describe -t common-commands 'common commands' list; }
|
25
25
|
_travis_settings() { list=(builds_only_with_travis_yml:"Only run builds with a .travis.yml" build_pushes:"Build pushes" build_pull_requests:"Build pull requests") _describe -t common-commands 'common commands' list; }
|
26
26
|
_travis_init() { list=(c:'initialize c project' clojure:'initialize clojure project' cpp:'initialize cpp project' erlang:'initialize erlang project' go:'initialize go project' groovy:'initialize groovy project' haskell:'initialize haskell project' java:'initialize java project' node_js:'initialize node_js project' objective-c:'initialize objective-c project' perl:'initialize perl project' php:'initialize php project' python:'initialize python project' ruby:'initialize ruby project' scala:'initialize scala project') _describe -t common-commands 'common commands' list; }
|
@@ -38,6 +38,7 @@ if type compdef 1>/dev/null 2>/dev/null; then
|
|
38
38
|
help) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" '*:file:_files' && return 0;;
|
39
39
|
history) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" "-a[Only show history after a given build number]" "--after[Only show history after a given build number]" "-p[Only show history for the given Pull Request]" "--pull-request[Only show history for the given Pull Request]" "-b[Only show history for the given branch]" "--branch[Only show history for the given branch]" "-l[Maximum number of history items]" "--limit[Maximum number of history items]" "-d[Include date in output]" "--date[Include date in output]" "-c[Include committer in output]" "--committer[Include committer in output]" "--all[Display all history items]" "--no-all[Display all history items]" '*:file:_files' && return 0;;
|
40
40
|
init) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" "-s[don't trigger a sync if the repo is unknown]" "--skip-sync[don't trigger a sync if the repo is unknown]" "-f[override .travis.yml if it already exists]" "--force[override .travis.yml if it already exists]" "-k[do not enable project, only add .travis.yml]" "--skip-enable[do not enable project, only add .travis.yml]" "-p[print generated config instead of writing to file]" "--print-conf[print generated config instead of writing to file]" "--script[sets script option in .travis.yml (can be used more than once)]" "--before-script[sets before_script option in .travis.yml (can be used more than once)]" "--after-script[sets after_script option in .travis.yml (can be used more than once)]" "--after-success[sets after_success option in .travis.yml (can be used more than once)]" "--install[sets install option in .travis.yml (can be used more than once)]" "--before-install[sets before_install option in .travis.yml (can be used more than once)]" "--compiler[sets compiler option in .travis.yml (can be used more than once)]" "--otp-release[sets otp_release option in .travis.yml (can be used more than once)]" "--go[sets go option in .travis.yml (can be used more than once)]" "--jdk[sets jdk option in .travis.yml (can be used more than once)]" "--node-js[sets node_js option in .travis.yml (can be used more than once)]" "--perl[sets perl option in .travis.yml (can be used more than once)]" "--php[sets php option in .travis.yml (can be used more than once)]" "--python[sets python option in .travis.yml (can be used more than once)]" "--rvm[sets rvm option in .travis.yml (can be used more than once)]" "--scala[sets scala option in .travis.yml (can be used more than once)]" "--env[sets env option in .travis.yml (can be used more than once)]" "--gemfile[sets gemfile option in .travis.yml (can be used more than once)]" '*:file:_files' && return 0;;
|
41
|
+
lint) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" "-q[does not print anything]" "--quiet[does not print anything]" "--no-quiet[does not print anything]" "-x[sets the exit code to 1 if there are warning]" "--exit-code[sets the exit code to 1 if there are warning]" "--no-exit-code[sets the exit code to 1 if there are warning]" '*:file:_files' && return 0;;
|
41
42
|
login) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" "-g[identify by GitHub token]" "--github-token[identify by GitHub token]" "-T[try to figure out who you are automatically (might send another apps token to Travis, token will not be stored)]" "--auto-token[try to figure out who you are automatically (might send another apps token to Travis, token will not be stored)]" "-p[try to load password from OSX keychain (will not be stored)]" "--auto-password[try to load password from OSX keychain (will not be stored)]" "-a[shorthand for --auto-token --auto-password]" "--auto[shorthand for --auto-token --auto-password]" "-u[user to log in as]" "--user[user to log in as]" "-M[do not use interactive login]" "--no-manual[do not use interactive login]" "--list-github-token[instead of actually logging in, list found GitHub tokens]" "--skip-token-check[don't verify the token with github]" '*:file:_files' && return 0;;
|
42
43
|
logout) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" '*:file:_files' && return 0;;
|
43
44
|
logs) _arguments -s -S "-h[Display help]" "--help[Display help]" "-i[be interactive and colorful]" "--interactive[be interactive and colorful]" "--no-interactive[be interactive and colorful]" "-E[don't rescue exceptions]" "--explode[don't rescue exceptions]" "--no-explode[don't rescue exceptions]" "--skip-version-check[don't check if travis client is up to date]" "--skip-completion-check[don't check if auto-completion is set up]" "-e[Travis API server to talk to]" "--api-endpoint[Travis API server to talk to]" "-I[do not verify SSL certificate of API endpoint]" "--insecure[do not verify SSL certificate of API endpoint]" "--no-insecure[do not verify SSL certificate of API endpoint]" "--pro[short-cut for --api-endpoint 'https://api.travis-ci.com/']" "--org[short-cut for --api-endpoint 'https://api.travis-ci.org/']" "--staging[talks to staging system]" "-t[access token to use]" "--token[access token to use]" "--debug[show API requests]" "-X[use enterprise setup (optionally takes name for multiple setups)]" "--enterprise[use enterprise setup (optionally takes name for multiple setups)]" "--adapter[Faraday adapter to use for HTTP requests]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" '*:file:_files' && return 0;;
|
@@ -63,7 +64,7 @@ if type compdef 1>/dev/null 2>/dev/null; then
|
|
63
64
|
elif type compctl 1>/dev/null 2>/dev/null; then
|
64
65
|
compctl -K _travis travis
|
65
66
|
_travis() { read -cA words && _travis_complete $((${#words} - 1)) "${words[2]}"; }
|
66
|
-
_travis_commands() { reply=("accounts" "branches" "cache" "cancel" "console" "disable" "enable" "encrypt" "endpoint" "help" "history" "init" "login" "logout" "logs" "monitor" "open" "pubkey" "raw" "report" "repos" "requests" "restart" "settings" "setup" "show" "status" "sync" "token" "version" "whatsup" "whoami"); }
|
67
|
+
_travis_commands() { reply=("accounts" "branches" "cache" "cancel" "console" "disable" "enable" "encrypt" "endpoint" "help" "history" "init" "lint" "login" "logout" "logs" "monitor" "open" "pubkey" "raw" "report" "repos" "requests" "restart" "settings" "setup" "show" "status" "sync" "token" "version" "whatsup" "whoami"); }
|
67
68
|
_travis_setup() { reply=("appfog" "artifacts" "cloudcontrol" "cloudfiles" "cloudfoundry" "cloud66" "deis" "divshot" "engineyard" "hackage" "heroku" "modulus" "npm" "ninefold" "nodejitsu" "openshift" "opsworks" "pypi" "releases" "rubygems" "s" "sauce_connect"); }
|
68
69
|
_travis_settings() { reply=(builds_only_with_travis_yml build_pushes build_pull_requests); }
|
69
70
|
_travis_init() { reply=("c" "clojure" "cpp" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"); }
|
@@ -81,6 +82,7 @@ elif type compctl 1>/dev/null 2>/dev/null; then
|
|
81
82
|
help) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check");;
|
82
83
|
history) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter" "--repo" "-r" "--after" "-a" "--pull-request" "-p" "--branch" "-b" "--limit" "-l" "--date" "-d" "--committer" "-c" "--all" "--no-all");;
|
83
84
|
init) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter" "--repo" "-r" "--skip-sync" "-s" "--force" "-f" "--skip-enable" "-k" "--print-conf" "-p" "--script" "--before-script" "--after-script" "--after-success" "--install" "--before-install" "--compiler" "--otp-release" "--go" "--jdk" "--node-js" "--perl" "--php" "--python" "--rvm" "--scala" "--env" "--gemfile");;
|
85
|
+
lint) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter" "--quiet" "--no-quiet" "-q" "--exit-code" "--no-exit-code" "-x");;
|
84
86
|
login) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter" "--github-token" "-g" "--auto-token" "-T" "--auto-password" "-p" "--auto" "-a" "--user" "-u" "--no-manual" "-M" "--list-github-token" "--skip-token-check");;
|
85
87
|
logout) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter");;
|
86
88
|
logs) reply=("--help" "-h" "--interactive" "--no-interactive" "-i" "--explode" "--no-explode" "-E" "--skip-version-check" "--skip-completion-check" "--api-endpoint" "-e" "--insecure" "--no-insecure" "-I" "--pro" "--org" "--staging" "--token" "-t" "--debug" "--enterprise" "-X" "--adapter" "--repo" "-r");;
|
@@ -106,7 +108,7 @@ elif type compctl 1>/dev/null 2>/dev/null; then
|
|
106
108
|
elif type complete 1>/dev/null 2>/dev/null; then
|
107
109
|
complete -F _travis travis
|
108
110
|
_travis() { _travis_complete "$COMP_CWORD" "${COMP_WORDS[1]}"; }
|
109
|
-
_travis_commands() { COMPREPLY=( $(compgen -W "accounts branches cache cancel console disable enable encrypt endpoint help history init login logout logs monitor open pubkey raw report repos requests restart settings setup show status sync token version whatsup whoami" -- "${COMP_WORDS[COMP_CWORD]}") ); }
|
111
|
+
_travis_commands() { COMPREPLY=( $(compgen -W "accounts branches cache cancel console disable enable encrypt endpoint help history init lint login logout logs monitor open pubkey raw report repos requests restart settings setup show status sync token version whatsup whoami" -- "${COMP_WORDS[COMP_CWORD]}") ); }
|
110
112
|
_travis_setup() { COMPREPLY=( $(compgen -W "appfog artifacts cloudcontrol cloudfiles cloudfoundry cloud66 deis divshot engineyard hackage heroku modulus npm ninefold nodejitsu openshift opsworks pypi releases rubygems s sauce_connect" -- "${COMP_WORDS[COMP_CWORD]}") ); }
|
111
113
|
_travis_settings() { COMPREPLY=( $(compgen -W "builds_only_with_travis_yml build_pushes build_pull_requests" -- "${COMP_WORDS[COMP_CWORD]}") ); }
|
112
114
|
_travis_init() { COMPREPLY=( $(compgen -W ""c" "clojure" "cpp" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"" -- "${COMP_WORDS[COMP_CWORD]}") ); }
|
@@ -125,6 +127,7 @@ elif type complete 1>/dev/null 2>/dev/null; then
|
|
125
127
|
help) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check";;
|
126
128
|
history) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter --repo -r --after -a --pull-request -p --branch -b --limit -l --date -d --committer -c --all --no-all";;
|
127
129
|
init) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter --repo -r --skip-sync -s --force -f --skip-enable -k --print-conf -p --script --before-script --after-script --after-success --install --before-install --compiler --otp-release --go --jdk --node-js --perl --php --python --rvm --scala --env --gemfile";;
|
130
|
+
lint) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter --quiet --no-quiet -q --exit-code --no-exit-code -x";;
|
128
131
|
login) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter --github-token -g --auto-token -T --auto-password -p --auto -a --user -u --no-manual -M --list-github-token --skip-token-check";;
|
129
132
|
logout) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter";;
|
130
133
|
logs) options="--help -h --interactive --no-interactive -i --explode --no-explode -E --skip-version-check --skip-completion-check --api-endpoint -e --insecure --no-insecure -I --pro --org --staging --token -t --debug --enterprise -X --adapter --repo -r";;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'travis/cli'
|
2
|
+
|
3
|
+
module Travis
|
4
|
+
module CLI
|
5
|
+
class Lint < ApiCommand
|
6
|
+
description 'display warnings for a .travis.yml'
|
7
|
+
on '-q', '--[no-]quiet', 'does not print anything'
|
8
|
+
on '-x', '--[no-]exit-code', 'sets the exit code to 1 if there are warning'
|
9
|
+
|
10
|
+
def run(file = nil)
|
11
|
+
file ||= '.travis.yml' if $stdin.tty? or $stdin.eof?
|
12
|
+
|
13
|
+
if file and file != '-'
|
14
|
+
debug "reading #{file}"
|
15
|
+
error "file does not exist: #{color(file, :bold)}" unless File.exist? file
|
16
|
+
error "cannot read #{color(file, :bold)}" unless File.readable? file
|
17
|
+
content = File.read(file)
|
18
|
+
else
|
19
|
+
debug "reading stdin"
|
20
|
+
file = 'STDIN'
|
21
|
+
content = $stdin.read
|
22
|
+
end
|
23
|
+
|
24
|
+
lint = session.lint(content)
|
25
|
+
|
26
|
+
unless quiet?
|
27
|
+
if lint.ok?
|
28
|
+
say "valid", color("Hooray, #{file} looks %s :)", :success)
|
29
|
+
else
|
30
|
+
say "Warnings for #{color(file, :info)}:"
|
31
|
+
lint.warnings.each do |warning|
|
32
|
+
say color('[x]', [:red, :bold]) + " "
|
33
|
+
if warning.key.any?
|
34
|
+
say [
|
35
|
+
color('in ', :info),
|
36
|
+
color(warning.key.join('.'), [:info, :bold, :underline]),
|
37
|
+
color(' section:', :info), ' '
|
38
|
+
].join
|
39
|
+
end
|
40
|
+
say warning.message.gsub(/"(.*?)"/) { color($1, [:info, :important]) }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
exit 1 if lint.warnings? and exit_code?
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Travis
|
2
|
+
module Client
|
3
|
+
class LintResult
|
4
|
+
Warning = Struct.new(:key, :message)
|
5
|
+
attr_accessor :warnings
|
6
|
+
|
7
|
+
def initialize(payload)
|
8
|
+
@warnings = []
|
9
|
+
payload = payload['lint'] if payload['lint']
|
10
|
+
|
11
|
+
Array(payload['warnings']).each do |warning|
|
12
|
+
@warnings << Warning.new(warning['key'], warning['message'])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def warnings?
|
17
|
+
warnings.any?
|
18
|
+
end
|
19
|
+
|
20
|
+
def ok?
|
21
|
+
!warnings?
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/travis/version.rb
CHANGED
data/travis.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
# general infos
|
4
4
|
s.name = "travis"
|
5
|
-
s.version = "1.6.
|
5
|
+
s.version = "1.6.14"
|
6
6
|
s.description = "CLI and Ruby client library for Travis CI"
|
7
7
|
s.homepage = "https://github.com/travis-ci/travis.rb"
|
8
8
|
s.summary = "Travis CI client"
|
@@ -137,6 +137,7 @@ Gem::Specification.new do |s|
|
|
137
137
|
"lib/travis/cli/help.rb",
|
138
138
|
"lib/travis/cli/history.rb",
|
139
139
|
"lib/travis/cli/init.rb",
|
140
|
+
"lib/travis/cli/lint.rb",
|
140
141
|
"lib/travis/cli/login.rb",
|
141
142
|
"lib/travis/cli/logout.rb",
|
142
143
|
"lib/travis/cli/logs.rb",
|
@@ -193,6 +194,7 @@ Gem::Specification.new do |s|
|
|
193
194
|
"lib/travis/client/entity.rb",
|
194
195
|
"lib/travis/client/error.rb",
|
195
196
|
"lib/travis/client/job.rb",
|
197
|
+
"lib/travis/client/lint_result.rb",
|
196
198
|
"lib/travis/client/listener.rb",
|
197
199
|
"lib/travis/client/methods.rb",
|
198
200
|
"lib/travis/client/namespace.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.14
|
4
|
+
version: 1.6.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -46,200 +46,200 @@ dependencies:
|
|
46
46
|
name: faraday
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- - ~>
|
49
|
+
- - "~>"
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0.9'
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- - ~>
|
56
|
+
- - "~>"
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0.9'
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: faraday_middleware
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - ~>
|
63
|
+
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0.9'
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.9.1
|
69
69
|
type: :runtime
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.9'
|
76
|
-
- -
|
76
|
+
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 0.9.1
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: highline
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- - ~>
|
83
|
+
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '1.6'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - ~>
|
90
|
+
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '1.6'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: backports
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
102
|
version_requirements: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- -
|
104
|
+
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: gh
|
109
109
|
requirement: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - ~>
|
111
|
+
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0.13'
|
114
114
|
type: :runtime
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - ~>
|
118
|
+
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0.13'
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: launchy
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- - ~>
|
125
|
+
- - "~>"
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '2.1'
|
128
128
|
type: :runtime
|
129
129
|
prerelease: false
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- - ~>
|
132
|
+
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '2.1'
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: pry
|
137
137
|
requirement: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- - <
|
139
|
+
- - "<"
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0.10'
|
142
|
-
- - ~>
|
142
|
+
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0.9'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- - <
|
149
|
+
- - "<"
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0.10'
|
152
|
-
- - ~>
|
152
|
+
- - "~>"
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0.9'
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: typhoeus
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
|
-
- - ~>
|
159
|
+
- - "~>"
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0.6'
|
162
|
-
- -
|
162
|
+
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: 0.6.8
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
|
-
- - ~>
|
169
|
+
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: '0.6'
|
172
|
-
- -
|
172
|
+
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: 0.6.8
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
176
|
name: pusher-client
|
177
177
|
requirement: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- - ~>
|
179
|
+
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0.4'
|
182
182
|
type: :runtime
|
183
183
|
prerelease: false
|
184
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
185
|
requirements:
|
186
|
-
- - ~>
|
186
|
+
- - "~>"
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0.4'
|
189
189
|
- !ruby/object:Gem::Dependency
|
190
190
|
name: addressable
|
191
191
|
requirement: !ruby/object:Gem::Requirement
|
192
192
|
requirements:
|
193
|
-
- - ~>
|
193
|
+
- - "~>"
|
194
194
|
- !ruby/object:Gem::Version
|
195
195
|
version: '2.3'
|
196
196
|
type: :runtime
|
197
197
|
prerelease: false
|
198
198
|
version_requirements: !ruby/object:Gem::Requirement
|
199
199
|
requirements:
|
200
|
-
- - ~>
|
200
|
+
- - "~>"
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: '2.3'
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
204
|
name: rspec
|
205
205
|
requirement: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
|
-
- - ~>
|
207
|
+
- - "~>"
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '2.12'
|
210
210
|
type: :development
|
211
211
|
prerelease: false
|
212
212
|
version_requirements: !ruby/object:Gem::Requirement
|
213
213
|
requirements:
|
214
|
-
- - ~>
|
214
|
+
- - "~>"
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '2.12'
|
217
217
|
- !ruby/object:Gem::Dependency
|
218
218
|
name: sinatra
|
219
219
|
requirement: !ruby/object:Gem::Requirement
|
220
220
|
requirements:
|
221
|
-
- - ~>
|
221
|
+
- - "~>"
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '1.3'
|
224
224
|
type: :development
|
225
225
|
prerelease: false
|
226
226
|
version_requirements: !ruby/object:Gem::Requirement
|
227
227
|
requirements:
|
228
|
-
- - ~>
|
228
|
+
- - "~>"
|
229
229
|
- !ruby/object:Gem::Version
|
230
230
|
version: '1.3'
|
231
231
|
- !ruby/object:Gem::Dependency
|
232
232
|
name: rack-test
|
233
233
|
requirement: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
|
-
- - ~>
|
235
|
+
- - "~>"
|
236
236
|
- !ruby/object:Gem::Version
|
237
237
|
version: '0.6'
|
238
238
|
type: :development
|
239
239
|
prerelease: false
|
240
240
|
version_requirements: !ruby/object:Gem::Requirement
|
241
241
|
requirements:
|
242
|
-
- - ~>
|
242
|
+
- - "~>"
|
243
243
|
- !ruby/object:Gem::Version
|
244
244
|
version: '0.6'
|
245
245
|
description: CLI and Ruby client library for Travis CI
|
@@ -334,6 +334,7 @@ files:
|
|
334
334
|
- lib/travis/cli/help.rb
|
335
335
|
- lib/travis/cli/history.rb
|
336
336
|
- lib/travis/cli/init.rb
|
337
|
+
- lib/travis/cli/lint.rb
|
337
338
|
- lib/travis/cli/login.rb
|
338
339
|
- lib/travis/cli/logout.rb
|
339
340
|
- lib/travis/cli/logs.rb
|
@@ -390,6 +391,7 @@ files:
|
|
390
391
|
- lib/travis/client/entity.rb
|
391
392
|
- lib/travis/client/error.rb
|
392
393
|
- lib/travis/client/job.rb
|
394
|
+
- lib/travis/client/lint_result.rb
|
393
395
|
- lib/travis/client/listener.rb
|
394
396
|
- lib/travis/client/methods.rb
|
395
397
|
- lib/travis/client/namespace.rb
|
@@ -456,14 +458,14 @@ require_paths:
|
|
456
458
|
- lib
|
457
459
|
required_ruby_version: !ruby/object:Gem::Requirement
|
458
460
|
requirements:
|
459
|
-
- -
|
461
|
+
- - ">="
|
460
462
|
- !ruby/object:Gem::Version
|
461
463
|
version: '0'
|
462
464
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
463
465
|
requirements:
|
464
|
-
- -
|
466
|
+
- - ">="
|
465
467
|
- !ruby/object:Gem::Version
|
466
|
-
version:
|
468
|
+
version: '0'
|
467
469
|
requirements: []
|
468
470
|
rubyforge_project:
|
469
471
|
rubygems_version: 2.2.2
|