chamber 2.9.0 → 2.9.1

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
  SHA1:
3
- metadata.gz: 70d5a99fb72440e64e3ef88a6ab33a3304466b19
4
- data.tar.gz: a9e604aa036a20152fa0be993ccfcd69e47406de
3
+ metadata.gz: 1ecd2c070d7f7877b3b727f904c140acc8974712
4
+ data.tar.gz: 79b12b587b92be9f7b177c4ad4349b93a4425610
5
5
  SHA512:
6
- metadata.gz: b6bafc0df4003a0f5dc2ef004bbb874b4489166e8000f8be0caa92e2edb09197b7716a0080d7941fe482721e996110f51baff07ca167af5f4907349b9b8e80d8
7
- data.tar.gz: 50985ca6d2a0716b1256a0e09df31d9501df5e26119be403b99ebaa7b67b327832236fc47616272579bce02abb3d9b703af8af68b24cbf8463216c87f0a98a2f
6
+ metadata.gz: 0b6038491608666d4b67b1d4eed6d7c87b8e623d27c09878da29affb9d7b78b4a39a8433584e839926beec8b615dbcadc5c07f7b917a2794c3dbe1d5be2153ea
7
+ data.tar.gz: 7924650c9d08ecd452b9e89f5b9b592e065678f2b681d040e2ec48b5640727c471f76d442f5a7c60c7c662e1aca4c89e36ca63cabc4fdcdd956b3f27a08d4c5f
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -16,7 +16,7 @@ class Push < Chamber::Commands::Base
16
16
  shell.say_status 'push', key, :blue
17
17
  else
18
18
  shell.say_status 'push', key, :green
19
- heroku("config:set #{key}=#{value}")
19
+ heroku("config:set #{key}=#{value.shellescape}")
20
20
  end
21
21
  end
22
22
  end
@@ -9,8 +9,8 @@ module Securable
9
9
  super
10
10
 
11
11
  ignored_settings_options = options.
12
- merge(files: ignored_settings_filepaths).
13
- reject { |k, _v| k == 'basepath' }
12
+ merge(files: ignored_settings_filepaths).
13
+ reject { |k, _v| k == 'basepath' }
14
14
  self.ignored_settings_instance = Chamber::Instance.new(ignored_settings_options)
15
15
  self.current_settings_instance = Chamber::Instance.new(options)
16
16
  self.only_sensitive = options[:only_sensitive]
@@ -27,11 +27,11 @@ class Ssl
27
27
  value
28
28
  else
29
29
  key, iv, decoded_string = value.
30
- match(LARGE_DATA_STRING_PATTERN).
31
- captures.
32
- map do |part|
30
+ match(LARGE_DATA_STRING_PATTERN).
31
+ captures.
32
+ map do |part|
33
33
  Base64.strict_decode64(part)
34
- end
34
+ end
35
35
  key = decryption_key.private_decrypt(key)
36
36
 
37
37
  cipher_dec = OpenSSL::Cipher::Cipher.new('AES-128-CBC')
data/lib/chamber/file.rb CHANGED
@@ -82,16 +82,16 @@ class File < Pathname
82
82
  escaped_value = Regexp.escape(value)
83
83
 
84
84
  file_contents.
85
- sub!(
85
+ sub!(
86
86
  /^(\s*)_secure_#{escaped_name}(\s*):(\s*)['"]?#{escaped_value}['"]?$/,
87
87
  "\\1_secure_#{name_pieces.last}\\2:\\3#{secure_value}",
88
- )
88
+ )
89
89
 
90
90
  file_contents.
91
- sub!(
91
+ sub!(
92
92
  /^(\s*)_secure_#{escaped_name}(\s*):(\s*)\|((?:\n\1\s{2}.*)+)/,
93
93
  "\\1_secure_#{name_pieces.last}\\2:\\3#{secure_value}",
94
- )
94
+ )
95
95
  end
96
96
 
97
97
  write(file_contents)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Chamber
3
- VERSION = '2.9.0'.freeze
3
+ VERSION = '2.9.1'.freeze
4
4
  end
@@ -63,7 +63,7 @@ describe ContextResolver do
63
63
 
64
64
  it 'sets the rootpath to the current working directory if none is passed in' do
65
65
  allow(Pathname).to receive(:pwd).
66
- and_return('my_dir')
66
+ and_return('my_dir')
67
67
 
68
68
  options = ContextResolver.resolve
69
69
 
@@ -20,16 +20,16 @@ describe File do
20
20
  settings_file = File.new path: tempfile.path
21
21
 
22
22
  allow(Settings).to receive(:new).
23
- and_return :settings
23
+ and_return :settings
24
24
 
25
25
  file_settings = settings_file.to_settings
26
26
 
27
27
  expect(file_settings).to eql :settings
28
28
  expect(Settings).to have_received(:new).
29
- with(settings: { 'test' => 'settings' },
30
- namespaces: {},
31
- decryption_key: nil,
32
- encryption_key: nil)
29
+ with(settings: { 'test' => 'settings' },
30
+ namespaces: {},
31
+ decryption_key: nil,
32
+ encryption_key: nil)
33
33
  end
34
34
 
35
35
  it 'can convert a file whose contents are empty' do
@@ -37,16 +37,16 @@ describe File do
37
37
  settings_file = File.new path: tempfile.path
38
38
 
39
39
  allow(Settings).to receive(:new).
40
- and_return :settings
40
+ and_return :settings
41
41
 
42
42
  file_settings = settings_file.to_settings
43
43
 
44
44
  expect(file_settings).to eql :settings
45
45
  expect(Settings).to have_received(:new).
46
- with(settings: {},
47
- namespaces: {},
48
- decryption_key: nil,
49
- encryption_key: nil)
46
+ with(settings: {},
47
+ namespaces: {},
48
+ decryption_key: nil,
49
+ encryption_key: nil)
50
50
  end
51
51
 
52
52
  it 'throws an error when the file contents are malformed' do
@@ -68,12 +68,12 @@ describe File do
68
68
  settings_file.to_settings
69
69
 
70
70
  expect(Settings).to have_received(:new).
71
- with(settings: { 'test' => 'settings' },
72
- namespaces: {
73
- environment: :development,
74
- },
75
- decryption_key: nil,
76
- encryption_key: nil)
71
+ with(settings: { 'test' => 'settings' },
72
+ namespaces: {
73
+ environment: :development,
74
+ },
75
+ decryption_key: nil,
76
+ encryption_key: nil)
77
77
  end
78
78
 
79
79
  it 'can handle files which contain ERB markup' do
@@ -84,26 +84,26 @@ describe File do
84
84
 
85
85
  settings_file.to_settings
86
86
  expect(Settings).to have_received(:new).
87
- with(settings: { 'test' => 2 },
88
- namespaces: {},
89
- decryption_key: nil,
90
- encryption_key: nil)
87
+ with(settings: { 'test' => 2 },
88
+ namespaces: {},
89
+ decryption_key: nil,
90
+ encryption_key: nil)
91
91
  end
92
92
 
93
93
  it 'does not throw an error when attempting to convert a file which does not exist' do
94
94
  settings_file = File.new path: 'no/path'
95
95
 
96
96
  allow(Settings).to receive(:new).
97
- and_return :settings
97
+ and_return :settings
98
98
 
99
99
  file_settings = settings_file.to_settings
100
100
 
101
101
  expect(file_settings).to eql :settings
102
102
  expect(Settings).to have_received(:new).
103
- with(settings: {},
104
- namespaces: {},
105
- decryption_key: nil,
106
- encryption_key: nil)
103
+ with(settings: {},
104
+ namespaces: {},
105
+ decryption_key: nil,
106
+ encryption_key: nil)
107
107
  end
108
108
 
109
109
  it 'can securely encrypt the settings contained in a file' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chamber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekompanee
@@ -34,7 +34,7 @@ cert_chain:
34
34
  QwSfDGz6+zsImi5N3UT71+mk7YcviQSgvMRl3VkAv8MZ6wcJ5SQRpf9w0OeFH6Ln
35
35
  nNbCoHiYeXX/lz/M6AIbxDIZZTwxcyvF7bdrQ2fbH5MsfQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2016-05-12 00:00:00.000000000 Z
37
+ date: 2016-08-23 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: thor
@@ -104,7 +104,6 @@ extra_rdoc_files: []
104
104
  files:
105
105
  - LICENSE.txt
106
106
  - README.md
107
- - Rakefile
108
107
  - bin/chamber
109
108
  - lib/chamber.rb
110
109
  - lib/chamber/binary/heroku.rb
@@ -192,7 +191,8 @@ files:
192
191
  homepage: https://github.com/thekompanee/chamber
193
192
  licenses:
194
193
  - MIT
195
- metadata: {}
194
+ metadata:
195
+ allowed_push_host: https://rubygems.org
196
196
  post_install_message:
197
197
  rdoc_options: []
198
198
  require_paths:
@@ -252,3 +252,4 @@ test_files:
252
252
  - spec/rails-engine-test/spec/dummy/script/rails
253
253
  - spec/spec_key
254
254
  - spec/spec_key.pub
255
+ has_rdoc:
metadata.gz.sig CHANGED
Binary file
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
4
-
5
- RSpec::Core::RakeTask.new(:spec)
6
-
7
- task default: :spec