puzzle-apartment 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +71 -0
- data/.github/ISSUE_TEMPLATE.md +21 -0
- data/.github/workflows/changelog.yml +63 -0
- data/.github/workflows/reviewdog.yml +22 -0
- data/.gitignore +15 -0
- data/.pryrc +5 -0
- data/.rspec +4 -0
- data/.rubocop.yml +33 -0
- data/.rubocop_todo.yml +418 -0
- data/.ruby-version +1 -0
- data/.story_branch.yml +5 -0
- data/Appraisals +49 -0
- data/CHANGELOG.md +963 -0
- data/Gemfile +17 -0
- data/Guardfile +11 -0
- data/HISTORY.md +496 -0
- data/README.md +652 -0
- data/Rakefile +157 -0
- data/TODO.md +50 -0
- data/docker-compose.yml +33 -0
- data/gemfiles/rails_6_1.gemfile +17 -0
- data/gemfiles/rails_7_0.gemfile +17 -0
- data/gemfiles/rails_7_1.gemfile +17 -0
- data/gemfiles/rails_master.gemfile +17 -0
- data/lib/apartment/active_record/connection_handling.rb +34 -0
- data/lib/apartment/active_record/internal_metadata.rb +9 -0
- data/lib/apartment/active_record/postgresql_adapter.rb +39 -0
- data/lib/apartment/active_record/schema_migration.rb +13 -0
- data/lib/apartment/adapters/abstract_adapter.rb +275 -0
- data/lib/apartment/adapters/abstract_jdbc_adapter.rb +20 -0
- data/lib/apartment/adapters/jdbc_mysql_adapter.rb +19 -0
- data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +62 -0
- data/lib/apartment/adapters/mysql2_adapter.rb +77 -0
- data/lib/apartment/adapters/postgis_adapter.rb +13 -0
- data/lib/apartment/adapters/postgresql_adapter.rb +284 -0
- data/lib/apartment/adapters/sqlite3_adapter.rb +66 -0
- data/lib/apartment/console.rb +24 -0
- data/lib/apartment/custom_console.rb +42 -0
- data/lib/apartment/deprecation.rb +11 -0
- data/lib/apartment/elevators/domain.rb +23 -0
- data/lib/apartment/elevators/first_subdomain.rb +18 -0
- data/lib/apartment/elevators/generic.rb +33 -0
- data/lib/apartment/elevators/host.rb +35 -0
- data/lib/apartment/elevators/host_hash.rb +26 -0
- data/lib/apartment/elevators/subdomain.rb +66 -0
- data/lib/apartment/log_subscriber.rb +45 -0
- data/lib/apartment/migrator.rb +52 -0
- data/lib/apartment/model.rb +29 -0
- data/lib/apartment/railtie.rb +68 -0
- data/lib/apartment/tasks/enhancements.rb +55 -0
- data/lib/apartment/tasks/task_helper.rb +52 -0
- data/lib/apartment/tenant.rb +63 -0
- data/lib/apartment/version.rb +5 -0
- data/lib/apartment.rb +159 -0
- data/lib/generators/apartment/install/USAGE +5 -0
- data/lib/generators/apartment/install/install_generator.rb +11 -0
- data/lib/generators/apartment/install/templates/apartment.rb +116 -0
- data/lib/tasks/apartment.rake +106 -0
- data/puzzle-apartment.gemspec +59 -0
- metadata +385 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 41f312a156f244c038bde7534d7cf4b432f4567c00b65cd3fe3f5ea39673cef9
|
4
|
+
data.tar.gz: 0670eafa56d429b3ad1df5ab359c30d34d6fc0850fad6a6beff04611dc4f74dd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de754727b92832c171e94bbb56d027b064330727c4ba30534146eb17eef2673e75c0f2eec24eb8b2b331b05a4ab1020d2ac94d42f32677c9e852784433bc3688
|
7
|
+
data.tar.gz: d5e2ab0c98b91c4d1cd3ea8c49e4ba3d0a68ea01185a57efc87c8a3e2eae3f16fbe7d1509f2ecb33d07203acaceceb70a87bb0b0a1846c3a21e7fb6b155b4a03
|
@@ -0,0 +1,71 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
jobs:
|
4
|
+
build:
|
5
|
+
docker:
|
6
|
+
- image: cimg/<< parameters.ruby_version >>
|
7
|
+
- image: cimg/postgres:12.13
|
8
|
+
- image: cimg/mysql:8.0
|
9
|
+
environment:
|
10
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
11
|
+
parameters:
|
12
|
+
ruby_version:
|
13
|
+
type: string
|
14
|
+
gemfile:
|
15
|
+
type: string
|
16
|
+
environment:
|
17
|
+
BUNDLE_GEMFILE: << parameters.gemfile >>
|
18
|
+
steps:
|
19
|
+
- checkout
|
20
|
+
|
21
|
+
- run: bundle install --path vendor/bundle
|
22
|
+
|
23
|
+
- run:
|
24
|
+
name: Update apt
|
25
|
+
command: sudo apt update
|
26
|
+
|
27
|
+
- run:
|
28
|
+
name: Install postgres client
|
29
|
+
command: sudo apt install -y postgresql-client
|
30
|
+
|
31
|
+
- run:
|
32
|
+
name: Install mysql client
|
33
|
+
command: sudo apt install -y default-mysql-client
|
34
|
+
|
35
|
+
- run:
|
36
|
+
name: Configure config database.yml
|
37
|
+
command: bundle exec rake db:copy_credentials
|
38
|
+
|
39
|
+
- run:
|
40
|
+
name: wait for postgresql
|
41
|
+
command: dockerize -wait tcp://localhost:5432 -timeout 1m
|
42
|
+
|
43
|
+
- run:
|
44
|
+
name: wait for mysql
|
45
|
+
command: dockerize -wait tcp://localhost:3306 -timeout 1m
|
46
|
+
|
47
|
+
- run:
|
48
|
+
name: Database Setup
|
49
|
+
command: |
|
50
|
+
bundle exec rake db:test:prepare
|
51
|
+
|
52
|
+
- run:
|
53
|
+
name: Run tests
|
54
|
+
command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/test-results/rspec/rspec.xml
|
55
|
+
|
56
|
+
- store_test_results:
|
57
|
+
path: ~/test-results/rspec/
|
58
|
+
|
59
|
+
workflows:
|
60
|
+
tests:
|
61
|
+
jobs:
|
62
|
+
- build:
|
63
|
+
matrix:
|
64
|
+
parameters:
|
65
|
+
ruby_version: ["ruby:3.0.6", "ruby:3.1.4", "ruby:3.2.2"]
|
66
|
+
gemfile:
|
67
|
+
[
|
68
|
+
"gemfiles/rails_6_1.gemfile",
|
69
|
+
"gemfiles/rails_7_0.gemfile",
|
70
|
+
"gemfiles/rails_7_1.gemfile",
|
71
|
+
]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
## Steps to reproduce
|
2
|
+
|
3
|
+
## Expected behavior
|
4
|
+
|
5
|
+
## Actual behavior
|
6
|
+
|
7
|
+
## System configuration
|
8
|
+
|
9
|
+
<!-- Please let us know as far as you can. -->
|
10
|
+
|
11
|
+
* Database: (Tell us what database and its version you use.)
|
12
|
+
|
13
|
+
* Apartment version:
|
14
|
+
|
15
|
+
* Apartment config (in `config/initializers/apartment.rb` or so):
|
16
|
+
|
17
|
+
* `use_schemas`: (`true` or `false`)
|
18
|
+
|
19
|
+
* Rails (or ActiveRecord) version:
|
20
|
+
|
21
|
+
* Ruby version:
|
@@ -0,0 +1,63 @@
|
|
1
|
+
name: Changelog
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [closed]
|
6
|
+
|
7
|
+
release:
|
8
|
+
types: [published]
|
9
|
+
|
10
|
+
issues:
|
11
|
+
types: [closed, edited]
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
generate_changelog:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
name: Generate changelog for master branch
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
with:
|
20
|
+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
21
|
+
|
22
|
+
- name: Generate changelog
|
23
|
+
uses: charmixer/auto-changelog-action@v1
|
24
|
+
with:
|
25
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
26
|
+
|
27
|
+
- name: Commit files
|
28
|
+
env:
|
29
|
+
ACTION_EMAIL: action@github.com
|
30
|
+
ACTION_USERNAME: GitHub Action
|
31
|
+
run: |
|
32
|
+
git config --local user.email "$ACTION_EMAIL"
|
33
|
+
git config --local user.name "$ACTION_USERNAME"
|
34
|
+
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md"
|
35
|
+
|
36
|
+
- name: Push changes
|
37
|
+
if: env.push == 1
|
38
|
+
env:
|
39
|
+
# CI_USER: ${{ secrets.YOUR_GITHUB_USER }}
|
40
|
+
CI_TOKEN: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
|
41
|
+
run: |
|
42
|
+
git push "https://$GITHUB_ACTOR:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:master
|
43
|
+
|
44
|
+
# - name: Push changelog to master
|
45
|
+
# if: env.push == 1
|
46
|
+
# uses: ad-m/github-push-action@master
|
47
|
+
# with:
|
48
|
+
# github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
|
49
|
+
# branch: master
|
50
|
+
|
51
|
+
# - name: Cherry-pick changelog to development
|
52
|
+
# if: env.push == 1
|
53
|
+
# env:
|
54
|
+
# ACTION_EMAIL: action@github.com
|
55
|
+
# ACTION_USERNAME: GitHub Action
|
56
|
+
# run: |
|
57
|
+
# git config --local user.email "$ACTION_EMAIL"
|
58
|
+
# git config --local user.name "$ACTION_USERNAME"
|
59
|
+
# commit_hash=`git show HEAD | egrep commit\ .+$ | cut -d' ' -f2`
|
60
|
+
# git checkout development
|
61
|
+
# git pull
|
62
|
+
# git cherry-pick $commit_hash
|
63
|
+
# git push
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: reviewdog
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
rubocop:
|
5
|
+
name: runner / rubocop
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- name: Check out code
|
9
|
+
uses: actions/checkout@v2
|
10
|
+
- name: Read ruby version
|
11
|
+
run: echo ::set-output name=RUBY_VERSION::$(cat .ruby-version | cut -f 1,2 -d .)
|
12
|
+
id: rv
|
13
|
+
- uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: "${{ steps.rv.outputs.RUBY_VERSION }}"
|
16
|
+
- uses: reviewdog/action-rubocop@v1
|
17
|
+
with:
|
18
|
+
filter_mode: nofilter
|
19
|
+
reporter: github-check
|
20
|
+
rubocop_version: 0.93.1
|
21
|
+
github_token: ${{ secrets.github_token }}
|
22
|
+
rubocop_extensions: rubocop-performance:1.19.1 rubocop-rails:2.22.2 rubocop-rspec:2.25.0
|
data/.gitignore
ADDED
data/.pryrc
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-rails
|
5
|
+
- rubocop-performance
|
6
|
+
- rubocop-rspec
|
7
|
+
|
8
|
+
AllCops:
|
9
|
+
Exclude:
|
10
|
+
- gemfiles/**/*.gemfile
|
11
|
+
- gemfiles/vendor/**/*
|
12
|
+
- spec/dummy_engine/dummy_engine.gemspec
|
13
|
+
- spec/schemas/**/*.rb
|
14
|
+
|
15
|
+
NewCops: enable
|
16
|
+
SuggestExtensions: false
|
17
|
+
|
18
|
+
Gemspec/RequiredRubyVersion:
|
19
|
+
Exclude:
|
20
|
+
- "puzzle-apartment.gemspec"
|
21
|
+
|
22
|
+
Metrics/BlockLength:
|
23
|
+
Exclude:
|
24
|
+
- spec/**/*.rb
|
25
|
+
|
26
|
+
Rails/RakeEnvironment:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Rails/ApplicationRecord:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Rails/Output:
|
33
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,418 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-11-30 11:39:58 UTC using RuboCop version 1.57.2.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
+
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
13
|
+
Bundler/OrderedGems:
|
14
|
+
Exclude:
|
15
|
+
- "Gemfile"
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
19
|
+
# Configuration parameters: Severity, Include.
|
20
|
+
# Include: **/*.gemspec
|
21
|
+
Gemspec/DeprecatedAttributeAssignment:
|
22
|
+
Exclude:
|
23
|
+
- "puzzle-apartment.gemspec"
|
24
|
+
|
25
|
+
# Offense count: 20
|
26
|
+
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
|
27
|
+
# SupportedStyles: Gemfile, gems.rb, gemspec
|
28
|
+
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
|
29
|
+
Gemspec/DevelopmentDependencies:
|
30
|
+
Exclude:
|
31
|
+
- "puzzle-apartment.gemspec"
|
32
|
+
|
33
|
+
# Offense count: 1
|
34
|
+
# This cop supports safe autocorrection (--autocorrect).
|
35
|
+
# Configuration parameters: Severity, Include.
|
36
|
+
# Include: **/*.gemspec
|
37
|
+
Gemspec/RequireMFA:
|
38
|
+
Exclude:
|
39
|
+
- "puzzle-apartment.gemspec"
|
40
|
+
|
41
|
+
# Offense count: 2
|
42
|
+
# This cop supports safe autocorrection (--autocorrect).
|
43
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
44
|
+
# SupportedStyles: aligned, indented
|
45
|
+
Layout/LineEndStringConcatenationIndentation:
|
46
|
+
Exclude:
|
47
|
+
- "lib/apartment/custom_console.rb"
|
48
|
+
|
49
|
+
# Offense count: 1
|
50
|
+
Lint/MixedRegexpCaptureTypes:
|
51
|
+
Exclude:
|
52
|
+
- "lib/apartment/elevators/domain.rb"
|
53
|
+
|
54
|
+
# Offense count: 1
|
55
|
+
# This cop supports safe autocorrection (--autocorrect).
|
56
|
+
Lint/RedundantCopDisableDirective:
|
57
|
+
Exclude:
|
58
|
+
- "spec/support/config.rb"
|
59
|
+
|
60
|
+
# Offense count: 2
|
61
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
62
|
+
Lint/RedundantDirGlobSort:
|
63
|
+
Exclude:
|
64
|
+
- "spec/spec_helper.rb"
|
65
|
+
|
66
|
+
# Offense count: 2
|
67
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
68
|
+
Metrics/AbcSize:
|
69
|
+
Max: 28
|
70
|
+
|
71
|
+
# Offense count: 4
|
72
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
73
|
+
# AllowedMethods: refine
|
74
|
+
Metrics/BlockLength:
|
75
|
+
Max: 83
|
76
|
+
|
77
|
+
# Offense count: 1
|
78
|
+
# Configuration parameters: CountComments, CountAsOne.
|
79
|
+
Metrics/ClassLength:
|
80
|
+
Max: 151
|
81
|
+
|
82
|
+
# Offense count: 6
|
83
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
84
|
+
Metrics/MethodLength:
|
85
|
+
Max: 23
|
86
|
+
|
87
|
+
# Offense count: 5
|
88
|
+
# This cop supports safe autocorrection (--autocorrect).
|
89
|
+
# Configuration parameters: EnforcedStyle, BlockForwardingName.
|
90
|
+
# SupportedStyles: anonymous, explicit
|
91
|
+
Naming/BlockForwarding:
|
92
|
+
Exclude:
|
93
|
+
- "lib/apartment/adapters/abstract_adapter.rb"
|
94
|
+
- "lib/apartment/log_subscriber.rb"
|
95
|
+
- "lib/apartment/model.rb"
|
96
|
+
|
97
|
+
# Offense count: 1
|
98
|
+
# This cop supports safe autocorrection (--autocorrect).
|
99
|
+
Performance/RedundantBlockCall:
|
100
|
+
Exclude:
|
101
|
+
- "lib/apartment/tasks/task_helper.rb"
|
102
|
+
|
103
|
+
# Offense count: 1
|
104
|
+
# This cop supports safe autocorrection (--autocorrect).
|
105
|
+
Performance/StringIdentifierArgument:
|
106
|
+
Exclude:
|
107
|
+
- "lib/apartment/railtie.rb"
|
108
|
+
|
109
|
+
# Offense count: 3
|
110
|
+
RSpec/AnyInstance:
|
111
|
+
Exclude:
|
112
|
+
- "spec/unit/migrator_spec.rb"
|
113
|
+
|
114
|
+
# Offense count: 4
|
115
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
116
|
+
RSpec/BeEq:
|
117
|
+
Exclude:
|
118
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
119
|
+
- "spec/unit/elevators/first_subdomain_spec.rb"
|
120
|
+
|
121
|
+
# Offense count: 2
|
122
|
+
RSpec/BeforeAfterAll:
|
123
|
+
Exclude:
|
124
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
125
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
126
|
+
|
127
|
+
# Offense count: 18
|
128
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
129
|
+
# Prefixes: when, with, without
|
130
|
+
RSpec/ContextWording:
|
131
|
+
Exclude:
|
132
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
133
|
+
- "spec/examples/generic_adapter_custom_configuration_example.rb"
|
134
|
+
- "spec/examples/schema_adapter_examples.rb"
|
135
|
+
- "spec/support/contexts.rb"
|
136
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
137
|
+
- "spec/tenant_spec.rb"
|
138
|
+
|
139
|
+
# Offense count: 5
|
140
|
+
# Configuration parameters: IgnoredMetadata.
|
141
|
+
RSpec/DescribeClass:
|
142
|
+
Exclude:
|
143
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
144
|
+
- "spec/integration/connection_handling_spec.rb"
|
145
|
+
- "spec/integration/query_caching_spec.rb"
|
146
|
+
- "spec/integration/use_within_an_engine_spec.rb"
|
147
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
148
|
+
|
149
|
+
# Offense count: 11
|
150
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
151
|
+
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
152
|
+
# SupportedStyles: described_class, explicit
|
153
|
+
RSpec/DescribedClass:
|
154
|
+
Exclude:
|
155
|
+
- "spec/apartment_spec.rb"
|
156
|
+
- "spec/tenant_spec.rb"
|
157
|
+
- "spec/unit/elevators/host_hash_spec.rb"
|
158
|
+
- "spec/unit/migrator_spec.rb"
|
159
|
+
|
160
|
+
# Offense count: 5
|
161
|
+
# This cop supports safe autocorrection (--autocorrect).
|
162
|
+
RSpec/EmptyLineAfterFinalLet:
|
163
|
+
Exclude:
|
164
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
165
|
+
- "spec/examples/schema_adapter_examples.rb"
|
166
|
+
|
167
|
+
# Offense count: 14
|
168
|
+
# Configuration parameters: CountAsOne.
|
169
|
+
RSpec/ExampleLength:
|
170
|
+
Max: 12
|
171
|
+
|
172
|
+
# Offense count: 60
|
173
|
+
# This cop supports safe autocorrection (--autocorrect).
|
174
|
+
# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
|
175
|
+
# DisallowedExamples: works
|
176
|
+
RSpec/ExampleWording:
|
177
|
+
Exclude:
|
178
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
179
|
+
- "spec/apartment_spec.rb"
|
180
|
+
- "spec/examples/connection_adapter_examples.rb"
|
181
|
+
- "spec/examples/generic_adapter_custom_configuration_example.rb"
|
182
|
+
- "spec/examples/generic_adapter_examples.rb"
|
183
|
+
- "spec/examples/schema_adapter_examples.rb"
|
184
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
185
|
+
- "spec/integration/use_within_an_engine_spec.rb"
|
186
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
187
|
+
- "spec/tenant_spec.rb"
|
188
|
+
|
189
|
+
# Offense count: 12
|
190
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
191
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
192
|
+
RSpec/FilePath:
|
193
|
+
Exclude:
|
194
|
+
- "spec/adapters/mysql2_adapter_spec.rb"
|
195
|
+
- "spec/adapters/postgresql_adapter_spec.rb"
|
196
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
197
|
+
- "spec/tenant_spec.rb"
|
198
|
+
- "spec/unit/config_spec.rb"
|
199
|
+
- "spec/unit/elevators/domain_spec.rb"
|
200
|
+
- "spec/unit/elevators/first_subdomain_spec.rb"
|
201
|
+
- "spec/unit/elevators/generic_spec.rb"
|
202
|
+
- "spec/unit/elevators/host_hash_spec.rb"
|
203
|
+
- "spec/unit/elevators/host_spec.rb"
|
204
|
+
- "spec/unit/elevators/subdomain_spec.rb"
|
205
|
+
- "spec/unit/migrator_spec.rb"
|
206
|
+
|
207
|
+
# Offense count: 1
|
208
|
+
# This cop supports safe autocorrection (--autocorrect).
|
209
|
+
# Configuration parameters: EnforcedStyle.
|
210
|
+
# SupportedStyles: implicit, each, example
|
211
|
+
RSpec/HookArgument:
|
212
|
+
Exclude:
|
213
|
+
- "spec/support/setup.rb"
|
214
|
+
|
215
|
+
# Offense count: 4
|
216
|
+
# This cop supports safe autocorrection (--autocorrect).
|
217
|
+
RSpec/HooksBeforeExamples:
|
218
|
+
Exclude:
|
219
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
220
|
+
- "spec/examples/schema_adapter_examples.rb"
|
221
|
+
|
222
|
+
# Offense count: 4
|
223
|
+
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
|
224
|
+
RSpec/IndexedLet:
|
225
|
+
Exclude:
|
226
|
+
- "spec/examples/schema_adapter_examples.rb"
|
227
|
+
- "spec/support/contexts.rb"
|
228
|
+
|
229
|
+
# Offense count: 18
|
230
|
+
# Configuration parameters: AssignmentOnly.
|
231
|
+
RSpec/InstanceVariable:
|
232
|
+
Exclude:
|
233
|
+
- "spec/examples/generic_adapter_examples.rb"
|
234
|
+
- "spec/examples/schema_adapter_examples.rb"
|
235
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
236
|
+
- "spec/integration/use_within_an_engine_spec.rb"
|
237
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
238
|
+
|
239
|
+
# Offense count: 2
|
240
|
+
RSpec/LeakyConstantDeclaration:
|
241
|
+
Exclude:
|
242
|
+
- "spec/examples/generic_adapters_callbacks_examples.rb"
|
243
|
+
- "spec/unit/elevators/generic_spec.rb"
|
244
|
+
|
245
|
+
# Offense count: 35
|
246
|
+
# Configuration parameters: EnforcedStyle.
|
247
|
+
# SupportedStyles: have_received, receive
|
248
|
+
RSpec/MessageSpies:
|
249
|
+
Exclude:
|
250
|
+
- "spec/examples/generic_adapter_custom_configuration_example.rb"
|
251
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
252
|
+
- "spec/integration/use_within_an_engine_spec.rb"
|
253
|
+
- "spec/tasks/apartment_rake_spec.rb"
|
254
|
+
- "spec/unit/elevators/domain_spec.rb"
|
255
|
+
- "spec/unit/elevators/generic_spec.rb"
|
256
|
+
- "spec/unit/elevators/host_hash_spec.rb"
|
257
|
+
- "spec/unit/elevators/host_spec.rb"
|
258
|
+
- "spec/unit/elevators/subdomain_spec.rb"
|
259
|
+
- "spec/unit/migrator_spec.rb"
|
260
|
+
|
261
|
+
# Offense count: 11
|
262
|
+
# This cop supports safe autocorrection (--autocorrect).
|
263
|
+
# Configuration parameters: EnforcedStyle.
|
264
|
+
# SupportedStyles: hash, symbol
|
265
|
+
RSpec/MetadataStyle:
|
266
|
+
Exclude:
|
267
|
+
- "spec/examples/schema_adapter_examples.rb"
|
268
|
+
- "spec/support/contexts.rb"
|
269
|
+
|
270
|
+
# Offense count: 30
|
271
|
+
RSpec/MultipleExpectations:
|
272
|
+
Max: 6
|
273
|
+
|
274
|
+
# Offense count: 46
|
275
|
+
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
276
|
+
# SupportedStyles: always, named_only
|
277
|
+
RSpec/NamedSubject:
|
278
|
+
Exclude:
|
279
|
+
- "spec/adapters/mysql2_adapter_spec.rb"
|
280
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
281
|
+
- "spec/support/contexts.rb"
|
282
|
+
- "spec/support/requirements.rb"
|
283
|
+
- "spec/tenant_spec.rb"
|
284
|
+
|
285
|
+
# Offense count: 24
|
286
|
+
# Configuration parameters: AllowedGroups.
|
287
|
+
RSpec/NestedGroups:
|
288
|
+
Max: 5
|
289
|
+
|
290
|
+
# Offense count: 1
|
291
|
+
# Configuration parameters: AllowedPatterns.
|
292
|
+
# AllowedPatterns: ^expect_, ^assert_
|
293
|
+
RSpec/NoExpectationExample:
|
294
|
+
Exclude:
|
295
|
+
- "spec/tenant_spec.rb"
|
296
|
+
|
297
|
+
# Offense count: 6
|
298
|
+
# This cop supports safe autocorrection (--autocorrect).
|
299
|
+
# Configuration parameters: EnforcedStyle.
|
300
|
+
# SupportedStyles: and_return, block
|
301
|
+
RSpec/ReturnFromStub:
|
302
|
+
Exclude:
|
303
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
304
|
+
- "spec/unit/migrator_spec.rb"
|
305
|
+
|
306
|
+
# Offense count: 12
|
307
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
|
308
|
+
# Include: **/*_spec.rb
|
309
|
+
RSpec/SpecFilePathFormat:
|
310
|
+
Exclude:
|
311
|
+
- "spec/adapters/mysql2_adapter_spec.rb"
|
312
|
+
- "spec/adapters/postgresql_adapter_spec.rb"
|
313
|
+
- "spec/adapters/sqlite3_adapter_spec.rb"
|
314
|
+
- "spec/tenant_spec.rb"
|
315
|
+
- "spec/unit/config_spec.rb"
|
316
|
+
- "spec/unit/elevators/domain_spec.rb"
|
317
|
+
- "spec/unit/elevators/first_subdomain_spec.rb"
|
318
|
+
- "spec/unit/elevators/generic_spec.rb"
|
319
|
+
- "spec/unit/elevators/host_hash_spec.rb"
|
320
|
+
- "spec/unit/elevators/host_spec.rb"
|
321
|
+
- "spec/unit/elevators/subdomain_spec.rb"
|
322
|
+
- "spec/unit/migrator_spec.rb"
|
323
|
+
|
324
|
+
# Offense count: 2
|
325
|
+
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
326
|
+
RSpec/VerifiedDoubles:
|
327
|
+
Exclude:
|
328
|
+
- "spec/integration/apartment_rake_integration_spec.rb"
|
329
|
+
- "spec/unit/elevators/first_subdomain_spec.rb"
|
330
|
+
|
331
|
+
# Offense count: 2
|
332
|
+
# This cop supports safe autocorrection (--autocorrect).
|
333
|
+
Rails/IndexWith:
|
334
|
+
Exclude:
|
335
|
+
- "lib/apartment.rb"
|
336
|
+
- "spec/unit/config_spec.rb"
|
337
|
+
|
338
|
+
# Offense count: 7
|
339
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
340
|
+
Rails/Pluck:
|
341
|
+
Exclude:
|
342
|
+
- "spec/adapters/jdbc_mysql_adapter_spec.rb"
|
343
|
+
- "spec/adapters/jdbc_postgresql_adapter_spec.rb"
|
344
|
+
- "spec/adapters/mysql2_adapter_spec.rb"
|
345
|
+
- "spec/adapters/postgresql_adapter_spec.rb"
|
346
|
+
|
347
|
+
# Offense count: 1
|
348
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
349
|
+
Security/IoMethods:
|
350
|
+
Exclude:
|
351
|
+
- "spec/support/config.rb"
|
352
|
+
|
353
|
+
# Offense count: 16
|
354
|
+
# Configuration parameters: AllowedConstants.
|
355
|
+
Style/Documentation:
|
356
|
+
Exclude:
|
357
|
+
- "lib/apartment/adapters/jdbc_mysql_adapter.rb"
|
358
|
+
- "lib/apartment/adapters/postgis_adapter.rb"
|
359
|
+
- "lib/apartment/adapters/postgresql_adapter.rb"
|
360
|
+
- "lib/apartment/adapters/sqlite3_adapter.rb"
|
361
|
+
- "lib/apartment/custom_console.rb"
|
362
|
+
- "lib/apartment/deprecation.rb"
|
363
|
+
- "lib/apartment/migrator.rb"
|
364
|
+
- "lib/apartment/model.rb"
|
365
|
+
- "lib/apartment/railtie.rb"
|
366
|
+
- "lib/apartment/tasks/enhancements.rb"
|
367
|
+
- "lib/apartment/tasks/task_helper.rb"
|
368
|
+
- "lib/generators/apartment/install/install_generator.rb"
|
369
|
+
- "spec/**/*.rb"
|
370
|
+
|
371
|
+
# Offense count: 4
|
372
|
+
# This cop supports safe autocorrection (--autocorrect).
|
373
|
+
# Configuration parameters: AllowedVars.
|
374
|
+
Style/FetchEnvVar:
|
375
|
+
Exclude:
|
376
|
+
- "lib/apartment/adapters/postgresql_adapter.rb"
|
377
|
+
|
378
|
+
# Offense count: 6
|
379
|
+
# This cop supports safe autocorrection (--autocorrect).
|
380
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
381
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
382
|
+
# SupportedShorthandSyntax: always, never, either, consistent
|
383
|
+
Style/HashSyntax:
|
384
|
+
Exclude:
|
385
|
+
- "lib/apartment/active_record/connection_handling.rb"
|
386
|
+
- "spec/integration/connection_handling_spec.rb"
|
387
|
+
|
388
|
+
# Offense count: 4
|
389
|
+
# This cop supports safe autocorrection (--autocorrect).
|
390
|
+
Style/RedundantConstantBase:
|
391
|
+
Exclude:
|
392
|
+
- "spec/apartment_spec.rb"
|
393
|
+
- "spec/dummy/config.ru"
|
394
|
+
- "spec/dummy_engine/test/dummy/config.ru"
|
395
|
+
- "spec/dummy_engine/test/dummy/config/environments/production.rb"
|
396
|
+
|
397
|
+
# Offense count: 1
|
398
|
+
# This cop supports safe autocorrection (--autocorrect).
|
399
|
+
Style/RedundantRegexpArgument:
|
400
|
+
Exclude:
|
401
|
+
- "lib/apartment/tasks/enhancements.rb"
|
402
|
+
|
403
|
+
# Offense count: 3
|
404
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
405
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
406
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
407
|
+
Style/SafeNavigation:
|
408
|
+
Exclude:
|
409
|
+
- "lib/apartment/migrator.rb"
|
410
|
+
- "lib/tasks/apartment.rake"
|
411
|
+
|
412
|
+
# Offense count: 4
|
413
|
+
# This cop supports safe autocorrection (--autocorrect).
|
414
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
415
|
+
# SupportedStyles: single_quotes, double_quotes
|
416
|
+
Style/StringLiterals:
|
417
|
+
Exclude:
|
418
|
+
- "Gemfile"
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|