choria-mcorpc-support 2.20.8 → 2.21.0

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
  SHA1:
3
- metadata.gz: eb7a857de2f51cbd58bf4cba56d44379f64cc198
4
- data.tar.gz: 1caeef76539d040751a4c90c8762659e92bfb6ea
3
+ metadata.gz: 85992290e92c35fee62a685de2f7f09ab9b04b0a
4
+ data.tar.gz: 61558acd376f1a10ce6a006efc1614f5856a5ca9
5
5
  SHA512:
6
- metadata.gz: fd11527997e8889619df7fdb287942d3a2c89a07df4896bd3ed41b1c74da48f2f25d7481a95c1dda8100d4a490e1394d9d1bf78c8868aad0d03fbb735c67331d
7
- data.tar.gz: c4698a78c63e91cbeacf54e1914dddd58e04ef4bbc87031ca02a3be1e44f037bb9e32f812a57dd2bdc633a147ae1cbb66b9d3f8a3fbff58116f3741c5c72cd82
6
+ metadata.gz: f9d23804c33dd3827f9e62162937896156244eeeb672e2b1050a25081f452b74583feec118c707e22bbde28333d4ac760dbe802841c43dc34b236d9a8f217b71
7
+ data.tar.gz: a29d61954fe9d8a6cf0528f0c9b43134ee1a4241828e86ac10999119a64cbc7922a7cb15a012c31130445e3199837e75af097de7816b55024e47ca4a41b1a4fc
@@ -54,7 +54,7 @@ module MCollective
54
54
  require "mcollective/util"
55
55
  require "mcollective/validator"
56
56
 
57
- VERSION = "2.20.8".freeze
57
+ VERSION = "2.21.0".freeze
58
58
 
59
59
  def self.version
60
60
  VERSION
@@ -149,7 +149,7 @@ module MCollective
149
149
 
150
150
  return true
151
151
  rescue => e
152
- raise DDLValidationError, "Cannot validate input %s: %s" % [key, e.to_s]
152
+ raise DDLValidationError, "Cannot validate input %s: %s" % [key, e.to_s], e.backtrace
153
153
  end
154
154
 
155
155
  # Registers an input argument for a given action
@@ -20,7 +20,9 @@ module MCollective
20
20
  @mcversion = mcdependency[:mcversion] || mcversion
21
21
  @metadata[:version] = (configuration[:version] || @metadata[:version])
22
22
  @dependencies << {:name => "#{@mcname}-common", :version => @mcversion}
23
+ @agent_name = @metadata[:name].downcase
23
24
  @metadata[:name] = (configuration[:pluginname] || @metadata[:name]).downcase.gsub(/\s+|_/, "-")
25
+
24
26
  identify_packages
25
27
  end
26
28
 
@@ -52,7 +54,7 @@ module MCollective
52
54
  agent[:plugindependency] = {:name => "#{@mcname}-#{@metadata[:name]}-common", :version => @metadata[:version], :revision => @revision}
53
55
 
54
56
  if @metadata[:provider] == "external"
55
- agent[:executable_files] << File.join(agentdir, @metadata[:name])
57
+ agent[:executable_files] << File.join(agentdir, @agent_name)
56
58
  end
57
59
 
58
60
  agent
@@ -60,9 +62,11 @@ module MCollective
60
62
 
61
63
  # Obtain client package files and dependencies.
62
64
  def client
63
- client = {:files => [],
64
- :dependencies => @dependencies.clone,
65
- :description => "Client plugin for #{@metadata[:name]}"}
65
+ client = {
66
+ :files => [],
67
+ :dependencies => @dependencies.clone,
68
+ :description => "Client plugin for #{@metadata[:name]}"
69
+ }
66
70
 
67
71
  clientdir = File.join(@path, "application")
68
72
  aggregatedir = File.join(@path, "aggregate")
@@ -57,7 +57,7 @@ module MCollective
57
57
  Validator.load_validators
58
58
 
59
59
  begin
60
- if [:integer, :boolean, :float, :number, :string].include?(validation)
60
+ if [:integer, :boolean, :float, :number, :string, :array, :hash].include?(validation)
61
61
  Validator.typecheck(validator, validation)
62
62
 
63
63
  else
@@ -76,7 +76,7 @@ module MCollective
76
76
  end
77
77
  end
78
78
  rescue => e
79
- raise ValidatorError, e.to_s
79
+ raise ValidatorError, e.to_s, e.backtrace
80
80
  end
81
81
  end
82
82
  end
@@ -19,6 +19,10 @@ module MCollective
19
19
  validator.is_a?(String)
20
20
  when :boolean
21
21
  [TrueClass, FalseClass].include?(validator.class)
22
+ when :array
23
+ validator.is_a?(Array)
24
+ when :hash
25
+ validator.is_a?(Hash)
22
26
  else
23
27
  false
24
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: choria-mcorpc-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.8
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.I.Pienaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2020-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu