jack-eb 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jack/create.rb +11 -2
- data/lib/jack/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc83fe99fffa027536020c3af625b3c913689a4f
|
4
|
+
data.tar.gz: e50d09ae4262c8a8773e0998dc89ab8c38e5f35f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f129606547e21227dca1ade82c18ef6503c95a867745d9b4f9be4b1e6047c74d5d8e0b065a2392e0c3e239f46f45c197a31c21f1c0e50f28029f1ba94198669
|
7
|
+
data.tar.gz: dea17503021a938ed10515d8be103f5201828594fba59c77a5a0c075ab32b8d2947e0545cc09a97130029a46594290deb490aef08d62cf0fc1115f40ac391eb7
|
data/lib/jack/create.rb
CHANGED
@@ -9,6 +9,7 @@ module Jack
|
|
9
9
|
@root = options[:root] || '.'
|
10
10
|
@env_name = options[:env_name]
|
11
11
|
@app_name = options[:app_name] || app_name_convention(@env_name)
|
12
|
+
@upload = Config::Upload.new(@options)
|
12
13
|
end
|
13
14
|
|
14
15
|
def run
|
@@ -17,11 +18,20 @@ module Jack
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def ensure_eb_init
|
20
|
-
|
21
|
+
if app_name_mismatch
|
21
22
|
do_cmd(%Q|eb init -p "#{platform}" "#{@app_name}"|, @options)
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
26
|
+
def app_name_mismatch
|
27
|
+
return true unless File.exist?("#{@root}/.elasticbeanstalk/config.yml")
|
28
|
+
return if @options[:noop]
|
29
|
+
eb_config_path = @upload.eb_config_path
|
30
|
+
data = YAML.load_file(eb_config_path)
|
31
|
+
application_name = data['global']['application_name']
|
32
|
+
application_name != @app_name
|
33
|
+
end
|
34
|
+
|
25
35
|
def platform
|
26
36
|
create_yaml['platform'] || latest_docker_platform
|
27
37
|
end
|
@@ -63,7 +73,6 @@ module Jack
|
|
63
73
|
end
|
64
74
|
|
65
75
|
def upload_cfg
|
66
|
-
@upload = Config::Upload.new(@options)
|
67
76
|
if @upload.local_cfg_exist?
|
68
77
|
@upload.upload
|
69
78
|
cfg = "--cfg #{@upload.upload_name} "
|
data/lib/jack/version.rb
CHANGED