ops_team 0.2.8 → 0.2.9
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/ops.rb +14 -8
- 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: e5c2fa7f06155a753554402aa2063aec1bf192aa171a6c2e601619ee6f80e148
|
|
4
|
+
data.tar.gz: ca9c1bcde247a55ad469e423f5bde3a1ba3a85ad51694b519622e6a572304afc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7baea51515c766fd4409382b91560dd21948b95470d62fad73a6f23c3b58d92a0a0030d55c95dd7de6dfeb0fed73f6b35f7728419da1ca9962598873440cccf3
|
|
7
|
+
data.tar.gz: c544f035850f131ff02882cf88196f4fc62ab91dc4142ce292cf10531f685415ad349aeaabd52e26f988932eba9fc02888a820502e7efff6fde8478cecfc1941
|
data/lib/ops.rb
CHANGED
|
@@ -16,7 +16,8 @@ class Ops
|
|
|
16
16
|
|
|
17
17
|
CONFIG_FILE = "ops.yml"
|
|
18
18
|
|
|
19
|
-
INVALID_SYNTAX_EXIT_CODE =
|
|
19
|
+
INVALID_SYNTAX_EXIT_CODE = 64
|
|
20
|
+
UNKNOWN_ACTION_EXIT_CODE = 65
|
|
20
21
|
|
|
21
22
|
def initialize(argv)
|
|
22
23
|
@action_name = argv[0]
|
|
@@ -28,15 +29,10 @@ class Ops
|
|
|
28
29
|
def run
|
|
29
30
|
exit(INVALID_SYNTAX_EXIT_CODE) unless syntax_valid?
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
app_config.load
|
|
33
|
-
|
|
34
|
-
return builtin.run if builtin
|
|
35
|
-
|
|
36
|
-
Output.warn("Running '#{action}' from #{CONFIG_FILE}...")
|
|
37
|
-
action.run
|
|
32
|
+
run_action
|
|
38
33
|
rescue UnknownActionError => e
|
|
39
34
|
Output.error("Error: #{e}")
|
|
35
|
+
exit(UNKNOWN_ACTION_EXIT_CODE)
|
|
40
36
|
end
|
|
41
37
|
|
|
42
38
|
private
|
|
@@ -51,6 +47,16 @@ class Ops
|
|
|
51
47
|
end
|
|
52
48
|
end
|
|
53
49
|
|
|
50
|
+
def run_action
|
|
51
|
+
environment.set_variables
|
|
52
|
+
app_config.load
|
|
53
|
+
|
|
54
|
+
return builtin.run if builtin
|
|
55
|
+
|
|
56
|
+
Output.warn("Running '#{action}' from #{CONFIG_FILE}...")
|
|
57
|
+
action.run
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
def builtin
|
|
55
61
|
@builtin ||= Builtins.const_get(builtin_class_name, false).new(@args, config)
|
|
56
62
|
rescue NameError
|
data/ops_team.gemspec
CHANGED