ops_team 0.20.0 → 1.0.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/action.rb +3 -5
  3. data/lib/ops.rb +3 -3
  4. data/ops_team.gemspec +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '00009bd6fac219bc943c27592ee2131f110769ef2124697c91b52fcbd123a9a0'
4
- data.tar.gz: 9f6c85c4019f6ceb777709f42ba6ebb7640039ed3db521ab15b7b4935dcf5cca
3
+ metadata.gz: 0e74fe375694383d5cf99385e04c314e804a2ab1aae6b03558b811e78874c65e
4
+ data.tar.gz: 4c9f31d818c8bc456c4c9c37d40d42491dde28ef6e038eee77ff0e7c42e7a6da
5
5
  SHA512:
6
- metadata.gz: 165158ff1c590509aa9ae88211996cefcd035faf227d0c88132dc0ea4d3cc4013166b20280627b89d20f6ebcdb2371a537d7f734105118d7d45c1356744c5f62
7
- data.tar.gz: 73378dff392b26b0da6091e24cba07e66661971469ca7e1ccc0bbdde0eee661ad7dca58a5348228061f649203864e22379a80d96722dc697d69a1e2173839856
6
+ metadata.gz: 87320ca1362f2691ad4808bca8b7733b2d1be4bc70b4ca06b650267bf5c50c7d69e64a554fc91d246c821e17454794ae0aadb9cca27ea747f7092f5f636a6492
7
+ data.tar.gz: 6b6bee1687f1858a1097931e336ddcf28fe4f50a9b8802cded747a034f4fefddbcab0fd4331bd961a269811384eb574bfca4e4cc69c5cca576a709bcb2cb59e0
@@ -17,8 +17,6 @@ class Action
17
17
  raise NotAllowedInEnvError, "Action not allowed in #{Environment.environment} environment."
18
18
  end
19
19
 
20
- Secrets.load if load_secrets?
21
-
22
20
  Kernel.exec(to_s)
23
21
  end
24
22
 
@@ -56,12 +54,12 @@ class Action
56
54
  end
57
55
  end
58
56
 
59
- private
60
-
61
57
  def load_secrets?
62
- @config["load_secrets"]
58
+ @config["load_secrets"].nil? ? false : @config["load_secrets"]
63
59
  end
64
60
 
61
+ private
62
+
65
63
  def not_in_envs
66
64
  @config["not_in_envs"] || []
67
65
  end
data/lib/ops.rb CHANGED
@@ -108,6 +108,7 @@ class Ops
108
108
 
109
109
  return builtin.run if builtin
110
110
 
111
+ raise UnknownActionError, "Unknown action: #{@action_name}" unless action
111
112
  raise ActionConfigError, action.config_errors.join("; ") unless action.config_valid?
112
113
 
113
114
  do_before_action
@@ -125,8 +126,9 @@ class Ops
125
126
  end
126
127
 
127
128
  def do_before_all
128
- environment.set_variables
129
129
  AppConfig.load
130
+ Secrets.load if action && action.load_secrets?
131
+ environment.set_variables
130
132
  end
131
133
 
132
134
  def do_before_action
@@ -159,8 +161,6 @@ class Ops
159
161
  def action
160
162
  return action_list.get(@action_name) if action_list.get(@action_name)
161
163
  return action_list.get_by_alias(@action_name) if action_list.get_by_alias(@action_name)
162
-
163
- raise UnknownActionError, "Unknown action: #{@action_name}"
164
164
  end
165
165
 
166
166
  def action_list
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ops_team'
5
- s.version = '0.20.0'
5
+ s.version = '1.0.0'
6
6
  s.authors = [
7
7
  'nickthecook@gmail.com'
8
8
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickthecook@gmail.com