scenic 1.5.2 → 1.5.3

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: 75afe5531011de8c35f2272af574763575bdb4d9f9650eeb2845a3f163b1e941
4
- data.tar.gz: a7ded9f2177997aba8c3c424e04c2aed14f08a2f452d4ab74d2030d692fe1e7c
3
+ metadata.gz: a5199c8d00d9c719110d712116605b4e7b55fe8094748e8532b6a61c7c36a88a
4
+ data.tar.gz: e9e5c90ed46501f15c09f3215e56a38ec7cd9e32b81008e651ec8d23d1a23916
5
5
  SHA512:
6
- metadata.gz: f1d00648e7f6c73b76242d43b3d49456afbc531a3a562dd43525b1f45f0b440f8650f1d4fb9459780aba7e46e87b49d33b3f7b92693ae43f03d51ea1fee39a67
7
- data.tar.gz: 7da8bfdf0cac0c7bea6a7e67f09a37767943d5e6f2608ffb478db0b2884a93bc76e06b2b0d8fcf52a7d95d7b10d154d3b7cd2065de022a44d669f61b88699cfa
6
+ metadata.gz: b75a5a869a500feddb5b45ec1f2b93eb9eb605c76d1326462eda78fddd888c2010f8692de141c275133553d200caef74c087c60a8b0c6e2e87b2cbdc751ef43d
7
+ data.tar.gz: 4580819daacf5bd817e1ef4a2fb127c825615286173bedb2a0ba61be19aaac5e7a963d5a6cdd9a435c09db13337a188c8c2fb4c4fa718276d3980d938ad4aa4b
@@ -0,0 +1,78 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: master
6
+ pull_request:
7
+ branches: "*"
8
+
9
+ jobs:
10
+ build:
11
+ name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
12
+
13
+ strategy:
14
+ fail-fast: false
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
26
+
27
+ runs-on: ubuntu-latest
28
+
29
+ services:
30
+ postgres:
31
+ image: postgres
32
+ env:
33
+ POSTGRES_USER: "postgres"
34
+ POSTGRES_PASSWORD: "postgres"
35
+ ports:
36
+ - 5432:5432
37
+ options: >-
38
+ --health-cmd pg_isready
39
+ --health-interval 10s
40
+ --health-timeout 5s
41
+ --health-retries 5
42
+
43
+ env:
44
+ RAILS_VERSION: ${{ matrix.rails }}
45
+ POSTGRES_USER: "postgres"
46
+ POSTGRES_PASSWORD: "postgres"
47
+
48
+ steps:
49
+ - name: Checkout
50
+ uses: actions/checkout@v2
51
+
52
+ - name: Install Ruby ${{ matrix.ruby }}
53
+ uses: ruby/setup-ruby@v1.14.1
54
+ with:
55
+ ruby-version: ${{ matrix.ruby }}
56
+
57
+ - name: Install dependent libraries
58
+ run: sudo apt-get install libpq-dev
59
+
60
+ - name: Generate lockfile
61
+ run: bundle lock
62
+
63
+ - name: Cache dependencies
64
+ uses: actions/cache@v1
65
+ with:
66
+ path: vendor/bundle
67
+ key: bundle-${{ hashFiles('Gemfile.lock') }}
68
+
69
+ - name: Set up Scenic
70
+ run: bin/setup
71
+
72
+ - name: Run fast tests
73
+ run: bundle exec rake spec
74
+ continue-on-error: ${{ matrix.continue-on-error }}
75
+
76
+ - name: Run acceptance tests
77
+ run: bundle exec rake spec:acceptance
78
+ continue-on-error: ${{ matrix.continue-on-error }}
@@ -5,7 +5,7 @@ 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.2] - February 6, 2019
8
+ ## [1.5.2] - February 6, 2020
9
9
 
10
10
  ### Fixed
11
11
 
@@ -10,10 +10,12 @@ agree to abide by our [code of conduct].
10
10
  1. Fork the repository.
11
11
  2. Run `bin/setup`, which will install dependencies and create the dummy
12
12
  application database.
13
- 3. Run `bin/appraisal rake` to verify that the tests pass against all
14
- supported versions of Rails.
13
+ 3. Run `rake` to verify that the tests pass against the version of Rails you are
14
+ running locally.
15
15
  4. Make your change with new passing tests, following existing style.
16
16
  5. Write a [good commit message], push your fork, and submit a pull request.
17
+ 6. CI will run the test suite on all configured versions of Ruby and Rails.
18
+ Address any failures.
17
19
 
18
20
  [good commit message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
19
21
 
data/Gemfile CHANGED
@@ -2,3 +2,15 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in scenic.gemspec
4
4
  gemspec
5
+
6
+ rails_version = ENV.fetch("RAILS_VERSION", "6.0")
7
+
8
+ if rails_version == "master"
9
+ rails_constraint = { github: "rails/rails" }
10
+ else
11
+ rails_constraint = "~> #{rails_version}.0"
12
+ end
13
+
14
+ gem "rails", rails_constraint
15
+ gem "sprockets", "< 4.0.0"
16
+ gem "pg", "~> 1.1"
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2016 Derek Prior, Caleb Thompson, and thoughtbot.
1
+ Copyright (c) 2014-2020 Derek Prior, Caleb Hearth, and thoughtbot.
2
2
 
3
3
  MIT License
4
4
 
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://travis-ci.org/scenic-views/scenic.svg?branch=master)](https://travis-ci.org/scenic-views/scenic)
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)
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
 
@@ -94,7 +94,7 @@ when some of those views may be materialized and take a long time to recreate.
94
94
 
95
95
  You can use `replace_view` to generate a CREATE OR REPLACE VIEW SQL statement.
96
96
 
97
- See postgresql documentation on how this works:
97
+ See Postgres documentation on how this works:
98
98
  http://www.postgresql.org/docs/current/static/sql-createview.html
99
99
 
100
100
  To start replacing a view run the generator like for a regular change:
@@ -135,7 +135,7 @@ ActiveRecord or ARel queries. As far as ActiveRecord is concerned, a view is
135
135
  no different than a table.
136
136
 
137
137
  ```ruby
138
- class SearchResult < ActiveRecord::Base
138
+ class SearchResult < ApplicationRecord
139
139
  belongs_to :searchable, polymorphic: true
140
140
 
141
141
  # this isn't strictly necessary, but it will prevent
@@ -218,7 +218,7 @@ You can get around these issues by setting the primary key column on your Rails
218
218
  model like so:
219
219
 
220
220
  ```ruby
221
- class People < ActiveRecord::Base
221
+ class People < ApplicationRecord
222
222
  self.primary_key = :my_unique_identifier_field
223
223
  end
224
224
  ```
@@ -255,12 +255,15 @@ meet your needs:
255
255
  * [scenic_sqlite_adapter](https://github.com/pdebelak/scenic_sqlite_adapter)
256
256
  * [scenic-mysql_adapter](https://github.com/EmpaticoOrg/scenic-mysql_adapter)
257
257
  * [scenic-sqlserver-adapter](https://github.com/ClickMechanic/scenic_sqlserver_adapter)
258
- * [scenic-oracle_enhanced_adapter](https://github.com/PMACS/scenic_oracle_enhanced_adapter)
258
+ * [scenic-oracle_adapter](https://github.com/cdinger/scenic-oracle_adapter)
259
+
260
+ Please note that the maintainers of Scenic make no assertions about the
261
+ quality or security of the above adapters.
259
262
 
260
263
  ## About
261
264
 
262
- Scenic is maintained by [Derek Prior], [Caleb Thompson], and you, our
265
+ Scenic is maintained by [Derek Prior], [Caleb Hearth], and you, our
263
266
  contributors.
264
267
 
265
268
  [Derek Prior]: http://prioritized.net
266
- [Caleb Thompson]: http://calebthompson.io
269
+ [Caleb Hearth]: http://calebhearth.com
@@ -0,0 +1,14 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Scenic maintainenance is a volunteer effort. We will do our best to fix
6
+ forward but do not offer backported fixes. As such, the only "supported" version of Scenic is whichever was most recently released.
7
+
8
+ ## Reporting a Vulnerability
9
+
10
+ Please report any discovered security vulnerabilities to Scenic's primary
11
+ volunteer maintainers, derekprior@gmail.com and caleb@calebhearth.com.
12
+
13
+ We will respond as soon as possible with any follow-up questions or details
14
+ on how we plan to handle the issue.
data/bin/setup CHANGED
@@ -2,12 +2,17 @@
2
2
 
3
3
  set -e
4
4
 
5
+ # CI-specific setup
6
+ if [ -n "$GITHUB_ACTIONS" ]; then
7
+ bundle config path vendor/bundle
8
+ bundle config jobs 4
9
+ bundle config retry 3
10
+ git config --global user.name 'GitHub Actions'
11
+ git config --global user.email 'github-actions@example.com'
12
+ fi
13
+
5
14
  gem install bundler --conservative
6
15
  bundle check || bundle install
7
16
 
8
- if [ -z "$CI" ]; then
9
- bundle exec appraisal install
10
- fi
11
-
12
17
  bundle exec rake dummy:db:drop
13
18
  bundle exec rake dummy:db:create
@@ -1,3 +1,3 @@
1
1
  module Scenic
2
- VERSION = "1.5.2".freeze
2
+ VERSION = "1.5.3".freeze
3
3
  end
@@ -5,8 +5,8 @@ require "scenic/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "scenic"
7
7
  spec.version = Scenic::VERSION
8
- spec.authors = ["Derek Prior", "Caleb Thompson"]
9
- spec.email = ["derekprior@gmail.com", "caleb@calebthompson.io"]
8
+ spec.authors = ["Derek Prior", "Caleb Hearth"]
9
+ spec.email = ["derekprior@gmail.com", "caleb@calebhearth.com"]
10
10
  spec.summary = "Support for database views in Rails migrations"
11
11
  spec.description = <<-DESCRIPTION
12
12
  Adds methods to ActiveRecord::Migration to create and manage database views
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^spec/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "appraisal"
23
22
  spec.add_development_dependency "bundler", ">= 1.5"
24
23
  spec.add_development_dependency "database_cleaner"
25
24
  spec.add_development_dependency "rake"
@@ -2,7 +2,12 @@ development: &default
2
2
  adapter: postgresql
3
3
  database: dummy_development
4
4
  encoding: unicode
5
+ host: localhost
5
6
  pool: 5
7
+ <% if ENV.fetch("GITHUB_ACTIONS", false) %>
8
+ username: <%= ENV.fetch("POSTGRES_USER") %>
9
+ password: <%= ENV.fetch("POSTGRES_PASSWORD") %>
10
+ <% end %>
6
11
 
7
12
  test:
8
13
  <<: *default
metadata CHANGED
@@ -1,30 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Prior
8
- - Caleb Thompson
9
- autorequire:
8
+ - Caleb Hearth
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-06 00:00:00.000000000 Z
12
+ date: 2020-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: appraisal
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: bundler
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -184,17 +170,16 @@ description: |2
184
170
  in Rails
185
171
  email:
186
172
  - derekprior@gmail.com
187
- - caleb@calebthompson.io
173
+ - caleb@calebhearth.com
188
174
  executables: []
189
175
  extensions: []
190
176
  extra_rdoc_files: []
191
177
  files:
178
+ - ".github/workflows/ci.yml"
192
179
  - ".gitignore"
193
180
  - ".hound.yml"
194
181
  - ".rubocop.yml"
195
- - ".travis.yml"
196
182
  - ".yardopts"
197
- - Appraisals
198
183
  - CHANGELOG.md
199
184
  - CODE_OF_CONDUCT.md
200
185
  - CONTRIBUTING.md
@@ -202,14 +187,11 @@ files:
202
187
  - LICENSE.txt
203
188
  - README.md
204
189
  - Rakefile
205
- - bin/appraisal
190
+ - SECURITY.md
206
191
  - bin/rake
207
192
  - bin/rspec
208
193
  - bin/setup
209
194
  - bin/yard
210
- - gemfiles/rails52.gemfile
211
- - gemfiles/rails60.gemfile
212
- - gemfiles/rails_edge.gemfile
213
195
  - lib/generators/scenic/generators.rb
214
196
  - lib/generators/scenic/materializable.rb
215
197
  - lib/generators/scenic/model/USAGE
@@ -273,7 +255,7 @@ homepage: https://github.com/scenic-views/scenic
273
255
  licenses:
274
256
  - MIT
275
257
  metadata: {}
276
- post_install_message:
258
+ post_install_message:
277
259
  rdoc_options: []
278
260
  require_paths:
279
261
  - lib
@@ -288,8 +270,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
270
  - !ruby/object:Gem::Version
289
271
  version: '0'
290
272
  requirements: []
291
- rubygems_version: 3.0.1
292
- signing_key:
273
+ rubygems_version: 3.1.2
274
+ signing_key:
293
275
  specification_version: 4
294
276
  summary: Support for database views in Rails migrations
295
277
  test_files:
@@ -1,34 +0,0 @@
1
- addons:
2
- postgresql: "9.4"
3
- before_install:
4
- - "echo '--colour' > ~/.rspec"
5
- - "echo 'gem: --no-document' > ~/.gemrc"
6
- - git config --global user.name 'Travis CI'
7
- - git config --global user.email 'travis-ci@example.com'
8
- - gem update --system
9
- branches:
10
- only:
11
- - master
12
- install:
13
- - travis_retry bin/setup
14
- language:
15
- - ruby
16
- notifications:
17
- email:
18
- - false
19
- sudo: false
20
- rvm:
21
- - 2.7.0
22
- - 2.4.5
23
- gemfile:
24
- - gemfiles/rails52.gemfile
25
- - gemfiles/rails60.gemfile
26
- - gemfiles/rails_edge.gemfile
27
- matrix:
28
- allow_failures:
29
- - gemfile: gemfiles/rails_edge.gemfile
30
- exclude:
31
- - rvm: 2.4.5
32
- gemfile: gemfiles/rails60.gemfile
33
- - rvm: 2.4.5
34
- gemfile: gemfiles/rails_edge.gemfile
data/Appraisals DELETED
@@ -1,16 +0,0 @@
1
- appraise "rails52" do
2
- gem "activerecord", "~> 5.2.0"
3
- gem "railties", "~> 5.2.0"
4
- end
5
-
6
- if RUBY_VERSION >= "2.5.0"
7
- appraise "rails60" do
8
- gem "activerecord", "~> 6.0.0"
9
- gem "railties", "~> 6.0.0"
10
- end
11
-
12
- appraise "rails-edge" do
13
- gem "rails", git: "https://github.com/rails/rails"
14
- gem "arel", git: "https://github.com/rails/arel"
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'appraisal' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('appraisal', 'appraisal')
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.2.0"
6
- gem "railties", "~> 5.2.0"
7
-
8
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 6.0.0"
6
- gem "railties", "~> 6.0.0"
7
-
8
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", git: "https://github.com/rails/rails"
6
- gem "arel", git: "https://github.com/rails/arel"
7
-
8
- gemspec path: "../"