ridgepole 2.0.0.beta2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd139cacfc2a24027ca2fd0dca97c4090ca338d579a867db3e37d0cb6be37593
4
- data.tar.gz: 16d8c4e9558d8c7690c3edf3198ca0d9565edbd418487f7c808f0d0612d0439b
3
+ metadata.gz: 6fa83f940f36282e309b63bc3b82dcf689b653ef91d8b85aa6c5a8264e381f54
4
+ data.tar.gz: 81aa49a5450b8c50329b9413907c921efce5ba2c41048bbfe9d220d879afc41b
5
5
  SHA512:
6
- metadata.gz: 97986dcde4b904d8a8e29b294ad359a37378ee5c78c9bbc686bb03d29fe581729b0e5aff8167bdca939b4af3b05cad3c53779f086d686edfb8acd97af5392d52
7
- data.tar.gz: 8ef1b3f2283145b573ea0aa6cda3006138c14c2c89e32b73753618781c8160a1f161dc18cf26617c09c7b7ccc5fb3196ec4ef8d5876882052608ae45db5845d1
6
+ metadata.gz: 2d9dd780d7d7dcb55dabbecaf1b0fced0c2e1bdc0f98120029da8d63eb950b1449debebceb01fccc7938deb5eef3fbdd8eb186f4bbcc9c236eabaa8b44c90831
7
+ data.tar.gz: a517f0ef28405b3a6dd7e17286dec85b1fd8e116de625ca8420f8ff358f7aca111c619640742639733b99e92b594b5717791c437b0cb6cc94b02e44585677672
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
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
+
9
+ ### 2.0.0 (2023/11/10)
10
+
11
+ * Bump up version.
12
+
5
13
  ### 2.0.0.beta2 (2023/10/26)
6
14
 
7
15
  * Support Rails 7.1 [pull#447](https://github.com/ridgepole/ridgepole/pull/447)
@@ -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.beta2'
4
+ VERSION = '2.0.1'
5
5
  end
data/ridgepole.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency 'rspec', '>= 3.0.0'
39
39
  spec.add_development_dependency 'rspec-match_fuzzy', '>= 0.1.3'
40
40
  spec.add_development_dependency 'rspec-match_ruby', '>= 0.1.3'
41
- spec.add_development_dependency 'rubocop', '1.57.1'
41
+ spec.add_development_dependency 'rubocop', '1.57.2'
42
42
  spec.add_development_dependency 'rubocop-rake', '>= 0.5.1'
43
43
  spec.add_development_dependency 'rubocop-rspec', '>= 2.1.0'
44
44
  spec.add_development_dependency 'simplecov'
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.beta2
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-10-26 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
@@ -204,14 +204,14 @@ dependencies:
204
204
  requirements:
205
205
  - - '='
206
206
  - !ruby/object:Gem::Version
207
- version: 1.57.1
207
+ version: 1.57.2
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - '='
213
213
  - !ruby/object:Gem::Version
214
- version: 1.57.1
214
+ version: 1.57.2
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: rubocop-rake
217
217
  requirement: !ruby/object:Gem::Requirement
@@ -344,11 +344,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
344
344
  version: '2.7'
345
345
  required_rubygems_version: !ruby/object:Gem::Requirement
346
346
  requirements:
347
- - - ">"
347
+ - - ">="
348
348
  - !ruby/object:Gem::Version
349
- version: 1.3.1
349
+ version: '0'
350
350
  requirements: []
351
- rubygems_version: 3.3.7
351
+ rubygems_version: 3.4.10
352
352
  signing_key:
353
353
  specification_version: 4
354
354
  summary: Ridgepole is a tool to manage DB schema.