roqua-support 0.1.32 → 0.1.33

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
- SHA1:
3
- metadata.gz: a9d0ec0470625062a0df4edb555e4147b66ad68d
4
- data.tar.gz: 7a6a0a0a4724b6c669d33f270c287440c0aa854f
2
+ SHA256:
3
+ metadata.gz: 91c71268f3678a8ff7501d5db547eb5edd6115cf7d403b3383ce3a6c959b0b86
4
+ data.tar.gz: 8442d43c71a5185051512d0055118c5607722308a902ce11965dfcfb2de549e3
5
5
  SHA512:
6
- metadata.gz: cbd3b91615e9541dbef76167809a7fe2e50134a810605d9aa46aafa75d3f16bfc192f037dbebc34b4919b09950060b5014d925022ed9d15fa1ace34acf259317
7
- data.tar.gz: 96ffc851835f35ff9a866fff1c9d7152a85d14ae93599759d554bace1e8352f364099233cb6549d5e7c619cc25d6bda1211efd9412e0ccd689ac562a0339dbde
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.31)
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.2
202
+ 1.16.4
@@ -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"
@@ -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"
@@ -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", "4.1"
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"
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.1.32'.freeze
3
+ VERSION = '0.1.33'.freeze
4
4
  end
5
5
  end
@@ -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
@@ -1,4 +1,5 @@
1
1
  require 'logger'
2
+ require 'roqua/logging/roqua_logging_railtie'
2
3
  require 'roqua/support/instrumentation'
3
4
  require 'roqua/support/log_wrapper'
4
5
  require 'roqua/support/errors'
@@ -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.32
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-08-15 00:00:00.000000000 Z
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.5.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