scenic 1.5.4 → 1.5.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: e93cc4bb35daed3860cfabd944a9e8bfba6ef4adb48ea03c16fc75f7a0be22df
4
- data.tar.gz: 733141c2c27baa2c09dec37acbaf006e3b9f5c746076b8da7508cec9ba7fff55
3
+ metadata.gz: 4da3d3cd88cae9dfaee68959a899fddbe617a1c711fa03ec36fc40cefba90315
4
+ data.tar.gz: 74b8894aee096545789a61bbd6d2dcbc276949d7f6d5fe62b06128a9751df49f
5
5
  SHA512:
6
- metadata.gz: 45191843b2feb1597827b4a71d8d34cb426aeb200f775b0b888f163cfb02ee36a356e9697c286a17a909406ce2fad4c0d71e0293dc5cecbda1777d2b522b9df0
7
- data.tar.gz: b6c650f5be7c718250c88ec6e6ddd801b2c8b884e11b316c5ef04711667eee87a0a7573dd6bfc3ddf706f809e986208c402b5af6fa792a8f8df9d7abec655fe7
6
+ metadata.gz: 886b10ebffb2a4a612bdb68ca519c38f0e5114d14850cfe7f3d4e985209f69530c18249bab750f4fe6b9b8fee98adc4675cb08f14cd56e1faf2693f1910d38fb
7
+ data.tar.gz: faa4bfbf6812f81ad9efc27a70e79ccb66e1679db69824a551f7494c11482361660aa9780900aa45ad3609ab37074ac83aea85a5cf62dcc4808772259a2a37cb
@@ -2,7 +2,7 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: master
5
+ branches: main
6
6
  pull_request:
7
7
  branches: "*"
8
8
 
@@ -13,16 +13,9 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- ruby: ["2.7","2.4"]
17
- rails: ["5.2", "6.0", "master"]
18
- exclude:
19
- - ruby: "2.4"
20
- rails: "6.0"
21
- - ruby: "2.4"
22
- rails: "master"
23
- include:
24
- - rails: "master"
25
- continue-on-error: true
16
+ ruby: ["2.7", "3.0"]
17
+ rails: ["6.0", "6.1", "master"]
18
+ continue-on-error: [false]
26
19
 
27
20
  runs-on: ubuntu-latest
28
21
 
@@ -50,7 +43,7 @@ jobs:
50
43
  uses: actions/checkout@v2
51
44
 
52
45
  - name: Install Ruby ${{ matrix.ruby }}
53
- uses: ruby/setup-ruby@v1.14.1
46
+ uses: ruby/setup-ruby@v1.61.1
54
47
  with:
55
48
  ruby-version: ${{ matrix.ruby }}
56
49
 
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/version_tmp
17
17
  tmp
18
18
  gemfiles/*.lock
19
19
  .DS_Store
20
+ .ruby-version
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ changelog, see the [commits] for each version via the version links.
5
5
 
6
6
  [commits]: https://github.com/scenic-views/scenic/commits/master
7
7
 
8
+ ## [1.5.5] - December 15, 2021
9
+
10
+ ### Fixed
11
+
12
+ - Fixed an issue reverting migrations under Ruby 3
13
+ - Fixed an issue in index reapplication where sometimes `say` was undefined
14
+
15
+ [1.5.5]: https://github.com/scenic-views/scenic/compare/v1.5.4...v1.5.5
16
+
8
17
  ## [1.5.4] - September 16, 2020
9
18
 
10
19
  [1.5.4]: https://github.com/scenic-views/scenic/compare/v1.5.3...v1.5.4
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in scenic.gemspec
4
4
  gemspec
5
5
 
6
- rails_version = ENV.fetch("RAILS_VERSION", "6.0")
6
+ rails_version = ENV.fetch("RAILS_VERSION", "6.1")
7
7
 
8
8
  if rails_version == "master"
9
9
  rails_constraint = { github: "rails/rails" }
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![Scenic Landscape](https://user-images.githubusercontent.com/152152/49344534-a8817480-f646-11e8-8431-3d95d349c070.png)
4
4
 
5
- [![Build Status](https://github.com/scenic-views/scenic/workflows/CI/badge.svg)](https://github.com/scenic-views/scenic/actions?query=workflow%3ACI+branch%3Amaster)
5
+ [![Build Status](https://github.com/scenic-views/scenic/actions/workflows/ci.yml/badge.svg)](https://github.com/scenic-views/scenic/actions/workflows/ci.yml)
6
6
  [![Documentation Quality](http://inch-ci.org/github/scenic-views/scenic.svg?branch=master)](http://inch-ci.org/github/scenic-views/scenic)
7
7
  [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
8
8
 
@@ -13,7 +13,7 @@ module Scenic
13
13
  # @param connection [Connection] The connection to execute SQL against.
14
14
  # @param speaker [#say] (ActiveRecord::Migration) The object used for
15
15
  # logging the results of reapplying indexes.
16
- def initialize(connection:, speaker: ActiveRecord::Migration)
16
+ def initialize(connection:, speaker: ActiveRecord::Migration.new)
17
17
  @connection = connection
18
18
  @speaker = speaker
19
19
  end
@@ -36,15 +36,25 @@ module Scenic
36
36
  @options ||= @args[1] || {}
37
37
  end
38
38
 
39
+ def keyword_hash(hash)
40
+ if Hash.respond_to? :ruby2_keywords_hash
41
+ Hash.ruby2_keywords_hash(hash)
42
+ else
43
+ hash
44
+ end
45
+ end
46
+
39
47
  def options_for_revert
40
- options.clone.tap do |revert_options|
48
+ opts = options.clone.tap do |revert_options|
41
49
  revert_options[:version] = revert_to_version
42
50
  revert_options.delete(:revert_to_version)
43
51
  end
52
+
53
+ keyword_hash(opts)
44
54
  end
45
55
 
46
56
  def options_without_version
47
- options.except(:version)
57
+ keyword_hash(options.except(:version))
48
58
  end
49
59
  end
50
60
  end
@@ -6,18 +6,22 @@ module Scenic
6
6
  def create_view(*args)
7
7
  record(:create_view, args)
8
8
  end
9
+ ruby2_keywords :create_view if respond_to?(:ruby2_keywords, true)
9
10
 
10
11
  def drop_view(*args)
11
12
  record(:drop_view, args)
12
13
  end
14
+ ruby2_keywords :drop_view if respond_to?(:ruby2_keywords, true)
13
15
 
14
16
  def update_view(*args)
15
17
  record(:update_view, args)
16
18
  end
19
+ ruby2_keywords :update_view if respond_to?(:ruby2_keywords, true)
17
20
 
18
21
  def replace_view(*args)
19
22
  record(:replace_view, args)
20
23
  end
24
+ ruby2_keywords :replace_view if respond_to?(:ruby2_keywords, true)
21
25
 
22
26
  def invert_create_view(args)
23
27
  drop_view_args = StatementArguments.new(args).remove_version.to_a
@@ -1,3 +1,3 @@
1
1
  module Scenic
2
- VERSION = "1.5.4".freeze
2
+ VERSION = "1.5.5".freeze
3
3
  end
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  module Scenic
4
4
  describe Scenic::Statements do
5
5
  before do
6
- adapter = instance_double("Scenic::Adapaters::Postgres").as_null_object
6
+ adapter = instance_double("Scenic::Adapters::Postgres").as_null_object
7
7
  allow(Scenic).to receive(:database).and_return(adapter)
8
8
  end
9
9
 
data/spec/spec_helper.rb CHANGED
@@ -11,6 +11,8 @@ RSpec.configure do |config|
11
11
  DatabaseCleaner.strategy = :transaction
12
12
 
13
13
  config.around(:each, db: true) do |example|
14
+ ActiveRecord::SchemaMigration.create_table
15
+
14
16
  DatabaseCleaner.start
15
17
  example.run
16
18
  DatabaseCleaner.clean
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Prior
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-16 00:00:00.000000000 Z
12
+ date: 2021-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  - !ruby/object:Gem::Version
271
271
  version: '0'
272
272
  requirements: []
273
- rubygems_version: 3.1.2
273
+ rubygems_version: 3.2.32
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Support for database views in Rails migrations