cheftacular 2.0.6 → 2.0.7

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: 5cf3dbcffc47aa2f7ec309eb955300dc73c69776
4
- data.tar.gz: 5c1a1cebd6277d1eb6a05fc9cc4728f847150c4e
3
+ metadata.gz: 3685f590daa72f5455eb81a3c70148ed502e2260
4
+ data.tar.gz: dde96719a915f11f60fadfa4b7959d65c8d14600
5
5
  SHA512:
6
- metadata.gz: 4afbd1514f159801b35ad550777a5d4be99ddebd923117e771d2ca4f31d34ce81c6f83bdbf9d0e22e6fcf8acf09a42fd5ca4afb43fb5e553e5835973a5b1e4a3
7
- data.tar.gz: ca25ef88a5545f4bc97d32b27b25c033a72e95a33230aedf428c8faa5a274b47781b15ff9d52380b9a4404ed20ff0eb50328f23cc41fa8d3906a2c31786200a2
6
+ metadata.gz: 8f591cb44744dca95f25434c5f8bcfc3ad6b92521cdcedd287c6a23907c6774eebfd206da369feb0951ae7eaf0365f1631becc81d324870f8b8844ae5855ad94
7
+ data.tar.gz: 0816925f0b578665398228834f802f975b4d3349f7939b19d55f529fd8857100873f43b27b112bea5db7f0e197405138fd4ef0a9b8e31540890d5b1bb898f300
@@ -6,7 +6,7 @@ class Cheftacular
6
6
 
7
7
  initialize_yaml_configuration
8
8
 
9
- initialize_environment
9
+ initialize_default_cheftacular_options
10
10
 
11
11
  initialize_locations
12
12
 
@@ -228,8 +228,9 @@ class Cheftacular
228
228
  exit
229
229
  end
230
230
 
231
- def initialize_environment
232
- @options['env'] = @config['cheftacular']['initial_environment'] if @config['cheftacular'].has_key?('initial_environment')
231
+ def initialize_default_cheftacular_options
232
+ @options['env'] = @config['cheftacular']['default_environment'] if @config['cheftacular'].has_key?('default_environment')
233
+ @options['repository'] = @config['cheftacular']['default_repository'] if @config['cheftacular'].has_key?('default_repository')
233
234
  end
234
235
 
235
236
  def initialize_monkeypatches
@@ -36,7 +36,7 @@ class Cheftacular
36
36
 
37
37
  hash = @config['default']['authentication_bag_hash']
38
38
 
39
- if h.has_key?('private_key')
39
+ if hash.has_key?('private_key')
40
40
  puts "Overwrite current git key in default data bag? (Y/y/N/n)"
41
41
  input = STDIN.gets.chomp
42
42
 
@@ -46,11 +46,11 @@ class Cheftacular
46
46
 
47
47
  if overwrite
48
48
 
49
- hash['private_key'] = data
49
+ hash['git_private_key'] = data
50
50
 
51
- hash['public_key'] = data_pub
51
+ hash['git_public_key'] = data_pub
52
52
 
53
- hash['OAuth'] = oauth_key
53
+ hash['git_OAuth'] = oauth_key
54
54
 
55
55
  @config['ChefDataBag'].save_authentication_bag
56
56
 
@@ -89,6 +89,12 @@ class Cheftacular
89
89
  end
90
90
  end
91
91
 
92
+ if @config['cheftacular']['git_based_deploys'] == 'true'
93
+ if !hash.has_key?('git_private_key') || !hash.has_key?('git_public_key') || !hash.has_key?('git_OAuth')
94
+ puts "Warning! github user credentials in default authentication bag were not found! Please run `cft help create_git_key` and then run that command itself!" unless @command == 'help'
95
+ end
96
+ end
97
+
92
98
  @config['ChefDataBag'].save_authentication_bag if save_on_finish
93
99
 
94
100
  exit if exit_on_finish
@@ -1,5 +1,5 @@
1
1
  class Cheftacular
2
2
  #major_version.minor_version.bugfixes
3
- VERSION = "2.0.6"
3
+ VERSION = "2.0.7"
4
4
  RUBY_VERSION = "2.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheftacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Alridge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie