index_shotgun 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/pages.yml +63 -0
- data/.github/workflows/test.yml +52 -28
- data/.yardopts +2 -0
- data/CHANGELOG.md +13 -1
- data/ci/build.sh +13 -0
- data/ci/install.sh +5 -2
- data/gemfiles/activerecord_7_0.gemfile +7 -7
- data/gemfiles/activerecord_7_1.gemfile +28 -0
- data/gemfiles/common.gemfile +6 -0
- data/index_shotgun.gemspec +3 -2
- data/lib/index_shotgun/analyzer.rb +16 -3
- data/lib/index_shotgun/version.rb +1 -1
- metadata +23 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e083f50b59dfe9def74cef986544b8086cc1e60bf2fe765672f233e5935a8685
|
4
|
+
data.tar.gz: c42212bddff5076c1c7252cf8ff33378a480e64190f7acc47591d3fbd1c16541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72226e56029dd8e36e853e9a23380d51c37991d7785bef739871846fdc985a6bf24ae8f36e041ced640a96ffba6574d35b180ecead0e5b619f07200fac2c401d
|
7
|
+
data.tar.gz: 5f773916e8a3ed188be272201c9e41e3f35390cd793f7755702c20e2055b60ecf3be2ff5aa8253021a9cfba67b98671581c6fbdc986739d9643645c7a727b5ac
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# c.f. https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
2
|
+
version: 2
|
3
|
+
|
4
|
+
updates:
|
5
|
+
- package-ecosystem: github-actions
|
6
|
+
directory: /
|
7
|
+
schedule:
|
8
|
+
interval: weekly
|
9
|
+
assignees:
|
10
|
+
- sue445
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Simple workflow for deploying static content to GitHub Pages
|
2
|
+
name: Deploy static content to Pages
|
3
|
+
|
4
|
+
on:
|
5
|
+
# Runs on pushes targeting the default branch
|
6
|
+
push:
|
7
|
+
branches:
|
8
|
+
- master
|
9
|
+
paths-ignore:
|
10
|
+
- ".github/workflows/test.yml"
|
11
|
+
|
12
|
+
# Allows you to run this workflow manually from the Actions tab
|
13
|
+
workflow_dispatch:
|
14
|
+
|
15
|
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
pages: write
|
19
|
+
id-token: write
|
20
|
+
|
21
|
+
# Allow one concurrent deployment
|
22
|
+
concurrency:
|
23
|
+
group: "pages"
|
24
|
+
cancel-in-progress: true
|
25
|
+
|
26
|
+
jobs:
|
27
|
+
# Single deploy job since we're just deploying
|
28
|
+
deploy:
|
29
|
+
environment:
|
30
|
+
name: github-pages
|
31
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
32
|
+
runs-on: ubuntu-latest
|
33
|
+
env:
|
34
|
+
BUNDLE_WITHOUT: mysql postgresql sqlite3 oracle
|
35
|
+
steps:
|
36
|
+
- name: Checkout
|
37
|
+
uses: actions/checkout@v4
|
38
|
+
|
39
|
+
- uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
ruby-version: ruby
|
42
|
+
bundler-cache: true
|
43
|
+
|
44
|
+
- run: bundle exec yard
|
45
|
+
|
46
|
+
- name: Setup Pages
|
47
|
+
uses: actions/configure-pages@v5
|
48
|
+
- name: Upload artifact
|
49
|
+
uses: actions/upload-pages-artifact@v3
|
50
|
+
with:
|
51
|
+
# Upload entire repository
|
52
|
+
path: './doc'
|
53
|
+
- name: Deploy to GitHub Pages
|
54
|
+
id: deployment
|
55
|
+
uses: actions/deploy-pages@main
|
56
|
+
|
57
|
+
- name: Slack Notification (not success)
|
58
|
+
uses: act10ns/slack@v2
|
59
|
+
if: "! success()"
|
60
|
+
continue-on-error: true
|
61
|
+
with:
|
62
|
+
status: ${{ job.status }}
|
63
|
+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
data/.github/workflows/test.yml
CHANGED
@@ -4,11 +4,15 @@ on:
|
|
4
4
|
push:
|
5
5
|
branches:
|
6
6
|
- master
|
7
|
+
paths-ignore:
|
8
|
+
- ".github/workflows/pages.yml"
|
7
9
|
pull_request:
|
8
10
|
types:
|
9
11
|
- opened
|
10
12
|
- synchronize
|
11
13
|
- reopened
|
14
|
+
paths-ignore:
|
15
|
+
- ".github/workflows/pages.yml"
|
12
16
|
schedule:
|
13
17
|
- cron: "0 20 * * 5" # JST 5:00 (Sat)
|
14
18
|
|
@@ -26,6 +30,9 @@ jobs:
|
|
26
30
|
- "2.6"
|
27
31
|
- "2.7"
|
28
32
|
- "3.0"
|
33
|
+
- "3.1"
|
34
|
+
- "3.2"
|
35
|
+
- "3.3"
|
29
36
|
gemfile:
|
30
37
|
- activerecord_5_0
|
31
38
|
- activerecord_5_1
|
@@ -33,16 +40,13 @@ jobs:
|
|
33
40
|
- activerecord_6_0
|
34
41
|
- activerecord_6_1
|
35
42
|
- activerecord_7_0
|
43
|
+
- activerecord_7_1
|
36
44
|
database:
|
37
45
|
- sqlite3
|
38
46
|
- mysql
|
39
47
|
- postgresql
|
40
48
|
- oracle
|
41
49
|
exclude:
|
42
|
-
# TODO: Remove this after activerecord-oracle_enhanced-adapter supports activerecord v7
|
43
|
-
- database: oracle
|
44
|
-
gemfile: activerecord_7_0
|
45
|
-
|
46
50
|
# Rails 7.0+ requires Ruby 2.7+
|
47
51
|
- ruby: "2.4"
|
48
52
|
gemfile: activerecord_7_0
|
@@ -50,6 +54,12 @@ jobs:
|
|
50
54
|
gemfile: activerecord_7_0
|
51
55
|
- ruby: "2.6"
|
52
56
|
gemfile: activerecord_7_0
|
57
|
+
- ruby: "2.4"
|
58
|
+
gemfile: activerecord_7_1
|
59
|
+
- ruby: "2.5"
|
60
|
+
gemfile: activerecord_7_1
|
61
|
+
- ruby: "2.6"
|
62
|
+
gemfile: activerecord_7_1
|
53
63
|
|
54
64
|
# Rails 6.0+ requires Ruby 2.5+
|
55
65
|
- ruby: "2.4"
|
@@ -64,6 +74,28 @@ jobs:
|
|
64
74
|
gemfile: activerecord_5_1
|
65
75
|
- ruby: "3.0"
|
66
76
|
gemfile: activerecord_5_2
|
77
|
+
- ruby: "3.1"
|
78
|
+
gemfile: activerecord_5_0
|
79
|
+
- ruby: "3.1"
|
80
|
+
gemfile: activerecord_5_1
|
81
|
+
- ruby: "3.1"
|
82
|
+
gemfile: activerecord_5_2
|
83
|
+
- ruby: "3.2"
|
84
|
+
gemfile: activerecord_5_0
|
85
|
+
- ruby: "3.2"
|
86
|
+
gemfile: activerecord_5_1
|
87
|
+
- ruby: "3.2"
|
88
|
+
gemfile: activerecord_5_2
|
89
|
+
- ruby: "3.3"
|
90
|
+
gemfile: activerecord_5_0
|
91
|
+
- ruby: "3.3"
|
92
|
+
gemfile: activerecord_5_1
|
93
|
+
- ruby: "3.3"
|
94
|
+
gemfile: activerecord_5_2
|
95
|
+
|
96
|
+
# TODO: latest activerecord-oracle_enhanced-adapter doesn't support activerecord 7.1
|
97
|
+
- database: oracle
|
98
|
+
gemfile: activerecord_7_1
|
67
99
|
|
68
100
|
env:
|
69
101
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
@@ -99,14 +131,14 @@ jobs:
|
|
99
131
|
ORACLE_SYSTEM_PASSWORD: oracle
|
100
132
|
|
101
133
|
steps:
|
102
|
-
- uses: actions/checkout@
|
134
|
+
- uses: actions/checkout@v4
|
103
135
|
|
104
136
|
- uses: ruby/setup-ruby@v1
|
105
137
|
with:
|
106
138
|
ruby-version: ${{ matrix.ruby }}
|
107
139
|
|
108
140
|
- name: Cache vendor/bundle
|
109
|
-
uses: actions/cache@
|
141
|
+
uses: actions/cache@v4
|
110
142
|
id: cache_gem
|
111
143
|
with:
|
112
144
|
path: vendor/bundle
|
@@ -127,8 +159,8 @@ jobs:
|
|
127
159
|
command: before-build
|
128
160
|
continue-on-error: true
|
129
161
|
|
130
|
-
# c.f. https://github.
|
131
|
-
- run: sudo
|
162
|
+
# c.f. https://github.com/actions/virtual-environments/issues/4732#issuecomment-992614476
|
163
|
+
- run: sudo systemctl start mysql
|
132
164
|
|
133
165
|
- name: Run test
|
134
166
|
run: |
|
@@ -148,15 +180,13 @@ jobs:
|
|
148
180
|
continue-on-error: true
|
149
181
|
|
150
182
|
- name: Slack Notification (not success)
|
151
|
-
uses:
|
183
|
+
uses: act10ns/slack@v2
|
152
184
|
if: "! success()"
|
153
185
|
continue-on-error: true
|
154
186
|
with:
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
url: ${{ secrets.SLACK_WEBHOOK }}
|
159
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
187
|
+
status: ${{ job.status }}
|
188
|
+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
189
|
+
matrix: ${{ toJson(matrix) }}
|
160
190
|
|
161
191
|
rubocop:
|
162
192
|
runs-on: ubuntu-latest
|
@@ -166,14 +196,14 @@ jobs:
|
|
166
196
|
BUNDLE_WITHOUT: mysql postgresql sqlite3 oracle
|
167
197
|
|
168
198
|
steps:
|
169
|
-
- uses: actions/checkout@
|
199
|
+
- uses: actions/checkout@v4
|
170
200
|
|
171
201
|
- uses: ruby/setup-ruby@v1
|
172
202
|
with:
|
173
203
|
ruby-version: ${{ env.RUBY_VERSION }}
|
174
204
|
|
175
205
|
- name: Cache vendor/bundle
|
176
|
-
uses: actions/cache@
|
206
|
+
uses: actions/cache@v4
|
177
207
|
id: cache_gem_rubocop
|
178
208
|
with:
|
179
209
|
path: vendor/bundle
|
@@ -192,15 +222,12 @@ jobs:
|
|
192
222
|
bundle exec rubocop
|
193
223
|
|
194
224
|
- name: Slack Notification (not success)
|
195
|
-
uses:
|
225
|
+
uses: act10ns/slack@v2
|
196
226
|
if: "! success()"
|
197
227
|
continue-on-error: true
|
198
228
|
with:
|
199
|
-
|
200
|
-
|
201
|
-
icon_emoji: ":octocat:"
|
202
|
-
url: ${{ secrets.SLACK_WEBHOOK }}
|
203
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
229
|
+
status: ${{ job.status }}
|
230
|
+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
204
231
|
|
205
232
|
notify:
|
206
233
|
needs:
|
@@ -211,12 +238,9 @@ jobs:
|
|
211
238
|
|
212
239
|
steps:
|
213
240
|
- name: Slack Notification (success)
|
214
|
-
uses:
|
241
|
+
uses: act10ns/slack@v2
|
215
242
|
if: always()
|
216
243
|
continue-on-error: true
|
217
244
|
with:
|
218
|
-
|
219
|
-
|
220
|
-
icon_emoji: ":octocat:"
|
221
|
-
url: ${{ secrets.SLACK_WEBHOOK }}
|
222
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
245
|
+
status: ${{ job.status }}
|
246
|
+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
## Unreleased
|
3
|
-
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.
|
3
|
+
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.3...master)
|
4
|
+
|
5
|
+
## [v1.0.2](https://github.com/sue445/index_shotgun/tree/v1.0.3) (2024/05/14)
|
6
|
+
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.2...v1.0.3)
|
7
|
+
|
8
|
+
* Fixed false positives when there are multiple unique indexes on a single table
|
9
|
+
* https://github.com/sue445/index_shotgun/pull/140
|
10
|
+
|
11
|
+
## [v1.0.2](https://github.com/sue445/index_shotgun/tree/v1.0.2) (2023/12/28)
|
12
|
+
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.1...v1.0.2)
|
13
|
+
|
14
|
+
* Fixed deprecation warning in activesupport 7.1
|
15
|
+
* https://github.com/sue445/index_shotgun/pull/134
|
4
16
|
|
5
17
|
## [v1.0.1](https://github.com/sue445/index_shotgun/tree/v1.0.1) (2021/11/20)
|
6
18
|
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.0...v1.0.1)
|
data/ci/build.sh
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
#!/bin/bash -xe
|
2
2
|
|
3
|
+
if [ "${DATABASE}" = "mysql" ]; then
|
4
|
+
export BUNDLE_WITHOUT="postgresql sqlite3 oracle"
|
5
|
+
elif [ "${DATABASE}" = "postgresql" ]; then
|
6
|
+
export BUNDLE_WITHOUT="mysql sqlite3 oracle"
|
7
|
+
elif [ "${DATABASE}" = "sqlite3" ]; then
|
8
|
+
export BUNDLE_WITHOUT="mysql postgresql oracle"
|
9
|
+
elif [ "${DATABASE}" = "oracle" ]; then
|
10
|
+
export BUNDLE_WITHOUT="mysql postgresql sqlite3"
|
11
|
+
else
|
12
|
+
echo "${DATABASE} is unknown"
|
13
|
+
exit 1
|
14
|
+
fi
|
15
|
+
|
3
16
|
cp ci/database.yml.${DATABASE} spec/config/database.yml
|
4
17
|
bundle exec rspec --profile
|
5
18
|
|
data/ci/install.sh
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
#!/bin/bash -xe
|
2
2
|
|
3
|
-
gem
|
3
|
+
gem update --system --quiet || true
|
4
|
+
|
5
|
+
gem --version
|
6
|
+
bundle --version
|
4
7
|
|
5
8
|
if [ "${DATABASE}" = "mysql" ]; then
|
6
9
|
sudo apt-get update
|
@@ -44,4 +47,4 @@ else
|
|
44
47
|
fi
|
45
48
|
|
46
49
|
bundle config set --local path "vendor/bundle/"
|
47
|
-
bundle
|
50
|
+
bundle update --jobs $(nproc) --retry 3
|
@@ -1,26 +1,26 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
3
|
+
# NOTE: Ruby 3.1 + Rails 7.0.0 doesn't work
|
4
|
+
# c.f. https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b
|
5
|
+
gem "activerecord", "~> 7.0.1"
|
4
6
|
|
5
7
|
group :postgresql do
|
6
|
-
# c.f. https://github.com/rails/rails/blob/v7.0.0
|
8
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L3
|
7
9
|
gem "pg", "~> 1.1"
|
8
10
|
end
|
9
11
|
|
10
12
|
group :mysql do
|
11
|
-
# c.f. https://github.com/rails/rails/blob/v7.0.0
|
13
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6
|
12
14
|
gem "mysql2", "~> 0.5"
|
13
15
|
end
|
14
16
|
|
15
17
|
group :oracle do
|
16
|
-
|
17
|
-
# gem "activerecord-oracle_enhanced-adapter", "~> 6.1.2"
|
18
|
-
|
18
|
+
gem "activerecord-oracle_enhanced-adapter", "~> 7.0.0"
|
19
19
|
gem "ruby-oci8"
|
20
20
|
end
|
21
21
|
|
22
22
|
group :sqlite3 do
|
23
|
-
# c.f. https://github.com/rails/rails/blob/v7.0.0
|
23
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13
|
24
24
|
gem "sqlite3", "~> 1.4"
|
25
25
|
end
|
26
26
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "activerecord", "~> 7.1.0"
|
4
|
+
|
5
|
+
group :postgresql do
|
6
|
+
# c.f. https://github.com/rails/rails/blob/v7.1.0/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L3
|
7
|
+
gem "pg", "~> 1.1"
|
8
|
+
end
|
9
|
+
|
10
|
+
group :mysql do
|
11
|
+
# c.f. https://github.com/rails/rails/blob/v7.1.0/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6
|
12
|
+
gem "mysql2", "~> 0.5"
|
13
|
+
end
|
14
|
+
|
15
|
+
# TODO: latest activerecord-oracle_enhanced-adapter doesn't support activerecord 7.1
|
16
|
+
# group :oracle do
|
17
|
+
# gem "activerecord-oracle_enhanced-adapter", "~> 7.0.0"
|
18
|
+
# gem "ruby-oci8"
|
19
|
+
# end
|
20
|
+
|
21
|
+
group :sqlite3 do
|
22
|
+
# c.f. https://github.com/rails/rails/blob/v7.1.0/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L14
|
23
|
+
gem "sqlite3", "~> 1.4"
|
24
|
+
end
|
25
|
+
|
26
|
+
eval_gemfile "#{__dir__}/common.gemfile"
|
27
|
+
|
28
|
+
gemspec path: "../"
|
data/gemfiles/common.gemfile
CHANGED
@@ -13,3 +13,9 @@ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.4.4")
|
|
13
13
|
# zeitwerk requires Ruby 2.4.4+
|
14
14
|
gem "activesupport", "< 6.0.0"
|
15
15
|
end
|
16
|
+
|
17
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
|
18
|
+
# parser 3.3.0.0 uses String#delete_suffix, but String#delete_suffix is available since Ruby 2.5.0+
|
19
|
+
# c.f https://github.com/whitequark/parser/blob/v3.3.0.0/lib/parser/lexer/literal.rb#L250
|
20
|
+
gem "parser", "< 3.3.0.0"
|
21
|
+
end
|
data/index_shotgun.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = spec.homepage
|
18
18
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
19
|
+
spec.metadata["documentation_uri"] = "https://sue445.github.io/index_shotgun/"
|
19
20
|
spec.metadata["rubygems_mfa_required"] = "true"
|
20
21
|
|
21
22
|
spec.required_ruby_version = ">= 2.4.0"
|
@@ -29,14 +30,14 @@ Gem::Specification.new do |spec|
|
|
29
30
|
spec.add_dependency "thor"
|
30
31
|
|
31
32
|
spec.add_development_dependency "bundler"
|
32
|
-
spec.add_development_dependency "
|
33
|
+
spec.add_development_dependency "coveralls_reborn"
|
33
34
|
spec.add_development_dependency "onkcop", "0.53.0.2"
|
34
35
|
spec.add_development_dependency "rake"
|
35
36
|
spec.add_development_dependency "rake_shared_context", "0.2.2"
|
36
37
|
spec.add_development_dependency "rspec"
|
37
38
|
spec.add_development_dependency "rspec-its"
|
38
|
-
spec.add_development_dependency "rspec-power_assert"
|
39
39
|
spec.add_development_dependency "rubocop", "0.62.0"
|
40
40
|
spec.add_development_dependency "rubocop_auto_corrector"
|
41
41
|
spec.add_development_dependency "simplecov", "< 0.18.0"
|
42
|
+
spec.add_development_dependency "yard"
|
42
43
|
end
|
@@ -21,7 +21,7 @@ module IndexShotgun
|
|
21
21
|
# @return [IndexShotgun::Analyzer::Response]
|
22
22
|
def perform
|
23
23
|
tables =
|
24
|
-
|
24
|
+
silence_deprecations do
|
25
25
|
ActiveRecord::Base.connection.tables
|
26
26
|
end
|
27
27
|
tables.reject! {|table| exclude_tables.include?(table.downcase) }
|
@@ -70,7 +70,7 @@ module IndexShotgun
|
|
70
70
|
# check duplicate indexes of table
|
71
71
|
# @param table [String] table name
|
72
72
|
# @return [Array<Hash>] array of index info
|
73
|
-
# index: index info
|
73
|
+
# index: index info `ActiveRecord::ConnectionAdapters::IndexDefinition`
|
74
74
|
# result: search result message
|
75
75
|
def check_indexes(table)
|
76
76
|
indexes = table_indexes(table)
|
@@ -78,6 +78,8 @@ module IndexShotgun
|
|
78
78
|
indexes.permutation(2).each_with_object([]) do |(source_index, target_index), response|
|
79
79
|
next unless source_index.columns.start_with?(target_index.columns)
|
80
80
|
|
81
|
+
next if source_index.unique && target_index.unique
|
82
|
+
|
81
83
|
if target_index.unique
|
82
84
|
response << {
|
83
85
|
index: source_index,
|
@@ -94,7 +96,6 @@ module IndexShotgun
|
|
94
96
|
|
95
97
|
# get indexes of table
|
96
98
|
# @param table [String]
|
97
|
-
# @see [ActiveRecord::ConnectionAdapters::TableDefinition#indexes]
|
98
99
|
def table_indexes(table)
|
99
100
|
ActiveRecord::Base.connection.indexes(table)
|
100
101
|
end
|
@@ -288,6 +289,18 @@ module IndexShotgun
|
|
288
289
|
@exclude_tables = tables.map(&:downcase)
|
289
290
|
@exclude_tables
|
290
291
|
end
|
292
|
+
|
293
|
+
def silence_deprecations
|
294
|
+
if ActiveSupport.version >= Gem::Version.create("7.1.0")
|
295
|
+
ActiveSupport::Deprecation::Deprecators.new.silence do
|
296
|
+
yield
|
297
|
+
end
|
298
|
+
else
|
299
|
+
ActiveSupport::Deprecation.silence do
|
300
|
+
yield
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|
291
304
|
end
|
292
305
|
end
|
293
306
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index_shotgun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: coveralls_reborn
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -136,20 +136,6 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rspec-power_assert
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: rubocop
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,6 +178,20 @@ dependencies:
|
|
192
178
|
- - "<"
|
193
179
|
- !ruby/object:Gem::Version
|
194
180
|
version: 0.18.0
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: yard
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
195
|
description: duplicate index checker
|
196
196
|
email:
|
197
197
|
- sue445@sue445.net
|
@@ -201,11 +201,14 @@ extensions: []
|
|
201
201
|
extra_rdoc_files: []
|
202
202
|
files:
|
203
203
|
- ".coveralls.yml"
|
204
|
+
- ".github/dependabot.yml"
|
205
|
+
- ".github/workflows/pages.yml"
|
204
206
|
- ".github/workflows/test.yml"
|
205
207
|
- ".github_changelog_generator"
|
206
208
|
- ".gitignore"
|
207
209
|
- ".rspec"
|
208
210
|
- ".rubocop.yml"
|
211
|
+
- ".yardopts"
|
209
212
|
- CHANGELOG.md
|
210
213
|
- Gemfile
|
211
214
|
- LICENSE.txt
|
@@ -226,6 +229,7 @@ files:
|
|
226
229
|
- gemfiles/activerecord_6_0.gemfile
|
227
230
|
- gemfiles/activerecord_6_1.gemfile
|
228
231
|
- gemfiles/activerecord_7_0.gemfile
|
232
|
+
- gemfiles/activerecord_7_1.gemfile
|
229
233
|
- gemfiles/common.gemfile
|
230
234
|
- index_shotgun.gemspec
|
231
235
|
- lib/index_shotgun.rb
|
@@ -243,6 +247,7 @@ metadata:
|
|
243
247
|
homepage_uri: https://github.com/sue445/index_shotgun
|
244
248
|
source_code_uri: https://github.com/sue445/index_shotgun
|
245
249
|
changelog_uri: https://github.com/sue445/index_shotgun/blob/master/CHANGELOG.md
|
250
|
+
documentation_uri: https://sue445.github.io/index_shotgun/
|
246
251
|
rubygems_mfa_required: 'true'
|
247
252
|
post_install_message:
|
248
253
|
rdoc_options: []
|
@@ -259,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
264
|
- !ruby/object:Gem::Version
|
260
265
|
version: '0'
|
261
266
|
requirements: []
|
262
|
-
rubygems_version: 3.
|
267
|
+
rubygems_version: 3.5.3
|
263
268
|
signing_key:
|
264
269
|
specification_version: 4
|
265
270
|
summary: duplicate index checker
|