ridgepole 2.0.0 → 2.0.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: e7156f99da51fe3ee205b17442595dfb56da0de39b0bb3995997c306832b7a46
4
- data.tar.gz: c3a09ae5f3b6d2a1895f0b5d518fbae1c607e8dd31419438b111c01fe19a33b1
3
+ metadata.gz: 6fa83f940f36282e309b63bc3b82dcf689b653ef91d8b85aa6c5a8264e381f54
4
+ data.tar.gz: 81aa49a5450b8c50329b9413907c921efce5ba2c41048bbfe9d220d879afc41b
5
5
  SHA512:
6
- metadata.gz: 1a78015bac866b9afd2036dad939b187ffeeadd1e4d96a1a144b87cadf83fba274368f529bc488dd6462a5618c3c6ea83e59cb5981ddafa9a3278feb9bc4ba8d
7
- data.tar.gz: 673e1d69957bb24e284551a509c0d515f16926cf61a0f17ca4080cc24ee71088c909b814269865069c07dfd592b2a7adc40ec0b6c1522d4935a995e59e585938
6
+ metadata.gz: 2d9dd780d7d7dcb55dabbecaf1b0fced0c2e1bdc0f98120029da8d63eb950b1449debebceb01fccc7938deb5eef3fbdd8eb186f4bbcc9c236eabaa8b44c90831
7
+ data.tar.gz: a517f0ef28405b3a6dd7e17286dec85b1fd8e116de625ca8420f8ff358f7aca111c619640742639733b99e92b594b5717791c437b0cb6cc94b02e44585677672
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## 2.0
4
4
 
5
+ ### 2.0.1 (2023/11/22)
6
+
7
+ * Fix renamed_from bug [pull#453](https://github.com/ridgepole/ridgepole/pull/453)
8
+
5
9
  ### 2.0.0 (2023/11/10)
6
10
 
7
11
  * Bump up version.
@@ -4,6 +4,10 @@ module Ridgepole
4
4
  class Delta
5
5
  SCRIPT_NAME = '<Schema>'
6
6
 
7
+ RIDGEPOLE_OPTIONS = %i[
8
+ renamed_from
9
+ ].freeze
10
+
7
11
  def initialize(delta, options = {})
8
12
  @delta = delta
9
13
  @options = options
@@ -235,7 +239,7 @@ create_table(#{table_name.inspect}, #{inspect_options_include_default_proc(optio
235
239
  normalize_limit(column_type, column_options)
236
240
 
237
241
  buf.puts(<<-RUBY)
238
- t.column(#{column_name.inspect}, :#{column_type.to_s.inspect}, #{inspect_options_include_default_proc(column_options)})
242
+ t.column(#{column_name.inspect}, :#{column_type.to_s.inspect}, #{inspect_options_include_default_proc(normalize_options(column_options))})
239
243
  RUBY
240
244
  end
241
245
 
@@ -646,6 +650,12 @@ remove_unique_constraint(#{table_name.inspect}, #{column_name.inspect}, **#{attr
646
650
  column_options[:limit] ||= default_limit if default_limit
647
651
  end
648
652
 
653
+ def normalize_options(options)
654
+ opts = options.dup
655
+ RIDGEPOLE_OPTIONS.each { opts.delete(_1) }
656
+ opts
657
+ end
658
+
649
659
  def inspect_options_include_default_proc(options)
650
660
  options = options.dup
651
661
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ridgepole
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-10 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord