stealth 1.1.0.rc2 → 1.1.0.rc3

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: 58fbace5ca3cdc2e8be0bfdcadc5f2b9e43dc7c7f814b62ac2813663e644e308
4
- data.tar.gz: 73de6fb00610b9661e382bf75aa08290b29442d8c197bd0f8d3ec78ecde24b1e
3
+ metadata.gz: 250f82dc387a6866ae8bc34e3fc28edca4fce6b04f51bb56511b91425a3f96cf
4
+ data.tar.gz: c2656a147103f6ff731a5d71f826addb2738077cbc76753d040e46b59be3487b
5
5
  SHA512:
6
- metadata.gz: c4eb034b8b80f19881762300057d315bd2161c593ff871be28d7adf24096ef67f25519a76fae7ffa56cbc2bfe5f95f05f876505352beac279081ca4345536bab
7
- data.tar.gz: 6d2fbd155f64ee66ebf51723d16709805e45ae1ba0a3c05b94c85ac0a89e6a47671987d2e4731d774f1e03817bedbae70455a6718cfec6061e12f1b214a4dfd5
6
+ metadata.gz: 5dd442c7a6e1ae50c94cb797122f2f6b9ff7392236f2aa9798ddbf7e29cb0c18189fac213acea353e3d48f3c6a71c670fbe9048b707b95e58636f9c06353c80e
7
+ data.tar.gz: 4f2d0024db5c0199587f468c86263e332aec1545568bd09a54f0105a5a0d93268cbacbdf100aa43282d0b8a2ec3c6c4cd95caa84a8ae591a9e6a2e83477c0024
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stealth (1.1.0.alpha)
4
+ stealth (1.1.0.rc2)
5
5
  activesupport (~> 5.2)
6
6
  multi_json (~> 1.12)
7
7
  puma (~> 3.10)
@@ -60,7 +60,7 @@ GEM
60
60
  tilt (~> 2.0)
61
61
  thor (0.20.3)
62
62
  thread_safe (0.3.6)
63
- tilt (2.0.8)
63
+ tilt (2.0.9)
64
64
  tzinfo (1.2.5)
65
65
  thread_safe (~> 0.1)
66
66
 
@@ -76,4 +76,4 @@ DEPENDENCIES
76
76
  stealth!
77
77
 
78
78
  BUNDLED WITH
79
- 1.16.3
79
+ 1.16.6
data/README.md CHANGED
@@ -33,7 +33,7 @@ Currently, there are gems for:
33
33
 
34
34
  ## Docs
35
35
 
36
- You can find our full docs [here](https://hellostealth.org/docs).
36
+ You can find our full docs [here](https://hellostealth.org/docs). If something is not clear in the docs, please file an issue! We consider all shortcomings in the docs as bugs.
37
37
 
38
38
  ## Thanks
39
39
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0.rc2
1
+ 1.1.0.rc3
data/lib/stealth/base.rb CHANGED
@@ -34,7 +34,11 @@ module Stealth
34
34
  end
35
35
 
36
36
  def self.config
37
- @configuration
37
+ Thread.current[:configuration] ||= load_services_config
38
+ end
39
+
40
+ def self.configuration=(config)
41
+ Thread.current[:configuration] = config
38
42
  end
39
43
 
40
44
  def self.set_config_defaults(config)
@@ -43,10 +47,13 @@ module Stealth
43
47
  end
44
48
 
45
49
  # Loads the services.yml configuration unless one has already been loaded
46
- def self.load_services_config(services_yaml)
50
+ def self.load_services_config(services_yaml=nil)
47
51
  @semaphore ||= Mutex.new
52
+ services_yaml ||= Stealth.load_services_config(
53
+ File.read(File.join(Stealth.root, 'config', 'services.yml'))
54
+ )
48
55
 
49
- @configuration ||= begin
56
+ Thread.current[:configuration] ||= begin
50
57
  @semaphore.synchronize do
51
58
  services_config = YAML.load(ERB.new(services_yaml).result)
52
59
 
@@ -64,8 +71,8 @@ module Stealth
64
71
 
65
72
  # Same as `load_services_config` but forces the loading even if one has
66
73
  # already been loaded
67
- def self.load_services_config!(services_yaml)
68
- @configuration = nil
74
+ def self.load_services_config!(services_yaml=nil)
75
+ Thread.current[:configuration] = nil
69
76
  load_services_config(services_yaml)
70
77
  end
71
78
 
@@ -1,4 +1,2 @@
1
- Stealth.load_services_config(File.read(File.join(File.dirname(__FILE__), 'services.yml')))
2
-
3
1
  REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost:6379/0'
4
2
  $redis = Redis.new(:url => REDIS_URL)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc2
4
+ version: 1.1.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Gomes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-29 00:00:00.000000000 Z
12
+ date: 2018-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra