migrate-hack 0.1.9 → 0.2.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/migrate-hack.sh +13 -2
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bedfddc47b4a9a7731ef1f1b1a019f01b4a4017c45459dedcc96c855934a0a6
4
- data.tar.gz: 6d4bc85df94bd1743291efeac977dbbcfb1106c703304096cdf4e3f0b7b9188f
3
+ metadata.gz: f551b4db0a438604977b1e5e1c1924e62257a9123802b95e30cbd21cbe3e362c
4
+ data.tar.gz: 0e79f977b2e13a4a6f7940816ca0d15998ad761a81c059d0d9d1d5d6ef87f99b
5
5
  SHA512:
6
- metadata.gz: c2ea7a038ec8ec2a9b0f72f64a1d7f21d701537076b1d4b174ae7cf5dfc0c971938cd16e514616465d911884242e7e58c43e4dd6b23b1d2525023927806c665d
7
- data.tar.gz: '082bfdc1a476841f34af80119b6e66783ccdd729b17e30f2fc80da8a97091ecb358161a8318c525e669f117695dc379acb76905a03e92f97e9c59bc2bd9232e4'
6
+ metadata.gz: 0dd0211befddde1a366f474b197a22fa4d744e0b7135d492eeebbf2a32fd12d1b1c8d0ad4b9cfe31b6cac9946580091ed90a8376e7abec7b0cb859bc139284c3
7
+ data.tar.gz: 2b31c74f49df7878cae1170fc828b443a27a726223bc4c245c8327d44b7caf401cc9525a0466f4bfea0f9863829311b118b60c0e4df002f5cab6b61aeb986a0b
data/bin/migrate-hack.sh CHANGED
@@ -23,8 +23,19 @@ fi
23
23
  if [ -f tmp/pids/server.pid ]; then
24
24
  PID=$(cat tmp/pids/server.pid)
25
25
  if ps -p $PID > /dev/null; then
26
- echo "⚠️ [ERROR] - Server Rails/Puma running on (PID: $PID). Please, stop it or run on a parallel repository."
27
- exit 1
26
+ echo "🔍 Server is running on PID: $PID. Checking code reload settings..."
27
+
28
+ # Verifica se cache_classes está true ou false
29
+ CACHE_CLASSES=$(rails runner "puts Rails.application.config.cache_classes")
30
+ EAGER_LOAD=$(rails runner "puts Rails.application.config.eager_load")
31
+
32
+ if [ "$CACHE_CLASSES" = "false" ]; then
33
+ echo "⚠️ [ERROR] - Server Rails/Puma is running with cache_classes=false (code reload ENABLED)."
34
+ echo "💡 Please stop the server or use a separate repo/branch to avoid conflicts."
35
+ exit 1
36
+ else
37
+ echo "✅ Server is running, but code reload is DISABLED (cache_classes=$CACHE_CLASSES, eager_load=$EAGER_LOAD). Safe to continue."
38
+ fi
28
39
  fi
29
40
  fi
30
41
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migrate-hack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Zillner
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-28 00:00:00.000000000 Z
10
+ date: 2025-03-31 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: "This gem checks out previous git commits to run migrations, then restores
13
- everything back to normal.\n\n"
12
+ description: "This gem rewinds your commits to apply migrations safely, fixes a bunch
13
+ of common issues, and then puts everything back the way it was.\n\n"
14
14
  email:
15
15
  - carlos@function.ws
16
16
  executables: