sapience 2.3.4 → 2.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/sapience/error_handler/sentry.rb +1 -0
- data/lib/sapience/sapience.rb +9 -7
- data/lib/sapience/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 439902e12b2cb4d1967a2e2bf1d89b5c779a67a5
|
4
|
+
data.tar.gz: 89f60374e6412c6b94c6325c597d9b55d7f548c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a63d295f92bfd1aa6ccc792e1ab7ea706bfbe16abaffc2227b950a81520dedbbc09d8379be516053047599ae3dd5a71228aa5cbf0808fb15cad49b821d92026
|
7
|
+
data.tar.gz: eb4ed3b886846ae8c752631f181e462302025374a39d79a887342430af478a1f5c70ce848dacaf1ee051739ccc7d2d5efde32542f6b9f637dbd14082cfdd78a9
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
## v2.3.5
|
2
|
+
|
3
|
+
- Set Sapience.config.app_name when APP_NAME environment variable is set
|
4
|
+
|
1
5
|
## v2.3.3
|
2
6
|
|
3
7
|
- Put back single_thread_executor and leave immediate_executor only for test environment
|
4
8
|
|
5
|
-
|
6
9
|
## v2.3.2
|
7
10
|
|
8
11
|
- Changing the log level of ActiveRecord has the side effect of changing the
|
@@ -109,6 +109,7 @@ module Sapience
|
|
109
109
|
options = payload[:extra] ? payload : { extra: payload }
|
110
110
|
|
111
111
|
Raven.capture_type(data, options) if @configured
|
112
|
+
true
|
112
113
|
rescue Exception => ex # rubocop:disable RescueException
|
113
114
|
Sapience.logger.error("Raven.capture_type failed with", payload, ex)
|
114
115
|
end
|
data/lib/sapience/sapience.rb
CHANGED
@@ -80,7 +80,6 @@ module Sapience
|
|
80
80
|
@@metrics = nil
|
81
81
|
@@error_handler = nil
|
82
82
|
@@environment = nil
|
83
|
-
@@app_name = nil
|
84
83
|
@@configured = false
|
85
84
|
@@config_hash = nil
|
86
85
|
clear_tags!
|
@@ -109,12 +108,9 @@ module Sapience
|
|
109
108
|
end
|
110
109
|
|
111
110
|
def self.app_name
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
@@app_name ||= ENV[APP_NAME]
|
116
|
-
fail AppNameMissing, "app_name is not configured. See documentation for more information" unless @@app_name
|
117
|
-
@@app_name
|
111
|
+
config.app_name ||= app_name_builder
|
112
|
+
fail AppNameMissing, "app_name is not configured. See documentation for more information" unless config.app_name
|
113
|
+
config.app_name
|
118
114
|
end
|
119
115
|
|
120
116
|
def self.namify(appname, sep = "_")
|
@@ -471,4 +467,10 @@ module Sapience
|
|
471
467
|
def self.root
|
472
468
|
@_root ||= Gem::Specification.find_by_name("sapience").gem_dir
|
473
469
|
end
|
470
|
+
|
471
|
+
def self.app_name_builder
|
472
|
+
config_hash.fetch(environment) { {} }["app_name"] ||
|
473
|
+
config_hash.fetch(DEFAULT_ENV) { {} }["app_name"] ||
|
474
|
+
ENV[APP_NAME]
|
475
|
+
end
|
474
476
|
end
|
data/lib/sapience/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sapience
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|