travis 1.5.6.travis.317.4 → 1.5.6.travis.319.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmJkMjY2ZWY4NjM3YTFhOTBhZjU0ZWE2ZmRlYjUzY2E0NTg5NzI5Mg==
4
+ Zjc5MDAwY2E0MWI4ZGQ1MmY5YmU4MjRlMTdkODQ1OTQwNjlmZmQ0Yg==
5
5
  data.tar.gz: !binary |-
6
- ZTVhODljZTM3MmIwZjVlM2Y4ZGZjOGRlOTJkNjBmMjE2YTc5YjcwOA==
6
+ ZjJkNWE2NzRmNmNmYTQzYTBjYTlmNWVlNGQyZjQxNTM2ZDE0YjFmZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTAwOTNjZWJjMjQ3NDg4Y2I2YzRlNTcxNDI1MGMzMGNkNTg2ZmIxMWUxNDQy
10
- MmM4OWI0ZjMyYmU4NjVkZGY5YzU1MGNkOTdjZWIyZTVkMzdhYWZhMjkwZWU5
11
- ZWIxODliNjZkMjFmMGI1ODBmYTJhNmRlOTRlMDI2Y2Y2NDFmZmY=
9
+ OWU2MTk2MGU4ZTViODYzNWExZDZjZTFiZWQxMjE1MjYzM2QwMjI3MmI1NWI2
10
+ YWE0NDJlZjAwZTVmYjAzZGI3N2E1NzU2NjY0MzNkMDM0NzcyNDg5NTViYjVk
11
+ Y2QwZjU4NzE0MzZlZTljOTcwMWM1NTBmZTJlMDViYzk5NDFiYzQ=
12
12
  data.tar.gz: !binary |-
13
- Y2JkZjY1NDhhYTFhNmE5YmY2YjNjYTM1MmU1ZjRjZTcxYTRhMGRmMDk0MmUw
14
- Y2YwNzdmYzE4YzQwMGUzZDI3MzVmZGMwYmJiYjkzNjQwYTBjZGMwMGVmNDM3
15
- ODRkNmE0YTA0MjM5Njg5NzhiMGNmZTEwOTMxZTI3YzhiNTc2OTY=
13
+ NDg2ZTJlOTcxZDMzZDBmNjYyMGI5MjcyM2ViZmZmN2UzNzJlMDMzYTYwMzNj
14
+ OWNhYzNiZWFmMTUyNmRmMWUzYTY0NDA2OTljZTVlZmU3NGU2OTgxZGJkMmVj
15
+ OWQwZTRkYTBmYzI2OWZjOGNhOWFmZmY0MTMwMjRiZTEyZjMxODg=
data/README.md CHANGED
@@ -572,21 +572,44 @@ You can also set certain values via command line flags (see list above):
572
572
 
573
573
  #### `logs`
574
574
 
575
- Given a job number, logs simply prints out that job's logs.
575
+ Given a job number, logs simply prints out that job's logs. By default it will display the first job of the latest build.
576
576
 
577
- $ travis logs 77.1
577
+ $ travis logs
578
+ displaying logs for travis-ci/travis#317.1
578
579
  [... more logs ...]
579
580
  Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
580
581
  $ bundle exec rake
581
582
  /home/travis/.rvm/rubies/ruby-1.8.7-p371/bin/ruby -S rspec spec -c
582
- Faraday: you may want to install system_timer for reliable timeouts
583
- ...................................................................................................................................................................
583
+ ..............................................................................................................................................................................................................................................................................
584
584
 
585
- Finished in 6.48 seconds
586
- 163 examples, 0 failures
585
+ Finished in 4.46 seconds
586
+ 270 examples, 0 failures
587
587
 
588
588
  Done. Build script exited with: 0
589
589
 
590
+ The info line about the job being displayed is written to stderr, the logs itself are written to stdout.
591
+
592
+ It takes an optional argument that can be a job number:
593
+
594
+ $ travis logs 100.3
595
+ displaying logs for travis-ci/travis#100.3
596
+
597
+ A build number (in which case it will pick the build's first job):
598
+
599
+ $ travis logs 100
600
+ displaying logs for travis-ci/travis#100.1
601
+
602
+ Just the job suffix, which will pick the corresponding job from the latest build:
603
+
604
+ $ travis logs .2
605
+ displaying logs for travis-ci/travis#317.2
606
+
607
+ A branch name:
608
+
609
+ $ travis logs ghe
610
+ displaying logs for travis-ci/travis#270.1
611
+
612
+
590
613
  #### `open`
591
614
 
592
615
  Opens the project view in the Travis CI web interface. If you pass it a build or job number, it will open that specific view:
@@ -1260,12 +1283,20 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
1260
1283
 
1261
1284
  * Use new API for fetching a single branch for Repository#branch. This also circumvents the 25 branches limit.
1262
1285
  * Start publishing gem prereleases after successful builds.
1286
+ * Have `travis logs` display first job for a build if a build number is given (or for the last build if called without arguments)
1287
+ * Add support for branch names to `travis logs`.
1288
+ * Add support for just using the job suffix with `travis logs`.
1289
+ * Improve error message if job cannot be found/identified by `travis logs`.
1290
+ * Add `travis logout` for removing access token.
1291
+ * Improve error message for commands that require user to be logged in.
1263
1292
  * Add `account` method for fetching a single account to `Travis::Client::Methods`.
1264
1293
  * Allow creating account objects for any account, not just these the user is part of. Add `Account#member?` to check for membership.
1265
1294
  * Add `Account#repositories` to load all repos for a given account.
1266
1295
  * Add `Repository#owner_name` and `Repository#owner` to load the account owning a repository.
1267
1296
  * Add `Repository#member?` to check if the current user is a member of a repository.
1268
1297
  * Add `Build#pull_request_number` and `Build#pull_request_title`.
1298
+ * Remove trailing new lines from string passed to `travis encrypt`.
1299
+ * Fix double `provider` entry generated by `travis setup engineyard`.
1269
1300
 
1270
1301
  **1.5.5** (October 2, 2013)
1271
1302
 
@@ -1,16 +1,17 @@
1
1
  config_path = ENV.fetch('TRAVIS_CONFIG_PATH') { File.expand_path('.travis', ENV['HOME']) }
2
+ cmp_file = File.expand_path('travis.sh', config_path)
2
3
 
3
4
  require 'fileutils'
4
5
  FileUtils.mkdir_p(config_path)
5
- FileUtils.cp(File.expand_path('../travis.sh', __FILE__), config_path)
6
+ FileUtils.cp(File.expand_path('../travis.sh', __FILE__), cmp_file)
6
7
 
7
- rcs = ['.zshrc', '.bashrc'].map { |f| File.expand_path(f, ENV['HOME']) }
8
- source = "source " << File.expand_path('travis.sh', config_path)
8
+ rcs = ['.zshrc', '.bashrc'].map { |f| File.expand_path(f, ENV['HOME']) }
9
+ source = "source " << cmp_file
9
10
 
10
11
  rcs.each do |file|
11
12
  next unless File.exist? file and File.writable? file
12
13
  next if File.read(file).include? source
13
- File.open(file, "a") { |f| f.puts("", "# added by travis gem", source) }
14
+ File.open(file, "a") { |f| f.puts("", "# added by travis gem", "[ -f #{cmp_file} ] && #{source}") }
14
15
  end
15
16
 
16
17
  # fake Makefile
@@ -14,12 +14,20 @@ module Travis
14
14
 
15
15
  include Tools::SafeString
16
16
  def run(number = last_build.number)
17
- error "##{number} is not a job, try #{number}.1" unless job = job(number)
17
+ job ||= job(number) || error("no such job ##{number}")
18
+ info "displaying logs for #{color(job.inspect_info, [:bold, :info])}"
18
19
  job.log.body { |part| print interactive? ? encoded(part) : clean(part) }
19
20
  end
20
21
 
21
22
  private
22
23
 
24
+ def job(number)
25
+ number = last_build.number + number if number.start_with? '.'
26
+ job = super(number) || build(number) || branch(number)
27
+ job = job.jobs.first if job.respond_to? :jobs
28
+ job
29
+ end
30
+
23
31
  def check_websocket
24
32
  require 'websocket-native'
25
33
  rescue LoadError => e
@@ -35,6 +35,10 @@ module Travis
35
35
  repository.job(number_or_id)
36
36
  end
37
37
 
38
+ def branch(name)
39
+ repository.branch(name)
40
+ end
41
+
38
42
  def last_build
39
43
  repository.last_build or error("no build yet for #{slug}")
40
44
  end
@@ -138,8 +138,8 @@ module Travis
138
138
  end
139
139
 
140
140
  def job(number)
141
- build_number = number.to_s[/^\d+/]
142
- build = build(build_number)
141
+ build_number = number.to_s[/^\d+/] or return nil
142
+ build = build(build_number) or return nil
143
143
  job = build.jobs.detect { |j| j.number == number } if number != build_number
144
144
  job ||= build.jobs.first if build and build.jobs.size == 1
145
145
  job
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.5.6.travis.317.4
4
+ version: 1.5.6.travis.319.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase