vop 0.3.4 → 0.3.5

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: 671eba569f41b30868a8026134138d13399d3d5e
4
- data.tar.gz: 5791e1031450edc74942ddc3b388ba8c27521c87
3
+ metadata.gz: 2e82b43bd88a68ea52a0cc6fa550fa47fb063cbd
4
+ data.tar.gz: d88c69b59fb9b4e44d8b17f5d8f8b369ad40cf15
5
5
  SHA512:
6
- metadata.gz: 2e216682fe3dce4eedbec94ff3d4073084652b405747383085430b16d8abebf0e1b20ecaff2632591592de142db52c34dd98103b27ef31a9df84df2135138549
7
- data.tar.gz: 62a72d94b60acd3f92dd0d5da33cbc3b14ee02aecb3380a365c5c5d2bffd8400d0adf96962d19474620d0977a52a6b6a687aca3f10203be1d67a77ced488c6bd
6
+ metadata.gz: b1eba461ca7c2c0ec1ec030f0bfaa2918adc9e74678284daaf215ec16f69bbb5a8f2be5292253a9d55b6bfc86a5404b50e02761146a7a1e1ff0fcd21d4e52e3e
7
+ data.tar.gz: b871a90a6488754cf5e5f984cbe893766a2d775e9f75fb86b0619c361354de36a749b619b2f62c42ba73aceb1567afdfb3a35866732a7d5da61469957750ac0e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vop (0.3.4)
4
+ vop (0.3.5)
5
5
  net-scp
6
6
  net-ssh
7
7
  redis
@@ -3,7 +3,8 @@ description "all read-only commands get <command>! commands that invalidate auto
3
3
  run do
4
4
  count = 0
5
5
  @op.commands.values.each do |command|
6
- if command.read_only
6
+ # actually, all read-only commands *and* all commands with an invalidation block
7
+ if command.read_only || command.invalidation_block
7
8
  invalidation_command_name = "#{command.short_name}!"
8
9
  $logger.debug "generating invalidation command #{invalidation_command_name}"
9
10
 
@@ -10,6 +10,7 @@ module Vop
10
10
  attr_accessor :block
11
11
  attr_accessor :params
12
12
  attr_accessor :description
13
+ attr_accessor :invalidation_block
13
14
 
14
15
  attr_accessor :show_options
15
16
  attr_accessor :dont_register
@@ -22,6 +23,7 @@ module Vop
22
23
  @description = nil
23
24
 
24
25
  @block = lambda { |params| $logger.warn "#{name} not yet implemented!" }
26
+ @invalidation_block = nil
25
27
 
26
28
  @params = []
27
29
  @show_options = {}
@@ -69,7 +69,9 @@ module Vop
69
69
  (@context.keys.include?(param.name) && param.wants_context)
70
70
  end
71
71
 
72
- $logger.debug "missing params : #{missing_mandatory_params.map(&:name)}"
72
+ if missing_mandatory_params.size > 0
73
+ $logger.debug "missing params : #{missing_mandatory_params.map(&:name)}"
74
+ end
73
75
 
74
76
  if missing_mandatory_params.size > 0
75
77
  @missing_params = missing_mandatory_params
@@ -85,6 +85,10 @@ module Vop
85
85
  @command.block = block
86
86
  end
87
87
 
88
+ def invalidate(&block)
89
+ @command.invalidation_block = block
90
+ end
91
+
88
92
  end
89
93
 
90
94
  end
@@ -1,3 +1,3 @@
1
1
  module Vop
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -111,6 +111,10 @@ module Vop
111
111
  @plugin_config_path ||= File.join(config_path, "plugins.d")
112
112
  end
113
113
 
114
+ def executor
115
+ @executor ||= Executor.new(self)
116
+ end
117
+
114
118
  def load_from(locations, load_options = {})
115
119
  found = finder.find(locations)
116
120
  plugins = loader.load(found, load_options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp T.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-25 00:00:00.000000000 Z
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh