travis 1.10.1.travis.1311.9 → 1.11.0

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
  SHA256:
3
- metadata.gz: cf07de268961f2fc5a04f64ca4d060de16c3854c4144f178d9d452341b4f8a0d
4
- data.tar.gz: d40f634af879d427e99f3d749fd201f7f999b5a62488d8523517d55da390b046
3
+ metadata.gz: bd56aab41cadf71c5d3e17baa3e32ef92c12b47df8433885cd93bfcdeba0a3ac
4
+ data.tar.gz: 31dfb62475ae626176823ce90347915da42e601c44f570cac6ee338bb4a923c1
5
5
  SHA512:
6
- metadata.gz: 38799cdd393e5c84733c389c2748f347b5692f72512d12c8b466af74c25c8af1055cce545978f043f982abc6cffa011ccc268f08e66ea821162be4d601125a43
7
- data.tar.gz: b06eabf2b7f4efcdc557747a04d5f2d4cb9bc288f0c1e2456d44a93d95fede0ff2465145a713c8c738bd7ac9264ae9e1786352f95087bb481ea0ae4fe55f91c1
6
+ metadata.gz: 1f3035ba8ccbf3031a84796f3d16ca3f88d93512a7250b71a3d6f773e19b95b4662ccf96ee350331b89403c437ce98f1ae3f921cb4ec2249f6529a13c51eb258
7
+ data.tar.gz: c8277df2456d7e9386a6241804e91078a378014804073efaed2c5f6c91d75db8fe51ab4dd180f74cfe3242b4c4f3d55ccd0f04b6a2dbd89e2544b595e7fbfcc6
data/README.md CHANGED
@@ -233,22 +233,11 @@ default API endpoint dropped (was https://api.travis-ci.com/)
233
233
  The `login` command will, well, log you in. That way, all subsequent commands that run against the same endpoint will be authenticated.
234
234
 
235
235
  ``` console
236
- $ travis login
237
- We need your GitHub login to identify you.
238
- This information will not be sent to Travis CI, only to GitHub.
239
- The password will not be displayed.
240
-
241
- Try running with --github-token or --auto if you don't want to enter your password anyway.
242
-
243
- Username: rkh
244
- Password: *******************
245
-
246
- Successfully logged in!
236
+ $ travis login --pro --github-token ghp_********
237
+ Successfully logged in as rkh!
247
238
  ```
248
239
 
249
- As you can see above, it will ask you for your GitHub user name and password, but not send these to Travis CI. Instead, it will use them to create a GitHub API token, show the token to Travis, which then on its own checks if you really are who you say you are, and gives you an access token for the Travis API in return. The client will then delete the GitHub token again, just to be sure. But don't worry, all that happens under the hood and fully automatic.
250
-
251
- If you don't want it to send your credentials to GitHub, you can create a GitHub token on your own and supply it via `--github-token`. In that case, the client will not delete the GitHub token (as it can't, it needs your password to do this). Travis CI will not store the token, though - after all, it already should have a valid token for you in the database.
240
+ You need to use a GitHub token and supply it via `--github-token`. Travis CI will not store the token, though - after all, it already should have a valid token for you in the database.
252
241
  *NOTE*: When creating a GitHub token, see [GitHub Permissions used by travis-ci.com](https://docs.travis-ci.com/user/github-oauth-scopes/#travis-ci-for-private-projects) or [GitHub Permissions used by travis-ci.org](https://docs.travis-ci.com/user/github-oauth-scopes/#travis-ci-for-open-source-projects). The token permissions are dependent on use of travis-ci.com or travis-ci.org and not if they are public or private repositories.
253
242
 
254
243
  A third option is for the really lazy: `--auto`. In this mode the client will try to find a GitHub token for you and just use that. This will only work if you have a [global GitHub token](https://help.github.com/articles/git-over-https-using-oauth-token) stored in your [.netrc](http://blogdown.io/c4d42f87-80dd-45d5-8927-4299cbdf261c/posts/574baa68-f663-4dcf-88b9-9d41310baf2f). If you haven't heard of this, it's worth looking into in general. Again: Travis CI will not store that token.
@@ -1560,26 +1549,6 @@ puts "Hello #{Travis::User.current.name}!"
1560
1549
 
1561
1550
  Travis CI will not store that token.
1562
1551
 
1563
- It also ships with a tool for generating a GitHub token from a user name and password via the GitHub API:
1564
-
1565
- ``` ruby
1566
- require 'travis'
1567
- require 'travis/tools/github'
1568
-
1569
- # drop_token will make the token a temporary one
1570
- github = Travis::Tools::Github.new(drop_token: true) do |g|
1571
- g.ask_login = -> { print("GitHub login: "); gets }
1572
- g.ask_password = -> { print("Password: "); gets }
1573
- g.ask_otp = -> { print("Two-factor token: "); gets }
1574
- end
1575
-
1576
- github.with_token do |token|
1577
- Travis.github_auth(token)
1578
- end
1579
-
1580
- puts "Hello #{Travis::User.current.name}!"
1581
- ```
1582
-
1583
1552
  There is also `travis/auto_login`, which will try to read the CLI configuration or .netrc for a Travis CI or GitHub token to authenticate with automatically:
1584
1553
 
1585
1554
  ``` ruby
@@ -2022,6 +1991,12 @@ Now make sure everything is working:
2022
1991
 
2023
1992
  See also [Note on Ubuntu](#ubuntu) below.
2024
1993
 
1994
+ ### Note on Ruby 2.3
1995
+
1996
+ For Ruby 2.3.x, be sure to have a compatible version of `faraday` installed; e.g.,
1997
+
1998
+ $ gem install faraday -v 1.0.1
1999
+
2025
2000
  ### Development Version
2026
2001
 
2027
2002
  You can also install the development version via RubyGems:
@@ -2078,8 +2053,23 @@ You can of course always compile Ruby from source, though then you are left with
2078
2053
 
2079
2054
  If you have the old `travis-cli` gem installed, you should `gem uninstall travis-cli`, just to be sure, as it ships with an executable that is also named `travis`.
2080
2055
 
2056
+ #### `uninitialized constant Faraday::Error::ConnectionFailed`
2057
+
2058
+ You might see this error message if you have Typhoeus version prior to version 1.4.0
2059
+ and Faraday 1.0 and up.
2060
+ You can eradicate this problem by either:
2061
+
2062
+ 1. Update Typhoeus to version 1.4.0 or later
2063
+ 1. Remove typhoeus entirely
2064
+
2065
+ See https://github.com/travis-ci/travis.rb/issues/768#issuecomment-700220351 for more details.
2066
+
2081
2067
  ## Version History
2082
2068
 
2069
+ ### 1.10.1
2070
+
2071
+ * Fix `travis monitor` command https://github.com/travis-ci/travis.rb/pull/770
2072
+
2083
2073
  ### 1.10.0 (September 22, 2020)
2084
2074
 
2085
2075
  * Requires Ruby 2.3.0 or later (2.6.0 or later is recommended)
@@ -2091,7 +2081,7 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
2091
2081
 
2092
2082
  ### 1.9.1 (May 19, 2020)
2093
2083
 
2094
- * Fix `--no-interactive` flag in `encrypt` and `encryt-file` commands https://github.com/travis-ci/travis.rb/pull/738
2084
+ * Fix `--no-interactive` flag in `encrypt` and `encrypt-file` commands https://github.com/travis-ci/travis.rb/pull/738
2095
2085
  * Display commit SHA in `show` https://github.com/travis-ci/travis.rb/pull/739
2096
2086
  * Display more helpful message when GitHub token given by `--github-token` is
2097
2087
  deficient https://github.com/travis-ci/travis.rb/issues/708
@@ -2182,7 +2172,7 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
2182
2172
  * Fix SSL verification issue on OS X Yosemite and certain Linux setups.
2183
2173
  * Be more forgiving with outdated API version (Enterprise).
2184
2174
  * Better handling of multibyte characters in archived logs.
2185
- * Use more restricitve permissions for the config file.
2175
+ * Use more restrictive permissions for the config file.
2186
2176
 
2187
2177
  ### 1.7.1 (August 9, 2014)
2188
2178
 
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; requires `pry`" disable:"disables a project" enable:"enables a project" encrypt:"encrypts values for the .travis.yml" encrypt-file:"encrypts a file and adds decryption steps to .travis.yml" endpoint:"displays or changes the API endpoint" env:"show or modify build environment variables" help:"helps you out when in dire need of information" history:"displays a project's 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" sshkey:"checks, updates or deletes an SSH key" 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; requires `pry`" disable:"disables a project" enable:"enables a project" encrypt:"encrypts values for the .travis.yml" encrypt-file:"encrypts a file and adds decryption steps to .travis.yml" endpoint:"displays or changes the API endpoint" env:"show or modify build environment variables" help:"helps you out when in dire need of information" history:"displays a project's 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" 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" sshkey:"checks, updates or deletes an SSH key" 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=(anynines:"automatic deployment to anynines" appfog:"automatic deployment to Appfog" artifacts:"automatic artifact shipping to S3" biicode:"automatic publish to biicode" cloudcontrol:"automatic deployment to cloudControl" cloudfiles:"automatic pushing to Rackspace Cloud Files" cloudfoundry:"automatic deployment to Cloud Foundry" cloud66:"Automatic deployment to Cloud 66" codedeploy:"triggering a new deployment on Amazon CodeDeploy" deis:"automatic deployment to a deis app" divshot:"deployment to Divshot.io" elasticbeanstalk:"deployment to AWS Elastic Beanstalk" engineyard:"automatic deployment to Engine Yard" gcs:"automatic pushing to Google Cloud Storage" 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" s3:"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" maximum_number_of_builds:"Maximum number of concurrent builds" auto_cancel_pushes:"Cancel older push builds that are not yet running" auto_cancel_pull_requests:"Cancel older pull request builds that are not yet running") _describe -t common-commands 'common commands' list; }
26
26
  _travis_init() { list=(bash:'initialize bash project' c:'initialize c project' clojure:'initialize clojure project' cpp:'initialize cpp project' elixir:'initialize elixir 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; }
@@ -44,7 +44,6 @@ if type compdef 1>/dev/null 2>/dev/null; then
44
44
  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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "-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;;
45
45
  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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" '*:file:_files' && return 0;;
46
46
  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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" "-R[like --repo, but remembers value for current directory]" "--store-repo[like --repo, but remembers value for current directory]" "-d[remove logs]" "--delete[remove logs]" "-f[do not ask user to confirm deleting the logs]" "--force[do not ask user to confirm deleting the logs]" "--stream[only print current logs, do not stream]" "--no-stream[only print current logs, do not stream]" '*:file:_files' && return 0;;
47
- monitor) _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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "-m[Only monitor my own repositories]" "--my-repos[Only monitor my own repositories]" "-r[monitor given repository (can be used more than once)]" "--repo[monitor given repository (can be used more than once)]" "-n[send out desktop notifications (optional type: osx, growl, libnotify)]" "--notify[send out desktop notifications (optional type: osx, growl, libnotify)]" "--no-notify[send out desktop notifications (optional type: osx, growl, libnotify)]" "-b[only monitor builds, not jobs]" "--builds[only monitor builds, not jobs]" "-p[monitor push events]" "--push[monitor push events]" "-P[monitor pull request events]" "--pull[monitor pull request events]" '*:file:_files' && return 0;;
48
47
  open) _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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" "-R[like --repo, but remembers value for current directory]" "--store-repo[like --repo, but remembers value for current directory]" "-g[Open the corresponding project, compare view or pull request on GitHub]" "--github[Open the corresponding project, compare view or pull request on GitHub]" "-p[Print out the URL instead of opening it in a browser]" "--print[Print out the URL instead of opening it in a browser]" '*:file:_files' && return 0;;
49
48
  pubkey) _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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "-r[repository to use (will try to detect from current git clone)]" "--repo[repository to use (will try to detect from current git clone)]" "-R[like --repo, but remembers value for current directory]" "--store-repo[like --repo, but remembers value for current directory]" "-p[encode in format used by pem]" "--pem[encode in format used by pem]" "-f[display fingerprint]" "--fingerprint[display fingerprint]" '*:file:_files' && return 0;;
50
49
  raw) _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/']" "--com[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]" "--debug-http[show HTTP(S) exchange]" "-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. If omitted, use Typhoeus if it is installed, and Net::HTTP otherwise. See https://lostisland.github.io/faraday/adapters/ for more info]" "--json[display as json]" "--no-json[display as json]" '*:file:_files' && return 0;;
@@ -67,7 +66,7 @@ if type compdef 1>/dev/null 2>/dev/null; then
67
66
  elif type compctl 1>/dev/null 2>/dev/null; then
68
67
  compctl -K _travis travis
69
68
  _travis() { read -cA words && _travis_complete $((${#words} - 1)) "${words[2]}"; }
70
- _travis_commands() { reply=("accounts" "branches" "cache" "cancel" "console" "disable" "enable" "encrypt" "encrypt-file" "endpoint" "env" "help" "history" "init" "lint" "login" "logout" "logs" "monitor" "open" "pubkey" "raw" "report" "repos" "requests" "restart" "settings" "setup" "show" "sshkey" "status" "sync" "token" "version" "whatsup" "whoami"); }
69
+ _travis_commands() { reply=("accounts" "branches" "cache" "cancel" "console" "disable" "enable" "encrypt" "encrypt-file" "endpoint" "env" "help" "history" "init" "lint" "login" "logout" "logs" "open" "pubkey" "raw" "report" "repos" "requests" "restart" "settings" "setup" "show" "sshkey" "status" "sync" "token" "version" "whatsup" "whoami"); }
71
70
  _travis_setup() { reply=("anynines" "appfog" "artifacts" "biicode" "cloudcontrol" "cloudfiles" "cloudfoundry" "cloud66" "codedeploy" "deis" "divshot" "elasticbeanstalk" "engineyard" "gcs" "hackage" "heroku" "modulus" "npm" "ninefold" "nodejitsu" "openshift" "opsworks" "pypi" "releases" "rubygems" "s3" "sauce_connect"); }
72
71
  _travis_settings() { reply=(builds_only_with_travis_yml build_pushes build_pull_requests maximum_number_of_builds auto_cancel_pushes auto_cancel_pull_requests); }
73
72
  _travis_init() { reply=("bash" "c" "clojure" "cpp" "elixir" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"); }
@@ -91,7 +90,6 @@ elif type compctl 1>/dev/null 2>/dev/null; then
91
90
  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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--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");;
92
91
  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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter");;
93
92
  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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter" "--repo" "-r" "--store-repo" "-R" "--delete" "-d" "--force" "-f" "--stream" "--no-stream");;
94
- monitor) 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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter" "--my-repos" "-m" "--repo" "-r" "--notify" "--no-notify" "-n" "--builds" "-b" "--push" "-p" "--pull" "-P");;
95
93
  open) 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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter" "--repo" "-r" "--store-repo" "-R" "--github" "-g" "--print" "-p");;
96
94
  pubkey) 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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter" "--repo" "-r" "--store-repo" "-R" "--pem" "-p" "--fingerprint" "-f");;
97
95
  raw) 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" "--com" "--org" "--staging" "--token" "-t" "--debug" "--debug-http" "--enterprise" "-X" "--adapter" "--json" "--no-json");;
@@ -114,7 +112,7 @@ elif type compctl 1>/dev/null 2>/dev/null; then
114
112
  elif type complete 1>/dev/null 2>/dev/null; then
115
113
  complete -F _travis travis
116
114
  _travis() { _travis_complete "$COMP_CWORD" "${COMP_WORDS[1]}"; }
117
- _travis_commands() { COMPREPLY=( $(compgen -W "accounts branches cache cancel console disable enable encrypt encrypt-file endpoint env help history init lint login logout logs monitor open pubkey raw report repos requests restart settings setup show sshkey status sync token version whatsup whoami" -- "${COMP_WORDS[COMP_CWORD]}") ); }
115
+ _travis_commands() { COMPREPLY=( $(compgen -W "accounts branches cache cancel console disable enable encrypt encrypt-file endpoint env help history init lint login logout logs open pubkey raw report repos requests restart settings setup show sshkey status sync token version whatsup whoami" -- "${COMP_WORDS[COMP_CWORD]}") ); }
118
116
  _travis_setup() { COMPREPLY=( $(compgen -W "anynines appfog artifacts biicode cloudcontrol cloudfiles cloudfoundry cloud66 codedeploy deis divshot elasticbeanstalk engineyard gcs hackage heroku modulus npm ninefold nodejitsu openshift opsworks pypi releases rubygems s3 sauce_connect" -- "${COMP_WORDS[COMP_CWORD]}") ); }
119
117
  _travis_settings() { COMPREPLY=( $(compgen -W "builds_only_with_travis_yml build_pushes build_pull_requests maximum_number_of_builds auto_cancel_pushes auto_cancel_pull_requests" -- "${COMP_WORDS[COMP_CWORD]}") ); }
120
118
  _travis_init() { COMPREPLY=( $(compgen -W ""bash" "c" "clojure" "cpp" "elixir" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"" -- "${COMP_WORDS[COMP_CWORD]}") ); }
@@ -139,7 +137,6 @@ elif type complete 1>/dev/null 2>/dev/null; then
139
137
  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 --com --org --staging --token -t --debug --debug-http --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";;
140
138
  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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter";;
141
139
  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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter --repo -r --store-repo -R --delete -d --force -f --stream --no-stream";;
142
- monitor) 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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter --my-repos -m --repo -r --notify --no-notify -n --builds -b --push -p --pull -P";;
143
140
  open) 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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter --repo -r --store-repo -R --github -g --print -p";;
144
141
  pubkey) 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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter --repo -r --store-repo -R --pem -p --fingerprint -f";;
145
142
  raw) 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 --com --org --staging --token -t --debug --debug-http --enterprise -X --adapter --json --no-json";;
data/examples/pro_auth.rb CHANGED
@@ -2,11 +2,11 @@ require 'travis/pro'
2
2
  require 'travis/tools/github'
3
3
  require 'highline/import' # so we can hide the password
4
4
 
5
+ github_token = ask("GitHub token: ")
6
+
5
7
  # Set up GitHub tool for doing the login handshake.
6
8
  github = Travis::Tools::Github.new(drop_token: true) do |g|
7
- g.ask_login = -> { ask("GitHub login: ") }
8
- g.ask_password = -> { ask("Password: ") { |q| q.echo = "*" } }
9
- g.ask_otp = -> { ask("Two-factor token: ") }
9
+ g.github_token = github_token
10
10
  end
11
11
 
12
12
  # Create temporary GitHub token and use it to authenticate against Travis CI.
@@ -16,7 +16,7 @@ end
16
16
 
17
17
  # Look up the current user.
18
18
  user = Travis::Pro::User.current
19
- puts "Hello #{user.name}!"
19
+ puts "Hello #{user.login}!"
20
20
 
21
21
  # Display repositories the user is a member of.
22
22
  repos = Travis::Pro::Repository.find_all(member: user.login)
@@ -15,7 +15,7 @@ module Travis
15
15
  def setup
16
16
  super
17
17
  authenticate
18
- error "not allowed to access environment variables for #{color(repository.slug, :bold)}" unless repository.admin?
18
+ error "not allowed to access environment variables for #{color(repository.slug, :bold)}" unless repository.push?
19
19
  end
20
20
 
21
21
  def set(name, value)
@@ -63,4 +63,4 @@ module Travis
63
63
  end
64
64
  end
65
65
  end
66
- end
66
+ end
@@ -10,10 +10,6 @@ module Travis
10
10
  description "authenticates against the API and stores the token"
11
11
  on('-g', '--github-token TOKEN', 'identify by GitHub token')
12
12
  on('-T', '--auto-token', 'try to figure out who you are automatically (might send another apps token to Travis, token will not be stored)')
13
- on('-p', '--auto-password', 'try to load password from OSX keychain (will not be stored)')
14
- on('-a', '--auto', 'shorthand for --auto-token --auto-password') { |c| c.auto_token = c.auto_password = true }
15
- on('-u', '--user LOGIN', 'user to log in as') { |c,n| c.user_login = n }
16
- on('-M', '--no-manual', 'do not use interactive login')
17
13
  on('--list-github-token', 'instead of actually logging in, list found GitHub tokens')
18
14
  on('--skip-token-check', 'don\'t verify the token with github')
19
15
 
@@ -55,17 +51,11 @@ module Travis
55
51
  load_gh
56
52
  Tools::Github.new(session.config['github']) do |g|
57
53
  g.note = "temporary token to identify with the travis command line client against #{api_endpoint}"
58
- g.manual_login = no_manual.nil?
59
54
  g.explode = explode?
60
55
  g.github_token = github_token
61
56
  g.auto_token = auto_token
62
- g.auto_password = auto_password
63
- g.github_login = user_login
64
57
  g.check_token = !skip_token_check?
65
58
  g.drop_token = !list_github_token
66
- g.ask_login = proc { ask("Username: ") }
67
- g.ask_password = proc { |user| ask("Password for #{user}: ") { |q| q.echo = "*" } }
68
- g.ask_otp = proc { |user| ask("Two-factor authentication code for #{user}: ") }
69
59
  g.login_header = proc { login_header }
70
60
  g.debug = proc { |log| debug(log) }
71
61
  g.after_tokens = proc { g.explode = true and error("no suitable github token found") }
@@ -74,12 +64,9 @@ module Travis
74
64
  end
75
65
 
76
66
  def login_header
77
- say "We need your #{color("GitHub login", :important)} to identify you."
78
- say "This information will #{color("not be sent to Travis CI", :important)}, only to #{color(github_endpoint.host, :info)}."
79
- say "The password will not be displayed."
80
- empty_line
81
- say "Try running with #{color("--github-token", :info)} or #{color("--auto", :info)} if you don't want to enter your password anyway."
82
- empty_line
67
+ say "GitHub deprecated its Authorizations API exchanging a password for a token."
68
+ say "Please visit https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations for more information."
69
+ say "Try running with #{color("--github-token", :info)} or #{color("--auto-token", :info)} ."
83
70
  end
84
71
  end
85
72
  end
@@ -6,6 +6,7 @@ module Travis
6
6
  class RepoCommand < ApiCommand
7
7
  GIT_REGEX = %r{/?(.*/.+?)(\.git)?$}
8
8
  TRAVIS = %r{^https://(staging-)?api\.travis-ci\.(org|com)}
9
+ on('-g', '--github-token TOKEN', 'identify by GitHub token')
9
10
  on('-r', '--repo SLUG', 'repository to use (will try to detect from current git clone)') do |c, slug|
10
11
  c.slug = slug
11
12
  c.error "SLUG should be of the form OWNER/REPO" unless slug.split('/').compact.size == 2
@@ -10,6 +10,10 @@ module Travis
10
10
  def run
11
11
  deploy 'releases' do |config|
12
12
  github.with_token { |t| config['api_key'] = t }
13
+ if config['api_key'].nil?
14
+ raise Travis::Client::GitHubLoginFailed, 'all GitHub tokens given were invalid'
15
+ end
16
+
13
17
  config['file'] = ask("File to Upload: ").to_s
14
18
  end
15
19
  end
@@ -19,9 +23,7 @@ module Travis
19
23
  load_gh
20
24
  Tools::Github.new(session.config['github']) do |g|
21
25
  g.drop_token = false
22
- g.ask_login = proc { ask("Username: ") }
23
- g.ask_password = proc { |user| ask("Password for #{user}: ") { |q| q.echo = "*" } }
24
- g.ask_otp = proc { |user| ask("Two-factor authentication code for #{user}: ") }
26
+ g.github_token = github_token
25
27
  g.debug = proc { |log| debug(log) }
26
28
  g.after_tokens = proc { g.explode = true and error("no suitable github token found") }
27
29
  g.scopes = org? ? ['public_repo'] : ['repo']
@@ -32,4 +34,4 @@ module Travis
32
34
  end
33
35
  end
34
36
  end
35
- end
37
+ end
@@ -13,6 +13,7 @@ module Travis
13
13
  on '-c', '--check', 'set exit code depending on key existing'
14
14
  on '-g', '--generate', 'generate SSH key and set up for given GitHub user'
15
15
  on '-p', '--passphrase PASSPHRASE', 'pass phrase to decrypt with when using --upload'
16
+ on '-g', '--github-token TOKEN', 'identify by GitHub token'
16
17
 
17
18
  def_delegators :repository, :ssh_key
18
19
 
@@ -51,27 +52,34 @@ module Travis
51
52
  end
52
53
 
53
54
  def generate_key
54
- github.with_basic_auth do |gh|
55
- login = gh['user']['login']
56
- check_access(gh)
57
- empty_line
55
+ access_token = nil
56
+ github.with_token do |token|
57
+ access_token = github_auth(token)
58
+ end
59
+ session.access_token = nil
60
+ unless access_token
61
+ raise Travis::Client::GitHubLoginFailed, "all GitHub tokens given were invalid"
62
+ end
63
+ gh = GH.with(token: github_token)
64
+ login = gh['user']['login']
65
+ check_access(gh)
66
+ empty_line
58
67
 
59
- say "Generating RSA key."
60
- private_key = Tools::SSLKey.generate_rsa
61
- self.description ||= "key for fetching dependencies for #{slug} via #{login}"
68
+ say "Generating RSA key."
69
+ private_key = Tools::SSLKey.generate_rsa
70
+ self.description ||= "key for fetching dependencies for #{slug} via #{login}"
62
71
 
63
- say "Uploading public key to GitHub."
64
- gh.post("/user/keys", :title => "#{description} (Travis CI)", :key => Tools::SSLKey.rsa_ssh(private_key.public_key))
72
+ say "Uploading public key to GitHub."
73
+ gh.post("/user/keys", :title => "#{description} (Travis CI)", :key => Tools::SSLKey.rsa_ssh(private_key.public_key))
65
74
 
66
- say "Uploading private key to Travis CI."
67
- ssh_key.update(:value => private_key.to_s, :description => description)
75
+ say "Uploading private key to Travis CI."
76
+ ssh_key.update(:value => private_key.to_s, :description => description)
68
77
 
69
- empty_line
70
- say "You can store the private key to reuse it for other repositories (travis sshkey --upload FILE)."
71
- if agree("Store private key? ") { |q| q.default = "no" }
72
- path = ask("Path: ") { |q| q.default = "id_travis_rsa" }
73
- File.write(path, private_key.to_s)
74
- end
78
+ empty_line
79
+ say "You can store the private key to reuse it for other repositories (travis sshkey --upload FILE)."
80
+ if agree("Store private key? ") { |q| q.default = "no" }
81
+ path = ask("Path: ") { |q| q.default = "id_travis_rsa" }
82
+ File.write(path, private_key.to_s)
75
83
  end
76
84
  end
77
85
 
@@ -97,9 +105,7 @@ module Travis
97
105
  Tools::Github.new(session.config['github']) do |g|
98
106
  g.note = "token for fetching dependencies for #{slug} (Travis CI)"
99
107
  g.explode = explode?
100
- g.ask_login = proc { ask("Username: ") }
101
- g.ask_password = proc { |user| ask("Password for #{user}: ") { |q| q.echo = "*" } }
102
- g.ask_otp = proc { |user| ask("Two-factor authentication code for #{user}: ") }
108
+ g.github_token = github_token
103
109
  g.login_header = proc { login_header }
104
110
  g.debug = proc { |log| debug(log) }
105
111
  g.after_tokens = proc { g.explode = true and error("no suitable github token found") }
@@ -108,10 +114,9 @@ module Travis
108
114
  end
109
115
 
110
116
  def login_header
111
- say "We need the #{color("GitHub login", :important)} for the account you want to add the key to."
112
- say "This information will #{color("not be sent to Travis CI", :important)}, only to #{color(github_endpoint.host, :info)}."
113
- say "The password will not be displayed."
114
- empty_line
117
+ say "GitHub deprecated its Authorizations API exchanging a password for a token."
118
+ say "Please visit https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations for more information."
119
+ say "Try running with #{color("--github-token", :info)} or #{color("--auto-token", :info)} ."
115
120
  end
116
121
  end
117
122
  end
@@ -24,7 +24,6 @@ module Travis
24
24
  def github
25
25
  @github ||= Tools::Github.new(session.config['github']) do |g|
26
26
  g.explode = true
27
- g.manual_login = false
28
27
  g.auto_token = @auto_token
29
28
  g.after_tokens = proc { raise NoTokenError, "no suitable github token found" } if @raise
30
29
  end
@@ -10,19 +10,15 @@ module Travis
10
10
  GITHUB_API = 'api.github.com'
11
11
  GITHUB_HOST = 'github.com'
12
12
 
13
- attr_accessor :api_url, :scopes, :github_token, :github_login, :drop_token, :callback, :explode, :after_tokens,
14
- :ask_login, :ask_password, :ask_otp, :login_header, :auto_token, :auto_password, :manual_login, :note,
15
- :netrc_path, :hub_path, :oauth_paths, :composer_path, :git_config_keys, :debug, :no_token, :check_token
13
+ attr_accessor :api_url, :scopes, :github_token, :drop_token, :callback, :explode, :after_tokens,
14
+ :login_header, :auto_token, :note,
15
+ :hub_path, :oauth_paths, :composer_path, :git_config_keys, :debug, :no_token, :check_token
16
16
 
17
17
  def initialize(options = nil)
18
18
  @check_token = true
19
- @manual_login = true
20
19
  @ask_login = proc { raise "ask_login callback not set" }
21
20
  @after_tokens = proc { }
22
- @ask_password = proc { |_| raise "ask_password callback not set" }
23
- @ask_otp = proc { |_| raise "ask_otp callback not set" }
24
21
  @debug = proc { |_| }
25
- @netrc_path = '~/.netrc'
26
22
  @hub_path = ENV['HUB_CONFIG'] || '~/.config/hub'
27
23
  @oauth_paths = ['~/.github-oauth-token']
28
24
  @composer_path = "~/.composer/config.json"
@@ -37,14 +33,6 @@ module Travis
37
33
  each_token { |t| break yield(t) }
38
34
  end
39
35
 
40
- def with_basic_auth(&block)
41
- user, password = ask_credentials
42
- basic_auth(user, password, true) do |gh, _|
43
- gh['user'] # so otp kicks in
44
- yield gh
45
- end
46
- end
47
-
48
36
  def each_token
49
37
  require 'gh' unless defined? GH
50
38
  possible_tokens { |t| yield(t) if acceptable?(t) }
@@ -61,7 +49,6 @@ module Travis
61
49
  return block[github_token] if github_token
62
50
 
63
51
  if auto_token
64
- netrc_tokens(&block)
65
52
  git_tokens(&block)
66
53
  hub_tokens(&block)
67
54
  oauth_file_tokens(&block)
@@ -70,41 +57,10 @@ module Travis
70
57
  composer_token(&block)
71
58
  end
72
59
 
73
- if auto_password
74
- possible_logins do |user, password|
75
- yield login(user, password, false)
76
- end
77
- end
78
-
79
- if manual_login
80
- user, password = ask_credentials
81
- yield login(user, password, true)
82
- end
83
-
84
- after_tokens.call
85
- end
86
-
87
- def ask_credentials
88
- login_header.call if login_header
89
- user = github_login || ask_login.call
90
- password = ask_password.arity == 0 ? ask_password.call : ask_password.call(user)
91
- [user, password]
92
- end
93
-
94
- def possible_logins(&block)
95
- netrc_logins(&block)
96
- hub_logins(&block)
97
- keychain_login(&block)
98
- end
99
-
100
- def netrc_tokens
101
- netrc.each do |entry|
102
- next unless entry["machine"] == api_host or entry["machine"] == host
103
- entry.values_at("token", "login", "password").each do |entry|
104
- next if entry.to_s.size != TOKEN_SIZE
105
- debug "found oauth token in netrc"
106
- yield entry
107
- end
60
+ if github_token || auto_token
61
+ after_tokens.call
62
+ elsif login_header
63
+ login_header.call
108
64
  end
109
65
  end
110
66
 
@@ -127,7 +83,6 @@ module Travis
127
83
 
128
84
  def hub_tokens
129
85
  hub.fetch(host, []).each do |entry|
130
- next if github_login and github_login != entry["user"]
131
86
  yield entry["oauth_token"] if entry["oauth_token"]
132
87
  end
133
88
  end
@@ -141,45 +96,6 @@ module Travis
141
96
  end
142
97
  end
143
98
 
144
- def netrc_logins
145
- netrc.each do |entry|
146
- next unless entry["machine"] == api_host or entry["machine"] == host
147
- next if github_login and github_login != entry["login"]
148
- yield entry["login"], entry["password"] if entry["login"] and entry["password"]
149
- end
150
- end
151
-
152
- def hub_logins
153
- hub.fetch(host, []).each do |entry|
154
- next if github_login and github_login != entry["user"]
155
- yield entry["user"], entry["password"] if entry["user"] and entry["password"]
156
- end
157
- end
158
-
159
- def keychain_login
160
- if github_login
161
- security(:internet, :w, "-s #{host} -a #{github_login}", "#{host} password for #{github_login}") do |password|
162
- yield github_login, password if password and not password.empty?
163
- end
164
- else
165
- security(:internet, :g, "-s #{host}", "#{host} login and password") do |data|
166
- username = data[/^\s+"acct"<blob>="(.*)"$/, 1].to_s
167
- password = data[/^password: "(.*)"$/, 1].to_s
168
- yield username, password unless username.empty? or password.empty?
169
- end
170
- end
171
- end
172
-
173
- def netrc
174
- file(netrc_path, []) do |contents|
175
- contents.scan(/^\s*(\S+)\s+(\S+)\s*$/).inject([]) do |mapping, (key, value)|
176
- mapping << {} if key == "machine"
177
- mapping.last[key] = value if mapping.last
178
- mapping
179
- end
180
- end
181
- end
182
-
183
99
  def hub
184
100
  file(hub_path, {}) do |contents|
185
101
  YAML.load(contents)
@@ -192,7 +108,6 @@ module Travis
192
108
 
193
109
  def github_for_mac_token(&block)
194
110
  command = '-s "github.com/mac"'
195
- command << " -a #{github_login}" if github_login
196
111
  security(:internet, :w, command, "GitHub for Mac token", &block) if host == 'github.com'
197
112
  end
198
113
 
@@ -205,52 +120,12 @@ module Travis
205
120
  api_url[%r{^(?:https?://)?([^/]+)}, 1]
206
121
  end
207
122
 
208
- def basic_auth(user, password, die = true, otp = nil, &block)
209
- gh = GH.with(:username => user, :password => password)
210
- with_otp(gh, user, otp, &block)
211
- rescue GH::Error => error
212
- raise gh_error(error) if die
213
- end
214
-
215
- def login(user, password, die = true, otp = nil)
216
- basic_auth(user, password, die, otp) do |gh, new_otp|
217
- reply = create_token(gh)
218
- auth_href = reply['_links']['self']['href']
219
- self.callback = proc { with_otp(gh, user, new_otp) { |g| g.delete(auth_href) } } if drop_token
220
- reply['token']
221
- end
222
- end
223
-
224
- def create_token(gh)
225
- gh.post('/authorizations', :scopes => scopes, :note => note)
226
- rescue GH::Error => error
227
- # token might already exist due to bug in earlier CLI version, we'll have to delete it first
228
- raise error unless error.info[:response_status] == 422 and error.info[:response_body].to_s =~ /already_exists/
229
- raise error unless reply = gh['/authorizations'].detect { |a| a['note'] == note }
230
- gh.delete(reply['_links']['self']['href'])
231
- retry
232
- end
233
-
234
- def with_otp(gh, user, otp, &block)
235
- gh = GH.with(gh.options.merge(:headers => { "X-GitHub-OTP" => otp })) if otp
236
- block.call(gh, otp)
237
- rescue GH::Error => error
238
- raise error unless error.info[:response_status] == 401 and error.info[:response_headers]['x-github-otp'].to_s =~ /required/
239
- otp = ask_otp.arity == 0 ? ask_otp.call : ask_otp.call(user)
240
- retry
241
- end
242
-
243
123
  def acceptable?(token)
244
124
  return true unless check_token
245
125
  gh = GH.with(:token => token)
246
126
  user = gh['user']
247
127
 
248
- if github_login and github_login != user['login']
249
- debug "token is not acceptable: identifies %p instead of %p" % [user['login'], github_login]
250
- false
251
- else
252
- true
253
- end
128
+ true
254
129
  rescue GH::Error => error
255
130
  debug "token is not acceptable: #{gh_error(error)}"
256
131
  false
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.10.0'
2
+ VERSION = '1.11.0'
3
3
  end
data/travis.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general info
4
4
  s.name = "travis"
5
- s.version = "1.10.0"
5
+ s.version = "1.11.0"
6
6
  s.required_ruby_version = ">= 2.3.0"
7
7
  s.description = "CLI and Ruby client library for Travis CI"
8
8
  s.homepage = "https://github.com/travis-ci/travis.rb"
@@ -12,24 +12,34 @@ Gem::Specification.new do |s|
12
12
 
13
13
  # generated from git shortlog -sn
14
14
  s.authors = [
15
- "Hiro Asari",
16
15
  "Konstantin Haase",
16
+ "Hiro Asari",
17
+ "Henrik Hodne",
18
+ "joshua-anderson",
19
+ "Aaron Hill",
17
20
  "Piotr Milcarz",
18
21
  "Buck Doyle",
22
+ "Peter Souter",
19
23
  "Christopher Grim",
20
24
  "Joe Corcoran",
25
+ "Peter van Dijk",
21
26
  "Sven Fuchs",
22
27
  "Aakriti Gupta",
23
28
  "Josh Kalderimis",
24
- "Ke Zhu",
25
29
  "Piotr Sarnacki",
30
+ "Ke Zhu",
31
+ "Max Barnash",
26
32
  "Ren\xC3\xA9e Hendricksen",
27
33
  "carlad",
34
+ "Carlos Palhares",
35
+ "Dan Buch",
28
36
  "Mar\xC3\xADa de Ant\xC3\xB3n",
37
+ "Mathias Meyer",
29
38
  "Matt Toothman",
30
39
  "mariadeanton",
31
40
  "techgaun",
32
41
  "Alpha",
42
+ "Andreas Tiefenthaler",
33
43
  "Beau Bouchard",
34
44
  "Corinna Wiesner",
35
45
  "David Rodr\xC3\xADguez",
@@ -39,65 +49,102 @@ Gem::Specification.new do |s|
39
49
  "Ivan Pozdeev",
40
50
  "Joep van Delft",
41
51
  "Stefan Nordhausen",
52
+ "Thais Camilo and Konstantin Haase",
42
53
  "Tobias Bieniek",
43
54
  "Adam Baxter",
55
+ "Adam Lavin",
56
+ "Adrien Brault",
44
57
  "Alfie John",
45
58
  "Alo\xC3\xAFs Th\xC3\xA9venot",
46
59
  "Basarat Ali Syed",
60
+ "Benjamin Manns",
47
61
  "Christian H\xC3\xB6ltje",
48
62
  "Dani Hodovic",
63
+ "Daniel Chatfield",
49
64
  "Dominic Jodoin",
50
65
  "Eli Schwartz",
66
+ "Eric Herot",
51
67
  "Eugene K",
68
+ "George Millo",
52
69
  "Gunter Grodotzki",
53
70
  "Harald Nordgren",
54
71
  "HaraldNordgren",
55
72
  "Igor",
56
73
  "Iulian Onofrei",
57
74
  "Jacob Atzen",
75
+ "Jacob Burkhart",
58
76
  "James Nylen",
59
77
  "Joe Rafaniello",
78
+ "Jon-Erik Schneiderhan",
60
79
  "Jonas Chromik",
80
+ "Jonne Ha\xC3\x9F",
81
+ "Julia S.Simon",
82
+ "Justin Lambert",
83
+ "Laurent Petit",
84
+ "Maarten van Vliet",
61
85
  "Marco Craveiro",
62
- "Marek Marczykowski-G\xC3\xB3recki",
86
+ "Mario Visic",
63
87
  "Matt",
64
88
  "Matteo Sumberaz",
89
+ "Matthias Bussonnier",
90
+ "Michael Mior",
65
91
  "Michael S. Fischer",
92
+ "Miro Hron\xC4\x8Dok",
93
+ "Neamar",
66
94
  "Nero Leung",
95
+ "Nicolas Bessi (nbessi)",
67
96
  "Nikhil Owalekar",
68
97
  "Peter Bengtsson",
69
98
  "Peter Drake",
99
+ "Rapha\xC3\xABl Pinson",
100
+ "Rob Hoelz",
70
101
  "Robert Grider",
71
102
  "Robert Van Voorhees",
72
103
  "Simon Cropp",
73
104
  "Tahsin Hasan",
74
105
  "Titus",
75
106
  "Titus Wormer",
107
+ "Tobias Wilken",
108
+ "Zachary Gershman",
109
+ "Zachary Scott",
76
110
  "designerror",
77
111
  "ia",
112
+ "jeffdh",
113
+ "john muhl",
78
114
  "slewt"
79
115
  ]
80
116
 
81
117
  # generated from git shortlog -sne
82
118
  s.email = [
83
- "asari.ruby@gmail.com",
84
119
  "konstantin.mailinglists@googlemail.com",
120
+ "asari.ruby@gmail.com",
121
+ "j@zatigo.com",
122
+ "aa1ronham@gmail.com",
85
123
  "piotrm@travis-ci.org",
124
+ "me@henrikhodne.com",
86
125
  "b@chromatin.ca",
126
+ "henrik@hodne.io",
127
+ "p.morsou@gmail.com",
87
128
  "chrisg@luminal.io",
88
129
  "joe@corcoran.io",
130
+ "peter.van.dijk@netherlabs.nl",
89
131
  "me@svenfuchs.com",
90
132
  "josh.kalderimis@gmail.com",
91
- "kzhu@us.ibm.com",
92
133
  "drogus@gmail.com",
134
+ "kzhu@us.ibm.com",
135
+ "i.am@anhero.ru",
93
136
  "renee@travis-ci.org",
94
137
  "aakritigupta@users.noreply.github.com",
138
+ "me@xjunior.me",
139
+ "dan@meatballhat.com",
95
140
  "mariadeanton@gmail.com",
141
+ "meyer@paperplanes.de",
96
142
  "matt.toothman@aver.io",
97
143
  "carlad@users.noreply.github.com",
98
144
  "coolsamar207@gmail.com",
99
145
  "aakriti@travis-ci.org",
100
146
  "AlphaWong@users.noreply.github.com",
147
+ "at@an-ti.eu",
101
148
  "127320+BeauBouchard@users.noreply.github.com",
102
149
  "wiesner@avarteq.de",
103
150
  "deivid.rodriguez@gmail.com",
@@ -106,43 +153,69 @@ Gem::Specification.new do |s|
106
153
  "igor@travis-ci.org",
107
154
  "vano@mail.mipt.ru",
108
155
  "stefan.nordhausen@immobilienscout24.de",
156
+ "dev+narwen+rkh@rkh.im",
109
157
  "tobias.bieniek@gmail.com",
110
158
  "github@voltagex.org",
159
+ "adam@lavoaster.co.uk",
160
+ "adrien.brault@gmail.com",
111
161
  "33c6c91f3bb4a391082e8a29642cafaf@alfie.wtf",
112
162
  "aloisthevenot@srxp.com",
113
163
  "basaratali@gmail.com",
164
+ "benmanns@gmail.com",
114
165
  "docwhat@gerf.org",
115
166
  "danihodovic@users.noreply.github.com",
167
+ "chatfielddaniel@gmail.com",
116
168
  "dominic@travis-ci.com",
117
169
  "eschwartz@archlinux.org",
170
+ "eric.github@herot.com",
118
171
  "34233075+eugene-kulak@users.noreply.github.com",
172
+ "georgejulianmillo@gmail.com",
119
173
  "gunter@grodotzki.co.za",
120
174
  "haraldnordgren@gmail.com",
121
175
  "igorwwwwwwwwwwwwwwwwwwww@users.noreply.github.com",
122
176
  "6d0847b9@opayq.com",
123
177
  "jatzen@gmail.com",
178
+ "jburkhart@engineyard.com",
124
179
  "jnylen@gmail.com",
125
180
  "jrafanie@users.noreply.github.com",
126
181
  "joep@travis-ci.org",
127
182
  "joepvd@users.noreply.github.com",
183
+ "jon-erik.schneiderhan@meyouhealth.com",
128
184
  "Jonas.Chromik@student.hpi.uni-potsdam.de",
185
+ "me@jhass.eu",
186
+ "julia.simon@biicode.com",
187
+ "jlambert@eml.cc",
188
+ "laurent.petit@gmail.com",
189
+ "maartenvanvliet@gmail.com",
129
190
  "marco.craveiro@gmail.com",
130
- "marmarek@invisiblethingslab.com",
191
+ "mario@mariovisic.com",
131
192
  "mtoothman@users.noreply.github.com",
132
193
  "gnappoms@gmail.com",
194
+ "bussonniermatthias@gmail.com",
195
+ "mmior@uwaterloo.ca",
133
196
  "mfischer@zendesk.com",
197
+ "miro@hroncok.cz",
198
+ "neamar@neamar.fr",
134
199
  "neroleung@gmail.com",
200
+ "nbessi@users.noreply.github.com",
135
201
  "nowalekar@tigetext.com",
136
202
  "peterbe@mozilla.com",
137
203
  "peter.drake@acquia.com",
204
+ "raphael.pinson@camptocamp.com",
205
+ "rob@hoelz.ro",
138
206
  "robert.grider@northwestern.edu",
139
207
  "rcvanvo@gmail.com",
140
208
  "simon.cropp@gmail.com",
141
209
  "51903216+Tahsin-travis-ci@users.noreply.github.com",
142
210
  "tituswormer@gmail.com",
211
+ "tw@cloudcontrol.de",
212
+ "pair+zg@pivotallabs.com",
213
+ "e@zzak.io",
143
214
  "carla@travis-ci.org",
144
215
  "designerror@yandex.ru",
145
216
  "isaac.ardis@gmail.com",
217
+ "jeffdh@gmail.com",
218
+ "git@johnmuhl.com",
146
219
  "leland@lcweathers.net"
147
220
  ]
148
221
 
@@ -303,7 +376,6 @@ Gem::Specification.new do |s|
303
376
  "spec/cli/help_spec.rb",
304
377
  "spec/cli/history_spec.rb",
305
378
  "spec/cli/init_spec.rb",
306
- "spec/cli/login_spec.rb",
307
379
  "spec/cli/logs_spec.rb",
308
380
  "spec/cli/open_spec.rb",
309
381
  "spec/cli/repo_command_spec.rb",
metadata CHANGED
@@ -1,27 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1.travis.1311.9
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
- - Hiro Asari
8
7
  - Konstantin Haase
8
+ - Hiro Asari
9
+ - Henrik Hodne
10
+ - joshua-anderson
11
+ - Aaron Hill
9
12
  - Piotr Milcarz
10
13
  - Buck Doyle
14
+ - Peter Souter
11
15
  - Christopher Grim
12
16
  - Joe Corcoran
17
+ - Peter van Dijk
13
18
  - Sven Fuchs
14
19
  - Aakriti Gupta
15
20
  - Josh Kalderimis
16
- - Ke Zhu
17
21
  - Piotr Sarnacki
22
+ - Ke Zhu
23
+ - Max Barnash
18
24
  - Renée Hendricksen
19
25
  - carlad
26
+ - Carlos Palhares
27
+ - Dan Buch
20
28
  - María de Antón
29
+ - Mathias Meyer
21
30
  - Matt Toothman
22
31
  - mariadeanton
23
32
  - techgaun
24
33
  - Alpha
34
+ - Andreas Tiefenthaler
25
35
  - Beau Bouchard
26
36
  - Corinna Wiesner
27
37
  - David Rodríguez
@@ -31,47 +41,73 @@ authors:
31
41
  - Ivan Pozdeev
32
42
  - Joep van Delft
33
43
  - Stefan Nordhausen
44
+ - Thais Camilo and Konstantin Haase
34
45
  - Tobias Bieniek
35
46
  - Adam Baxter
47
+ - Adam Lavin
48
+ - Adrien Brault
36
49
  - Alfie John
37
50
  - Aloïs Thévenot
38
51
  - Basarat Ali Syed
52
+ - Benjamin Manns
39
53
  - Christian Höltje
40
54
  - Dani Hodovic
55
+ - Daniel Chatfield
41
56
  - Dominic Jodoin
42
57
  - Eli Schwartz
58
+ - Eric Herot
43
59
  - Eugene K
60
+ - George Millo
44
61
  - Gunter Grodotzki
45
62
  - Harald Nordgren
46
63
  - HaraldNordgren
47
64
  - Igor
48
65
  - Iulian Onofrei
49
66
  - Jacob Atzen
67
+ - Jacob Burkhart
50
68
  - James Nylen
51
69
  - Joe Rafaniello
70
+ - Jon-Erik Schneiderhan
52
71
  - Jonas Chromik
72
+ - Jonne Haß
73
+ - Julia S.Simon
74
+ - Justin Lambert
75
+ - Laurent Petit
76
+ - Maarten van Vliet
53
77
  - Marco Craveiro
54
- - Marek Marczykowski-Górecki
78
+ - Mario Visic
55
79
  - Matt
56
80
  - Matteo Sumberaz
81
+ - Matthias Bussonnier
82
+ - Michael Mior
57
83
  - Michael S. Fischer
84
+ - Miro Hrončok
85
+ - Neamar
58
86
  - Nero Leung
87
+ - Nicolas Bessi (nbessi)
59
88
  - Nikhil Owalekar
60
89
  - Peter Bengtsson
61
90
  - Peter Drake
91
+ - Raphaël Pinson
92
+ - Rob Hoelz
62
93
  - Robert Grider
63
94
  - Robert Van Voorhees
64
95
  - Simon Cropp
65
96
  - Tahsin Hasan
66
97
  - Titus
67
98
  - Titus Wormer
99
+ - Tobias Wilken
100
+ - Zachary Gershman
101
+ - Zachary Scott
68
102
  - designerror
69
103
  - ia
104
+ - jeffdh
105
+ - john muhl
70
106
  - slewt
71
- autorequire:
107
+ autorequire:
72
108
  bindir: bin
73
109
  cert_chain: []
74
- date: 2020-10-08 00:00:00.000000000 Z
110
+ date: 2022-01-03 00:00:00.000000000 Z
75
111
  dependencies:
76
112
  - !ruby/object:Gem::Dependency
77
113
  name: faraday
@@ -235,24 +271,35 @@ dependencies:
235
271
  version: '0.6'
236
272
  description: CLI and Ruby client library for Travis CI
237
273
  email:
238
- - asari.ruby@gmail.com
239
274
  - konstantin.mailinglists@googlemail.com
275
+ - asari.ruby@gmail.com
276
+ - j@zatigo.com
277
+ - aa1ronham@gmail.com
240
278
  - piotrm@travis-ci.org
279
+ - me@henrikhodne.com
241
280
  - b@chromatin.ca
281
+ - henrik@hodne.io
282
+ - p.morsou@gmail.com
242
283
  - chrisg@luminal.io
243
284
  - joe@corcoran.io
285
+ - peter.van.dijk@netherlabs.nl
244
286
  - me@svenfuchs.com
245
287
  - josh.kalderimis@gmail.com
246
- - kzhu@us.ibm.com
247
288
  - drogus@gmail.com
289
+ - kzhu@us.ibm.com
290
+ - i.am@anhero.ru
248
291
  - renee@travis-ci.org
249
292
  - aakritigupta@users.noreply.github.com
293
+ - me@xjunior.me
294
+ - dan@meatballhat.com
250
295
  - mariadeanton@gmail.com
296
+ - meyer@paperplanes.de
251
297
  - matt.toothman@aver.io
252
298
  - carlad@users.noreply.github.com
253
299
  - coolsamar207@gmail.com
254
300
  - aakriti@travis-ci.org
255
301
  - AlphaWong@users.noreply.github.com
302
+ - at@an-ti.eu
256
303
  - 127320+BeauBouchard@users.noreply.github.com
257
304
  - wiesner@avarteq.de
258
305
  - deivid.rodriguez@gmail.com
@@ -261,43 +308,69 @@ email:
261
308
  - igor@travis-ci.org
262
309
  - vano@mail.mipt.ru
263
310
  - stefan.nordhausen@immobilienscout24.de
311
+ - dev+narwen+rkh@rkh.im
264
312
  - tobias.bieniek@gmail.com
265
313
  - github@voltagex.org
314
+ - adam@lavoaster.co.uk
315
+ - adrien.brault@gmail.com
266
316
  - 33c6c91f3bb4a391082e8a29642cafaf@alfie.wtf
267
317
  - aloisthevenot@srxp.com
268
318
  - basaratali@gmail.com
319
+ - benmanns@gmail.com
269
320
  - docwhat@gerf.org
270
321
  - danihodovic@users.noreply.github.com
322
+ - chatfielddaniel@gmail.com
271
323
  - dominic@travis-ci.com
272
324
  - eschwartz@archlinux.org
325
+ - eric.github@herot.com
273
326
  - 34233075+eugene-kulak@users.noreply.github.com
327
+ - georgejulianmillo@gmail.com
274
328
  - gunter@grodotzki.co.za
275
329
  - haraldnordgren@gmail.com
276
330
  - igorwwwwwwwwwwwwwwwwwwww@users.noreply.github.com
277
331
  - 6d0847b9@opayq.com
278
332
  - jatzen@gmail.com
333
+ - jburkhart@engineyard.com
279
334
  - jnylen@gmail.com
280
335
  - jrafanie@users.noreply.github.com
281
336
  - joep@travis-ci.org
282
337
  - joepvd@users.noreply.github.com
338
+ - jon-erik.schneiderhan@meyouhealth.com
283
339
  - Jonas.Chromik@student.hpi.uni-potsdam.de
340
+ - me@jhass.eu
341
+ - julia.simon@biicode.com
342
+ - jlambert@eml.cc
343
+ - laurent.petit@gmail.com
344
+ - maartenvanvliet@gmail.com
284
345
  - marco.craveiro@gmail.com
285
- - marmarek@invisiblethingslab.com
346
+ - mario@mariovisic.com
286
347
  - mtoothman@users.noreply.github.com
287
348
  - gnappoms@gmail.com
349
+ - bussonniermatthias@gmail.com
350
+ - mmior@uwaterloo.ca
288
351
  - mfischer@zendesk.com
352
+ - miro@hroncok.cz
353
+ - neamar@neamar.fr
289
354
  - neroleung@gmail.com
355
+ - nbessi@users.noreply.github.com
290
356
  - nowalekar@tigetext.com
291
357
  - peterbe@mozilla.com
292
358
  - peter.drake@acquia.com
359
+ - raphael.pinson@camptocamp.com
360
+ - rob@hoelz.ro
293
361
  - robert.grider@northwestern.edu
294
362
  - rcvanvo@gmail.com
295
363
  - simon.cropp@gmail.com
296
364
  - 51903216+Tahsin-travis-ci@users.noreply.github.com
297
365
  - tituswormer@gmail.com
366
+ - tw@cloudcontrol.de
367
+ - pair+zg@pivotallabs.com
368
+ - e@zzak.io
298
369
  - carla@travis-ci.org
299
370
  - designerror@yandex.ru
300
371
  - isaac.ardis@gmail.com
372
+ - jeffdh@gmail.com
373
+ - git@johnmuhl.com
301
374
  - leland@lcweathers.net
302
375
  executables:
303
376
  - travis
@@ -459,7 +532,6 @@ files:
459
532
  - spec/cli/help_spec.rb
460
533
  - spec/cli/history_spec.rb
461
534
  - spec/cli/init_spec.rb
462
- - spec/cli/login_spec.rb
463
535
  - spec/cli/logs_spec.rb
464
536
  - spec/cli/open_spec.rb
465
537
  - spec/cli/repo_command_spec.rb
@@ -495,7 +567,7 @@ homepage: https://github.com/travis-ci/travis.rb
495
567
  licenses:
496
568
  - MIT
497
569
  metadata: {}
498
- post_install_message:
570
+ post_install_message:
499
571
  rdoc_options: []
500
572
  require_paths:
501
573
  - lib
@@ -506,12 +578,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
506
578
  version: 2.3.0
507
579
  required_rubygems_version: !ruby/object:Gem::Requirement
508
580
  requirements:
509
- - - ">"
581
+ - - ">="
510
582
  - !ruby/object:Gem::Version
511
- version: 1.3.1
583
+ version: '0'
512
584
  requirements: []
513
- rubygems_version: 3.0.8
514
- signing_key:
585
+ rubygems_version: 3.2.15
586
+ signing_key:
515
587
  specification_version: 4
516
588
  summary: Travis CI client
517
589
  test_files: []
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Travis::CLI::Login do
4
- example "travis login", :unless => Travis::Tools::System.windows? do
5
- run_cli('login', '-E', '--skip-token-check') { |i| i.puts('rkh', 'password') }.should be_success
6
- run_cli('whoami').out.should be == "rkh\n"
7
- end
8
-
9
- example "travis login (with bad credentials)", :unless => Travis::Tools::System.windows? do
10
- run_cli('login') { |i| i.puts('rkh', 'wrong password') }.should_not be_success
11
- run_cli('whoami').should_not be_success
12
- end
13
- end