ready-for-migration 0.1.0 → 0.1.1

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: ed093d37434ed4e1f83202c1e3701bca3bcd1001c50a9ecbae29fab4fe7e8e7f
4
- data.tar.gz: d0fd1e2cd5fc8be803efdd52f9f09af7c0912459aec4f1a6d958915cd5198483
3
+ metadata.gz: '0594c87355e8056fb15067e0aab39c234d56f603e10377f86fde0b65d48e3fdf'
4
+ data.tar.gz: c140de4c6b325e2655bffb64abdc3fc3b6eb95cc85ae49053679275baad3e78c
5
5
  SHA512:
6
- metadata.gz: 885d484b08c3f30fd07cb482d11b9fe46f0f9b62d500230c2cf3b892b0a7e85d80621b138332a397287ab12e5689b835e2247d3a877fc3fcfd41af0453662740
7
- data.tar.gz: bf4f48eea6820fe615f913ce87b7cab643c8a3e4b81869b7eb330900f0c928ac8c575c9077c0eb495bfcc3752c218e6f76ce665268ea0ca30011928ff2ab514d
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
@@ -1,5 +1,5 @@
1
1
  Ready::For::Migration::Engine.routes.draw do
2
2
 
3
- get 'healthz', to: 'ready_for_migration/health#readiness'
3
+ root to: 'ready/for/migration/health#readiness'
4
4
 
5
5
  end
@@ -1,7 +1,7 @@
1
1
  module Ready
2
2
  module For
3
3
  module Migration
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
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.0
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-26 00:00:00.000000000 Z
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/ready_for_migration/health_controller.rb
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
@@ -1,13 +0,0 @@
1
- module ReadyForMigration
2
- class HealthController < ::ActionController::Base
3
-
4
- def readiness
5
- if ApplicationRecord.connection.migration_context.needs_migration?
6
- head 503
7
- else
8
- head 200
9
- end
10
- end
11
-
12
- end
13
- end