rbcm 0.0.2 → 0.0.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 +4 -4
- data/app/action/action.rb +2 -2
- data/app/cli.rb +1 -1
- data/app/node/sandbox.rb +2 -0
- data/app/rbcm.rb +13 -6
- 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: 5d21ced32c1ebdeeef149cd3c77faad5cad48be90f874233f57fdd78dee5fa45
|
4
|
+
data.tar.gz: 62351e19844eaf2b263b6f52fbfef46ec25386bc0ff9ffa3318134ebc91bb7ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 627acffbfa4465ac33f6386b5bb2a2ec9ff1a03429175eddf52ecc4b69f137f30c0c70ba7cf36ee92a79720527c03da28d4438184fb0920314c7d38331550e84
|
7
|
+
data.tar.gz: 9ecb0e4228b86142e20610de4ab86c77e93fcce56ca4b00b276b90c7267d118b5e58408490edb2251b9c8a8e2e835602aaf25e9189328d5562be47cf81697a93
|
data/app/action/action.rb
CHANGED
@@ -6,12 +6,12 @@ class Action
|
|
6
6
|
|
7
7
|
def initialize job:, chain:, path: nil, params: nil, line: nil, check: nil,
|
8
8
|
dependencies: nil, trigger: nil, triggered_by: nil,
|
9
|
-
source: nil, tags: nil
|
9
|
+
source: nil, tags: nil, node:
|
10
10
|
@dependencies = [:file] + [dependencies].flatten - [chain.last]
|
11
11
|
@trigger = [trigger, chain.last].flatten.compact
|
12
12
|
@triggered_by = [triggered_by].flatten.compact
|
13
13
|
@triggered = []; @source = source
|
14
|
-
@node =
|
14
|
+
@node = node; @job = job
|
15
15
|
@chain = chain; @capability = chain.last
|
16
16
|
@obsolete = nil; @approved = nil
|
17
17
|
@tags = tags.compact.flatten
|
data/app/cli.rb
CHANGED
@@ -76,7 +76,7 @@ class CLI
|
|
76
76
|
elsif element == :title
|
77
77
|
triggerd_by = "#{format :trigger, :bold} #{@action.triggered_by.join(", ")} " if @action.triggered_by.any?
|
78
78
|
out "┣━ #{triggerd_by}#{format color, :bold} #{(@action.chain).join(" > ")} " +
|
79
|
-
"#{format} #{format :params}#{@action.job.params}#{format}" +
|
79
|
+
"#{format} #{format :params}#{@action.job.params if @action.job}#{format}" +
|
80
80
|
" #{format :tag}#{"tags: " if @action.tags.any?}#{@action.tags.join(", ")}#{format}"
|
81
81
|
elsif element == :capabilities
|
82
82
|
out prefix + "capabilities: #{Node::Sandbox.capabilities.join(", ")}"
|
data/app/node/sandbox.rb
CHANGED
@@ -75,6 +75,7 @@ class Node::Sandbox
|
|
75
75
|
|
76
76
|
def run action, check: nil, tags: nil, trigger: nil, triggered_by: nil
|
77
77
|
@node.actions << Action::Command.new(
|
78
|
+
node: @node,
|
78
79
|
line: action,
|
79
80
|
check: check,
|
80
81
|
chain: @cache[:chain].dup.flatten(1),
|
@@ -93,6 +94,7 @@ class Node::Sandbox
|
|
93
94
|
:template, :context, :tags]
|
94
95
|
).any?
|
95
96
|
@node.actions << Action::File.new(
|
97
|
+
node: @node,
|
96
98
|
path: path,
|
97
99
|
params: Params.new([path], named),
|
98
100
|
chain: [@cache[:chain].dup].flatten(1),
|
data/app/rbcm.rb
CHANGED
@@ -4,12 +4,19 @@ require "shellwords"
|
|
4
4
|
require "diffy"
|
5
5
|
|
6
6
|
APPDIR = File.expand_path File.dirname(__FILE__)
|
7
|
-
[ "action/action",
|
8
|
-
"
|
9
|
-
"node/
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
7
|
+
[ "action/action", "action/command",
|
8
|
+
"action/file", "action/list",
|
9
|
+
"node/node", "node/file",
|
10
|
+
"node/job", "node/filesystem",
|
11
|
+
"node/remote", "node/sandbox",
|
12
|
+
"node/template",
|
13
|
+
"lib/lib", "lib/array_hash",
|
14
|
+
"lib/options", "lib/quick_each",
|
15
|
+
"lib/params",
|
16
|
+
"project/project", "project/definition",
|
17
|
+
"project/file", "project/capability",
|
18
|
+
"project/sandbox",
|
19
|
+
"cli"
|
13
20
|
].each{|requirement| require "#{APPDIR}/#{requirement}.rb"}
|
14
21
|
|
15
22
|
class RBCM
|