activerecord-simple_index_name 1.1.2 → 1.1.4

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: 06fdd154fa866f49c54b8f1d878442093945f6f1cb5dcd0110b510b79ac220c9
4
- data.tar.gz: 4f1d43781e259cd57d083e4f2dbee0036266de711b25ba5a3efaf4cf652577ad
3
+ metadata.gz: 8a71bae9726de9c68f464b5cce8ea02b959ac56b2d68a3e294d25f65af5b5eb3
4
+ data.tar.gz: 77e6a75ba4bfb7b468b44b644dc0e4dd50400a4c4b7055d650850a89aaf24abe
5
5
  SHA512:
6
- metadata.gz: f1c4ed076ba045104a2bd78ff7d5f282183413fa9a66d5ee57e2f3e73f3859b7b92dd254bc4213cb1038699f8fd5f2163802e37a636b8019e3e7dc9d101d8c6e
7
- data.tar.gz: de6756af23d5d48c65752c3ecd4a451c814c8744894cfd3039cdff14918eae9fc16206ada63953d286bcf1e9c3d074425f6dbf57e095f41136afae5cfc66cf87
6
+ metadata.gz: 0edca564bef44f5f31aa321492c6718587256d86dd4ca8dc5af34cbc6c85bbb20abcfec79a93f6c37bf159112b158a51fcf5f6f9c9b58651efe6bd14bafc07d0
7
+ data.tar.gz: 8c4c1796a5e43aa7576f8df36bc1506ba2ba057d48db4e9b9cf6551c2d262209e0b1b6421a0c85c07deae69fa6c586dd7048d1afb4412ff0c3718921a7dee740
@@ -2,9 +2,19 @@
2
2
  version: 2
3
3
 
4
4
  updates:
5
+ ###########################################################
6
+ # NOTE: following sections are auto generated. DO NOT EDIT!
7
+ ###########################################################
5
8
  - package-ecosystem: github-actions
6
9
  directory: /
7
10
  schedule:
8
- interval: weekly
11
+ interval: monthly
12
+ time: "05:00"
13
+ timezone: Asia/Tokyo
9
14
  assignees:
10
15
  - sue445
16
+ cooldown:
17
+ default-days: 7
18
+ exclude:
19
+ - ruby/setup-ruby
20
+ ###########################################################
@@ -0,0 +1,31 @@
1
+ # ref. https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes
2
+
3
+ changelog:
4
+ exclude:
5
+ labels:
6
+ - chore
7
+
8
+ categories:
9
+ - title: ":bomb: Breaking Changes"
10
+ labels:
11
+ - breaking change
12
+
13
+ - title: ":lock: Security Fix"
14
+ labels:
15
+ - security
16
+
17
+ - title: ":rocket: Features"
18
+ labels:
19
+ - enhancement
20
+
21
+ - title: ":bug: Bug Fixes"
22
+ labels:
23
+ - bug
24
+
25
+ - title: ":dependabot: Dependency updates"
26
+ labels:
27
+ - dependencies
28
+
29
+ - title: ":pencil: Other Changes"
30
+ labels:
31
+ - "*"
@@ -0,0 +1,28 @@
1
+ name: dependabot-manager
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - synchronize # PR branch is rebased
8
+
9
+ jobs:
10
+ dependabot-auto-merge:
11
+ uses: sue445/workflows/.github/workflows/dependabot-auto-merge.yml@main
12
+ with:
13
+ repo-name: sue445/activerecord-simple_index_name
14
+ secrets:
15
+ # TODO: Set secrets to Dependabot secrets
16
+ app-id: ${{ secrets.GH_APP_ID }}
17
+ private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
18
+ slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
19
+
20
+ dependabot-security-alert:
21
+ uses: sue445/workflows/.github/workflows/dependabot-security-alert.yml@main
22
+ with:
23
+ repo-name: sue445/activerecord-simple_index_name
24
+ secrets:
25
+ # TODO: Set secrets to Dependabot secrets
26
+ app-id: ${{ secrets.GH_APP_ID }}
27
+ private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
28
+ slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
@@ -1,59 +1,18 @@
1
- # Simple workflow for deploying static content to GitHub Pages
2
- name: Deploy static content to Pages
1
+ name: Deploy yard to Pages
3
2
 
4
3
  on:
5
- # Runs on pushes targeting the default branch
6
4
  push:
7
5
  branches:
8
6
  - master
9
-
10
- # Allows you to run this workflow manually from the Actions tab
11
7
  workflow_dispatch:
12
8
 
13
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14
9
  permissions:
15
10
  contents: read
16
11
  pages: write
17
12
  id-token: write
18
13
 
19
- # Allow one concurrent deployment
20
- concurrency:
21
- group: "pages"
22
- cancel-in-progress: true
23
-
24
14
  jobs:
25
- # Single deploy job since we're just deploying
26
15
  deploy:
27
- environment:
28
- name: github-pages
29
- url: ${{ steps.deployment.outputs.page_url }}
30
- runs-on: ubuntu-latest
31
- steps:
32
- - name: Checkout
33
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
34
-
35
- - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
36
- with:
37
- ruby-version: ruby
38
- bundler-cache: true
39
-
40
- - run: bundle exec yard
41
-
42
- - name: Setup Pages
43
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
44
- - name: Upload artifact
45
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
46
- with:
47
- # Upload entire repository
48
- path: './doc'
49
- - name: Deploy to GitHub Pages
50
- id: deployment
51
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
52
-
53
- - name: Slack Notification (not success)
54
- uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
55
- if: "! success()"
56
- continue-on-error: true
57
- with:
58
- status: ${{ job.status }}
59
- webhook-url: ${{ secrets.SLACK_WEBHOOK }}
16
+ uses: sue445/workflows/.github/workflows/pages-yard.yml@main
17
+ secrets:
18
+ slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
@@ -5,37 +5,10 @@ on:
5
5
 
6
6
  jobs:
7
7
  release:
8
- if: github.repository == 'sue445/activerecord-simple_index_name'
9
- runs-on: ubuntu-latest
10
-
11
- environment:
12
- name: rubygems.org
13
- url: https://rubygems.org/gems/activerecord-simple_index_name
14
-
8
+ uses: sue445/workflows/.github/workflows/release_gem.yml@main
9
+ with:
10
+ repo-name: sue445/activerecord-simple_index_name
11
+ gem-name: activerecord-simple_index_name
15
12
  permissions:
16
13
  contents: write
17
14
  id-token: write
18
-
19
- steps:
20
- - name: Harden Runner
21
- uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
22
- with:
23
- egress-policy: audit
24
-
25
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26
-
27
- - name: Set up Ruby
28
- uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
29
- with:
30
- bundler-cache: true
31
- ruby-version: ruby
32
-
33
- - name: Publish to RubyGems
34
- uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
35
-
36
- - name: Create GitHub release
37
- run: |
38
- tag_name="$(git describe --tags --abbrev=0)"
39
- gh release create "${tag_name}" --verify-tag --generate-notes
40
- env:
41
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -31,6 +31,7 @@ jobs:
31
31
  - "3.2"
32
32
  - "3.3"
33
33
  - "3.4"
34
+ - "4.0"
34
35
  gemfile:
35
36
  - rails_5_0
36
37
  - rails_5_1
@@ -147,61 +148,79 @@ jobs:
147
148
  gemfile: rails_5_1
148
149
  - ruby: "3.4"
149
150
  gemfile: rails_5_2
151
+ - ruby: "4.0"
152
+ gemfile: rails_5_0
153
+ - ruby: "4.0"
154
+ gemfile: rails_5_1
155
+ - ruby: "4.0"
156
+ gemfile: rails_5_2
150
157
 
151
158
  env:
152
159
  BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
153
160
 
154
161
  steps:
155
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
162
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
156
163
 
157
164
  - run: sudo apt-get update
158
165
  - run: sudo apt-get install -y libsqlite3-dev
159
166
 
160
- - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
167
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
161
168
  with:
162
169
  ruby-version: ${{ matrix.ruby }}
163
170
  bundler-cache: true
164
171
  cache-version: ${{ matrix.gemfile }}
165
172
 
166
- - run: bundle update --jobs $(nproc) --retry 3
173
+ - run: bundle update --all --jobs $(nproc) --retry 3
167
174
 
168
- - name: Setup Code Climate Test Reporter
169
- uses: aktions/codeclimate-test-reporter@7634aa9ac7883182f583f15ff7b6ff519939dd0a # v1.2.0
170
- with:
171
- codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
172
- command: before-build
175
+ - run: bundle exec rspec
176
+
177
+ - name: Slack Notification (not success)
178
+ uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
179
+ if: "! success()"
173
180
  continue-on-error: true
181
+ with:
182
+ status: ${{ job.status }}
183
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
184
+ matrix: ${{ toJson(matrix) }}
174
185
 
175
- - run: bundle exec rspec
186
+ yard:
187
+ runs-on: ubuntu-latest
188
+
189
+ steps:
190
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
176
191
 
177
- - name: Teardown Code Climate Test Reporter
178
- uses: aktions/codeclimate-test-reporter@7634aa9ac7883182f583f15ff7b6ff519939dd0a # v1.2.0
192
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
179
193
  with:
180
- codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
181
- command: after-build
182
- if: always()
183
- continue-on-error: true
194
+ ruby-version: ruby
195
+ bundler-cache: true
196
+
197
+ - run: bundle update --all --jobs $(nproc) --retry 3
198
+
199
+ - name: yard generating test
200
+ run: |
201
+ set -xe
202
+ bundle exec yard
203
+ ls -ld doc/
184
204
 
185
205
  - name: Slack Notification (not success)
186
- uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
206
+ uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
187
207
  if: "! success()"
188
208
  continue-on-error: true
189
209
  with:
190
210
  status: ${{ job.status }}
191
211
  webhook-url: ${{ secrets.SLACK_WEBHOOK }}
192
- matrix: ${{ toJson(matrix) }}
193
212
 
194
- notify:
213
+ all-pass:
214
+ if: always()
215
+
195
216
  needs:
196
217
  - test
218
+ - yard
197
219
 
198
- runs-on: ubuntu-latest
220
+ runs-on: ubuntu-slim
199
221
 
200
222
  steps:
201
- - name: Slack Notification (success)
202
- uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
203
- if: always()
204
- continue-on-error: true
223
+ - name: check dependent jobs
224
+ uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
205
225
  with:
206
- status: ${{ job.status }}
207
- webhook-url: ${{ secrets.SLACK_WEBHOOK }}
226
+ jobs: ${{ toJSON(needs) }}
data/CHANGELOG.md CHANGED
@@ -1,11 +1,26 @@
1
1
  # Change Log
2
2
 
3
3
  ## Unreleased
4
- [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.2...master)
4
+ [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.4...master)
5
+
6
+ ## [v1.1.4](https://github.com/sue445/activerecord-simple_index_name/releases/tag/v1.1.4)
7
+ [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.3...v1.1.4)
8
+
9
+ * Migrate release_gem workflow to sue445/workflows (Also testing the gem release)
10
+ * https://github.com/sue445/activerecord-simple_index_name/pull/155
11
+
12
+ ## [v1.1.3](https://github.com/sue445/activerecord-simple_index_name/releases/tag/v1.1.3)
13
+ [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.2...v1.1.3)
14
+
15
+ * Fix deprecation warning since activerecord 8.1
16
+ * https://github.com/sue445/activerecord-simple_index_name/pull/137
5
17
 
6
18
  ## [v1.1.2](https://github.com/sue445/activerecord-simple_index_name/releases/tag/v1.1.2)
7
19
  [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.1...v1.1.2)
8
20
 
21
+ * Release gem from GitHub Actions
22
+ * https://github.com/sue445/activerecord-simple_index_name/pull/114
23
+
9
24
  ## v1.1.1
10
25
  [full changelog](http://github.com/sue445/activerecord-simple_index_name/compare/v1.1.0...v1.1.1)
11
26
 
data/README.md CHANGED
@@ -5,7 +5,7 @@ Shorten index name
5
5
  [![Gem Version](https://badge.fury.io/rb/activerecord-simple_index_name.svg)](https://badge.fury.io/rb/activerecord-simple_index_name)
6
6
  [![test](https://github.com/sue445/activerecord-simple_index_name/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/activerecord-simple_index_name/actions/workflows/test.yml)
7
7
  [![Coverage Status](https://coveralls.io/repos/sue445/activerecord-simple_index_name/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/activerecord-simple_index_name?branch=master)
8
- [![Code Climate](https://codeclimate.com/github/sue445/activerecord-simple_index_name/badges/gpa.svg)](https://codeclimate.com/github/sue445/activerecord-simple_index_name)
8
+ [![Maintainability](https://qlty.sh/gh/sue445/projects/activerecord-simple_index_name/maintainability.svg)](https://qlty.sh/gh/sue445/projects/activerecord-simple_index_name)
9
9
 
10
10
  ## Requirements
11
11
  * Ruby 2.3+
@@ -7,3 +7,8 @@ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.7.0")
7
7
  # term-ansicolor 1.9.0+ doesn't work on Ruby < 2.7
8
8
  gem "term-ansicolor", "< 1.9.0"
9
9
  end
10
+
11
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2.0")
12
+ # NOTE: i18n 1.15.0+ requires Ruby 3.2+
13
+ gem "i18n", "< 1.15.0"
14
+ end
@@ -19,6 +19,9 @@ gem "bigdecimal"
19
19
  gem "drb"
20
20
  gem "mutex_m"
21
21
 
22
+ # for Ruby 4.0+
23
+ gem "benchmark"
24
+
22
25
  gemspec path: '../'
23
26
 
24
27
  eval_gemfile "./common.gemfile"
@@ -19,6 +19,9 @@ gem "bigdecimal"
19
19
  gem "drb"
20
20
  gem "mutex_m"
21
21
 
22
+ # for Ruby 4.0+
23
+ gem "benchmark"
24
+
22
25
  gemspec path: '../'
23
26
 
24
27
  eval_gemfile "./common.gemfile"
@@ -1,14 +1,20 @@
1
1
  module ActiveRecord
2
2
  module SimpleIndexName
3
- require "active_support/configurable"
4
-
5
3
  class Configuration
6
- include ActiveSupport::Configurable
4
+ if ActiveSupport.gem_version < Gem::Version.create("8.1.0")
5
+ require "active_support/configurable"
6
+
7
+ include ActiveSupport::Configurable
8
+
9
+ config_accessor :auto_shorten
7
10
 
8
- config_accessor :auto_shorten
11
+ configure do |config|
12
+ config.auto_shorten = true
13
+ end
14
+ else
15
+ require "active_support/core_ext/class/attribute"
9
16
 
10
- configure do |config|
11
- config.auto_shorten = true
17
+ class_attribute :auto_shorten, default: true
12
18
  end
13
19
  end
14
20
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module SimpleIndexName
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-simple_index_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
@@ -172,6 +172,8 @@ extra_rdoc_files: []
172
172
  files:
173
173
  - ".coveralls.yml"
174
174
  - ".github/dependabot.yml"
175
+ - ".github/release.yml"
176
+ - ".github/workflows/dependabot-manager.yml"
175
177
  - ".github/workflows/pages.yml"
176
178
  - ".github/workflows/release_gem.yml"
177
179
  - ".github/workflows/test.yml"
@@ -231,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
233
  - !ruby/object:Gem::Version
232
234
  version: '0'
233
235
  requirements: []
234
- rubygems_version: 3.6.7
236
+ rubygems_version: 4.0.16
235
237
  specification_version: 4
236
238
  summary: Shorten index name
237
239
  test_files: []