travis 1.8.11 → 1.8.12.pre.rc1

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: 560192251d9099ff71868e67bf60b83062a32602bd39723a0d0ec1caa16df9e6
4
- data.tar.gz: e2c4be543e3d14d7fd7b2f89d4dea7ffc241cce8ad490d74daf378e6894d64e3
3
+ metadata.gz: f51db57168016dc8721aa4183da72941b39c7eaa101f4597841097a9b66862cf
4
+ data.tar.gz: 65e2c477544aec8a9c285574b7f35861778b799b9147ff29d6c577892ba20287
5
5
  SHA512:
6
- metadata.gz: baa548bee0487c391f922556c8b24688fb9d51729fb7a2d7b9fd435bce37f3ce7af34e99f993119bbd07a01a59b3a92180b77ba1399bb9ecc0cb057838874934
7
- data.tar.gz: 6ef892fe18818c5d8210e9c421fc5e78f4f0bfa8640832e766519e4b86e0f3521cca6003d065d5ea7652548e251649d31ec79c2beaf9d7ce2dcf3bbd602ace12
6
+ metadata.gz: 6acb29c43b904e661aa1e43f2b32990a2896a957f5417c79970f93c2f0bbba4668b151a752309128d7e970cb2eff3014cb2e3b569c4c10a6bd3390db83d92cef
7
+ data.tar.gz: 3808a0fd75926c1182ccc6a0580cd879271ccd50693ab8339124fc260dd74abd52fc6d35cc62cd31a68145a3510c858bdaddfa90f0572fb87b05fbc9ae392d8f
data/README.md CHANGED
@@ -1967,7 +1967,9 @@ You can check your Ruby version by running `ruby -v`:
1967
1967
 
1968
1968
  Then run:
1969
1969
 
1970
- $ gem install travis -v 1.8.11 --no-rdoc --no-ri
1970
+ $ gem install travis -v 1.8.11 --no-document
1971
+
1972
+ (For older versions of `gem`, replace `--no-document` with `--no-rdoc --no-ri`.)
1971
1973
 
1972
1974
  Now make sure everything is working:
1973
1975
 
@@ -67,7 +67,7 @@ module Travis
67
67
  end
68
68
 
69
69
  def decrypt_command(path)
70
- "openssl aes-256-cbc -K $#{env_name(:key)} -iv $#{env_name(:iv)} -in #{escape_path(path)} -out #{escape_path(decrypt_to)} -d"
70
+ "openssl aes-256-cbc -K $#{env_name(path, :key)} -iv $#{env_name(path, :iv)} -in #{escape_path(path)} -out #{escape_path(decrypt_to)} -d"
71
71
  end
72
72
 
73
73
  def set_env_vars(input_path)
@@ -1,6 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'travis/client'
3
3
  require 'travis/tools/safe_string'
4
+ require 'ostruct'
4
5
 
5
6
  module Travis
6
7
  module Client
@@ -44,11 +45,15 @@ module Travis
44
45
  end
45
46
  body
46
47
  end
48
+ rescue NoMethodError => e
49
+ # Most likely `#load_attribute` failed because the logs have already
50
+ # been archived and API returned a bare string, so we will use that instead
51
+ session.get_raw("logs/#{id}", nil, "Accept" => TEXT)
47
52
  end
48
53
 
49
54
  def body(stream = block_given?)
50
55
  return current_body unless block_given? or stream
51
- return yield(current_body) unless stream and job.pending?
56
+ return yield(current_body) unless stream and raw_job.pending?
52
57
  number = 0
53
58
 
54
59
  session.listen(self) do |listener|
@@ -80,6 +85,17 @@ module Travis
80
85
  job
81
86
  end
82
87
 
88
+ # wrapper to rescue errors while constructing the job object
89
+ # https://github.com/travis-ci/travis.rb/issues/578
90
+ def raw_job
91
+ job
92
+ rescue
93
+ # Exception arises because the logs have been archived, so in this case
94
+ # the job is obviously no longer pending. This is the only call we have
95
+ # to stub
96
+ OpenStruct.new(:pending? => false)
97
+ end
98
+
83
99
  one :log
84
100
  many :logs
85
101
  aka :artifact
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.8.11'
2
+ VERSION = '1.8.12-rc1'
3
3
  end
@@ -721,6 +721,56 @@ module Travis
721
721
  }]}.to_json
722
722
  end
723
723
 
724
+ #### for encrypt_file spec
725
+ get '/settings/env_vars/' do
726
+ # p params
727
+ $params = params
728
+ {
729
+ "env_vars":[
730
+ {
731
+ "id": "8aa1c74d-dcc4-4e41-9087-1326b7c68abd",
732
+ "name": "encrypted_randomhex_key",
733
+ "value": "super_secret_key",
734
+ "public": false,
735
+ "repository_id": 891
736
+ },
737
+ {
738
+ "id": "b2ed30b9-622d-4bd7-928b-ba5aad7ba6a1",
739
+ "name": "encrypted_randomhex_iv",
740
+ "value": "super_secret_iv",
741
+ "public": false,
742
+ "repository_id": 891
743
+ }
744
+ ]
745
+ }.to_json
746
+ end
747
+
748
+ patch '/settings/env_vars/8aa1c74d-dcc4-4e41-9087-1326b7c68abd' do
749
+ $params = params
750
+ {
751
+ "env_var": {
752
+ "id": "8aa1c74d-dcc4-4e41-9087-1326b7c68abd",
753
+ "name": "encrypted_randomhex_key",
754
+ "value": "new_super_secret_key",
755
+ "public": false,
756
+ "repository_id": 891
757
+ }
758
+ }.to_json
759
+ end
760
+
761
+ patch '/settings/env_vars/b2ed30b9-622d-4bd7-928b-ba5aad7ba6a1' do
762
+ $params = params
763
+ {
764
+ "env_var": {
765
+ "id": "b2ed30b9-622d-4bd7-928b-ba5aad7ba6a1",
766
+ "name": "encrypted_randomhex_iv",
767
+ "value": "new_super_secret_iv",
768
+ "public": false,
769
+ "repository_id": 891
770
+ }
771
+ }.to_json
772
+ end
773
+
724
774
  post '/requests' do
725
775
  $params = params
726
776
  "{}"
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.8.11"
5
+ s.version = "1.8.12-rc1"
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"
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.8.11
4
+ version: 1.8.12.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -79,7 +79,7 @@ authors:
79
79
  autorequire:
80
80
  bindir: bin
81
81
  cert_chain: []
82
- date: 2020-03-02 00:00:00.000000000 Z
82
+ date: 2020-03-10 00:00:00.000000000 Z
83
83
  dependencies:
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: faraday
@@ -542,11 +542,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
542
542
  version: '0'
543
543
  required_rubygems_version: !ruby/object:Gem::Requirement
544
544
  requirements:
545
- - - ">="
545
+ - - ">"
546
546
  - !ruby/object:Gem::Version
547
- version: '0'
547
+ version: 1.3.1
548
548
  requirements: []
549
- rubygems_version: 3.0.6
549
+ rubygems_version: 3.0.3
550
550
  signing_key:
551
551
  specification_version: 4
552
552
  summary: Travis CI client