scenic 1.4.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.devcontainer/Dockerfile +6 -0
- data/.devcontainer/devcontainer.json +11 -0
- data/.devcontainer/docker-compose.yml +24 -0
- data/.github/workflows/ci.yml +71 -0
- data/.gitignore +2 -0
- data/.hound.yml +2 -4
- data/.rubocop.yml +129 -0
- data/{NEWS.md → CHANGELOG.md} +122 -13
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +7 -9
- data/Gemfile +13 -1
- data/LICENSE.txt +1 -1
- data/README.md +44 -42
- data/Rakefile +2 -2
- data/SECURITY.md +14 -0
- data/bin/setup +9 -4
- data/lib/generators/scenic/materializable.rb +18 -0
- data/lib/generators/scenic/model/model_generator.rb +19 -8
- data/lib/generators/scenic/view/USAGE +1 -0
- data/lib/generators/scenic/view/templates/db/migrate/create_view.erb +1 -1
- data/lib/generators/scenic/view/templates/db/migrate/update_view.erb +4 -3
- data/lib/generators/scenic/view/view_generator.rb +19 -9
- data/lib/scenic/adapters/postgres/index_reapplication.rb +1 -1
- data/lib/scenic/adapters/postgres/refresh_dependencies.rb +21 -7
- data/lib/scenic/adapters/postgres/views.rb +11 -1
- data/lib/scenic/adapters/postgres.rb +20 -7
- data/lib/scenic/command_recorder/statement_arguments.rb +20 -2
- data/lib/scenic/command_recorder.rb +6 -1
- data/lib/scenic/configuration.rb +1 -1
- data/lib/scenic/definition.rb +4 -2
- data/lib/scenic/schema_dumper.rb +2 -2
- data/lib/scenic/statements.rb +24 -6
- data/lib/scenic/unaffixed_name.rb +31 -0
- data/lib/scenic/version.rb +1 -1
- data/lib/scenic/view.rb +7 -4
- data/lib/scenic.rb +1 -0
- data/scenic.gemspec +21 -23
- data/spec/acceptance/user_manages_views_spec.rb +2 -1
- data/spec/dummy/app/models/application_record.rb +5 -0
- data/spec/dummy/config/database.yml +5 -0
- data/spec/dummy/db/migrate/20220112154220_add_pg_stat_statements_extension.rb +5 -0
- data/spec/dummy/db/schema.rb +19 -0
- data/spec/generators/scenic/model/model_generator_spec.rb +1 -1
- data/spec/generators/scenic/view/view_generator_spec.rb +22 -4
- data/spec/scenic/adapters/postgres/refresh_dependencies_spec.rb +66 -26
- data/spec/scenic/adapters/postgres_spec.rb +23 -3
- data/spec/scenic/command_recorder_spec.rb +15 -1
- data/spec/scenic/definition_spec.rb +15 -1
- data/spec/scenic/schema_dumper_spec.rb +48 -3
- data/spec/scenic/statements_spec.rb +49 -14
- data/spec/spec_helper.rb +5 -1
- data/spec/support/generator_spec_setup.rb +1 -1
- data/spec/support/rails_configuration_helpers.rb +10 -0
- metadata +32 -41
- data/.travis.yml +0 -44
- data/Appraisals +0 -33
- data/bin/appraisal +0 -16
- data/gemfiles/rails40.gemfile +0 -8
- data/gemfiles/rails41.gemfile +0 -8
- data/gemfiles/rails42.gemfile +0 -8
- data/gemfiles/rails42_with_fg_rails.gemfile +0 -10
- data/gemfiles/rails50.gemfile +0 -8
- data/gemfiles/rails51.gemfile +0 -8
- data/gemfiles/rails_edge.gemfile +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b378292bd7d642dcd235d01f5a31d94c74065b798ab469a9c091f68e936f4d9c
|
4
|
+
data.tar.gz: b97f6e156685d4c03761543d5748f1381447c94cfcc42f7d6ddb8714e16791d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ffb0c73e52da5122a8ce3092b7f280d1a1dcaac9ca03a5f8ea63fe361d1b011d3c71f54706ff17d8ee1768fbdc1ba32c38bfebbcda320271e0b751eaea340f3
|
7
|
+
data.tar.gz: 846d53ffe8c0d0209ab6517c47e0447ee3b40a81e5f55f845f16a1b3f697cebd44ad38550a5fe8d10016ab19b3c1197f36ea9f3f5f7f42395a1431790684e0c1
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"name": "Scenic Development",
|
3
|
+
"dockerComposeFile": "docker-compose.yml",
|
4
|
+
"service": "app",
|
5
|
+
"workspaceFolder": "/workspace",
|
6
|
+
"settings": { },
|
7
|
+
"extensions": ["rebornix.Ruby"],
|
8
|
+
"postCreateCommand": "bin/setup",
|
9
|
+
"remoteUser": "vscode",
|
10
|
+
"features": { "github-cli": "latest" }
|
11
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
version: '3'
|
2
|
+
|
3
|
+
services:
|
4
|
+
app:
|
5
|
+
build:
|
6
|
+
context: ..
|
7
|
+
dockerfile: .devcontainer/Dockerfile
|
8
|
+
args:
|
9
|
+
VARIANT: "3"
|
10
|
+
volumes:
|
11
|
+
- ..:/workspace:cached
|
12
|
+
command: sleep infinity
|
13
|
+
network_mode: service:db
|
14
|
+
db:
|
15
|
+
image: postgres:latest
|
16
|
+
restart: unless-stopped
|
17
|
+
volumes:
|
18
|
+
- postgres-data:/var/lib/postgresql/data
|
19
|
+
environment:
|
20
|
+
POSTGRES_USER: postgres
|
21
|
+
POSTGRES_DB: postgres
|
22
|
+
POSTGRES_PASSWORD: postgres
|
23
|
+
volumes:
|
24
|
+
postgres-data: null
|
@@ -0,0 +1,71 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: main
|
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", "3.0", "3.1"]
|
17
|
+
rails: ["6.1", "7.0"]
|
18
|
+
continue-on-error: [false]
|
19
|
+
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
|
22
|
+
services:
|
23
|
+
postgres:
|
24
|
+
image: postgres
|
25
|
+
env:
|
26
|
+
POSTGRES_USER: "postgres"
|
27
|
+
POSTGRES_PASSWORD: "postgres"
|
28
|
+
ports:
|
29
|
+
- 5432:5432
|
30
|
+
options: >-
|
31
|
+
--health-cmd pg_isready
|
32
|
+
--health-interval 10s
|
33
|
+
--health-timeout 5s
|
34
|
+
--health-retries 5
|
35
|
+
|
36
|
+
env:
|
37
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
38
|
+
POSTGRES_USER: "postgres"
|
39
|
+
POSTGRES_PASSWORD: "postgres"
|
40
|
+
|
41
|
+
steps:
|
42
|
+
- name: Checkout
|
43
|
+
uses: actions/checkout@v2
|
44
|
+
|
45
|
+
- name: Install Ruby ${{ matrix.ruby }}
|
46
|
+
uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
ruby-version: ${{ matrix.ruby }}
|
49
|
+
|
50
|
+
- name: Install dependent libraries
|
51
|
+
run: sudo apt-get install libpq-dev
|
52
|
+
|
53
|
+
- name: Generate lockfile
|
54
|
+
run: bundle lock
|
55
|
+
|
56
|
+
- name: Cache dependencies
|
57
|
+
uses: actions/cache@v1
|
58
|
+
with:
|
59
|
+
path: vendor/bundle
|
60
|
+
key: bundle-${{ hashFiles('Gemfile.lock') }}
|
61
|
+
|
62
|
+
- name: Set up Scenic
|
63
|
+
run: bin/setup
|
64
|
+
|
65
|
+
- name: Run fast tests
|
66
|
+
run: bundle exec rake spec
|
67
|
+
continue-on-error: ${{ matrix.continue-on-error }}
|
68
|
+
|
69
|
+
- name: Run acceptance tests
|
70
|
+
run: bundle exec rake spec:acceptance
|
71
|
+
continue-on-error: ${{ matrix.continue-on-error }}
|
data/.gitignore
CHANGED
data/.hound.yml
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3.0
|
3
|
+
Exclude:
|
4
|
+
- "tmp/**/*"
|
5
|
+
- "bin/*"
|
6
|
+
- "spec/dummy/**/*"
|
7
|
+
|
8
|
+
Bundler/OrderedGems:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Gemspec/OrderedDependencies:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/AlignParameters:
|
15
|
+
Enabled: true
|
16
|
+
EnforcedStyle: with_fixed_indentation
|
17
|
+
Layout/ConditionPosition:
|
18
|
+
Enabled: false
|
19
|
+
Layout/DotPosition:
|
20
|
+
EnforcedStyle: leading
|
21
|
+
Layout/ExtraSpacing:
|
22
|
+
Enabled: true
|
23
|
+
Layout/IndentAssignment:
|
24
|
+
Enabled: False
|
25
|
+
Layout/MultilineOperationIndentation:
|
26
|
+
Enabled: true
|
27
|
+
EnforcedStyle: indented
|
28
|
+
Layout/MultilineMethodCallIndentation:
|
29
|
+
Enabled: true
|
30
|
+
EnforcedStyle: indented
|
31
|
+
|
32
|
+
Lint/AmbiguousOperator:
|
33
|
+
Enabled: true
|
34
|
+
Lint/AmbiguousRegexpLiteral:
|
35
|
+
Enabled: true
|
36
|
+
Lint/DuplicatedKey:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Metrics/ClassLength:
|
40
|
+
Enabled: false
|
41
|
+
Metrics/ModuleLength:
|
42
|
+
Enabled: false
|
43
|
+
Metrics/AbcSize:
|
44
|
+
Enabled: false
|
45
|
+
Metrics/BlockLength:
|
46
|
+
CountComments: true # count full line comments?
|
47
|
+
Max: 25
|
48
|
+
ExcludedMethods: []
|
49
|
+
Exclude:
|
50
|
+
- "spec/**/*"
|
51
|
+
- "*.gemspec"
|
52
|
+
Metrics/CyclomaticComplexity:
|
53
|
+
Enabled: false
|
54
|
+
Metrics/LineLength:
|
55
|
+
Max: 80
|
56
|
+
Metrics/MethodLength:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Security/Eval:
|
60
|
+
Enabled: true
|
61
|
+
Exclude:
|
62
|
+
- "spec/scenic/schema_dumper_spec.rb"
|
63
|
+
Style/BlockDelimiters:
|
64
|
+
Enabled: false
|
65
|
+
Style/CollectionMethods:
|
66
|
+
Enabled: true
|
67
|
+
PreferredMethods:
|
68
|
+
find: find
|
69
|
+
inject: reduce
|
70
|
+
collect: map
|
71
|
+
find_all: select
|
72
|
+
Style/ConditionalAssignment:
|
73
|
+
Enabled: false
|
74
|
+
Style/ClassAndModuleChildren:
|
75
|
+
Enabled: true
|
76
|
+
Exclude:
|
77
|
+
- "spec/**/*"
|
78
|
+
Style/Documentation:
|
79
|
+
Enabled: false
|
80
|
+
Style/FrozenStringLiteralComment:
|
81
|
+
Description: >-
|
82
|
+
Add the frozen_string_literal comment to the top of files
|
83
|
+
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
84
|
+
Enabled: false
|
85
|
+
Style/GuardClause:
|
86
|
+
Enabled: false
|
87
|
+
Style/IfUnlessModifier:
|
88
|
+
Enabled: false
|
89
|
+
Style/Lambda:
|
90
|
+
Enabled: false
|
91
|
+
Style/NumericLiterals:
|
92
|
+
Enabled: false
|
93
|
+
Style/OneLineConditional:
|
94
|
+
Enabled: false
|
95
|
+
Style/PercentLiteralDelimiters:
|
96
|
+
Enabled: false
|
97
|
+
Style/StringLiterals:
|
98
|
+
EnforcedStyle: double_quotes
|
99
|
+
Enabled: true
|
100
|
+
Style/TrailingCommaInArguments:
|
101
|
+
Description: 'Checks for trailing comma in argument lists.'
|
102
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
103
|
+
EnforcedStyleForMultiline: comma
|
104
|
+
SupportedStylesForMultiline:
|
105
|
+
- comma
|
106
|
+
- consistent_comma
|
107
|
+
- no_comma
|
108
|
+
Enabled: true
|
109
|
+
Style/TrailingCommaInArrayLiteral:
|
110
|
+
Description: 'Checks for trailing comma in array literals.'
|
111
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
112
|
+
EnforcedStyleForMultiline: comma
|
113
|
+
SupportedStylesForMultiline:
|
114
|
+
- comma
|
115
|
+
- consistent_comma
|
116
|
+
- no_comma
|
117
|
+
Enabled: true
|
118
|
+
Style/TrailingCommaInHashLiteral:
|
119
|
+
Description: 'Checks for trailing comma in hash literals.'
|
120
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
121
|
+
EnforcedStyleForMultiline: comma
|
122
|
+
SupportedStylesForMultiline:
|
123
|
+
- comma
|
124
|
+
- consistent_comma
|
125
|
+
- no_comma
|
126
|
+
Enabled: true
|
127
|
+
Style/WordArray:
|
128
|
+
Enabled: false
|
129
|
+
|
data/{NEWS.md → CHANGELOG.md}
RENAMED
@@ -1,9 +1,116 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
2
|
|
3
3
|
The noteworthy changes for each Scenic version are included here. For a complete
|
4
|
-
changelog, see the [
|
4
|
+
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
|
+
|
8
|
+
## [1.7.0] - December 8, 2022
|
9
|
+
|
10
|
+
[1.7.0]: https://github.com/scenic-views/scenic/compare/v1.6.0...v1.7.0
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
* Added the `--replace` CLI flag to generate a migration that uses the
|
15
|
+
`replace_view` schema statement - *Dan Hixon*
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
* Fixed deprecation notice from newer versions of ERB when using scenic
|
20
|
+
generators - *Ali Ismayilov*
|
21
|
+
|
22
|
+
## [1.6.0] - February 13, 2022
|
23
|
+
|
24
|
+
[1.6.0]: https://github.com/scenic-views/scenic/compare/v1.5.5...v1.6.0
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
* Exclude pg_stat_statements_info (#349) 76bface - *Caleb Hearth*
|
29
|
+
* Fix serialization of views with backslashes c625d1b - *Ben Sheldon*
|
30
|
+
* Handle ActiveRecord table name prefix and suffix b1544dc - *Derek Prior*
|
31
|
+
|
32
|
+
## [1.5.5] - December 15, 2021
|
33
|
+
|
34
|
+
### Fixed
|
35
|
+
|
36
|
+
- Fixed an issue reverting migrations under Ruby 3
|
37
|
+
- Fixed an issue in index reapplication where sometimes `say` was undefined
|
38
|
+
|
39
|
+
[1.5.5]: https://github.com/scenic-views/scenic/compare/v1.5.4...v1.5.5
|
40
|
+
|
41
|
+
## [1.5.4] - September 16, 2020
|
42
|
+
|
43
|
+
[1.5.4]: https://github.com/scenic-views/scenic/compare/v1.5.3...v1.5.4
|
44
|
+
|
45
|
+
### Fixed
|
46
|
+
|
47
|
+
- Added missing changelog for v1.5.3.
|
48
|
+
|
49
|
+
## [1.5.3] - September 15, 2020
|
50
|
+
|
51
|
+
[1.5.3]: https://github.com/scenic-views/scenic/compare/v1.5.2...v1.5.3
|
52
|
+
|
53
|
+
### Fixed
|
54
|
+
|
55
|
+
- `scenic-oracle_enhanced_adapter` has been pulled from rubygems.
|
56
|
+
`scenic-oracle_adapter` is a current, maintained alternative.
|
57
|
+
- Updated code snippets - since Rails 5.0, all models inherit from
|
58
|
+
ApplicationRecord (#302)
|
59
|
+
- Update Caleb's last name
|
60
|
+
|
61
|
+
### Added
|
62
|
+
|
63
|
+
- Add Security Policy
|
64
|
+
|
65
|
+
## [1.5.2] - February 6, 2020
|
66
|
+
|
67
|
+
### Fixed
|
68
|
+
|
69
|
+
- The schema statement `create_view` is now reversible when passed a `version`
|
70
|
+
argument.
|
71
|
+
- Calling `refresh_materialized_view` with both `concurrently` and `cascade` set
|
72
|
+
to `true` now correctly cascades the concurrent refresh to dependent views.
|
73
|
+
- File generation and lookup now operates correctly for schema-qualified names
|
74
|
+
like `warehouse.archived_posts`.
|
75
|
+
|
76
|
+
[1.5.2]: https://github.com/scenic-views/scenic/compare/v1.5.1...v1.5.2
|
77
|
+
|
78
|
+
## [1.5.1] - February 10, 2019
|
79
|
+
|
80
|
+
### Fixed
|
81
|
+
|
82
|
+
- Passing `no_data: true` when creating a materialized view would error if the
|
83
|
+
corresponding SQL file had statement-terminating semicolon.
|
84
|
+
|
85
|
+
[1.5.1]: https://github.com/scenic-views/scenic/compare/v1.5.0...v1.5.1
|
86
|
+
|
87
|
+
## [1.5.0] - February 8, 2019
|
88
|
+
|
89
|
+
### Added
|
90
|
+
|
91
|
+
- `create_view` can now be passed `materialized: { no_data: true }` to create
|
92
|
+
the materialized view without populating it. Generators have been updated to
|
93
|
+
accept a `--no-data` option.
|
94
|
+
|
95
|
+
### Fixed
|
96
|
+
|
97
|
+
- Passing `cascade: true` when refreshing a materialized view will no longer
|
98
|
+
error when the view in question has no dependencies.
|
99
|
+
- Fixed runtime deprecation warnings when using `pg` 0.21 and newer.
|
100
|
+
- Fixed a cascading refresh issue when the name of the view to trigger the
|
101
|
+
refresh is a substring of one of its dependencies.
|
102
|
+
|
103
|
+
|
104
|
+
[1.5.0]: https://github.com/scenic-views/scenic/compare/v1.4.1...v1.5.0
|
105
|
+
|
106
|
+
## [1.4.1] - December 15, 2017
|
107
|
+
|
108
|
+
### Fixed
|
109
|
+
|
110
|
+
- View migrations created under Rails 5 and newer will use the current migration
|
111
|
+
version in the generated migration class rather than always using `5.0`.
|
112
|
+
|
113
|
+
[1.4.1]: https://github.com/scenic-views/scenic/compare/v1.4.0...v1.4.1
|
7
114
|
|
8
115
|
## [1.4.0] - May 11, 2017
|
9
116
|
|
@@ -23,6 +130,8 @@ changelog, see the [CHANGELOG] for each version via the version links.
|
|
23
130
|
and newer apps.
|
24
131
|
- Using the `scenic:model` generator will no longer create a fixture or factory.
|
25
132
|
|
133
|
+
[1.4.0]: https://github.com/scenic-views/scenic/compare/v1.3.0...v1.4.0
|
134
|
+
|
26
135
|
## [1.3.0] - May 27, 2016
|
27
136
|
|
28
137
|
### Added
|
@@ -37,7 +146,7 @@ changelog, see the [CHANGELOG] for each version via the version links.
|
|
37
146
|
attempt to insert model code into the pluralized model file.
|
38
147
|
* Convert shell-based smoke tests to RSpec syntax.
|
39
148
|
|
40
|
-
[1.3.0]: https://github.com/
|
149
|
+
[1.3.0]: https://github.com/scenic-views/scenic/compare/v1.2.0...v1.3.0
|
41
150
|
|
42
151
|
## [1.2.0] - February 5, 2016
|
43
152
|
|
@@ -57,7 +166,7 @@ changelog, see the [CHANGELOG] for each version via the version links.
|
|
57
166
|
`db/schema.rb` file under Rails 5 beta 1 and beta 2. This is fixed on Rails
|
58
167
|
master.
|
59
168
|
|
60
|
-
[1.2.0]: https://github.com/
|
169
|
+
[1.2.0]: https://github.com/scenic-views/scenic/compare/v1.1.1...v1.2.0
|
61
170
|
|
62
171
|
## [1.1.1] - January 29, 2016
|
63
172
|
|
@@ -66,7 +175,7 @@ master.
|
|
66
175
|
closed` error. This has been fixed by ensuring we grab a fresh connection for
|
67
176
|
all operations.
|
68
177
|
|
69
|
-
[1.1.1]: https://github.com/
|
178
|
+
[1.1.1]: https://github.com/scenic-views/scenic/compare/v1.1.0...v1.1.1
|
70
179
|
|
71
180
|
## [1.1.0] - January 8, 2016
|
72
181
|
|
@@ -86,7 +195,7 @@ master.
|
|
86
195
|
- Fixed inability to dump materialized views in Rails 5.0.0.beta1.
|
87
196
|
|
88
197
|
[supported versions of Postgres]: http://www.postgresql.org/support/versioning/
|
89
|
-
[1.1.0]: https://github.com/
|
198
|
+
[1.1.0]: https://github.com/scenic-views/scenic/compare/v1.0.0...v1.1.0
|
90
199
|
|
91
200
|
## [1.0.0] - November 23, 2015
|
92
201
|
|
@@ -101,8 +210,8 @@ master.
|
|
101
210
|
- Eliminated `alias_method_chain` deprecation when running with Rails master
|
102
211
|
(5.0).
|
103
212
|
|
104
|
-
[materialized views]:https://github.com/
|
105
|
-
[1.0.0]: https://github.com/
|
213
|
+
[materialized views]:https://github.com/scenic-views/scenic/blob/v1.0.0/README.md
|
214
|
+
[1.0.0]: https://github.com/scenic-views/scenic/compare/v0.3.0...v1.0.0
|
106
215
|
|
107
216
|
## [0.3.0] - January 23, 2015
|
108
217
|
|
@@ -114,14 +223,14 @@ master.
|
|
114
223
|
- We avoid dumping views that belong to Postgres extensions.
|
115
224
|
- `db/schema.rb` is prettier thanks to a blank line after each view definition.
|
116
225
|
|
117
|
-
[0.3.0]: https://github.com/
|
226
|
+
[0.3.0]: https://github.com/scenic-views/scenic/compare/v0.2.1...v0.3.0
|
118
227
|
|
119
228
|
## [0.2.1] - January 5, 2015
|
120
229
|
|
121
230
|
### Fixed
|
122
231
|
- View generator will now create `db/views` directory if necessary.
|
123
232
|
|
124
|
-
[0.2.1]: https://github.com/
|
233
|
+
[0.2.1]: https://github.com/scenic-views/scenic/compare/v0.2.0...v0.2.1
|
125
234
|
|
126
235
|
## [0.2.0] - August 11, 2014
|
127
236
|
|
@@ -131,7 +240,7 @@ master.
|
|
131
240
|
### Fixed
|
132
241
|
- Raise an error if view definition is empty.
|
133
242
|
|
134
|
-
[0.2.0]: https://github.com/
|
243
|
+
[0.2.0]: https://github.com/scenic-views/scenic/compare/v0.1.0...v0.2.0
|
135
244
|
|
136
245
|
## [0.1.0] - August 4, 2014
|
137
246
|
|
@@ -144,4 +253,4 @@ definition files.
|
|
144
253
|
|
145
254
|
In short, go add a view to your app.
|
146
255
|
|
147
|
-
[0.1.0]: https://github.com/
|
256
|
+
[0.1.0]: https://github.com/scenic-views/scenic/compare/8599daa132880cd6c07efb0395c0fb023b171f47...v0.1.0
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and
|
9
|
+
expression, level of experience, education, socio-economic status, nationality,
|
10
|
+
personal appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at derekprior@gmail.com. All complaints
|
59
|
+
will be reviewed and investigated and will result in a response that is deemed
|
60
|
+
necessary and appropriate to the circumstances. The project team is obligated to
|
61
|
+
maintain confidentiality with regard to the reporter of an incident. Further
|
62
|
+
details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
71
|
+
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/CONTRIBUTING.md
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
3
|
We love contributions from everyone. By participating in this project, you
|
4
|
-
agree to abide by
|
4
|
+
agree to abide by our [code of conduct].
|
5
5
|
|
6
|
-
[code of conduct]:
|
7
|
-
|
8
|
-
We expect everyone to follow the code of conduct anywhere in thoughtbot's
|
9
|
-
project codebases, issue trackers, chatrooms, and mailing lists.
|
6
|
+
[code of conduct]: CODE_OF_CONDUCT.md
|
10
7
|
|
11
8
|
## Contributing Code
|
12
9
|
|
13
10
|
1. Fork the repository.
|
14
11
|
2. Run `bin/setup`, which will install dependencies and create the dummy
|
15
12
|
application database.
|
16
|
-
3. Run `
|
17
|
-
|
18
|
-
4. Make your change with new passing tests, following
|
13
|
+
3. Run `rake` to verify that the tests pass against the version of Rails you are
|
14
|
+
running locally.
|
15
|
+
4. Make your change with new passing tests, following existing style.
|
19
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.
|
20
19
|
|
21
|
-
[style guide]: https://github.com/thoughtbot/guides/tree/master/style
|
22
20
|
[good commit message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
23
21
|
|
24
22
|
Others will give constructive feedback. This is a time for discussion and
|
data/Gemfile
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
source
|
1
|
+
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.1")
|
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"
|
data/LICENSE.txt
CHANGED