rservicebus2 0.2.22 → 0.2.23

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: bdf786cee730fd3a1cb0ecb384d566ead93171cfa566b2b23bff09ab4dc75116
4
- data.tar.gz: 4f8d812c2cf83ce2c1c561038d6d7b545afdb4e8ba5db414554fda52e19eb3d0
3
+ metadata.gz: 71f2b7544eaabb8ac574d01767ff0649ac84cd5d3be3e08978f7e81a66a55fbe
4
+ data.tar.gz: abb04b187ab3c1bdc2b798df1172305f03e527b932e8a84079de203b03ac938c
5
5
  SHA512:
6
- metadata.gz: 3787ed00c7dd8947ae2e1b000f3953afb34ceb8ffce6925f9c97a3d7ce67cf8d10e2e0d7989da8b7abee110a608066a8e1f95acb752665376beb811a0636d519
7
- data.tar.gz: c8f21f22ea7132ecdf43d6a14c681f68071def8e611ab91e1388fa2dbeaf38ad02c2e89ce9ded75551e444ade20eea54d0493f9252fee2dca2e5cab2fd6c3891
6
+ metadata.gz: f4e0fadea46712cb6d027936620eb2cbdd78b25dbbfc38c912f16eedb1a2793ccdbc71535ee34c68764b0433ba6c01c0e7d951fe0ed93c8b034d0e3153fc8958
7
+ data.tar.gz: 433bf092c220e1eafe3b3ae365fe9633bcabec7330c940445a983bbce2da65db835d54026fa95848ed72b163bf3fbd17cf6dc6eacbe1aa950fb1608a42667b73
@@ -99,6 +99,7 @@ module RServiceBus2
99
99
 
100
100
  def initialize
101
101
  RServiceBus2.rlog "Current directory: #{Dir.pwd}"
102
+ YamlSafeLoader.instance
102
103
  @config = ConfigFromEnv.new
103
104
  .load_host_section
104
105
  .load_contracts
@@ -10,24 +10,18 @@ class YamlSafeLoader
10
10
  DEFAULT_PERMITTED_CLASSES = 'RServiceBus2::Message,Time,UUIDTools::UUID,YamlSafeLoader,' \
11
11
  'URI::Generic,URI::RFC3986_Parser,Symbol,Regexp'
12
12
 
13
- def init
14
- return unless @permitted_classes.nil?
15
-
13
+ def initialize
16
14
  string = "#{RServiceBus2.get_value('PERMITTED_CLASSES_BASE', DEFAULT_PERMITTED_CLASSES)}," \
17
15
  "#{RServiceBus2.get_value('PERMITTED_CLASSES', '')}"
18
16
  @permitted_classes = CSV.parse(string)[0].reject { |c| c.to_s.rstrip.empty? }
19
17
  end
20
18
 
21
19
  def add_permitted_class(string)
22
- init
23
-
24
20
  @permitted_classes << string
25
21
  @permitted_classes.uniq!
26
22
  end
27
23
 
28
24
  def load(body)
29
- init
30
-
31
25
  YAML.safe_load(body, permitted_classes: @permitted_classes)
32
26
  end
33
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Irvine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-01 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beanstalk-client