ready-for-migration 0.1.4 → 0.1.6

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: f855a777fcbf390d9e7df10b5a2a8b0002623c9b9985a254f7d79f2d25f93990
4
- data.tar.gz: '052758f3910e9864972b96ec3d7d46ea637416a57ca4fad205f91efda59c7709'
3
+ metadata.gz: 6369f63cee99d6f2f8730e4075fc2209da8a0e32dc726b79414258d4c83b091a
4
+ data.tar.gz: 4b9a723df87039df6fa7d7d74fde16ea63630555b889c3568c713242e7592991
5
5
  SHA512:
6
- metadata.gz: 11036a04db24b448d2d06efda25638cbd605e764be39cd12245717e3914ff12c10f92524cc6bde17d6ec5a33f1a9be30c47d3c57a249395f93283fccd983be27
7
- data.tar.gz: 5bf2c1b2beae4df61c6e0f59b007035c9af90fa35ebd2648d6e2c0d5f8eb41e7252e38771df396e2f350dce3c419315ad330a5cef64f594ca2f9c7e9521456c4
6
+ metadata.gz: 043df0826aa722e461ad12928bd3078b1fd9aa1e9f8e17bc3c5639ff1c8460985e757ac2a3a9bade982ad6b1632124d3245d0139b8a9d81b0fd6c05b2eee9bb8
7
+ data.tar.gz: a2ad377a50c6b4d37f351ee6835cc90ee584f01d2b48fa449a8d953f0b1fd8d1c14d44129592fb89460c8e81f5a0364cba1e3a886c9ef2a17b53d4f548772034
@@ -7,6 +7,11 @@ module Ready
7
7
  require config.root.join('app/controllers/concerns/ready/for/migration/health_action_inspectable')
8
8
  Ready::For::Migration::HealthActionInspectable.cache.write(:first_access_time, Time.now)
9
9
  end
10
+
11
+ initializer 'ready-for-migration.initialize_logger' do
12
+ require_relative 'rails_rack_logger_extention'
13
+ end
14
+
10
15
  end
11
16
  end
12
17
  end
@@ -0,0 +1,35 @@
1
+ unless ENV['RFM_ENABLE_LOGGING']
2
+
3
+ module Rails
4
+ module Rack
5
+ class Logger
6
+
7
+ def call_with_silencer(env)
8
+ if env['PATH_INFO'] == mounted_path
9
+ logger.silence do
10
+ call_without_silencer(env)
11
+ end
12
+ else
13
+ call_without_silencer(env)
14
+ end
15
+ end
16
+
17
+ alias_method :call_without_silencer, :call
18
+ alias_method :call, :call_with_silencer
19
+
20
+ private
21
+
22
+ def mounted_path
23
+ if @_mounted_path.nil?
24
+ @_mounted_path = Ready::For::Migration::Engine.routes.path_for(controller: 'ready/for/migration/health', action: 'readiness')
25
+ @_mounted_path = ActionDispatch::Routing::Mapper.normalize_path(@_mounted_path)
26
+ logger.info "Ready::For::Migration::Engine mounted at #{@_mounted_path}"
27
+ end
28
+ @_mounted_path
29
+ end
30
+
31
+ end
32
+ end
33
+ end
34
+
35
+ end
@@ -1,7 +1,7 @@
1
1
  module Ready
2
2
  module For
3
3
  module Migration
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.6'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ready-for-migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bizside-developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-07 00:00:00.000000000 Z
11
+ date: 2024-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -65,6 +65,7 @@ files:
65
65
  - config/routes.rb
66
66
  - lib/ready/for/migration.rb
67
67
  - lib/ready/for/migration/engine.rb
68
+ - lib/ready/for/migration/rails_rack_logger_extention.rb
68
69
  - lib/ready/for/migration/version.rb
69
70
  homepage: https://github.com/maedadev/ready-for-migration
70
71
  licenses:
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  - !ruby/object:Gem::Version
86
87
  version: '0'
87
88
  requirements: []
88
- rubygems_version: 3.1.6
89
+ rubygems_version: 3.4.22
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: ready for migration