ready-for-migration 0.1.0 → 0.1.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0594c87355e8056fb15067e0aab39c234d56f603e10377f86fde0b65d48e3fdf'
|
4
|
+
data.tar.gz: c140de4c6b325e2655bffb64abdc3fc3b6eb95cc85ae49053679275baad3e78c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affa9b3b0aa6def18e31f46876232f96b6497b7c48528fa13f9059950a1a063606ba053d6996da3beec1e2cf51743ae72cdcbb7ee571787655a740229a9ae6fb
|
7
|
+
data.tar.gz: 3fee0628bb2f9192fb508986dfcb346c519e3ab08b989cbca07442fc0285366c8ba4d69f8b7ede426f404fe45de6d9330f527ba0a13f70a1dca8d9b854a16ecd
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ This is an Rails Engine that provides an endpoint that responds whether the appl
|
|
7
7
|
Add this line to your Rails application's config/routes.rb:
|
8
8
|
|
9
9
|
```
|
10
|
-
mount Ready::For::Migration::Engine, at: '/'
|
10
|
+
mount Ready::For::Migration::Engine, at: '/healthz'
|
11
11
|
|
12
12
|
```
|
13
13
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Ready
|
2
|
+
module For
|
3
|
+
module Migration
|
4
|
+
class HealthController < ::ActionController::Base
|
5
|
+
|
6
|
+
def readiness
|
7
|
+
if ApplicationRecord.connection.migration_context.needs_migration?
|
8
|
+
head 503
|
9
|
+
else
|
10
|
+
head 200
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ready-for-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bizside-developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 5.2.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 7.2.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 5.2.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 7.2.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: sqlite3
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,7 +60,7 @@ files:
|
|
54
60
|
- MIT-LICENSE
|
55
61
|
- README.md
|
56
62
|
- Rakefile
|
57
|
-
- app/controllers/
|
63
|
+
- app/controllers/ready/for/migration/health_controller.rb
|
58
64
|
- config/routes.rb
|
59
65
|
- lib/ready/for/migration.rb
|
60
66
|
- lib/ready/for/migration/engine.rb
|