scenic-cascade 0.1.3 → 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: 29ecc270cd637c5654557c3d349c43a59483476d7a0758a3988136d4c3fa4a28
4
- data.tar.gz: b53b4f0a78d929753627aabcab2dbf75c6e6aad79fe5ee6a77b5a1b45b9b9af0
3
+ metadata.gz: d73b897c05b319c076cf356e7e461fee43001a4fed0da81b2357a10b6723a16c
4
+ data.tar.gz: ba968715ba61e3085546ca6b8027f789c99f73c4ba36da08ab7dd1e7c90f3021
5
5
  SHA512:
6
- metadata.gz: 642f9d3a40bf02b8da393a10e645c7609e5562652654c016ad27a6806b86d8bbf4f98ffd4e1554ef4fca5a60dab878badf298bbc0200b38ae1aa16c0baccddf3
7
- data.tar.gz: b95a92d620f673192b07e82de00151e4e251e1ecaeb13c24df4c6fa85670a71093b04a2d0d44dde9b86bf7e066dc112689292b808eabe27e3549dddea849c134
6
+ metadata.gz: c328b221646cfbdcb5f435b6ebf76e4299161793d12663d2dd7916c3a549f38aa33c3e1a60edba872ff1bb8b74063683b827a72f128438e862fc710ac9803534
7
+ data.tar.gz: 73e2139585600fb6a5bc121403c6eeabbaa6ec9c92479cc03f4c3970db06d1ba25ce0bb3a4966ef3749c25856782bb96b0cf3ff4c84d8a6a56adebc1a44a6474
data/.rubocop.yml CHANGED
@@ -3,9 +3,15 @@ require:
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
5
 
6
+ inherit_mode:
7
+ merge:
8
+ - Exclude
9
+
6
10
  AllCops:
7
11
  TargetRubyVersion: 2.6
8
12
  NewCops: enable
13
+ Exclude:
14
+ - gemfiles/*.gemfile
9
15
 
10
16
  Style/StringLiterals:
11
17
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ 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
+
21
+ ## [0.1.4] - 2026-11-04
22
+
23
+ ### Added
24
+
25
+ - Verified compatibility with Rails 8.0 and 8.1 while retaining Rails 7.1 and 7.2 coverage.
26
+
10
27
  ## [0.1.3] - 2026-11-01
11
28
 
12
29
  ### Fixed
@@ -37,7 +54,9 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
37
54
 
38
55
  - Initial release of the cascading Scenic view migration generator.
39
56
 
40
- [Unreleased]: https://github.com/akiomik/scenic-cascade/compare/v0.1.3...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
59
+ [0.1.4]: https://github.com/akiomik/scenic-cascade/compare/v0.1.3...v0.1.4
41
60
  [0.1.3]: https://github.com/akiomik/scenic-cascade/compare/v0.1.2...v0.1.3
42
61
  [0.1.2]: https://github.com/akiomik/scenic-cascade/compare/v0.1.1...v0.1.2
43
62
  [0.1.1]: https://github.com/akiomik/scenic-cascade/compare/v0.1.0...v0.1.1
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in scenic-cascade.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'appraisal', '~> 2.5', require: false
8
9
  gem 'rake', '~> 13.0'
9
10
 
10
11
  # type checking
@@ -12,13 +13,13 @@ gem 'rake', '~> 13.0'
12
13
  gem 'steep', '~> 1.10', require: false
13
14
 
14
15
  # testing
15
- gem 'activerecord', '~> 7.1.0'
16
+ gem 'activerecord', '~> 7.2.0'
16
17
  gem 'ammeter', '~> 1.1'
17
18
  gem 'database_cleaner-active_record', '~> 2.0'
18
19
  # Nokogiri 1.19 drops Ruby 3.1, which remains in the CI matrix.
19
20
  gem 'nokogiri', '~> 1.18.0'
20
21
  gem 'pg', '~> 1.0'
21
- gem 'railties', '~> 7.1.0'
22
+ gem 'railties', '~> 7.2.0'
22
23
  gem 'rspec', '~> 3.0'
23
24
  gem 'simplecov', require: false
24
25
  gem 'simplecov-cobertura', '~> 3.2', require: false
data/Gemfile.lock CHANGED
@@ -1,93 +1,101 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scenic-cascade (0.1.3)
4
+ scenic-cascade (0.1.5)
5
5
  scenic (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (7.1.6)
11
- actionview (= 7.1.6)
12
- activesupport (= 7.1.6)
10
+ actionpack (7.2.4)
11
+ actionview (= 7.2.4)
12
+ activesupport (= 7.2.4)
13
13
  cgi
14
14
  nokogiri (>= 1.8.5)
15
15
  racc
16
- rack (>= 2.2.4)
16
+ rack (>= 2.2.4, < 3.3)
17
17
  rack-session (>= 1.0.1)
18
18
  rack-test (>= 0.6.3)
19
19
  rails-dom-testing (~> 2.2)
20
20
  rails-html-sanitizer (~> 1.6)
21
- actionview (7.1.6)
22
- activesupport (= 7.1.6)
21
+ useragent (~> 0.16)
22
+ actionview (7.2.4)
23
+ activesupport (= 7.2.4)
23
24
  builder (~> 3.1)
24
25
  cgi
25
26
  erubi (~> 1.11)
26
27
  rails-dom-testing (~> 2.2)
27
28
  rails-html-sanitizer (~> 1.6)
28
- activemodel (7.1.6)
29
- activesupport (= 7.1.6)
30
- activerecord (7.1.6)
31
- activemodel (= 7.1.6)
32
- activesupport (= 7.1.6)
29
+ activemodel (7.2.4)
30
+ activesupport (= 7.2.4)
31
+ activerecord (7.2.4)
32
+ activemodel (= 7.2.4)
33
+ activesupport (= 7.2.4)
33
34
  timeout (>= 0.4.0)
34
- activesupport (7.1.6)
35
+ activesupport (7.2.4)
35
36
  base64
36
37
  benchmark (>= 0.3)
37
38
  bigdecimal
38
- concurrent-ruby (~> 1.0, >= 1.0.2)
39
- connection_pool (>= 2.2.5)
39
+ concurrent-ruby (~> 1.0, >= 1.3.1)
40
+ connection_pool (>= 2.2.5, < 3)
40
41
  drb
41
42
  i18n (>= 1.6, < 2)
42
43
  logger (>= 1.4.2)
43
- minitest (>= 5.1)
44
- mutex_m
44
+ minitest (>= 5.1, < 6)
45
45
  securerandom (>= 0.3)
46
- tzinfo (~> 2.0)
47
- ammeter (1.1.6)
46
+ tzinfo (~> 2.0, >= 2.0.5)
47
+ ammeter (1.1.7)
48
48
  activesupport (>= 3.0)
49
49
  railties (>= 3.0)
50
50
  rspec-rails (>= 2.2)
51
+ appraisal (2.5.0)
52
+ bundler
53
+ rake
54
+ thor (>= 0.14.0)
51
55
  ast (2.4.2)
52
- base64 (0.2.0)
56
+ base64 (0.3.0)
53
57
  benchmark (0.5.0)
54
- bigdecimal (3.1.4)
55
- builder (3.2.4)
58
+ bigdecimal (4.1.3)
59
+ builder (3.3.0)
56
60
  cgi (0.5.2)
57
- concurrent-ruby (1.3.7)
58
- connection_pool (2.4.1)
61
+ concurrent-ruby (1.3.8)
62
+ connection_pool (2.5.5)
59
63
  crass (1.0.8)
60
64
  csv (3.3.7)
61
- database_cleaner-active_record (2.1.0)
65
+ database_cleaner-active_record (2.2.2)
62
66
  activerecord (>= 5.a)
63
- database_cleaner-core (~> 2.0.0)
64
- database_cleaner-core (2.0.1)
65
- diff-lcs (1.5.0)
67
+ database_cleaner-core (~> 2.0)
68
+ database_cleaner-core (2.1.0)
69
+ date (3.6.0)
70
+ diff-lcs (1.6.2)
66
71
  docile (1.4.0)
67
- drb (2.2.0)
68
- ruby2_keywords
69
- erubi (1.12.0)
72
+ drb (2.2.3)
73
+ erb (4.0.4.1)
74
+ cgi (>= 0.3.3)
75
+ erubi (1.13.1)
70
76
  ffi (1.17.4-aarch64-linux-musl)
71
77
  ffi (1.17.4-arm64-darwin)
72
78
  ffi (1.17.4-x86_64-linux-gnu)
73
79
  fileutils (1.8.1)
74
- i18n (1.14.1)
80
+ i18n (1.15.2)
75
81
  concurrent-ruby (~> 1.0)
76
- io-console (0.6.0)
77
- irb (1.10.1)
78
- rdoc
79
- reline (>= 0.3.8)
82
+ io-console (0.9.5)
83
+ irb (1.18.0)
84
+ pp (>= 0.6.0)
85
+ prism (>= 1.3.0)
86
+ rdoc (>= 4.0.0)
87
+ reline (>= 0.4.2)
80
88
  json (2.7.1)
81
89
  language_server-protocol (3.17.0.6)
82
90
  listen (3.10.1)
83
91
  logger
84
92
  rb-fsevent (~> 0.10, >= 0.10.3)
85
93
  rb-inotify (~> 0.9, >= 0.9.10)
86
- logger (1.6.0)
94
+ logger (1.7.0)
87
95
  loofah (2.25.2)
88
96
  crass (~> 1.0.2)
89
97
  nokogiri (>= 1.12.0)
90
- minitest (5.20.0)
98
+ minitest (5.27.0)
91
99
  mutex_m (0.3.0)
92
100
  nokogiri (1.18.10-aarch64-linux-musl)
93
101
  racc (~> 1.4)
@@ -100,61 +108,68 @@ GEM
100
108
  ast (~> 2.4.1)
101
109
  racc
102
110
  pg (1.5.4)
103
- psych (5.1.2)
111
+ pp (0.6.4)
112
+ prettyprint
113
+ prettyprint (0.2.1)
114
+ prism (2.1.0)
115
+ psych (5.5.0)
116
+ date
104
117
  stringio
105
- racc (1.7.3)
106
- rack (3.0.8)
107
- rack-session (2.0.0)
118
+ racc (1.8.1)
119
+ rack (3.2.8)
120
+ rack-session (2.1.2)
121
+ base64 (>= 0.1.0)
108
122
  rack (>= 3.0.0)
109
- rack-test (2.1.0)
123
+ rack-test (2.3.0)
110
124
  rack (>= 1.3)
111
- rackup (2.1.0)
125
+ rackup (2.3.1)
112
126
  rack (>= 3)
113
- webrick (~> 1.8)
114
- rails-dom-testing (2.2.0)
127
+ rails-dom-testing (2.3.0)
115
128
  activesupport (>= 5.0.0)
116
129
  minitest
117
130
  nokogiri (>= 1.6)
118
- rails-html-sanitizer (1.6.0)
119
- loofah (~> 2.21)
120
- nokogiri (~> 1.14)
121
- railties (7.1.6)
122
- actionpack (= 7.1.6)
123
- activesupport (= 7.1.6)
131
+ rails-html-sanitizer (1.7.1)
132
+ loofah (~> 2.25, >= 2.25.2)
133
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
134
+ railties (7.2.4)
135
+ actionpack (= 7.2.4)
136
+ activesupport (= 7.2.4)
124
137
  cgi
125
- irb
138
+ irb (~> 1.13)
126
139
  rackup (>= 1.0.0)
127
140
  rake (>= 12.2)
128
141
  thor (~> 1.0, >= 1.2.2)
129
142
  tsort (>= 0.2)
130
143
  zeitwerk (~> 2.6)
131
144
  rainbow (3.1.1)
132
- rake (13.1.0)
145
+ rake (13.4.2)
133
146
  rb-fsevent (0.11.2)
134
147
  rb-inotify (0.11.1)
135
148
  ffi (~> 1.0)
136
149
  rbs (3.10.4)
137
150
  logger
138
151
  tsort
139
- rdoc (6.6.3.1)
152
+ rdoc (7.2.0)
153
+ erb
140
154
  psych (>= 4.0.0)
155
+ tsort
141
156
  regexp_parser (2.8.3)
142
- reline (0.4.1)
157
+ reline (0.7.0)
143
158
  io-console (~> 0.5)
144
159
  rexml (3.4.4)
145
160
  rspec (3.12.0)
146
161
  rspec-core (~> 3.12.0)
147
162
  rspec-expectations (~> 3.12.0)
148
163
  rspec-mocks (~> 3.12.0)
149
- rspec-core (3.12.2)
164
+ rspec-core (3.12.3)
150
165
  rspec-support (~> 3.12.0)
151
- rspec-expectations (3.12.3)
166
+ rspec-expectations (3.12.4)
152
167
  diff-lcs (>= 1.2.0, < 2.0)
153
168
  rspec-support (~> 3.12.0)
154
- rspec-mocks (3.12.6)
169
+ rspec-mocks (3.12.7)
155
170
  diff-lcs (>= 1.2.0, < 2.0)
156
171
  rspec-support (~> 3.12.0)
157
- rspec-rails (6.1.0)
172
+ rspec-rails (6.1.1)
158
173
  actionpack (>= 6.1)
159
174
  activesupport (>= 6.1)
160
175
  railties (>= 6.1)
@@ -162,7 +177,7 @@ GEM
162
177
  rspec-expectations (~> 3.12)
163
178
  rspec-mocks (~> 3.12)
164
179
  rspec-support (~> 3.12)
165
- rspec-support (3.12.1)
180
+ rspec-support (3.12.2)
166
181
  rubocop (1.58.0)
167
182
  json (~> 2.3)
168
183
  language_server-protocol (>= 3.17.0)
@@ -190,11 +205,10 @@ GEM
190
205
  rubocop-capybara (~> 2.17)
191
206
  rubocop-factory_bot (~> 2.22)
192
207
  ruby-progressbar (1.13.0)
193
- ruby2_keywords (0.0.5)
194
208
  scenic (1.9.0)
195
209
  activerecord (>= 4.0.0)
196
210
  railties (>= 4.0.0)
197
- securerandom (0.3.0)
211
+ securerandom (0.4.1)
198
212
  simplecov (0.22.0)
199
213
  docile (~> 1.1)
200
214
  simplecov-html (~> 0.11)
@@ -225,15 +239,15 @@ GEM
225
239
  strscan (3.1.8)
226
240
  terminal-table (4.0.0)
227
241
  unicode-display_width (>= 1.1.1, < 4)
228
- thor (1.4.0)
229
- timeout (0.4.1)
242
+ thor (1.5.0)
243
+ timeout (0.6.1)
230
244
  tsort (0.2.0)
231
245
  tzinfo (2.0.6)
232
246
  concurrent-ruby (~> 1.0)
233
247
  unicode-display_width (2.5.0)
234
248
  uri (1.1.2)
235
- webrick (1.8.2)
236
- zeitwerk (2.6.12)
249
+ useragent (0.16.11)
250
+ zeitwerk (2.6.18)
237
251
 
238
252
  PLATFORMS
239
253
  aarch64-linux-musl
@@ -241,12 +255,13 @@ PLATFORMS
241
255
  x86_64-linux
242
256
 
243
257
  DEPENDENCIES
244
- activerecord (~> 7.1.0)
258
+ activerecord (~> 7.2.0)
245
259
  ammeter (~> 1.1)
260
+ appraisal (~> 2.5)
246
261
  database_cleaner-active_record (~> 2.0)
247
262
  nokogiri (~> 1.18.0)
248
263
  pg (~> 1.0)
249
- railties (~> 7.1.0)
264
+ railties (~> 7.2.0)
250
265
  rake (~> 13.0)
251
266
  rspec (~> 3.0)
252
267
  rubocop (~> 1.21)
data/README.md CHANGED
@@ -92,6 +92,8 @@ end
92
92
 
93
93
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
94
94
 
95
+ The default bundle tests Rails 7.2. To test another supported version, run `bundle exec appraisal install` followed by `bundle exec appraisal rails-7-1 rspec`, `bundle exec appraisal rails-8-0 rspec`, or `bundle exec appraisal rails-8-1 rspec`.
96
+
95
97
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update `version.rb`, `Gemfile.lock`, and `CHANGELOG.md`, then publish a GitHub Release with a matching `vX.Y.Z` tag. The [publish workflow](.github/workflows/publish.yml) builds and pushes the gem to [rubygems.org](https://rubygems.org).
96
98
 
97
99
  ## Contributing
@@ -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.3'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
@@ -2,7 +2,7 @@
2
2
  path: ".gem_rbs_collection"
3
3
  gems:
4
4
  - name: actionpack
5
- version: '6.0'
5
+ version: '7.2'
6
6
  source:
7
7
  type: git
8
8
  name: ruby/gem_rbs_collection
@@ -26,7 +26,7 @@ gems:
26
26
  remote: https://github.com/ruby/gem_rbs_collection.git
27
27
  repo_dir: gems
28
28
  - name: activerecord
29
- version: '7.1'
29
+ version: '7.2'
30
30
  source:
31
31
  type: git
32
32
  name: ruby/gem_rbs_collection
@@ -42,25 +42,17 @@ gems:
42
42
  remote: https://github.com/ruby/gem_rbs_collection.git
43
43
  repo_dir: gems
44
44
  - name: base64
45
- version: '0.1'
45
+ version: 0.3.0
46
46
  source:
47
- type: git
48
- name: ruby/gem_rbs_collection
49
- revision: 9e17daa08b1710667699a208981cffd21dbf15f6
50
- remote: https://github.com/ruby/gem_rbs_collection.git
51
- repo_dir: gems
47
+ type: rubygems
52
48
  - name: benchmark
53
49
  version: '0'
54
50
  source:
55
51
  type: stdlib
56
52
  - name: bigdecimal
57
- version: '3.1'
53
+ version: 4.1.3
58
54
  source:
59
- type: git
60
- name: ruby/gem_rbs_collection
61
- revision: 9e17daa08b1710667699a208981cffd21dbf15f6
62
- remote: https://github.com/ruby/gem_rbs_collection.git
63
- repo_dir: gems
55
+ type: rubygems
64
56
  - name: cgi
65
57
  version: '0.5'
66
58
  source:
@@ -145,10 +137,6 @@ gems:
145
137
  version: '0'
146
138
  source:
147
139
  type: stdlib
148
- - name: mutex_m
149
- version: 0.3.0
150
- source:
151
- type: rubygems
152
140
  - name: nokogiri
153
141
  version: '1.11'
154
142
  source:
@@ -165,6 +153,18 @@ gems:
165
153
  version: '0'
166
154
  source:
167
155
  type: stdlib
156
+ - name: pp
157
+ version: '0'
158
+ source:
159
+ type: stdlib
160
+ - name: prettyprint
161
+ version: '0'
162
+ source:
163
+ type: stdlib
164
+ - name: prism
165
+ version: 2.1.0
166
+ source:
167
+ type: rubygems
168
168
  - name: pstore
169
169
  version: '0'
170
170
  source:
@@ -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.3
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