scenic-cascade 0.1.4 → 0.1.5

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: 88a122c88ce1ff74a3dcad133235b02ba2d0c2a7f981088c3372bd52f6a6db23
4
- data.tar.gz: f768ffa8187c32107726e6784e3622a46679cdb98220d121a8abe68d170da124
3
+ metadata.gz: d73b897c05b319c076cf356e7e461fee43001a4fed0da81b2357a10b6723a16c
4
+ data.tar.gz: ba968715ba61e3085546ca6b8027f789c99f73c4ba36da08ab7dd1e7c90f3021
5
5
  SHA512:
6
- metadata.gz: 37a6f0c06c9ac08373f047a2cd6d6b7c57e1a2e568786f35c9a9e5d33c0c2c9d8037c65181b42a56f6012a87e7ad8bb27931a52da6b139676f7f0c38db54c748
7
- data.tar.gz: 3b1484414f3d89ca87b100a8a0d82d1ddc63d37eb1c95b308dc0989ac23d83fc542848a42b70d3738da2a43bd0a0f7f6ea10ac2b423ba70f8f8faa80f128d17a
6
+ metadata.gz: c328b221646cfbdcb5f435b6ebf76e4299161793d12663d2dd7916c3a549f38aa33c3e1a60edba872ff1bb8b74063683b827a72f128438e862fc710ac9803534
7
+ data.tar.gz: 73e2139585600fb6a5bc121403c6eeabbaa6ec9c92479cc03f4c3970db06d1ba25ce0bb3a4966ef3749c25856782bb96b0cf3ff4c84d8a6a56adebc1a44a6474
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.5] - 2026-11-04
11
+
12
+ ### Added
13
+
14
+ - Verified compatibility with Ruby 4.0 on Rails 8.1.
15
+ - Verified compatibility with PostgreSQL 17 while retaining PostgreSQL 14 coverage.
16
+
17
+ ### Fixed
18
+
19
+ - Reject `--side-by-side` on Scenic 1.8 when updating a materialized view, before writing a migration.
20
+
10
21
  ## [0.1.4] - 2026-11-04
11
22
 
12
23
  ### Added
@@ -43,7 +54,8 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
43
54
 
44
55
  - Initial release of the cascading Scenic view migration generator.
45
56
 
46
- [Unreleased]: https://github.com/akiomik/scenic-cascade/compare/v0.1.4...HEAD
57
+ [Unreleased]: https://github.com/akiomik/scenic-cascade/compare/v0.1.5...HEAD
58
+ [0.1.5]: https://github.com/akiomik/scenic-cascade/compare/v0.1.4...v0.1.5
47
59
  [0.1.4]: https://github.com/akiomik/scenic-cascade/compare/v0.1.3...v0.1.4
48
60
  [0.1.3]: https://github.com/akiomik/scenic-cascade/compare/v0.1.2...v0.1.3
49
61
  [0.1.2]: https://github.com/akiomik/scenic-cascade/compare/v0.1.1...v0.1.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scenic-cascade (0.1.4)
4
+ scenic-cascade (0.1.5)
5
5
  scenic (~> 1.0)
6
6
 
7
7
  GEM
@@ -9,9 +9,14 @@ module Scenic
9
9
  module Generators
10
10
  module View
11
11
  # Create a database view migration with re-creating of dependent views
12
+ # rubocop:disable Metrics/ClassLength
12
13
  class CascadeGenerator < Scenic::Generators::ViewGenerator
13
14
  source_root File.expand_path('templates', __dir__ || '.')
14
15
 
16
+ if Gem::Version.new(Scenic::VERSION) < Gem::Version.new('1.9')
17
+ class_option :side_by_side, type: :boolean, default: false, aliases: ['--side-by-side']
18
+ end
19
+
15
20
  def create_view_definition
16
21
  @definition_path = @original_definition = nil
17
22
  validate_update_options! unless destroying? || creating_new_view?
@@ -51,6 +56,9 @@ module Scenic
51
56
  raise ArgumentError, '--side-by-side cannot update schema-qualified views' if plural_name.include?('.')
52
57
 
53
58
  raise ArgumentError, '--side-by-side cannot be combined with --no-data' if options[:no_data]
59
+ return if Gem::Version.new(Scenic::VERSION) >= Gem::Version.new('1.9')
60
+
61
+ raise ArgumentError, '--side-by-side requires Scenic 1.9 or newer'
54
62
  end
55
63
 
56
64
  def migration_template_details
@@ -141,6 +149,7 @@ module Scenic
141
149
  "#{ActiveRecord::Base.table_name_prefix}#{plural_name}#{ActiveRecord::Base.table_name_suffix}"
142
150
  end
143
151
  end
152
+ # rubocop:enable Metrics/ClassLength
144
153
  end
145
154
  end
146
155
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Scenic
4
4
  module Cascade
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
@@ -2,6 +2,7 @@ module Scenic
2
2
  module Generators
3
3
  class ViewGenerator
4
4
  def self.source_root: (String?) -> void
5
+ def self.class_option: (Symbol, **untyped) -> untyped
5
6
  def migration_template: (String, String) -> void
6
7
  def destination_root: -> String
7
8
  def find_in_source_paths: (String) -> String
@@ -0,0 +1,3 @@
1
+ module Scenic
2
+ VERSION: String
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenic-cascade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akiomi Kamakura
@@ -71,6 +71,7 @@ files:
71
71
  - sig/scenic/cascade/view.rbs
72
72
  - sig/scenic/cascade/view_with_version.rbs
73
73
  - sig/scenic/definition.rbs
74
+ - sig/scenic/version.rbs
74
75
  homepage: https://github.com/akiomik/scenic-cascade
75
76
  licenses:
76
77
  - Apache-2.0