seira 0.4.2 → 0.4.3

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
  SHA1:
3
- metadata.gz: 228e077af1f8e715eac6baf348669c49567ee918
4
- data.tar.gz: 5e39a77f9e6696585b0eba1b301da428949228b6
3
+ metadata.gz: 7dc4d9f9ef065f08ef6890cdff4d3e53609b4c87
4
+ data.tar.gz: 77bcbfdde4975bbb2893103c1b13556e43f2ed0b
5
5
  SHA512:
6
- metadata.gz: e6444c0d6b07b436fad4e768df735faf5cc601d816c241e04822a2af8fdfaef12278bd36b3f921b4e7399e9209c27d3b46c8d12cabb91c5c419bfc88327d399e
7
- data.tar.gz: 53b2edeaa08392391a3a0dbe2c97ccfa901b25c723585ad6fd0072efc1a8d8d5808e3613e9071d7fb561e72071047c35bd6d9d70e6ca7fc89f22dbb938ef756c
6
+ metadata.gz: f267f44d5e953aa8bfaaaace6f673c4c55c8be016a8bc83e39a1925e5414b904557f2de4fba931391e8c42bd4ce045fe645aa35d553726b955e28308bb0a6d5b
7
+ data.tar.gz: cf2e852fd7645b16bfdf25752295342fbe31192c44501e3b7e1cf236451381de8ed45662bf1c09834f03b9b5368bfc82755b5b7b1ffe38ec8be1f090615f7a97
@@ -87,8 +87,11 @@ module Seira
87
87
  @settings.full_cluster_name_for_shorthand(cluster)
88
88
  end
89
89
 
90
- unless category == 'setup'
91
- @project = @settings.project_for_cluster(@cluster)
90
+ # If cluster is nil, we'll show an error message later on.
91
+ unless @cluster.nil?
92
+ unless category == 'setup'
93
+ @project = @settings.project_for_cluster(@cluster)
94
+ end
92
95
  end
93
96
  end
94
97
 
@@ -161,7 +164,7 @@ module Seira
161
164
  end
162
165
 
163
166
  def simple_cluster_change?
164
- app.nil? && category.nil? # Special case where user is simply changing environments
167
+ app.nil? && category.nil? # Special case where user is simply changing clusters
165
168
  end
166
169
 
167
170
  def run_base_help
@@ -34,8 +34,8 @@ module Seira
34
34
 
35
35
  def switch(target_cluster:, verbose: false)
36
36
  unless target_cluster && target_cluster != "" && settings.valid_cluster_names.include?(target_cluster)
37
- puts "Please specify environment as first param to any seira command"
38
- puts "Environment should be one of #{settings.valid_cluster_names}"
37
+ puts "Please specify cluster as first param to any seira command"
38
+ puts "Cluster should be one of #{settings.valid_cluster_names}"
39
39
  exit(1)
40
40
  end
41
41
 
@@ -144,7 +144,7 @@ module Seira
144
144
  end
145
145
  else
146
146
  # If we don't need a dedicated pod, it's way easier - just connect to the already running one
147
- connect_to_pod(target_pod.dig('metadata', 'name'))
147
+ connect_to_pod(target_pod.dig('metadata', 'name'), command)
148
148
  end
149
149
  end
150
150
 
@@ -49,7 +49,7 @@ module Seira
49
49
 
50
50
  # Try iterating through each cluster to find the relevant alias
51
51
  clusters.each do |cluster_name, cluster_metadata|
52
- next if cluster_metadata['aliases'].empty?
52
+ next if cluster_metadata['aliases'].nil? || cluster_metadata['aliases'].empty?
53
53
  return cluster_name if cluster_metadata['aliases'].include?(shorthand)
54
54
  end
55
55
 
@@ -22,7 +22,7 @@ module Seira
22
22
  run_status
23
23
  exit(0)
24
24
  elsif target == 'all'
25
- puts "We will now set up gcloud and kubectl for each project. We use a distinct GCP Project for each environment, which are specified in .seira.yml."
25
+ puts "We will now set up gcloud and kubectl for each project. Each cluster is specified in .seira.yml."
26
26
  settings.valid_cluster_names.each do |cluster|
27
27
  setup_cluster(cluster)
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module Seira
2
- VERSION = "0.4.2".freeze
2
+ VERSION = "0.4.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Ringwelski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-27 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline