evnt 3.6.3 → 3.6.4

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: d6914876f490b7f506f0bd135ac831e8acffb9e5fb43415f58058caabd247b89
4
- data.tar.gz: bccddfbc82d68e6b0a4799dd1db223cb8eb29c53b74b2ce59cfbcbd208d15ad5
3
+ metadata.gz: 48a269bcba5e53791dc505227f9dc91aab4b0ed4124d8e86c3b58667355e33e8
4
+ data.tar.gz: 993d4e0eb8dd418d469796add41b7df78000fc2bef25ac9c339143eb9cc8b2d8
5
5
  SHA512:
6
- metadata.gz: c66d8707ed27a203347788861f27f7acdb6220bae5fe6288ce63b4b162dafc19ace35fe0e4e077274e743f908f1c0ca2acd379cdc02441cf1aeb2956ba502ddf
7
- data.tar.gz: 7e01984cd1ae84b961ff41fad33e0fd518c5543c172eb821a5315936767637615e81efb3d215e408fa824e79c087d11e4daeceba8d76c8f57f17c97fc76aff08
6
+ metadata.gz: d82983ce2a886410416941fa0b148e0617a7226dcc1f50f0fc144f9f54c9860a44c02379691503e9ab954a493c8f408f6534f198f52ff3c384863a266d87d0fb
7
+ data.tar.gz: d70d16ef3d6470d9b77d15ffa811e2b2cd272da31566d4ea2e96d0fb684e120d8d5fb2de146a551a9b05c3ac669b885d3308eb66d17fbe7afe632f3d5d6b1b92
@@ -213,10 +213,11 @@ module Evnt
213
213
 
214
214
  # This function sets the single validation request for a command parameter.
215
215
  def validates(param, options)
216
- @@validations ||= []
217
- @@validations.push(param: param, options: options)
216
+ @validations ||= []
217
+ @validations.push(param: param, options: options)
218
+ command_validations = @validations
218
219
 
219
- define_method('_validations', -> { @@validations })
220
+ define_method('_validations', -> { return command_validations })
220
221
  end
221
222
 
222
223
  # This function sets the normalize params function for the command.
@@ -217,10 +217,11 @@ module Evnt
217
217
 
218
218
  # This function sets the default options that should be used by the event.
219
219
  def default_options(options)
220
- @@options ||= {}
221
- @@options.merge!(options)
220
+ @options ||= {}
221
+ @options.merge!(options)
222
+ event_options = @options
222
223
 
223
- define_method('_default_options', -> { @@options })
224
+ define_method('_default_options', -> { return event_options })
224
225
  end
225
226
 
226
227
  # This function sets the name for the event.
@@ -230,34 +231,38 @@ module Evnt
230
231
 
231
232
  # This function sets the list of payload attributes for the event.
232
233
  def payload_attributes_are(*attributes)
233
- @@payload_attributes ||= []
234
- @@payload_attributes.concat(attributes).uniq!
234
+ @payload_attributes ||= []
235
+ @payload_attributes.concat(attributes).uniq!
236
+ event_payload_attributes = @payload_attributes
235
237
 
236
- define_method('_payload_attributes', -> { @@payload_attributes })
238
+ define_method('_payload_attributes', -> { return event_payload_attributes })
237
239
  end
238
240
 
239
241
  # This function sets the list of extras attributes for the event.
240
242
  def extras_attributes_are(*attributes)
241
- @@extras_attributes ||= []
242
- @@extras_attributes.concat(attributes).uniq!
243
+ @extras_attributes ||= []
244
+ @extras_attributes.concat(attributes).uniq!
245
+ event_extras_attributes = @extras_attributes
243
246
 
244
- define_method('_extras_attributes', -> { @@extras_attributes })
247
+ define_method('_extras_attributes', -> { return event_extras_attributes })
245
248
  end
246
249
 
247
250
  # DEPRECATED: This function sets the list of attributes for the event.
248
251
  def attributes_are(*attributes)
249
- @@payload_attributes ||= []
250
- @@payload_attributes.concat(attributes).uniq!
252
+ @payload_attributes ||= []
253
+ @payload_attributes.concat(attributes).uniq!
254
+ event_payload_attributes = @payload_attributes
251
255
 
252
- define_method('_payload_attributes', -> { @@payload_attributes })
256
+ define_method('_payload_attributes', -> { return event_payload_attributes })
253
257
  end
254
258
 
255
259
  # This function sets the list of handlers for the event.
256
260
  def handlers_are(handlers)
257
- @@handlers ||= []
258
- @@handlers.concat(handlers)
261
+ @handlers ||= []
262
+ @handlers.concat(handlers)
263
+ event_handlers = @handlers
259
264
 
260
- define_method('_handlers', -> { @@handlers })
265
+ define_method('_handlers', -> { return event_handlers })
261
266
  end
262
267
 
263
268
  # This function sets the write event function for the event.
@@ -267,10 +272,11 @@ module Evnt
267
272
 
268
273
  # This function is used to add a new handler to the event from the external.
269
274
  def add_handler(handler)
270
- @@handlers ||= []
271
- @@handlers.push(handler)
275
+ @handlers ||= []
276
+ @handlers.push(handler)
277
+ event_handlers = @handlers
272
278
 
273
- define_method('_handlers', -> { @@handlers })
279
+ define_method('_handlers', -> { return event_handlers })
274
280
  end
275
281
 
276
282
  end
@@ -3,6 +3,6 @@
3
3
  # Evnt.
4
4
  module Evnt
5
5
 
6
- VERSION = '3.6.3'
6
+ VERSION = '3.6.4'
7
7
 
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evnt
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.3
4
+ version: 3.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ideonetwork
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler