ridgepole 3.0.3 → 3.1.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.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +10 -0
 - data/README.md +43 -0
 - data/bin/ridgepole +1 -0
 - data/lib/ridgepole/default_limit.rb +3 -2
 - data/lib/ridgepole/delta.rb +19 -3
 - data/lib/ridgepole/diff.rb +31 -4
 - data/lib/ridgepole/dsl_parser.rb +7 -1
 - data/lib/ridgepole/logger.rb +1 -0
 - data/lib/ridgepole/version.rb +1 -1
 - metadata +8 -21
 - data/.rspec +0 -3
 - data/.rubocop.yml +0 -64
 - data/.simplecov +0 -6
 - data/Appraisals +0 -21
 - data/Gemfile +0 -8
 - data/Rakefile +0 -13
 - data/compose.yml +0 -20
 - data/gemfiles/activerecord_6.1.gemfile +0 -7
 - data/gemfiles/activerecord_7.0.gemfile +0 -7
 - data/gemfiles/activerecord_7.1.gemfile +0 -7
 - data/gemfiles/activerecord_7.2.gemfile +0 -7
 - data/gemfiles/activerecord_8.0.gemfile +0 -7
 - data/ridgepole.gemspec +0 -51
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d387024f72e2f0cadf0c913d9d6d1863753401ed8cdd35759effd47e5405d3fd
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ed16c2c4ce6e91797eba24c94384dc2e03db5e39ca18e9119daa4e19a67bd97e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ea58375d9d0f3aa45084f08dabdea2719bbdd973229214dd60388fdd375d05dc3814b9131afb48a0c3b445b505a23f7c25b99a27f255549db81abf948a88a04e
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 692d7e680804f86feab03fdebf1aa8f0f88af8f752e04cafec57a5406be64240114d6327a1651a74dae483d31336d0ab09b0f566524f8bd7f133a3e0e9862bb7
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -2,6 +2,16 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            ## 3.0
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            ### 3.1.0 (2025/10/30)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            - Support Rails 8.1 [pull#589](https://github.com/ridgepole/ridgepole/pull/589)
         
     | 
| 
      
 8 
     | 
    
         
            +
            - Support for migrating PostgreSQL table comments [pull#587](https://github.com/ridgepole/ridgepole/pull/587)
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            ### 3.0.4 (2025/08/31)
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            - Fix checking foreign key without index [pull#571](https://github.com/ridgepole/ridgepole/pull/571)
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Use `change_column_comment` for comment-only column changes [pull#567](https://github.com/ridgepole/ridgepole/pull/567)
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       5 
15 
     | 
    
         
             
            ### 3.0.3 (2025/07/23)
         
     | 
| 
       6 
16 
     | 
    
         | 
| 
       7 
17 
     | 
    
         
             
            - Fix for index `algorithm` option [pull#555](https://github.com/ridgepole/ridgepole/pull/555)
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -181,6 +181,13 @@ create_table "user_comments", force: :cascade, renamed_from: "comments" do |t| 
     | 
|
| 
       181 
181 
     | 
    
         
             
            end
         
     | 
| 
       182 
182 
     | 
    
         
             
            ```
         
     | 
| 
       183 
183 
     | 
    
         | 
| 
      
 184 
     | 
    
         
            +
            > [!note]
         
     | 
| 
      
 185 
     | 
    
         
            +
            > When using `renamed_from` on a table, Ridgepole will only perform the rename operation. All other changes to that table (columns, indexes, foreign keys, etc.) will not be detected during the same migration.
         
     | 
| 
      
 186 
     | 
    
         
            +
            >
         
     | 
| 
      
 187 
     | 
    
         
            +
            > If you need to rename AND modify a table, do it in two separate steps:
         
     | 
| 
      
 188 
     | 
    
         
            +
            > 1. First migration: Add `renamed_from` to rename the table
         
     | 
| 
      
 189 
     | 
    
         
            +
            > 2. Second migration: Remove `renamed_from` and apply your desired changes
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
       184 
191 
     | 
    
         
             
            ## Foreign Key
         
     | 
| 
       185 
192 
     | 
    
         
             
            ```ruby
         
     | 
| 
       186 
193 
     | 
    
         
             
            create_table "parent", force: :cascade do |t|
         
     | 
| 
         @@ -329,6 +336,42 @@ Apply `Schemafile` 
     | 
|
| 
       329 
336 
     | 
    
         
             
            ...
         
     | 
| 
       330 
337 
     | 
    
         
             
            ```
         
     | 
| 
       331 
338 
     | 
    
         | 
| 
      
 339 
     | 
    
         
            +
            ## Define a partial index in PostgreSQL
         
     | 
| 
      
 340 
     | 
    
         
            +
             
     | 
| 
      
 341 
     | 
    
         
            +
            Partial indexes in PostgreSQL are normalized so differences are always detected.
         
     | 
| 
      
 342 
     | 
    
         
            +
             
     | 
| 
      
 343 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 344 
     | 
    
         
            +
            create_table "users", id: :serial, force: :cascade do |t|
         
     | 
| 
      
 345 
     | 
    
         
            +
              t.text "email"
         
     | 
| 
      
 346 
     | 
    
         
            +
              t.text "name"
         
     | 
| 
      
 347 
     | 
    
         
            +
              t.index ["email"], name: "idx_users_email", unique: true, where: "email is not null"
         
     | 
| 
      
 348 
     | 
    
         
            +
            end
         
     | 
| 
      
 349 
     | 
    
         
            +
            ```
         
     | 
| 
      
 350 
     | 
    
         
            +
             
     | 
| 
      
 351 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 352 
     | 
    
         
            +
            % ridgepole -a -c database.yml --dry-run --verbose
         
     | 
| 
      
 353 
     | 
    
         
            +
            Apply `Schemafile` (dry-run)
         
     | 
| 
      
 354 
     | 
    
         
            +
            # Parse DSL
         
     | 
| 
      
 355 
     | 
    
         
            +
            # ...
         
     | 
| 
      
 356 
     | 
    
         
            +
            # Compare definitions
         
     | 
| 
      
 357 
     | 
    
         
            +
            #   users
         
     | 
| 
      
 358 
     | 
    
         
            +
                  :options=>
         
     | 
| 
      
 359 
     | 
    
         
            +
                   {:name=>"idx_users_email",
         
     | 
| 
      
 360 
     | 
    
         
            +
                    :unique=>true,
         
     | 
| 
      
 361 
     | 
    
         
            +
            -       :where=>"(email IS NOT NULL)"}}},
         
     | 
| 
      
 362 
     | 
    
         
            +
            +       :where=>"email is not null"}}},
         
     | 
| 
      
 363 
     | 
    
         
            +
              :options=>{:id=>:serial}}
         
     | 
| 
      
 364 
     | 
    
         
            +
            ```
         
     | 
| 
      
 365 
     | 
    
         
            +
             
     | 
| 
      
 366 
     | 
    
         
            +
            Use a normalized WHERE clause to avoid detecting differences.
         
     | 
| 
      
 367 
     | 
    
         
            +
             
     | 
| 
      
 368 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 369 
     | 
    
         
            +
            #t.index ["email"], name: "idx_users_email", unique: true, where: "email is not null"
         
     | 
| 
      
 370 
     | 
    
         
            +
            t.index ["email"], name: "idx_users_email", unique: true, where: "(email IS NOT NULL)"
         
     | 
| 
      
 371 
     | 
    
         
            +
            ```
         
     | 
| 
      
 372 
     | 
    
         
            +
             
     | 
| 
      
 373 
     | 
    
         
            +
            see https://github.com/ridgepole/ridgepole/issues/568
         
     | 
| 
      
 374 
     | 
    
         
            +
             
     | 
| 
       332 
375 
     | 
    
         
             
            ## Run tests
         
     | 
| 
       333 
376 
     | 
    
         | 
| 
       334 
377 
     | 
    
         | 
    
        data/bin/ridgepole
    CHANGED
    
    | 
         @@ -139,6 +139,7 @@ ARGV.options do |opt| 
     | 
|
| 
       139 
139 
     | 
    
         
             
              opt.on('',   '--drop-table-only') { options[:drop_table_only] = true }
         
     | 
| 
       140 
140 
     | 
    
         
             
              opt.on('',   '--mysql-change-table-options') { options[:mysql_change_table_options] = true }
         
     | 
| 
       141 
141 
     | 
    
         
             
              opt.on('',   '--mysql-change-table-comment') { options[:mysql_change_table_comment] = true }
         
     | 
| 
      
 142 
     | 
    
         
            +
              opt.on('',   '--pg-change-table-comment') { options[:postgresql_change_table_comment] = true }
         
     | 
| 
       142 
143 
     | 
    
         
             
              opt.on('',   '--check-relation-type DEF_PK') { |v| options[:check_relation_type] = v }
         
     | 
| 
       143 
144 
     | 
    
         
             
              opt.on('',   '--ignore-table-comment') { options[:ignore_table_comment] = true }
         
     | 
| 
       144 
145 
     | 
    
         
             
              opt.on('',   '--skip-column-comment-change') { options[:skip_column_comment_change] = true }
         
     | 
| 
         @@ -3,14 +3,15 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Ridgepole
         
     | 
| 
       4 
4 
     | 
    
         
             
              class DefaultsLimit
         
     | 
| 
       5 
5 
     | 
    
         
             
                DEFAULT_LIMIT_FOR_MYSQL = {
         
     | 
| 
       6 
     | 
    
         
            -
                  boolean: 1,
         
     | 
| 
       7 
6 
     | 
    
         
             
                  integer: 4,
         
     | 
| 
       8 
7 
     | 
    
         
             
                  bigint: 8,
         
     | 
| 
       9 
8 
     | 
    
         
             
                  float: 24,
         
     | 
| 
       10 
9 
     | 
    
         
             
                  string: 255,
         
     | 
| 
       11 
10 
     | 
    
         
             
                  text: 65_535,
         
     | 
| 
       12 
11 
     | 
    
         
             
                  binary: 65_535,
         
     | 
| 
       13 
     | 
    
         
            -
                }. 
     | 
| 
      
 12 
     | 
    
         
            +
                }.tap do |limits|
         
     | 
| 
      
 13 
     | 
    
         
            +
                  limits[:boolean] = 1 if ActiveRecord.gem_version < Gem::Version.new('8.1.0.beta1')
         
     | 
| 
      
 14 
     | 
    
         
            +
                end.freeze
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
                DEFAULTS_LIMITS = {
         
     | 
| 
       16 
17 
     | 
    
         
             
                  mysql2: DEFAULT_LIMIT_FOR_MYSQL,
         
     | 
    
        data/lib/ridgepole/delta.rb
    CHANGED
    
    | 
         @@ -328,8 +328,14 @@ execute "ALTER TABLE #{ActiveRecord::Base.connection.quote_table_name(table_name 
     | 
|
| 
       328 
328 
     | 
    
         
             
                end
         
     | 
| 
       329 
329 
     | 
    
         | 
| 
       330 
330 
     | 
    
         
             
                def append_change_table_comment(table_name, table_comment, buf)
         
     | 
| 
       331 
     | 
    
         
            -
                   
     | 
| 
       332 
     | 
    
         
            -
             
     | 
| 
      
 331 
     | 
    
         
            +
                  if Ridgepole::ConnectionAdapters.postgresql?
         
     | 
| 
      
 332 
     | 
    
         
            +
                    buf.puts(<<-RUBY)
         
     | 
| 
      
 333 
     | 
    
         
            +
            change_table_comment(#{table_name.inspect}, #{table_comment.inspect})
         
     | 
| 
      
 334 
     | 
    
         
            +
                    RUBY
         
     | 
| 
      
 335 
     | 
    
         
            +
                  else
         
     | 
| 
      
 336 
     | 
    
         
            +
                    comment_literal = "COMMENT=#{ActiveRecord::Base.connection.quote(table_comment)}"
         
     | 
| 
      
 337 
     | 
    
         
            +
                    append_change_table_options(table_name, comment_literal, buf)
         
     | 
| 
      
 338 
     | 
    
         
            +
                  end
         
     | 
| 
       333 
339 
     | 
    
         
             
                end
         
     | 
| 
       334 
340 
     | 
    
         | 
| 
       335 
341 
     | 
    
         
             
                def append_change(table_name, attrs, buf, pre_buf_for_fk, post_buf_for_fk)
         
     | 
| 
         @@ -344,6 +350,7 @@ execute "ALTER TABLE #{ActiveRecord::Base.connection.quote_table_name(table_name 
     | 
|
| 
       344 
350 
     | 
    
         
             
                  table_charset = attrs[:table_charset]
         
     | 
| 
       345 
351 
     | 
    
         
             
                  table_collation = attrs[:table_collation]
         
     | 
| 
       346 
352 
     | 
    
         
             
                  table_comment = attrs[:table_comment]
         
     | 
| 
      
 353 
     | 
    
         
            +
                  column_comments = attrs[:column_comments] || {}
         
     | 
| 
       347 
354 
     | 
    
         | 
| 
       348 
355 
     | 
    
         
             
                  if !definition.empty? || !indices.empty? || !primary_key_definition.empty?
         
     | 
| 
       349 
356 
     | 
    
         
             
                    append_change_table(table_name, buf) do
         
     | 
| 
         @@ -365,12 +372,21 @@ execute "ALTER TABLE #{ActiveRecord::Base.connection.quote_table_name(table_name 
     | 
|
| 
       365 
372 
     | 
    
         
             
                  end
         
     | 
| 
       366 
373 
     | 
    
         | 
| 
       367 
374 
     | 
    
         
             
                  append_change_table_comment(table_name, table_comment, buf) if table_comment
         
     | 
| 
      
 375 
     | 
    
         
            +
                  append_change_column_comments(table_name, column_comments, buf) unless column_comments.empty?
         
     | 
| 
       368 
376 
     | 
    
         | 
| 
       369 
377 
     | 
    
         
             
                  buf.puts
         
     | 
| 
       370 
378 
     | 
    
         
             
                  pre_buf_for_fk.puts
         
     | 
| 
       371 
379 
     | 
    
         
             
                  post_buf_for_fk.puts
         
     | 
| 
       372 
380 
     | 
    
         
             
                end
         
     | 
| 
       373 
381 
     | 
    
         | 
| 
      
 382 
     | 
    
         
            +
                def append_change_column_comments(table_name, column_comments, buf)
         
     | 
| 
      
 383 
     | 
    
         
            +
                  column_comments.each do |column_name, comment|
         
     | 
| 
      
 384 
     | 
    
         
            +
                    buf.puts(<<-RUBY)
         
     | 
| 
      
 385 
     | 
    
         
            +
            change_column_comment(#{table_name.inspect}, #{column_name.inspect}, #{comment.inspect})
         
     | 
| 
      
 386 
     | 
    
         
            +
                    RUBY
         
     | 
| 
      
 387 
     | 
    
         
            +
                  end
         
     | 
| 
      
 388 
     | 
    
         
            +
                end
         
     | 
| 
      
 389 
     | 
    
         
            +
             
     | 
| 
       374 
390 
     | 
    
         
             
                def append_change_table(table_name, buf)
         
     | 
| 
       375 
391 
     | 
    
         
             
                  buf.puts "change_table(#{table_name.inspect}, bulk: true) do |t|" if @options[:bulk_change]
         
     | 
| 
       376 
392 
     | 
    
         
             
                  yield
         
     | 
| 
         @@ -428,7 +444,7 @@ rename_column(#{table_name.inspect}, #{from_column_name.inspect}, #{to_column_na 
     | 
|
| 
       428 
444 
     | 
    
         
             
                  options = attrs[:options] || {}
         
     | 
| 
       429 
445 
     | 
    
         | 
| 
       430 
446 
     | 
    
         
             
                  # Fix for https://github.com/rails/rails/commit/7f0567b43b73b1bd1a16bfac9cd32fcbf1321b51
         
     | 
| 
       431 
     | 
    
         
            -
                  if Ridgepole::ConnectionAdapters.mysql? 
     | 
| 
      
 447 
     | 
    
         
            +
                  if Ridgepole::ConnectionAdapters.mysql?
         
     | 
| 
       432 
448 
     | 
    
         
             
                    options[:comment] = nil unless options.key?(:comment)
         
     | 
| 
       433 
449 
     | 
    
         
             
                  end
         
     | 
| 
       434 
450 
     | 
    
         | 
    
        data/lib/ridgepole/diff.rb
    CHANGED
    
    | 
         @@ -157,6 +157,14 @@ module Ridgepole 
     | 
|
| 
       157 
157 
     | 
    
         
             
                    end
         
     | 
| 
       158 
158 
     | 
    
         
             
                  end
         
     | 
| 
       159 
159 
     | 
    
         | 
| 
      
 160 
     | 
    
         
            +
                  if Ridgepole::ConnectionAdapters.postgresql?
         
     | 
| 
      
 161 
     | 
    
         
            +
                    if @options[:postgresql_change_table_comment] && (from[:comment] != to[:comment])
         
     | 
| 
      
 162 
     | 
    
         
            +
                      from.delete(:comment)
         
     | 
| 
      
 163 
     | 
    
         
            +
                      to_comment = to.delete(:comment)
         
     | 
| 
      
 164 
     | 
    
         
            +
                      table_delta[:table_comment] = to_comment
         
     | 
| 
      
 165 
     | 
    
         
            +
                    end
         
     | 
| 
      
 166 
     | 
    
         
            +
                  end
         
     | 
| 
      
 167 
     | 
    
         
            +
             
     | 
| 
       160 
168 
     | 
    
         
             
                  if @options[:dump_without_table_options]
         
     | 
| 
       161 
169 
     | 
    
         
             
                    from.delete(:options)
         
     | 
| 
       162 
170 
     | 
    
         
             
                    from.delete(:charset)
         
     | 
| 
         @@ -234,6 +242,7 @@ module Ridgepole 
     | 
|
| 
       234 
242 
     | 
    
         
             
                  from = (from || {}).dup
         
     | 
| 
       235 
243 
     | 
    
         
             
                  to = (to || {}).dup
         
     | 
| 
       236 
244 
     | 
    
         
             
                  definition_delta = {}
         
     | 
| 
      
 245 
     | 
    
         
            +
                  column_comments = {}
         
     | 
| 
       237 
246 
     | 
    
         | 
| 
       238 
247 
     | 
    
         
             
                  scan_column_rename(from, to, definition_delta)
         
     | 
| 
       239 
248 
     | 
    
         | 
| 
         @@ -249,10 +258,14 @@ module Ridgepole 
     | 
|
| 
       249 
258 
     | 
    
         
             
                    next if ignore_column
         
     | 
| 
       250 
259 
     | 
    
         | 
| 
       251 
260 
     | 
    
         
             
                    if from_attrs
         
     | 
| 
       252 
     | 
    
         
            -
                       
     | 
| 
       253 
     | 
    
         
            -
                      if  
     | 
| 
       254 
     | 
    
         
            -
                         
     | 
| 
       255 
     | 
    
         
            -
             
     | 
| 
      
 261 
     | 
    
         
            +
                      changed_attrs = build_attrs_if_changed(to_attrs, from_attrs)
         
     | 
| 
      
 262 
     | 
    
         
            +
                      if changed_attrs
         
     | 
| 
      
 263 
     | 
    
         
            +
                        if comment_only_change?(from_attrs, to_attrs)
         
     | 
| 
      
 264 
     | 
    
         
            +
                          column_comments[column_name] = to_attrs[:options][:comment]
         
     | 
| 
      
 265 
     | 
    
         
            +
                        else
         
     | 
| 
      
 266 
     | 
    
         
            +
                          definition_delta[:change] ||= {}
         
     | 
| 
      
 267 
     | 
    
         
            +
                          definition_delta[:change][column_name] = changed_attrs
         
     | 
| 
      
 268 
     | 
    
         
            +
                        end
         
     | 
| 
       256 
269 
     | 
    
         
             
                      end
         
     | 
| 
       257 
270 
     | 
    
         
             
                    else
         
     | 
| 
       258 
271 
     | 
    
         
             
                      definition_delta[:add] ||= {}
         
     | 
| 
         @@ -307,6 +320,7 @@ module Ridgepole 
     | 
|
| 
       307 
320 
     | 
    
         
             
                  end
         
     | 
| 
       308 
321 
     | 
    
         | 
| 
       309 
322 
     | 
    
         
             
                  table_delta[:definition] = definition_delta unless definition_delta.empty?
         
     | 
| 
      
 323 
     | 
    
         
            +
                  table_delta[:column_comments] = column_comments unless column_comments.empty?
         
     | 
| 
       310 
324 
     | 
    
         
             
                end
         
     | 
| 
       311 
325 
     | 
    
         | 
| 
       312 
326 
     | 
    
         
             
                def scan_column_rename(from, to, definition_delta)
         
     | 
| 
         @@ -626,6 +640,19 @@ module Ridgepole 
     | 
|
| 
       626 
640 
     | 
    
         
             
                  attrs1 == attrs2
         
     | 
| 
       627 
641 
     | 
    
         
             
                end
         
     | 
| 
       628 
642 
     | 
    
         | 
| 
      
 643 
     | 
    
         
            +
                def comment_only_change?(attrs1, attrs2)
         
     | 
| 
      
 644 
     | 
    
         
            +
                  return false if @options[:skip_column_comment_change]
         
     | 
| 
      
 645 
     | 
    
         
            +
             
     | 
| 
      
 646 
     | 
    
         
            +
                  attrs1 = attrs1.merge(options: attrs1.fetch(:options, {}).dup)
         
     | 
| 
      
 647 
     | 
    
         
            +
                  attrs2 = attrs2.merge(options: attrs2.fetch(:options, {}).dup)
         
     | 
| 
      
 648 
     | 
    
         
            +
                  normalize_default_proc_options!(attrs1[:options], attrs2[:options])
         
     | 
| 
      
 649 
     | 
    
         
            +
             
     | 
| 
      
 650 
     | 
    
         
            +
                  comment1 = attrs1.fetch(:options).delete(:comment)
         
     | 
| 
      
 651 
     | 
    
         
            +
                  comment2 = attrs2.fetch(:options).delete(:comment)
         
     | 
| 
      
 652 
     | 
    
         
            +
             
     | 
| 
      
 653 
     | 
    
         
            +
                  attrs1 == attrs2 && comment1 != comment2
         
     | 
| 
      
 654 
     | 
    
         
            +
                end
         
     | 
| 
      
 655 
     | 
    
         
            +
             
     | 
| 
       629 
656 
     | 
    
         
             
                def normalize_default_proc_options!(opts1, opts2)
         
     | 
| 
       630 
657 
     | 
    
         
             
                  if opts1[:default].is_a?(Proc) && opts2[:default].is_a?(Proc)
         
     | 
| 
       631 
658 
     | 
    
         
             
                    opts1[:default] = opts1[:default].call
         
     | 
    
        data/lib/ridgepole/dsl_parser.rb
    CHANGED
    
    | 
         @@ -31,8 +31,9 @@ module Ridgepole 
     | 
|
| 
       31 
31 
     | 
    
         
             
                end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                def check_foreign_key_without_index(table_name, attrs)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  return if Ridgepole::ConnectionAdapters.postgresql?
         
     | 
| 
       34 
35 
     | 
    
         
             
                  return unless attrs[:foreign_keys]
         
     | 
| 
       35 
     | 
    
         
            -
                  return unless  
     | 
| 
      
 36 
     | 
    
         
            +
                  return unless innodb_table?(attrs)
         
     | 
| 
       36 
37 
     | 
    
         | 
| 
       37 
38 
     | 
    
         
             
                  attrs[:foreign_keys].each_value do |foreign_key_attrs|
         
     | 
| 
       38 
39 
     | 
    
         
             
                    fk_index = foreign_key_attrs[:options][:column] || "#{foreign_key_attrs[:to_table].singularize}_id"
         
     | 
| 
         @@ -53,5 +54,10 @@ module Ridgepole 
     | 
|
| 
       53 
54 
     | 
    
         
             
                    Array(index_column_name).first == fk_index
         
     | 
| 
       54 
55 
     | 
    
         
             
                  end
         
     | 
| 
       55 
56 
     | 
    
         
             
                end
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                def innodb_table?(attrs)
         
     | 
| 
      
 59 
     | 
    
         
            +
                  engine = attrs[:options][:options]&.match(/ENGINE=([^ ]+)/) && Regexp.last_match(1)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  engine.nil? || engine == 'InnoDB'
         
     | 
| 
      
 61 
     | 
    
         
            +
                end
         
     | 
| 
       56 
62 
     | 
    
         
             
              end
         
     | 
| 
       57 
63 
     | 
    
         
             
            end
         
     | 
    
        data/lib/ridgepole/logger.rb
    CHANGED
    
    
    
        data/lib/ridgepole/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ridgepole
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 3.0 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 3.1.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Genki Sugawara
         
     | 
| 
         @@ -18,7 +18,7 @@ dependencies: 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    version: '6.1'
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - "<"
         
     | 
| 
       20 
20 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       21 
     | 
    
         
            -
                    version: '8. 
     | 
| 
      
 21 
     | 
    
         
            +
                    version: '8.2'
         
     | 
| 
       22 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       23 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       24 
24 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -28,7 +28,7 @@ dependencies: 
     | 
|
| 
       28 
28 
     | 
    
         
             
                    version: '6.1'
         
     | 
| 
       29 
29 
     | 
    
         
             
                - - "<"
         
     | 
| 
       30 
30 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       31 
     | 
    
         
            -
                    version: '8. 
     | 
| 
      
 31 
     | 
    
         
            +
                    version: '8.2'
         
     | 
| 
       32 
32 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       33 
33 
     | 
    
         
             
              name: diffy
         
     | 
| 
       34 
34 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -217,28 +217,28 @@ dependencies: 
     | 
|
| 
       217 
217 
     | 
    
         
             
                requirements:
         
     | 
| 
       218 
218 
     | 
    
         
             
                - - ">="
         
     | 
| 
       219 
219 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       220 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 220 
     | 
    
         
            +
                    version: 0.2.0
         
     | 
| 
       221 
221 
     | 
    
         
             
              type: :development
         
     | 
| 
       222 
222 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       223 
223 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       224 
224 
     | 
    
         
             
                requirements:
         
     | 
| 
       225 
225 
     | 
    
         
             
                - - ">="
         
     | 
| 
       226 
226 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       227 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 227 
     | 
    
         
            +
                    version: 0.2.0
         
     | 
| 
       228 
228 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       229 
229 
     | 
    
         
             
              name: rubocop
         
     | 
| 
       230 
230 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       231 
231 
     | 
    
         
             
                requirements:
         
     | 
| 
       232 
232 
     | 
    
         
             
                - - '='
         
     | 
| 
       233 
233 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       234 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 234 
     | 
    
         
            +
                    version: 1.81.6
         
     | 
| 
       235 
235 
     | 
    
         
             
              type: :development
         
     | 
| 
       236 
236 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       237 
237 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       238 
238 
     | 
    
         
             
                requirements:
         
     | 
| 
       239 
239 
     | 
    
         
             
                - - '='
         
     | 
| 
       240 
240 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       241 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 241 
     | 
    
         
            +
                    version: 1.81.6
         
     | 
| 
       242 
242 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       243 
243 
     | 
    
         
             
              name: rubocop-rake
         
     | 
| 
       244 
244 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -318,22 +318,10 @@ executables: 
     | 
|
| 
       318 
318 
     | 
    
         
             
            extensions: []
         
     | 
| 
       319 
319 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       320 
320 
     | 
    
         
             
            files:
         
     | 
| 
       321 
     | 
    
         
            -
            - ".rspec"
         
     | 
| 
       322 
     | 
    
         
            -
            - ".rubocop.yml"
         
     | 
| 
       323 
     | 
    
         
            -
            - ".simplecov"
         
     | 
| 
       324 
     | 
    
         
            -
            - Appraisals
         
     | 
| 
       325 
321 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       326 
     | 
    
         
            -
            - Gemfile
         
     | 
| 
       327 
322 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       328 
323 
     | 
    
         
             
            - README.md
         
     | 
| 
       329 
     | 
    
         
            -
            - Rakefile
         
     | 
| 
       330 
324 
     | 
    
         
             
            - bin/ridgepole
         
     | 
| 
       331 
     | 
    
         
            -
            - compose.yml
         
     | 
| 
       332 
     | 
    
         
            -
            - gemfiles/activerecord_6.1.gemfile
         
     | 
| 
       333 
     | 
    
         
            -
            - gemfiles/activerecord_7.0.gemfile
         
     | 
| 
       334 
     | 
    
         
            -
            - gemfiles/activerecord_7.1.gemfile
         
     | 
| 
       335 
     | 
    
         
            -
            - gemfiles/activerecord_7.2.gemfile
         
     | 
| 
       336 
     | 
    
         
            -
            - gemfiles/activerecord_8.0.gemfile
         
     | 
| 
       337 
325 
     | 
    
         
             
            - lib/ridgepole.rb
         
     | 
| 
       338 
326 
     | 
    
         
             
            - lib/ridgepole/cli/config.rb
         
     | 
| 
       339 
327 
     | 
    
         
             
            - lib/ridgepole/client.rb
         
     | 
| 
         @@ -356,7 +344,6 @@ files: 
     | 
|
| 
       356 
344 
     | 
    
         
             
            - lib/ridgepole/schema_dumper_ext.rb
         
     | 
| 
       357 
345 
     | 
    
         
             
            - lib/ridgepole/schema_statements_ext.rb
         
     | 
| 
       358 
346 
     | 
    
         
             
            - lib/ridgepole/version.rb
         
     | 
| 
       359 
     | 
    
         
            -
            - ridgepole.gemspec
         
     | 
| 
       360 
347 
     | 
    
         
             
            homepage: https://github.com/ridgepole/ridgepole
         
     | 
| 
       361 
348 
     | 
    
         
             
            licenses:
         
     | 
| 
       362 
349 
     | 
    
         
             
            - MIT
         
     | 
| 
         @@ -376,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       376 
363 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       377 
364 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       378 
365 
     | 
    
         
             
            requirements: []
         
     | 
| 
       379 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 366 
     | 
    
         
            +
            rubygems_version: 3.7.2
         
     | 
| 
       380 
367 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       381 
368 
     | 
    
         
             
            summary: Ridgepole is a tool to manage DB schema.
         
     | 
| 
       382 
369 
     | 
    
         
             
            test_files: []
         
     | 
    
        data/.rspec
    DELETED
    
    
    
        data/.rubocop.yml
    DELETED
    
    | 
         @@ -1,64 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            AllCops:
         
     | 
| 
       2 
     | 
    
         
            -
              Exclude:
         
     | 
| 
       3 
     | 
    
         
            -
                - "gemfiles/**/*"
         
     | 
| 
       4 
     | 
    
         
            -
                - "omnibus-ridgepole/**/*"
         
     | 
| 
       5 
     | 
    
         
            -
                - "vendor/bundle/**/*"
         
     | 
| 
       6 
     | 
    
         
            -
                - "Schemafile"
         
     | 
| 
       7 
     | 
    
         
            -
                - "**/*.schema"
         
     | 
| 
       8 
     | 
    
         
            -
              TargetRubyVersion: 2.7
         
     | 
| 
       9 
     | 
    
         
            -
              NewCops: enable
         
     | 
| 
       10 
     | 
    
         
            -
              SuggestExtensions: false
         
     | 
| 
       11 
     | 
    
         
            -
            Bundler/OrderedGems:
         
     | 
| 
       12 
     | 
    
         
            -
              Include:
         
     | 
| 
       13 
     | 
    
         
            -
                - "Appraisals"
         
     | 
| 
       14 
     | 
    
         
            -
            Layout/HeredocIndentation:
         
     | 
| 
       15 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       16 
     | 
    
         
            -
            Metrics/AbcSize:
         
     | 
| 
       17 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       18 
     | 
    
         
            -
            Metrics/BlockLength:
         
     | 
| 
       19 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       20 
     | 
    
         
            -
            Metrics/BlockNesting:
         
     | 
| 
       21 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       22 
     | 
    
         
            -
            Metrics/ClassLength:
         
     | 
| 
       23 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       24 
     | 
    
         
            -
            Metrics/CyclomaticComplexity:
         
     | 
| 
       25 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       26 
     | 
    
         
            -
            Layout/LineLength:
         
     | 
| 
       27 
     | 
    
         
            -
              Max: 200
         
     | 
| 
       28 
     | 
    
         
            -
            Metrics/MethodLength:
         
     | 
| 
       29 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       30 
     | 
    
         
            -
            Metrics/ModuleLength:
         
     | 
| 
       31 
     | 
    
         
            -
              Max: 106
         
     | 
| 
       32 
     | 
    
         
            -
            Metrics/ParameterLists:
         
     | 
| 
       33 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       34 
     | 
    
         
            -
            Metrics/PerceivedComplexity:
         
     | 
| 
       35 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       36 
     | 
    
         
            -
            Style/Documentation:
         
     | 
| 
       37 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       38 
     | 
    
         
            -
            Style/GuardClause:
         
     | 
| 
       39 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       40 
     | 
    
         
            -
            Style/MixinUsage:
         
     | 
| 
       41 
     | 
    
         
            -
              Exclude:
         
     | 
| 
       42 
     | 
    
         
            -
                - "spec/**/*"
         
     | 
| 
       43 
     | 
    
         
            -
            Style/TrailingCommaInHashLiteral:
         
     | 
| 
       44 
     | 
    
         
            -
              EnforcedStyleForMultiline: consistent_comma
         
     | 
| 
       45 
     | 
    
         
            -
            Layout/ClosingHeredocIndentation:
         
     | 
| 
       46 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       47 
     | 
    
         
            -
            Style/NumericPredicate:
         
     | 
| 
       48 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       49 
     | 
    
         
            -
            Lint/MissingSuper:
         
     | 
| 
       50 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       51 
     | 
    
         
            -
            Style/StringConcatenation:
         
     | 
| 
       52 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       53 
     | 
    
         
            -
            Style/SoleNestedConditional:
         
     | 
| 
       54 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       55 
     | 
    
         
            -
            Lint/DuplicateBranch:
         
     | 
| 
       56 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       57 
     | 
    
         
            -
            Style/OptionalBooleanParameter:
         
     | 
| 
       58 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       59 
     | 
    
         
            -
            Gemspec/DevelopmentDependencies:
         
     | 
| 
       60 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       61 
     | 
    
         
            -
            Lint/LiteralInInterpolation:
         
     | 
| 
       62 
     | 
    
         
            -
              Enabled: false
         
     | 
| 
       63 
     | 
    
         
            -
            Naming/PredicateMethod:
         
     | 
| 
       64 
     | 
    
         
            -
              Enabled: false
         
     | 
    
        data/.simplecov
    DELETED
    
    
    
        data/Appraisals
    DELETED
    
    | 
         @@ -1,21 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            appraise 'activerecord-6.1' do
         
     | 
| 
       4 
     | 
    
         
            -
              gem 'activerecord', '~> 6.1.7'
         
     | 
| 
       5 
     | 
    
         
            -
            end
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            appraise 'activerecord-7.0' do
         
     | 
| 
       8 
     | 
    
         
            -
              gem 'activerecord', '~> 7.0.4'
         
     | 
| 
       9 
     | 
    
         
            -
            end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            appraise 'activerecord-7.1' do
         
     | 
| 
       12 
     | 
    
         
            -
              gem 'activerecord', '~> 7.1.0'
         
     | 
| 
       13 
     | 
    
         
            -
            end
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            appraise 'activerecord-7.2' do
         
     | 
| 
       16 
     | 
    
         
            -
              gem 'activerecord', '~> 7.2.0'
         
     | 
| 
       17 
     | 
    
         
            -
            end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            appraise 'activerecord-8.0' do
         
     | 
| 
       20 
     | 
    
         
            -
              gem 'activerecord', '~> 8.0.0'
         
     | 
| 
       21 
     | 
    
         
            -
            end
         
     | 
    
        data/Gemfile
    DELETED
    
    
    
        data/Rakefile
    DELETED
    
    | 
         @@ -1,13 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'bundler/gem_tasks'
         
     | 
| 
       4 
     | 
    
         
            -
            require 'rspec/core/rake_task'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'rubocop/rake_task'
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            RSpec::Core::RakeTask.new('spec')
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            RuboCop::RakeTask.new do |task|
         
     | 
| 
       10 
     | 
    
         
            -
              task.options = %w[-c .rubocop.yml]
         
     | 
| 
       11 
     | 
    
         
            -
            end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            task default: %i[rubocop spec]
         
     | 
    
        data/compose.yml
    DELETED
    
    | 
         @@ -1,20 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            services:
         
     | 
| 
       2 
     | 
    
         
            -
              mysql57:
         
     | 
| 
       3 
     | 
    
         
            -
                image: "mysql:5.7"
         
     | 
| 
       4 
     | 
    
         
            -
                platform: linux/amd64
         
     | 
| 
       5 
     | 
    
         
            -
                ports:
         
     | 
| 
       6 
     | 
    
         
            -
                  - "13316:3306"
         
     | 
| 
       7 
     | 
    
         
            -
                environment:
         
     | 
| 
       8 
     | 
    
         
            -
                  MYSQL_ROOT_PASSWORD: password
         
     | 
| 
       9 
     | 
    
         
            -
              mysql80:
         
     | 
| 
       10 
     | 
    
         
            -
                image: "mysql:8.0"
         
     | 
| 
       11 
     | 
    
         
            -
                ports:
         
     | 
| 
       12 
     | 
    
         
            -
                  - "13318:3306"
         
     | 
| 
       13 
     | 
    
         
            -
                environment:
         
     | 
| 
       14 
     | 
    
         
            -
                  MYSQL_ROOT_PASSWORD: password
         
     | 
| 
       15 
     | 
    
         
            -
              postgres:
         
     | 
| 
       16 
     | 
    
         
            -
                image: "postgres:14"
         
     | 
| 
       17 
     | 
    
         
            -
                ports:
         
     | 
| 
       18 
     | 
    
         
            -
                  - "15442:5432"
         
     | 
| 
       19 
     | 
    
         
            -
                environment:
         
     | 
| 
       20 
     | 
    
         
            -
                  POSTGRES_PASSWORD: password
         
     | 
    
        data/ridgepole.gemspec
    DELETED
    
    | 
         @@ -1,51 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            lib = File.expand_path('lib', __dir__)
         
     | 
| 
       4 
     | 
    
         
            -
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
       5 
     | 
    
         
            -
            require 'ridgepole/version'
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            Gem::Specification.new do |spec|
         
     | 
| 
       8 
     | 
    
         
            -
              spec.name          = 'ridgepole'
         
     | 
| 
       9 
     | 
    
         
            -
              spec.version       = Ridgepole::VERSION
         
     | 
| 
       10 
     | 
    
         
            -
              spec.authors       = ['Genki Sugawara']
         
     | 
| 
       11 
     | 
    
         
            -
              spec.email         = ['sugawara@winebarrel.jp']
         
     | 
| 
       12 
     | 
    
         
            -
              spec.summary       = 'Ridgepole is a tool to manage DB schema.'
         
     | 
| 
       13 
     | 
    
         
            -
              spec.description   = 'Ridgepole is a tool to manage DB schema. It defines DB schema using Rails DSL, and updates DB schema according to DSL.'
         
     | 
| 
       14 
     | 
    
         
            -
              spec.homepage      = 'https://github.com/ridgepole/ridgepole'
         
     | 
| 
       15 
     | 
    
         
            -
              spec.license       = 'MIT'
         
     | 
| 
       16 
     | 
    
         
            -
              spec.platform      = Gem::Platform::RUBY
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              spec.files = Dir.chdir(File.expand_path(__dir__)) do
         
     | 
| 
       19 
     | 
    
         
            -
                `git ls-files -z`.split("\x0").reject do |f|
         
     | 
| 
       20 
     | 
    
         
            -
                  f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
         
     | 
| 
       21 
     | 
    
         
            -
                end
         
     | 
| 
       22 
     | 
    
         
            -
              end
         
     | 
| 
       23 
     | 
    
         
            -
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         
     | 
| 
       24 
     | 
    
         
            -
              spec.require_paths = ['lib']
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
              spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
              spec.add_dependency 'activerecord', '>= 6.1', '< 8.1'
         
     | 
| 
       29 
     | 
    
         
            -
              spec.add_dependency 'diffy'
         
     | 
| 
       30 
     | 
    
         
            -
              spec.add_dependency 'logger'
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
              spec.add_development_dependency 'appraisal', '>= 2.2.0'
         
     | 
| 
       33 
     | 
    
         
            -
              spec.add_development_dependency 'bigdecimal'
         
     | 
| 
       34 
     | 
    
         
            -
              spec.add_development_dependency 'bundler'
         
     | 
| 
       35 
     | 
    
         
            -
              spec.add_development_dependency 'erbh', '>= 0.2.1'
         
     | 
| 
       36 
     | 
    
         
            -
              spec.add_development_dependency 'hash_modern_inspect', '>= 0.1.1'
         
     | 
| 
       37 
     | 
    
         
            -
              spec.add_development_dependency 'hash_order_helper', '>= 0.1.6'
         
     | 
| 
       38 
     | 
    
         
            -
              spec.add_development_dependency 'mysql2'
         
     | 
| 
       39 
     | 
    
         
            -
              spec.add_development_dependency 'pg'
         
     | 
| 
       40 
     | 
    
         
            -
              spec.add_development_dependency 'rake'
         
     | 
| 
       41 
     | 
    
         
            -
              spec.add_development_dependency 'rspec', '>= 3.0.0'
         
     | 
| 
       42 
     | 
    
         
            -
              spec.add_development_dependency 'rspec-match_fuzzy', '>= 0.2.0'
         
     | 
| 
       43 
     | 
    
         
            -
              spec.add_development_dependency 'rspec-match_ruby', '>= 0.1.3'
         
     | 
| 
       44 
     | 
    
         
            -
              spec.add_development_dependency 'rubocop', '1.78.0'
         
     | 
| 
       45 
     | 
    
         
            -
              spec.add_development_dependency 'rubocop-rake', '>= 0.5.1'
         
     | 
| 
       46 
     | 
    
         
            -
              spec.add_development_dependency 'rubocop-rspec', '>= 2.1.0'
         
     | 
| 
       47 
     | 
    
         
            -
              spec.add_development_dependency 'simplecov'
         
     | 
| 
       48 
     | 
    
         
            -
              spec.add_development_dependency 'simplecov-lcov'
         
     | 
| 
       49 
     | 
    
         
            -
              spec.add_development_dependency 'trilogy'
         
     | 
| 
       50 
     | 
    
         
            -
              spec.metadata['rubygems_mfa_required'] = 'true'
         
     | 
| 
       51 
     | 
    
         
            -
            end
         
     |