rubypitaya 3.12.2 → 3.12.3

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: 4b19010c6bf1e32e5d3b3de6c7f8f37272c2833bbced64a6885cd0a9d7d801b2
4
- data.tar.gz: 1893209d316d56005591bc6087c3067b9854e4f91c59ff20c1c43bca9c4a1fd6
3
+ metadata.gz: 270ca626bda8a04f8f28d27b28cf0021c3ae6db4993970ad349907e101f8378f
4
+ data.tar.gz: 3347a0ae3df752f8cfee83683e4b66ae9032469fddbb778b0eb0a3993969704d
5
5
  SHA512:
6
- metadata.gz: 47358ef6e6c7a764d19f1432b200f695b9fb226425402605cbb00e9fbbbac554b8e454f0b487ee38cc69e714b2c6c230233683679fe858cc8e0ce598d8a46202
7
- data.tar.gz: 8c5da7ab60e71c37aa24693d93bb6c5dbc96474976d0053304eda09e6b2887ef1b88a0190a47337497b438f668c0d2c64576f7d1afe9a40f772246829dd33a71
6
+ metadata.gz: 4411b69cf50a057d5deb1d9464f81a8eebe6c570e76cde26bf6b477f4a28aea5f1060644a4563cf104dda830f5da7157d41bf054e92d0f8fdf1963e31e0d7935
7
+ data.tar.gz: 319092fadeefe0a79ec7170d0b7a1b31e751bcf6b76cda1363b7c8f3d371b7a6c33a5b459788567b7e453f87d6a1caadadabe6c95141777fb5b1b6593bd7cb88
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '3.12.2'
3
+ gem 'rubypitaya', '3.12.3'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.14.2'
@@ -94,7 +94,7 @@ GEM
94
94
  rspec-support (~> 3.12.0)
95
95
  rspec-support (3.12.0)
96
96
  ruby2_keywords (0.0.5)
97
- rubypitaya (3.12.2)
97
+ rubypitaya (3.12.3)
98
98
  activerecord (= 7.0.4)
99
99
  etcdv3 (= 0.11.5)
100
100
  google-protobuf (= 3.21.12)
@@ -132,7 +132,7 @@ DEPENDENCIES
132
132
  listen (= 3.8.0)
133
133
  pry (= 0.14.2)
134
134
  rspec (= 3.12.0)
135
- rubypitaya (= 3.12.2)
135
+ rubypitaya (= 3.12.3)
136
136
  sinatra-contrib (= 3.0.5)
137
137
 
138
138
  BUNDLED WITH
@@ -11,16 +11,15 @@ module RubyPitaya
11
11
 
12
12
  def self.initialize_before_suite
13
13
  default_setup = Setup.new.get_config
14
+ default_config = ConfigCore.new
14
15
 
15
16
  @@log = Logger.new('/dev/null')
16
17
  @@setup = SetupSpecHelper.new(default_setup)
17
- @@config = ConfigSpecHelper.new
18
+ @@config = ConfigSpecHelper.new(default_config)
18
19
  @@session = Session.new
19
20
  @@postman = PostmanSpecHelper.new
20
21
  @@services = ServiceHolder.new
21
22
 
22
- @@default_setup = Setup.new
23
-
24
23
  is_cheats_enabled = @@setup.fetch('rubypitaya.server.cheats', true)
25
24
  @@handler_router ||= HandlerRouter.new(is_cheats_enabled)
26
25
 
@@ -2,13 +2,16 @@ module RubyPitaya
2
2
 
3
3
  class ConfigSpecHelper
4
4
 
5
- def initialize
5
+ def initialize(default_config = {})
6
6
  @config_mock = {}
7
+ @default_config = default_config
7
8
  end
8
9
 
9
10
  def [](key)
10
- split_key = key.split('.')
11
- @config_mock.dig(*split_key)
11
+ result = @config_mock[key]
12
+ return result unless result.nil?
13
+
14
+ return @default_config[key]
12
15
  end
13
16
 
14
17
  def auto_reload
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '3.12.2'
2
+ VERSION = '3.12.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypitaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.2
4
+ version: 3.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-16 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg