index_shotgun 1.0.2 → 1.0.3

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: 1a2170564fedea98e55841bdf9c3c775e9d17f82829cd0a4f4e6e373152187ff
4
- data.tar.gz: bd302f0a23894d679d67e0e32379f6a2a0631a69af57a5e5ae0ac2c04ad39edd
3
+ metadata.gz: e083f50b59dfe9def74cef986544b8086cc1e60bf2fe765672f233e5935a8685
4
+ data.tar.gz: c42212bddff5076c1c7252cf8ff33378a480e64190f7acc47591d3fbd1c16541
5
5
  SHA512:
6
- metadata.gz: ee13a990a519dee3c290e94782924c6d1a9eed815ebc7444867c82855e6e7600ae3ab844b882ce1149f6264ba6b122dadd5e9153e8c84dbe5dd761ddff7c9a12
7
- data.tar.gz: d49b22e234b7b96d20b559872a43780359ae81241465871bd6a8205d58aeaa215c36097d28357fadfed5cbae19e40c887e3e9bd5207d717638a74bad5d5ae1a9
6
+ metadata.gz: 72226e56029dd8e36e853e9a23380d51c37991d7785bef739871846fdc985a6bf24ae8f36e041ced640a96ffba6574d35b180ecead0e5b619f07200fac2c401d
7
+ data.tar.gz: 5f773916e8a3ed188be272201c9e41e3f35390cd793f7755702c20e2055b60ecf3be2ff5aa8253021a9cfba67b98671581c6fbdc986739d9643645c7a727b5ac
@@ -44,7 +44,7 @@ jobs:
44
44
  - run: bundle exec yard
45
45
 
46
46
  - name: Setup Pages
47
- uses: actions/configure-pages@v4
47
+ uses: actions/configure-pages@v5
48
48
  - name: Upload artifact
49
49
  uses: actions/upload-pages-artifact@v3
50
50
  with:
@@ -55,12 +55,9 @@ jobs:
55
55
  uses: actions/deploy-pages@main
56
56
 
57
57
  - name: Slack Notification (not success)
58
- uses: lazy-actions/slatify@master
58
+ uses: act10ns/slack@v2
59
59
  if: "! success()"
60
60
  continue-on-error: true
61
61
  with:
62
- job_name: "*pages*"
63
- type: ${{ job.status }}
64
- icon_emoji: ":octocat:"
65
- url: ${{ secrets.SLACK_WEBHOOK }}
66
- token: ${{ secrets.GITHUB_TOKEN }}
62
+ status: ${{ job.status }}
63
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
@@ -138,7 +138,7 @@ jobs:
138
138
  ruby-version: ${{ matrix.ruby }}
139
139
 
140
140
  - name: Cache vendor/bundle
141
- uses: actions/cache@v3
141
+ uses: actions/cache@v4
142
142
  id: cache_gem
143
143
  with:
144
144
  path: vendor/bundle
@@ -180,15 +180,13 @@ jobs:
180
180
  continue-on-error: true
181
181
 
182
182
  - name: Slack Notification (not success)
183
- uses: lazy-actions/slatify@master
183
+ uses: act10ns/slack@v2
184
184
  if: "! success()"
185
185
  continue-on-error: true
186
186
  with:
187
- job_name: ${{ format('*build* ({0}, {1}, {2})', matrix.ruby, matrix.gemfile, matrix.database) }}
188
- type: ${{ job.status }}
189
- icon_emoji: ":octocat:"
190
- url: ${{ secrets.SLACK_WEBHOOK }}
191
- token: ${{ secrets.GITHUB_TOKEN }}
187
+ status: ${{ job.status }}
188
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
189
+ matrix: ${{ toJson(matrix) }}
192
190
 
193
191
  rubocop:
194
192
  runs-on: ubuntu-latest
@@ -205,7 +203,7 @@ jobs:
205
203
  ruby-version: ${{ env.RUBY_VERSION }}
206
204
 
207
205
  - name: Cache vendor/bundle
208
- uses: actions/cache@v3
206
+ uses: actions/cache@v4
209
207
  id: cache_gem_rubocop
210
208
  with:
211
209
  path: vendor/bundle
@@ -224,15 +222,12 @@ jobs:
224
222
  bundle exec rubocop
225
223
 
226
224
  - name: Slack Notification (not success)
227
- uses: lazy-actions/slatify@master
225
+ uses: act10ns/slack@v2
228
226
  if: "! success()"
229
227
  continue-on-error: true
230
228
  with:
231
- job_name: '*rubocop*'
232
- type: ${{ job.status }}
233
- icon_emoji: ":octocat:"
234
- url: ${{ secrets.SLACK_WEBHOOK }}
235
- token: ${{ secrets.GITHUB_TOKEN }}
229
+ status: ${{ job.status }}
230
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
236
231
 
237
232
  notify:
238
233
  needs:
@@ -243,12 +238,9 @@ jobs:
243
238
 
244
239
  steps:
245
240
  - name: Slack Notification (success)
246
- uses: lazy-actions/slatify@master
241
+ uses: act10ns/slack@v2
247
242
  if: always()
248
243
  continue-on-error: true
249
244
  with:
250
- job_name: '*build*'
251
- type: ${{ job.status }}
252
- icon_emoji: ":octocat:"
253
- url: ${{ secrets.SLACK_WEBHOOK }}
254
- token: ${{ secrets.GITHUB_TOKEN }}
245
+ status: ${{ job.status }}
246
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change Log
2
2
  ## Unreleased
3
- [Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.2...master)
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
4
10
 
5
11
  ## [v1.0.2](https://github.com/sue445/index_shotgun/tree/v1.0.2) (2023/12/28)
6
12
  [Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.1...v1.0.2)
@@ -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
@@ -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,
@@ -1,3 +1,3 @@
1
1
  module IndexShotgun
2
- VERSION = "1.0.2".freeze
2
+ VERSION = "1.0.3".freeze
3
3
  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.2
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: 2023-12-28 00:00:00.000000000 Z
11
+ date: 2024-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord