roqua-support 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitlab-ci.yml +10 -5
- data/Appraisals +7 -7
- data/Gemfile +1 -0
- data/Gemfile.lock +4 -2
- data/gemfiles/rails42.gemfile +3 -1
- data/gemfiles/rails50.gemfile +3 -1
- data/gemfiles/rails51.gemfile +3 -1
- data/gemfiles/{rails41.gemfile → rails52.gemfile} +3 -1
- data/lib/roqua-support/version.rb +1 -1
- data/lib/roqua/logging/roqua_logging_railtie.rb +13 -0
- data/lib/roqua/support.rb +1 -0
- data/spec/roqua/logging/roqua_logging_railtie_spec.rb +42 -0
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 91c71268f3678a8ff7501d5db547eb5edd6115cf7d403b3383ce3a6c959b0b86
|
|
4
|
+
data.tar.gz: 8442d43c71a5185051512d0055118c5607722308a902ce11965dfcfb2de549e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e97ed287127da20afee3bd07833bc6dc44e4548834518cf0ace7fe39685ace2bdbab4d20810dc51913a8b6d85c32129b590cc7fe45aa897976d50c9cc8565d91
|
|
7
|
+
data.tar.gz: a44868fd90c07f751c9b894d636d1c5c32be83d0ce37c81b094e4544439c47bd0e5a36d4a8bd8704b60420d42809785bfde60b4225b31b8dd5cc94686e5ff84c
|
data/.gitlab-ci.yml
CHANGED
|
@@ -21,11 +21,6 @@ before_script:
|
|
|
21
21
|
paths:
|
|
22
22
|
- .gems
|
|
23
23
|
|
|
24
|
-
rails_41_ruby_23:
|
|
25
|
-
<<: *ruby_23
|
|
26
|
-
script:
|
|
27
|
-
- bundle exec appraisal rails41 bundle exec rspec
|
|
28
|
-
|
|
29
24
|
rails_42_ruby_23:
|
|
30
25
|
<<: *ruby_23
|
|
31
26
|
script:
|
|
@@ -50,3 +45,13 @@ rails_51_ruby_24:
|
|
|
50
45
|
<<: *ruby_24
|
|
51
46
|
script:
|
|
52
47
|
- bundle exec appraisal rails51 bundle exec rspec
|
|
48
|
+
|
|
49
|
+
rails_52_ruby_23:
|
|
50
|
+
<<: *ruby_23
|
|
51
|
+
script:
|
|
52
|
+
- bundle exec appraisal rails52 bundle exec rspec
|
|
53
|
+
|
|
54
|
+
rails_52_ruby_24:
|
|
55
|
+
<<: *ruby_24
|
|
56
|
+
script:
|
|
57
|
+
- bundle exec appraisal rails52 bundle exec rspec
|
data/Appraisals
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
appraise "rails41" do
|
|
2
|
-
gem "activesupport", "4.1"
|
|
3
|
-
end
|
|
4
|
-
|
|
5
1
|
appraise "rails42" do
|
|
6
|
-
gem "activesupport", "4.2"
|
|
2
|
+
gem "activesupport", "~> 4.2.10"
|
|
7
3
|
end
|
|
8
4
|
|
|
9
5
|
appraise "rails50" do
|
|
10
|
-
gem "activesupport", "5.0"
|
|
6
|
+
gem "activesupport", "~> 5.0.0"
|
|
11
7
|
end
|
|
12
8
|
|
|
13
9
|
appraise "rails51" do
|
|
14
|
-
gem "activesupport", "5.1"
|
|
10
|
+
gem "activesupport", "~> 5.1.0"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
appraise "rails52" do
|
|
14
|
+
gem "activesupport", "~> 5.2.0"
|
|
15
15
|
end
|
data/Gemfile
CHANGED
|
@@ -10,6 +10,7 @@ group :test do
|
|
|
10
10
|
gem 'actionpack', '>= 4.0'
|
|
11
11
|
gem 'active_interaction', '~> 3.0'
|
|
12
12
|
gem 'appsignal'
|
|
13
|
+
gem 'climate_control' # For ENV modification in specs
|
|
13
14
|
gem 'combustion', '~> 0.5.2'
|
|
14
15
|
gem 'fakefs', require: 'fakefs/safe'
|
|
15
16
|
gem 'guard-rspec', '~> 4.2.6'
|
data/Gemfile.lock
CHANGED
|
@@ -8,7 +8,7 @@ GIT
|
|
|
8
8
|
PATH
|
|
9
9
|
remote: .
|
|
10
10
|
specs:
|
|
11
|
-
roqua-support (0.1.
|
|
11
|
+
roqua-support (0.1.32)
|
|
12
12
|
active_interaction (~> 3.0)
|
|
13
13
|
activesupport (>= 3.2, < 6)
|
|
14
14
|
naught (~> 1.0)
|
|
@@ -52,6 +52,7 @@ GEM
|
|
|
52
52
|
arel (7.1.4)
|
|
53
53
|
ast (2.3.0)
|
|
54
54
|
builder (3.2.3)
|
|
55
|
+
climate_control (0.2.0)
|
|
55
56
|
coderay (1.1.1)
|
|
56
57
|
combustion (0.5.5)
|
|
57
58
|
activesupport (>= 3.0.0)
|
|
@@ -182,6 +183,7 @@ DEPENDENCIES
|
|
|
182
183
|
appraisal
|
|
183
184
|
appsignal
|
|
184
185
|
bundler (~> 1.0)
|
|
186
|
+
climate_control
|
|
185
187
|
combustion (~> 0.5.2)
|
|
186
188
|
delayed_job_active_record
|
|
187
189
|
fakefs
|
|
@@ -197,4 +199,4 @@ DEPENDENCIES
|
|
|
197
199
|
timecop
|
|
198
200
|
|
|
199
201
|
BUNDLED WITH
|
|
200
|
-
1.16.
|
|
202
|
+
1.16.4
|
data/gemfiles/rails42.gemfile
CHANGED
|
@@ -4,13 +4,15 @@ source "https://rubygems.org"
|
|
|
4
4
|
|
|
5
5
|
gem "appraisal"
|
|
6
6
|
gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
|
|
7
|
-
gem "activesupport", "4.2"
|
|
7
|
+
gem "activesupport", "~> 4.2.10"
|
|
8
8
|
|
|
9
9
|
group :test do
|
|
10
10
|
gem "actionpack", ">= 4.0"
|
|
11
11
|
gem "active_interaction", "~> 3.0"
|
|
12
12
|
gem "appsignal"
|
|
13
|
+
gem "climate_control"
|
|
13
14
|
gem "combustion", "~> 0.5.2"
|
|
15
|
+
gem "fakefs", :require => "fakefs/safe"
|
|
14
16
|
gem "guard-rspec", "~> 4.2.6"
|
|
15
17
|
gem "responders"
|
|
16
18
|
gem "rspec-instrumentation-matcher"
|
data/gemfiles/rails50.gemfile
CHANGED
|
@@ -4,13 +4,15 @@ source "https://rubygems.org"
|
|
|
4
4
|
|
|
5
5
|
gem "appraisal"
|
|
6
6
|
gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
|
|
7
|
-
gem "activesupport", "5.0"
|
|
7
|
+
gem "activesupport", "~> 5.0.0"
|
|
8
8
|
|
|
9
9
|
group :test do
|
|
10
10
|
gem "actionpack", ">= 4.0"
|
|
11
11
|
gem "active_interaction", "~> 3.0"
|
|
12
12
|
gem "appsignal"
|
|
13
|
+
gem "climate_control"
|
|
13
14
|
gem "combustion", "~> 0.5.2"
|
|
15
|
+
gem "fakefs", :require => "fakefs/safe"
|
|
14
16
|
gem "guard-rspec", "~> 4.2.6"
|
|
15
17
|
gem "responders"
|
|
16
18
|
gem "rspec-instrumentation-matcher"
|
data/gemfiles/rails51.gemfile
CHANGED
|
@@ -4,13 +4,15 @@ source "https://rubygems.org"
|
|
|
4
4
|
|
|
5
5
|
gem "appraisal"
|
|
6
6
|
gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
|
|
7
|
-
gem "activesupport", "5.1"
|
|
7
|
+
gem "activesupport", "~> 5.1.0"
|
|
8
8
|
|
|
9
9
|
group :test do
|
|
10
10
|
gem "actionpack", ">= 4.0"
|
|
11
11
|
gem "active_interaction", "~> 3.0"
|
|
12
12
|
gem "appsignal"
|
|
13
|
+
gem "climate_control"
|
|
13
14
|
gem "combustion", "~> 0.5.2"
|
|
15
|
+
gem "fakefs", :require => "fakefs/safe"
|
|
14
16
|
gem "guard-rspec", "~> 4.2.6"
|
|
15
17
|
gem "responders"
|
|
16
18
|
gem "rspec-instrumentation-matcher"
|
|
@@ -4,13 +4,15 @@ source "https://rubygems.org"
|
|
|
4
4
|
|
|
5
5
|
gem "appraisal"
|
|
6
6
|
gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
|
|
7
|
-
gem "activesupport", "
|
|
7
|
+
gem "activesupport", "~> 5.2.0"
|
|
8
8
|
|
|
9
9
|
group :test do
|
|
10
10
|
gem "actionpack", ">= 4.0"
|
|
11
11
|
gem "active_interaction", "~> 3.0"
|
|
12
12
|
gem "appsignal"
|
|
13
|
+
gem "climate_control"
|
|
13
14
|
gem "combustion", "~> 0.5.2"
|
|
15
|
+
gem "fakefs", :require => "fakefs/safe"
|
|
14
16
|
gem "guard-rspec", "~> 4.2.6"
|
|
15
17
|
gem "responders"
|
|
16
18
|
gem "rspec-instrumentation-matcher"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class RoquaLoggingRailtie < Rails::Railtie
|
|
2
|
+
initializer 'roqua_logging_railtie.configure_roqua_logging' do
|
|
3
|
+
RoquaLoggingRailtie.configure if ENV['RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER'].present?
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def self.configure
|
|
7
|
+
Roqua.logger = ActiveSupport::Logger.new(STDOUT)
|
|
8
|
+
Roqua.logger.logger.formatter = Logger::Formatter.new
|
|
9
|
+
|
|
10
|
+
require 'roqua/support/request_logger'
|
|
11
|
+
Roqua::Support::RequestLogger.attach_to :action_controller
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/roqua/support.rb
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
require 'roqua/support/request_logger'
|
|
4
|
+
require 'roqua/logging/roqua_logging_railtie'
|
|
5
|
+
|
|
6
|
+
describe RoquaLoggingRailtie do
|
|
7
|
+
let(:initializer_key) { 'roqua_logging_railtie.configure_roqua_logging' }
|
|
8
|
+
|
|
9
|
+
subject(:initializer) do
|
|
10
|
+
Rails.application.initializers.select { |i| i.name == initializer_key }.first
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it 'loads the initializer' do
|
|
14
|
+
expect(Rails.application.initializers.map(&:name)).to include(initializer_key)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'attaches Roqua::Support::RequestLogger to action_controller' do
|
|
18
|
+
expect(Roqua::Support::RequestLogger).to receive(:attach_to).with(:action_controller)
|
|
19
|
+
RoquaLoggingRailtie.configure
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'logs to STDOUT' do
|
|
23
|
+
RoquaLoggingRailtie.configure
|
|
24
|
+
expect(ActiveSupport::Logger.logger_outputs_to?(Roqua.logger.logger, STDOUT)).to be_truthy
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'when RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER is blank' do
|
|
28
|
+
expect(RoquaLoggingRailtie).to_not receive(:configure)
|
|
29
|
+
|
|
30
|
+
ClimateControl.modify RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER: '' do
|
|
31
|
+
initializer.block.call
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'when RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER is present' do
|
|
36
|
+
expect(RoquaLoggingRailtie).to receive(:configure)
|
|
37
|
+
|
|
38
|
+
ClimateControl.modify RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER: 'true' do
|
|
39
|
+
initializer.block.call
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roqua-support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marten Veldthuis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_interaction
|
|
@@ -196,10 +196,10 @@ files:
|
|
|
196
196
|
- README.md
|
|
197
197
|
- Rakefile
|
|
198
198
|
- circle.yml
|
|
199
|
-
- gemfiles/rails41.gemfile
|
|
200
199
|
- gemfiles/rails42.gemfile
|
|
201
200
|
- gemfiles/rails50.gemfile
|
|
202
201
|
- gemfiles/rails51.gemfile
|
|
202
|
+
- gemfiles/rails52.gemfile
|
|
203
203
|
- lib/roqua-support.rb
|
|
204
204
|
- lib/roqua-support/railtie.rb
|
|
205
205
|
- lib/roqua-support/version.rb
|
|
@@ -212,6 +212,7 @@ files:
|
|
|
212
212
|
- lib/roqua/core_ext/enumerable/sort_by_alphanum.rb
|
|
213
213
|
- lib/roqua/core_ext/fabrication/singleton.rb
|
|
214
214
|
- lib/roqua/core_ext/fixnum/clamp.rb
|
|
215
|
+
- lib/roqua/logging/roqua_logging_railtie.rb
|
|
215
216
|
- lib/roqua/probes/base_probe.rb
|
|
216
217
|
- lib/roqua/probes/delayed_job_probe.rb
|
|
217
218
|
- lib/roqua/probes/monitoring_probe.rb
|
|
@@ -247,6 +248,7 @@ files:
|
|
|
247
248
|
- spec/roqua/core_ext/enumerable/sort_by_alphanum_spec.rb
|
|
248
249
|
- spec/roqua/core_ext/fabrication/singleton_spec.rb
|
|
249
250
|
- spec/roqua/core_ext/fixnum/clamp_spec.rb
|
|
251
|
+
- spec/roqua/logging/roqua_logging_railtie_spec.rb
|
|
250
252
|
- spec/roqua/probes/delayed_job_probe_spec.rb
|
|
251
253
|
- spec/roqua/probes/monitoring_probe_spec.rb
|
|
252
254
|
- spec/roqua/responders/active_interaction_aware_responder_spec.rb
|
|
@@ -284,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
284
286
|
version: '0'
|
|
285
287
|
requirements: []
|
|
286
288
|
rubyforge_project:
|
|
287
|
-
rubygems_version: 2.
|
|
289
|
+
rubygems_version: 2.7.6
|
|
288
290
|
signing_key:
|
|
289
291
|
specification_version: 4
|
|
290
292
|
summary: Helper objects and proxies used by a lot of RoQua applications
|
|
@@ -300,6 +302,7 @@ test_files:
|
|
|
300
302
|
- spec/roqua/core_ext/enumerable/sort_by_alphanum_spec.rb
|
|
301
303
|
- spec/roqua/core_ext/fabrication/singleton_spec.rb
|
|
302
304
|
- spec/roqua/core_ext/fixnum/clamp_spec.rb
|
|
305
|
+
- spec/roqua/logging/roqua_logging_railtie_spec.rb
|
|
303
306
|
- spec/roqua/probes/delayed_job_probe_spec.rb
|
|
304
307
|
- spec/roqua/probes/monitoring_probe_spec.rb
|
|
305
308
|
- spec/roqua/responders/active_interaction_aware_responder_spec.rb
|