actual_db_schema 0.8.5 → 0.8.6

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: 9f9554e95ad1dfebbd6cb07f024f4704037fd20cf4d01d35a6869f2535c0884a
4
- data.tar.gz: 93dd06f393d31c95a34bf4e81636b1067ec9ab5e587899be7141bda519189ffc
3
+ metadata.gz: 9b9b0ce8fc7b1dbf1e0af8af4d06cdb13c60a9b36499b2de11b3d2dd320833f2
4
+ data.tar.gz: bcb1f6e85b9fea8dcac89535fe4118edc9ced43f5ea57c3878d24d3b7b1786d2
5
5
  SHA512:
6
- metadata.gz: bfff355482dcfe845c3986bd1a64001869f68c2d9559a122b5b0c4dba260d2cc79a32368fa691cd2612ac7d5d2de73e620a8e6c94df5d7b9df9a309d37d7e396
7
- data.tar.gz: 5feb8b7a790826869f4ed76e9c91be3312c6079e37fa99f5f4b96087087bbd10524ee6f7b93f93aaaaba0779f61362869d76f387e3bcc17b4e9db8fde9799b1f
6
+ metadata.gz: caa882430fcf07bcdd6c60a8653b0792587c627b99a93843599e9cb986bba53d644875650e825ddeb73b3c168d5831728cebb5e5ef276d077663da9f9c2bcdf9
7
+ data.tar.gz: f88c0acf54bba3ed626e380fa64a264573afc5ee2f1489ff6a3d3682ce2fd623d1b6b88917771811455a1e98e495b8252043cf6832044f86ccbb8da19d3d4f6e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.6 - 2025-05-21
2
+ - Fix gem installtion with git hooks
3
+ - Update README
4
+
1
5
  ## 0.8.5 - 2025-04-10
2
6
 
3
7
  - Fix the gem working on projects without git
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- actual_db_schema (0.8.5)
4
+ actual_db_schema (0.8.6)
5
5
  activerecord
6
6
  activesupport
7
7
  ast
@@ -96,7 +96,7 @@ GEM
96
96
  concurrent-ruby (1.2.2)
97
97
  connection_pool (2.4.1)
98
98
  crass (1.0.6)
99
- csv (3.3.3)
99
+ csv (3.3.4)
100
100
  date (3.3.3)
101
101
  debug (1.8.0)
102
102
  irb (>= 1.5.0)
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Does switching between branches in your Rails app mess up the DB schema?
6
6
 
7
- Keep the DB schema actual across branches in your Rails project. Just install `actual_db_schema` gem and run `db:migrate` in branches as usual. It automatically rolls back the *phantom migrations* (non-relevant to the current branch). No additional steps are needed. It works with both `schema.rb` and `structure.sql`.
7
+ Keep the DB schema current across branches in your Rails project. Just install `actual_db_schema` gem and run `db:migrate` in branches as usual. It automatically rolls back the *phantom migrations* (non-relevant to the current branch). No additional steps are needed. It works with both `schema.rb` and `structure.sql`.
8
8
 
9
9
  ## Why ActualDbSchema
10
10
 
@@ -63,7 +63,6 @@ module ActualDbSchema
63
63
  end
64
64
 
65
65
  def install_post_checkout_hook
66
- return unless git_hooks_enabled?
67
66
  return unless hooks_directory_present?
68
67
 
69
68
  if File.exist?(hook_path)
@@ -87,12 +86,6 @@ module ActualDbSchema
87
86
  @hook_path ||= hooks_dir.join("post-checkout")
88
87
  end
89
88
 
90
- def git_hooks_enabled?
91
- return true if ActualDbSchema.config[:git_hooks_enabled]
92
-
93
- puts colorize("[ActualDbSchema] Git hooks are disabled in configuration. Skipping installation.", :gray)
94
- end
95
-
96
89
  def hooks_directory_present?
97
90
  return true if Dir.exist?(hooks_dir)
98
91
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActualDbSchema
4
- VERSION = "0.8.5"
4
+ VERSION = "0.8.6"
5
5
  end
@@ -15,9 +15,10 @@ if defined?(ActualDbSchema)
15
15
  # Enable the UI for managing migrations.
16
16
  config.ui_enabled = Rails.env.development? || ENV["ACTUAL_DB_SCHEMA_UI_ENABLED"].present?
17
17
 
18
- # Enable automatic phantom migration rollback on branch switch,
18
+ # Enable automatic phantom migration rollback on branch switch.
19
19
  # config.git_hooks_enabled = true
20
- config.git_hooks_enabled = ENV["ACTUAL_DB_SCHEMA_GIT_HOOKS_ENABLED"].present?
20
+ git_hook_enabled_env = ENV["ACTUAL_DB_SCHEMA_GIT_HOOKS_ENABLED"]
21
+ config.git_hooks_enabled = git_hook_enabled_env.nil? ? true : git_hook_enabled_env.present?
21
22
 
22
23
  # If your application leverages multiple schemas for multi-tenancy, define the active schemas.
23
24
  # config.multi_tenant_schemas = -> { ["public", "tenant1", "tenant2"] }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actual_db_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Kaleshka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-10 00:00:00.000000000 Z
11
+ date: 2025-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord