travis 1.8.12.travis.1101.9 → 1.8.12.travis.1111.9

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: ef6bf67c09f2bdbfea0d8cbfd126c8de42ceb65460b820e252dc0066de183f11
4
- data.tar.gz: 6987bae976bec855b219198a03a5973dab8ce2564fbcbe04f949d24f240d929f
3
+ metadata.gz: 8b7621fd1d4d7832463a62398d4c27d10323bd860aa1b346fe5667066611e15e
4
+ data.tar.gz: 4597ed931fe76c6e06c5d4218a373074cbd60d092af45b82bf8b8c22906648c3
5
5
  SHA512:
6
- metadata.gz: d4ae1f6e8723966e0c240243fbd58ef6a96be6585a19525a0dc424898720fb5c3db352f28430420d2edc9c4d67d35f1ad06093a8ffcd220d50120cb7903d25de
7
- data.tar.gz: a78d4ed105f44f479e9c942a7624ce82826cf7915bb0d9ff0c59ffba4af82cc19caedbab012be7c4ebb91bd62411452edd7d09fe5681cebbee49597a008ad182
6
+ metadata.gz: 23465aaa69632df5a75bc70cd42e40d23480a10d41d18e28d57d2a74c87afe1ea81f659082c9cbb2dd9af41fc522108036ab61f4090151c724f87fb48e10a760
7
+ data.tar.gz: 885a29d425adbb3c0c5615188ada569cb08b6f8a0a6d16d0994cf001535a4968749708f77d9ed4afc9306457752d543a2cf874619ff7355ac8b192af655bd10b
@@ -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)
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+ require 'fileutils'
3
+ require 'digest'
4
+
5
+ describe Travis::CLI::EncryptFile do
6
+ CMD_TARGET = 'README.md'
7
+
8
+ before :each do
9
+ Digest.stub(:hexencode).and_return "randomhex" # to avoid relying on Dir.pwd value for hex
10
+ end
11
+
12
+ after :each do
13
+ FileUtils.rm_f "#{CMD_TARGET}.enc"
14
+ end
15
+
16
+ example "travis encrypt-file #{CMD_TARGET}" do
17
+ run_cli('encrypt-file', CMD_TARGET).should be_success
18
+ File.exists?("#{CMD_TARGET}.enc").should be true
19
+ end
20
+ 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
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
 
12
12
  # generated from git shortlog -sn
13
13
  s.authors = [
14
- "Konstantin Haase",
15
14
  "Hiro Asari",
15
+ "Konstantin Haase",
16
16
  "Piotr Milcarz",
17
17
  "Buck Doyle",
18
18
  "Christopher Grim",
@@ -53,8 +53,8 @@ Gem::Specification.new do |s|
53
53
 
54
54
  # generated from git shortlog -sne
55
55
  s.email = [
56
- "konstantin.mailinglists@googlemail.com",
57
56
  "asari.ruby@gmail.com",
57
+ "konstantin.mailinglists@googlemail.com",
58
58
  "piotrm@travis-ci.org",
59
59
  "b@chromatin.ca",
60
60
  "chrisg@luminal.io",
@@ -245,6 +245,7 @@ Gem::Specification.new do |s|
245
245
  "lib/travis/version.rb",
246
246
  "spec/cli/api_command_spec.rb",
247
247
  "spec/cli/cancel_spec.rb",
248
+ "spec/cli/encrypt_file_spec.rb",
248
249
  "spec/cli/encrypt_spec.rb",
249
250
  "spec/cli/endpoint_spec.rb",
250
251
  "spec/cli/help_spec.rb",
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.12.travis.1101.9
4
+ version: 1.8.12.travis.1111.9
5
5
  platform: ruby
6
6
  authors:
7
- - Konstantin Haase
8
7
  - Hiro Asari
8
+ - Konstantin Haase
9
9
  - Piotr Milcarz
10
10
  - Buck Doyle
11
11
  - Christopher Grim
@@ -45,7 +45,7 @@ authors:
45
45
  autorequire:
46
46
  bindir: bin
47
47
  cert_chain: []
48
- date: 2020-03-02 00:00:00.000000000 Z
48
+ date: 2020-03-04 00:00:00.000000000 Z
49
49
  dependencies:
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: faraday
@@ -229,8 +229,8 @@ dependencies:
229
229
  version: '0.6'
230
230
  description: CLI and Ruby client library for Travis CI
231
231
  email:
232
- - konstantin.mailinglists@googlemail.com
233
232
  - asari.ruby@gmail.com
233
+ - konstantin.mailinglists@googlemail.com
234
234
  - piotrm@travis-ci.org
235
235
  - b@chromatin.ca
236
236
  - chrisg@luminal.io
@@ -422,6 +422,7 @@ files:
422
422
  - lib/travis/version.rb
423
423
  - spec/cli/api_command_spec.rb
424
424
  - spec/cli/cancel_spec.rb
425
+ - spec/cli/encrypt_file_spec.rb
425
426
  - spec/cli/encrypt_spec.rb
426
427
  - spec/cli/endpoint_spec.rb
427
428
  - spec/cli/help_spec.rb