rbcm 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31d1c0ddf25d724b993537f1c2277cdf417286b5f1e5ee5ae81cbc2dcb2a69ee
4
- data.tar.gz: beb43965c73e48e331857f0af84bca0e5eaec9115bfa09b4122a12edcc7b5561
3
+ metadata.gz: 5d21ced32c1ebdeeef149cd3c77faad5cad48be90f874233f57fdd78dee5fa45
4
+ data.tar.gz: 62351e19844eaf2b263b6f52fbfef46ec25386bc0ff9ffa3318134ebc91bb7ee
5
5
  SHA512:
6
- metadata.gz: 44d8cf0574192eeaed1201189e99aae65bdf56196d1d9f982f9d956081fccc45ae26ff31d636db05c3bd8a6dfd839167d46d5261b298500cb7c448dfe1e764b5
7
- data.tar.gz: 4578274e0f4e7130b253f5ab040528d8108e125aaf3cf8f3d68021e33345c312e968c7508baf6f590eb995762b510ff3e1fbe481de083abe6a7ff95e3e74c0f6
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 = job.node; @job = job
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", "action/command", "action/file", "action/list",
8
- "lib/array_hash", "lib/lib", "node/node", "node/file", "node/job",
9
- "node/filesystem", "node/remote", "node/sandbox", "node/template",
10
- "lib/options", "lib/quick_each",
11
- "lib/params", "project/project", "project/definition", "project/file",
12
- "project/capability", "project/sandbox", "cli"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Wiegand