ansible-ruby 1.0.29 → 1.0.30

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 128d7aaaf33a94fb64e0d45ce330d67d681fca3374e6aa2114d54508c1fcd488
4
- data.tar.gz: 72e17af8d491c0c3cf86248982ed545b2e5f8b2e02665d166064f31a03bf15e4
3
+ metadata.gz: c08dd4ac2f6ce4538c7ccfc700e70eac483db816181871e42c869dcb1356a691
4
+ data.tar.gz: 77fa38677ada09ccb0cdaaead779a1dba1803fb42cde16018d98cf367e3314c3
5
5
  SHA512:
6
- metadata.gz: ea7be3657081c5127ee77debc75f1d0cd4fe293b24aa81a7b52d2ca5d575d480e8c125edbd25c082b50bf851c1e6741cbb5af40beac1366b4fb4ce6bebde38f0
7
- data.tar.gz: 2d57c9d0d95c99dfdd671a54da9aea826d905f574473fb68f9dae6a172996153534063d36ad1c752c2dd3b5acaca0aeea632704ab02817dbb0cf5b214d1ee3cd
6
+ metadata.gz: 2a34132d501c55d7bb6d8e84a7134e182664cf696e5f218a7bb84876667e463520d4323d3896d2a588c426a33e31659b1cc8904bd7ea0a34559346685d022bd0
7
+ data.tar.gz: 02ff5e94af59703744f43263f004e2afed9b80abb40d40f9328cb85fae77d53728a0308b90c7c51dbe7b6aaa0233c13cb96d0b2775571d8b9d6e4200739ecbda
@@ -4,6 +4,7 @@ require 'ansible/ruby/dsl_builders/base'
4
4
  require 'ansible/ruby/dsl_builders/module_call'
5
5
  require 'ansible/ruby/dsl_builders/result'
6
6
  require 'ansible/ruby/models/task'
7
+ require 'ansible/ruby/models/handler'
7
8
  require 'ansible/ruby/dsl_builders/unit'
8
9
 
9
10
  module Ansible
@@ -17,10 +18,10 @@ module Ansible
17
18
  attr_writer :counter_variable
18
19
  end
19
20
 
20
- def initialize(name, context)
21
+ def initialize(name, model)
21
22
  super()
22
23
  @name = name
23
- @context = context
24
+ @model = model
24
25
  @module = nil
25
26
  @inclusion = nil
26
27
  # Until the variable is utilized, we don't know if 'register' should be set, the supplied lambda
@@ -111,7 +112,7 @@ module Ansible
111
112
  args[:block] = @block if @block
112
113
  args[:rescue] = @rescue if @rescue
113
114
  args[:always] = @always if @always
114
- task = @context.new args
115
+ task = @model.new args
115
116
  # Quick feedback if the type is wrong, etc.
116
117
  task.validate! if validate?
117
118
  task
@@ -149,6 +150,10 @@ module Ansible
149
150
  @inclusion = _ansible_include(*args, &block)
150
151
  return
151
152
  end
153
+ if id == :listen && @model == Models::Handler
154
+ @task_args[:listen] = args[0]
155
+ return
156
+ end
152
157
  mcb = ModuleCall.new
153
158
  # only 1 module allowed per task, give a good error message
154
159
  raise "Invalid module call `#{id}' since `#{@module.ansible_name}' module has already been used in this task. Only valid options are #{_valid_attributes}" if @module && mcb.respond_to?(id)
@@ -8,6 +8,8 @@ module Ansible
8
8
  module Ruby
9
9
  module Models
10
10
  class Handler < Task
11
+ attribute :listen
12
+ validates :listen, type: String
11
13
  end
12
14
  end
13
15
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ansible
4
4
  module Ruby
5
- VERSION = '1.0.29'
5
+ VERSION = '1.0.30'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.29
4
+ version: 1.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brady Wied
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-04 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel