ready-for-migration 0.1.4 → 0.1.5

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: ab726b4be46863e5179c79f0b6508e1248e5f23af2151e340584626925a2be21
4
+ data.tar.gz: 7219e0f3b07c2bd53e6661928a9f727e2780f82bf30f8d99fdad9e1ee450043b
5
5
  SHA512:
6
- metadata.gz: 11036a04db24b448d2d06efda25638cbd605e764be39cd12245717e3914ff12c10f92524cc6bde17d6ec5a33f1a9be30c47d3c57a249395f93283fccd983be27
7
- data.tar.gz: 5bf2c1b2beae4df61c6e0f59b007035c9af90fa35ebd2648d6e2c0d5f8eb41e7252e38771df396e2f350dce3c419315ad330a5cef64f594ca2f9c7e9521456c4
6
+ metadata.gz: e608535de09cf3b63890f9745f792f3444cea2402d0fceac3a1f460741e5b923ab01d2aa376b0ff5af48eb7d224f21c224b2efae7c531ac64f739a3d814c14ee
7
+ data.tar.gz: 2ab3b6ca824111aa7d9d4edd233048eb9c7bab5cff80d9ca557e23f5488ec6d50dfe2b0b031f7db50213f726866b6eb67928fbf9fb01cab67a1338ab9f8a7518
@@ -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_extenstion'
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.5'
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.5
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-14 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_extenstion.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.3.26
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: ready for migration