ufo 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4cd7a59e7976f154950cf4549762565dc012a5e2a74644ca593e2f9805d46b2
4
- data.tar.gz: d3afe20c93b5d3234d71c7fa1be39c76a1274899385237a9338eedfc7d5c0e18
3
+ metadata.gz: d75643b59e36f0f08c8cbbf2731b6e812609e27ff417055fad1fa549aa454db9
4
+ data.tar.gz: 146706f8a36243229014cf8a4e09397506efd655284ebe199e79b7c5f3107fc8
5
5
  SHA512:
6
- metadata.gz: 1a0d229886a6e6fe529f2174f177b7c2956f89b2fcbbfb23b2c7beb7089d220ca5cfa4643e8bcd4129e57aaaa74e2481d05eedc39a6f34ce25dcfef7b37ae86b
7
- data.tar.gz: 8ad4894dcaf057160249c6885a7e1afd522707d97f1e280a6dbcd92ec646857410d22399639987349690e0700b711695693b4f911ec29dbd872c03d216432bd3
6
+ metadata.gz: 4706fcc082ace35482e905c587599fdc2cfbd7e6649c2f4859a51f7ba4a298c994133c8f03e817aa1285a6bb59e839ce4e6ec4ae9e99d4679a367214c34e6203
7
+ data.tar.gz: bea2d53470126f9005b6ecfe9cb366a7433a510f94cbfc4bc2dfd4f69b3eeac0e7ce6a4c3721326767893b42bd661d686460f526da07b2d087d77fb18e0308da
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [3.1.1]
7
+ - actually use the cluster value in settings
8
+ - upgrade variables path also #20
9
+
6
10
  ## [3.1.0]
7
11
  - fix container_info to refer to .ufo instead of old ufo folder #20
8
12
  - fix ufo upgrade3 #20
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ufo (3.0.1)
4
+ ufo (3.1.0)
5
5
  aws-sdk-cloudwatchlogs
6
6
  aws-sdk-ec2
7
7
  aws-sdk-ecr
@@ -9,16 +9,11 @@ module Ufo
9
9
  # So @options must be set
10
10
  module Default
11
11
  # The default cluster normally defaults to the Ufo.env value.
12
- # But it can be overriden by ufo/settings.yml ufo_env_cluster_map
12
+ # But it can be overriden by ufo/settings.yml cluster
13
13
  #
14
14
  # More info: http://ufoships.com/docs/settings/
15
15
  def default_cluster
16
- map = setting.data["ufo_env_cluster_map"]
17
- if map
18
- ecs_cluster = map[Ufo.env] || map["default"]
19
- end
20
-
21
- ecs_cluster || Ufo.env
16
+ setting.data["cluster"] || Ufo.env
22
17
  end
23
18
 
24
19
  # These default service values only are used when a service is created by `ufo`
@@ -24,8 +24,26 @@ module Ufo
24
24
  if File.exist?(user_settings_path)
25
25
  upgrade_settings(user_settings_path)
26
26
  end
27
+
28
+ upgrade_variables
29
+
27
30
  mv("ufo", ".ufo")
28
31
  puts "Upgrade complete."
32
+ new_env_info
33
+ end
34
+
35
+ def upgrade_variables
36
+ upgrade_variable_path("dev")
37
+ upgrade_variable_path("stag")
38
+ upgrade_variable_path("prod")
39
+ end
40
+
41
+ def upgrade_variable_path(old_ufo_env)
42
+ old_path = "ufo/variables/#{old_ufo_env}.rb"
43
+ return unless File.exist?(old_path)
44
+
45
+ ufo_env = map_env(old_ufo_env)
46
+ mv(old_path, "ufo/variables/#{ufo_env}.rb")
29
47
  end
30
48
 
31
49
  def upgrade_settings(path)
@@ -56,8 +74,6 @@ module Ufo
56
74
  if path.include?(ENV['HOME'])
57
75
  puts "NOTE: Your ~/.ufo/settings.yml file was also upgraded to the new format. If you are using ufo in other projects those will have to be upgraded also."
58
76
  end
59
-
60
- new_env_info
61
77
  end
62
78
 
63
79
  ENV_MAP = {
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "3.1.0"
2
+ VERSION = "3.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen