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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ridgepole/delta.rb +11 -1
- data/lib/ridgepole/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6fa83f940f36282e309b63bc3b82dcf689b653ef91d8b85aa6c5a8264e381f54
|
|
4
|
+
data.tar.gz: 81aa49a5450b8c50329b9413907c921efce5ba2c41048bbfe9d220d879afc41b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d9dd780d7d7dcb55dabbecaf1b0fced0c2e1bdc0f98120029da8d63eb950b1449debebceb01fccc7938deb5eef3fbdd8eb186f4bbcc9c236eabaa8b44c90831
|
|
7
|
+
data.tar.gz: a517f0ef28405b3a6dd7e17286dec85b1fd8e116de625ca8420f8ff358f7aca111c619640742639733b99e92b594b5717791c437b0cb6cc94b02e44585677672
|
data/CHANGELOG.md
CHANGED
data/lib/ridgepole/delta.rb
CHANGED
|
@@ -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
|
|
data/lib/ridgepole/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2023-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|