ops_team 0.6.0 → 0.7.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.
- checksums.yaml +4 -4
- data/lib/app_config.rb +16 -0
- data/lib/builtins/help.rb +4 -1
- data/lib/environment.rb +1 -1
- data/lib/ops.rb +2 -6
- data/lib/secrets.rb +1 -9
- data/ops_team.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 011b0f2a12af0a58c9b48f53d2dd59b9a753eab0acd221ee2675c296c7b109d0
|
|
4
|
+
data.tar.gz: 157963863ac30030921804a37f57ab332502ba465ac9c4ea139b18a297f0618e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ce81eacd3adb1f7416a96adeabc38b244919ef8e8b17b349cea60e21a68535cc7aaeca57d8af1fb9fb1a03f7b94e98d423f018c2ecd2e9a4da556234ea64f65
|
|
7
|
+
data.tar.gz: 0e0b772bdd70841e197079c93124f53a0d61ea8558add16a4b89e2e7340a1dbeba58222a3631165c03ed3ea35c85c7c596f9834aa0ba3e0445196b27b35e3f41
|
data/lib/app_config.rb
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class AppConfig
|
|
4
|
+
class << self
|
|
5
|
+
def load
|
|
6
|
+
new(app_config_path).load
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def app_config_path
|
|
12
|
+
expand_path(Options.get("config.path"))
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def expand_path(path)
|
|
16
|
+
`echo #{path}`.chomp
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
4
20
|
def initialize(filename = "")
|
|
5
21
|
@filename = filename.empty? ? default_filename : filename
|
|
6
22
|
end
|
data/lib/builtins/help.rb
CHANGED
|
@@ -35,7 +35,10 @@ module Builtins
|
|
|
35
35
|
|
|
36
36
|
def actions
|
|
37
37
|
@config["actions"].map do |name, value|
|
|
38
|
-
format("%<name>-35s %<desc>s",
|
|
38
|
+
format("%<name>-35s %<desc>s",
|
|
39
|
+
name: name.yellow,
|
|
40
|
+
desc: value["description"] || value["command"]
|
|
41
|
+
)
|
|
39
42
|
end
|
|
40
43
|
end
|
|
41
44
|
end
|
data/lib/environment.rb
CHANGED
data/lib/ops.rb
CHANGED
|
@@ -49,7 +49,7 @@ class Ops
|
|
|
49
49
|
|
|
50
50
|
def run_action
|
|
51
51
|
environment.set_variables
|
|
52
|
-
|
|
52
|
+
AppConfig.load
|
|
53
53
|
|
|
54
54
|
return builtin.run if builtin
|
|
55
55
|
|
|
@@ -106,12 +106,8 @@ class Ops
|
|
|
106
106
|
@environment ||= Environment.new(env_vars)
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
def app_config_file
|
|
110
|
-
`echo #{Options.get("config.path")}`.chomp
|
|
111
|
-
end
|
|
112
|
-
|
|
113
109
|
def app_config
|
|
114
|
-
@app_config ||= AppConfig.new
|
|
110
|
+
@app_config ||= AppConfig.new
|
|
115
111
|
end
|
|
116
112
|
end
|
|
117
113
|
|
data/lib/secrets.rb
CHANGED
|
@@ -8,19 +8,11 @@ require 'options'
|
|
|
8
8
|
|
|
9
9
|
class Secrets < AppConfig
|
|
10
10
|
class << self
|
|
11
|
-
def load
|
|
12
|
-
Secrets.new(secrets_path).load
|
|
13
|
-
end
|
|
14
|
-
|
|
15
11
|
private
|
|
16
12
|
|
|
17
|
-
def
|
|
13
|
+
def app_config_path
|
|
18
14
|
expand_path(Options.get("secrets.path"))
|
|
19
15
|
end
|
|
20
|
-
|
|
21
|
-
def expand_path(path)
|
|
22
|
-
`echo #{path}`.chomp
|
|
23
|
-
end
|
|
24
16
|
end
|
|
25
17
|
|
|
26
18
|
def initialize(filename = "")
|
data/ops_team.gemspec
CHANGED