index_shotgun 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/pages.yml +66 -0
- data/.github/workflows/test.yml +254 -0
- data/.rubocop.yml +1 -1
- data/.yardopts +2 -0
- data/CHANGELOG.md +13 -1
- data/Gemfile +5 -1
- data/README.md +1 -2
- data/ci/build.sh +16 -3
- data/ci/database.yml.mysql +3 -1
- data/ci/database.yml.oracle +1 -1
- data/ci/database.yml.postgresql +3 -0
- data/ci/install.sh +50 -0
- data/gemfiles/activerecord_5_0.gemfile +6 -2
- data/gemfiles/activerecord_5_1.gemfile +6 -2
- data/gemfiles/activerecord_5_2.gemfile +6 -2
- data/gemfiles/activerecord_6_0.gemfile +27 -0
- data/gemfiles/activerecord_6_1.gemfile +27 -0
- data/gemfiles/activerecord_7_0.gemfile +29 -0
- data/gemfiles/activerecord_7_1.gemfile +28 -0
- data/gemfiles/common.gemfile +14 -2
- data/index_shotgun.gemspec +11 -6
- data/lib/index_shotgun/analyzer.rb +14 -3
- data/lib/index_shotgun/version.rb +1 -1
- metadata +38 -41
- data/.circleci/config.yml +0 -162
- data/.travis.yml +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1a2170564fedea98e55841bdf9c3c775e9d17f82829cd0a4f4e6e373152187ff
|
4
|
+
data.tar.gz: bd302f0a23894d679d67e0e32379f6a2a0631a69af57a5e5ae0ac2c04ad39edd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee13a990a519dee3c290e94782924c6d1a9eed815ebc7444867c82855e6e7600ae3ab844b882ce1149f6264ba6b122dadd5e9153e8c84dbe5dd761ddff7c9a12
|
7
|
+
data.tar.gz: d49b22e234b7b96d20b559872a43780359ae81241465871bd6a8205d58aeaa215c36097d28357fadfed5cbae19e40c887e3e9bd5207d717638a74bad5d5ae1a9
|
@@ -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,66 @@
|
|
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@v4
|
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: lazy-actions/slatify@master
|
59
|
+
if: "! success()"
|
60
|
+
continue-on-error: true
|
61
|
+
with:
|
62
|
+
job_name: "*pages*"
|
63
|
+
type: ${{ job.status }}
|
64
|
+
icon_emoji: ":octocat:"
|
65
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
66
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,254 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
paths-ignore:
|
8
|
+
- ".github/workflows/pages.yml"
|
9
|
+
pull_request:
|
10
|
+
types:
|
11
|
+
- opened
|
12
|
+
- synchronize
|
13
|
+
- reopened
|
14
|
+
paths-ignore:
|
15
|
+
- ".github/workflows/pages.yml"
|
16
|
+
schedule:
|
17
|
+
- cron: "0 20 * * 5" # JST 5:00 (Sat)
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
|
23
|
+
strategy:
|
24
|
+
fail-fast: false
|
25
|
+
|
26
|
+
matrix:
|
27
|
+
ruby:
|
28
|
+
- "2.4"
|
29
|
+
- "2.5"
|
30
|
+
- "2.6"
|
31
|
+
- "2.7"
|
32
|
+
- "3.0"
|
33
|
+
- "3.1"
|
34
|
+
- "3.2"
|
35
|
+
- "3.3"
|
36
|
+
gemfile:
|
37
|
+
- activerecord_5_0
|
38
|
+
- activerecord_5_1
|
39
|
+
- activerecord_5_2
|
40
|
+
- activerecord_6_0
|
41
|
+
- activerecord_6_1
|
42
|
+
- activerecord_7_0
|
43
|
+
- activerecord_7_1
|
44
|
+
database:
|
45
|
+
- sqlite3
|
46
|
+
- mysql
|
47
|
+
- postgresql
|
48
|
+
- oracle
|
49
|
+
exclude:
|
50
|
+
# Rails 7.0+ requires Ruby 2.7+
|
51
|
+
- ruby: "2.4"
|
52
|
+
gemfile: activerecord_7_0
|
53
|
+
- ruby: "2.5"
|
54
|
+
gemfile: activerecord_7_0
|
55
|
+
- ruby: "2.6"
|
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
|
63
|
+
|
64
|
+
# Rails 6.0+ requires Ruby 2.5+
|
65
|
+
- ruby: "2.4"
|
66
|
+
gemfile: activerecord_6_0
|
67
|
+
- ruby: "2.4"
|
68
|
+
gemfile: activerecord_6_1
|
69
|
+
|
70
|
+
# Rails 5.x doesn't works on Ruby 3.0+
|
71
|
+
- ruby: "3.0"
|
72
|
+
gemfile: activerecord_5_0
|
73
|
+
- ruby: "3.0"
|
74
|
+
gemfile: activerecord_5_1
|
75
|
+
- ruby: "3.0"
|
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
|
99
|
+
|
100
|
+
env:
|
101
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
102
|
+
DATABASE: ${{ matrix.database }}
|
103
|
+
|
104
|
+
# for oracle
|
105
|
+
LD_LIBRARY_PATH: /opt/oracle/instantclient_19_3
|
106
|
+
NLS_LANG: AMERICAN_AMERICA.UTF8
|
107
|
+
ORACLE_SYSTEM_PASSWORD: oracle
|
108
|
+
|
109
|
+
services:
|
110
|
+
mysql:
|
111
|
+
image: mysql:8
|
112
|
+
ports:
|
113
|
+
- 3306
|
114
|
+
env:
|
115
|
+
MYSQL_ROOT_PASSWORD: root
|
116
|
+
|
117
|
+
postgresql:
|
118
|
+
image: postgres:10-alpine
|
119
|
+
ports:
|
120
|
+
- 5432
|
121
|
+
env:
|
122
|
+
POSTGRES_USER: postgres
|
123
|
+
POSTGRES_PASSWORD: postgres
|
124
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
125
|
+
|
126
|
+
oracle:
|
127
|
+
image: deepdiver/docker-oracle-xe-11g
|
128
|
+
ports:
|
129
|
+
- 1521
|
130
|
+
env:
|
131
|
+
ORACLE_SYSTEM_PASSWORD: oracle
|
132
|
+
|
133
|
+
steps:
|
134
|
+
- uses: actions/checkout@v4
|
135
|
+
|
136
|
+
- uses: ruby/setup-ruby@v1
|
137
|
+
with:
|
138
|
+
ruby-version: ${{ matrix.ruby }}
|
139
|
+
|
140
|
+
- name: Cache vendor/bundle
|
141
|
+
uses: actions/cache@v3
|
142
|
+
id: cache_gem
|
143
|
+
with:
|
144
|
+
path: vendor/bundle
|
145
|
+
key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ env.DATABASE }}-${{ github.sha }}
|
146
|
+
restore-keys: |
|
147
|
+
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ env.DATABASE }}-
|
148
|
+
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.gemfile }}-
|
149
|
+
|
150
|
+
- name: Install
|
151
|
+
run: |
|
152
|
+
set -xe
|
153
|
+
./ci/install.sh
|
154
|
+
|
155
|
+
- name: Setup Code Climate Test Reporter
|
156
|
+
uses: aktions/codeclimate-test-reporter@v1
|
157
|
+
with:
|
158
|
+
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
159
|
+
command: before-build
|
160
|
+
continue-on-error: true
|
161
|
+
|
162
|
+
# c.f. https://github.com/actions/virtual-environments/issues/4732#issuecomment-992614476
|
163
|
+
- run: sudo systemctl start mysql
|
164
|
+
|
165
|
+
- name: Run test
|
166
|
+
run: |
|
167
|
+
set -xe
|
168
|
+
./ci/build.sh
|
169
|
+
env:
|
170
|
+
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
|
171
|
+
POSTGRESQL_PORT: ${{ job.services.postgresql.ports['5432'] }}
|
172
|
+
ORACLE_PORT: ${{ job.services.oracle.ports['1521'] }}
|
173
|
+
|
174
|
+
- name: Teardown Code Climate Test Reporter
|
175
|
+
uses: aktions/codeclimate-test-reporter@v1
|
176
|
+
with:
|
177
|
+
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
178
|
+
command: after-build
|
179
|
+
if: always()
|
180
|
+
continue-on-error: true
|
181
|
+
|
182
|
+
- name: Slack Notification (not success)
|
183
|
+
uses: lazy-actions/slatify@master
|
184
|
+
if: "! success()"
|
185
|
+
continue-on-error: true
|
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 }}
|
192
|
+
|
193
|
+
rubocop:
|
194
|
+
runs-on: ubuntu-latest
|
195
|
+
|
196
|
+
env:
|
197
|
+
RUBY_VERSION: 2.4
|
198
|
+
BUNDLE_WITHOUT: mysql postgresql sqlite3 oracle
|
199
|
+
|
200
|
+
steps:
|
201
|
+
- uses: actions/checkout@v4
|
202
|
+
|
203
|
+
- uses: ruby/setup-ruby@v1
|
204
|
+
with:
|
205
|
+
ruby-version: ${{ env.RUBY_VERSION }}
|
206
|
+
|
207
|
+
- name: Cache vendor/bundle
|
208
|
+
uses: actions/cache@v3
|
209
|
+
id: cache_gem_rubocop
|
210
|
+
with:
|
211
|
+
path: vendor/bundle
|
212
|
+
key: v1-gem-rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ github.sha }}
|
213
|
+
restore-keys: |
|
214
|
+
v1-gem-rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-
|
215
|
+
|
216
|
+
- name: Install
|
217
|
+
run: |
|
218
|
+
set -xe
|
219
|
+
./ci/install.sh
|
220
|
+
|
221
|
+
- name: Run rubocop
|
222
|
+
run: |
|
223
|
+
set -xe
|
224
|
+
bundle exec rubocop
|
225
|
+
|
226
|
+
- name: Slack Notification (not success)
|
227
|
+
uses: lazy-actions/slatify@master
|
228
|
+
if: "! success()"
|
229
|
+
continue-on-error: true
|
230
|
+
with:
|
231
|
+
job_name: '*rubocop*'
|
232
|
+
type: ${{ job.status }}
|
233
|
+
icon_emoji: ":octocat:"
|
234
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
235
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
236
|
+
|
237
|
+
notify:
|
238
|
+
needs:
|
239
|
+
- test
|
240
|
+
- rubocop
|
241
|
+
|
242
|
+
runs-on: ubuntu-latest
|
243
|
+
|
244
|
+
steps:
|
245
|
+
- name: Slack Notification (success)
|
246
|
+
uses: lazy-actions/slatify@master
|
247
|
+
if: always()
|
248
|
+
continue-on-error: true
|
249
|
+
with:
|
250
|
+
job_name: '*build*'
|
251
|
+
type: ${{ job.status }}
|
252
|
+
icon_emoji: ":octocat:"
|
253
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
254
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.rubocop.yml
CHANGED
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.2...master)
|
4
|
+
|
5
|
+
## [v1.0.2](https://github.com/sue445/index_shotgun/tree/v1.0.2) (2023/12/28)
|
6
|
+
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.1...v1.0.2)
|
7
|
+
|
8
|
+
* Fixed deprecation warning in activesupport 7.1
|
9
|
+
* https://github.com/sue445/index_shotgun/pull/134
|
10
|
+
|
11
|
+
## [v1.0.1](https://github.com/sue445/index_shotgun/tree/v1.0.1) (2021/11/20)
|
12
|
+
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v1.0.0...v1.0.1)
|
13
|
+
|
14
|
+
* Enable MFA requirement for gem releasing
|
15
|
+
* https://github.com/sue445/index_shotgun/pull/111
|
4
16
|
|
5
17
|
## [v1.0.0](https://github.com/sue445/index_shotgun/tree/v1.0.0) (2019/01/06)
|
6
18
|
[Full Changelog](https://github.com/sue445/index_shotgun/compare/v0.3.0...v1.0.0)
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# IndexShotgun :fire: :gun: :cop:
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/index_shotgun.svg)](http://badge.fury.io/rb/index_shotgun)
|
3
|
-
[![Build Status](https://
|
4
|
-
[![CircleCI](https://circleci.com/gh/sue445/index_shotgun/tree/master.svg?style=svg)](https://circleci.com/gh/sue445/index_shotgun/tree/master)
|
3
|
+
[![Build Status](https://github.com/sue445/index_shotgun/workflows/test/badge.svg?branch=master)](https://github.com/sue445/index_shotgun/actions?query=workflow%3Atest)
|
5
4
|
[![Code Climate](https://codeclimate.com/github/sue445/index_shotgun/badges/gpa.svg)](https://codeclimate.com/github/sue445/index_shotgun)
|
6
5
|
[![Coverage Status](https://coveralls.io/repos/sue445/index_shotgun/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/index_shotgun?branch=master)
|
7
6
|
|
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
|
|
@@ -9,16 +22,16 @@ bundle exec ./exe/index_shotgun version
|
|
9
22
|
set +e
|
10
23
|
|
11
24
|
if [ ${DATABASE} = "mysql" ]; then
|
12
|
-
bundle exec ./exe/index_shotgun mysql --database=index_shotgun_test --username=
|
25
|
+
bundle exec ./exe/index_shotgun mysql --database=index_shotgun_test --username=root --password=root --port=$MYSQL_PORT
|
13
26
|
RET=$?
|
14
27
|
elif [ ${DATABASE} = "postgresql" ]; then
|
15
|
-
bundle exec ./exe/index_shotgun postgresql --database=index_shotgun_test --username=postgres
|
28
|
+
bundle exec ./exe/index_shotgun postgresql --database=index_shotgun_test --username=postgres --password=postgres --port=$POSTGRESQL_PORT
|
16
29
|
RET=$?
|
17
30
|
elif [ ${DATABASE} = "sqlite3" ]; then
|
18
31
|
bundle exec ./exe/index_shotgun sqlite3 --database=spec/db/index_shotgun_test.db
|
19
32
|
RET=$?
|
20
33
|
elif [ ${DATABASE} = "oracle" ]; then
|
21
|
-
bundle exec ./exe/index_shotgun oracle --database=xe --username=system --password=oracle
|
34
|
+
bundle exec ./exe/index_shotgun oracle --database=xe --username=system --password=oracle --port=$ORACLE_PORT
|
22
35
|
RET=$?
|
23
36
|
fi
|
24
37
|
|
data/ci/database.yml.mysql
CHANGED
data/ci/database.yml.oracle
CHANGED
data/ci/database.yml.postgresql
CHANGED
data/ci/install.sh
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/bin/bash -xe
|
2
|
+
|
3
|
+
gem update --system --quiet || true
|
4
|
+
|
5
|
+
gem --version
|
6
|
+
bundle --version
|
7
|
+
|
8
|
+
if [ "${DATABASE}" = "mysql" ]; then
|
9
|
+
sudo apt-get update
|
10
|
+
sudo apt-get install -y libmysqlclient-dev
|
11
|
+
|
12
|
+
export BUNDLE_WITHOUT="postgresql sqlite3 oracle"
|
13
|
+
|
14
|
+
elif [ "${DATABASE}" = "postgresql" ]; then
|
15
|
+
sudo apt-get update
|
16
|
+
sudo apt-get install -y libpq-dev
|
17
|
+
|
18
|
+
export BUNDLE_WITHOUT="mysql sqlite3 oracle"
|
19
|
+
|
20
|
+
elif [ "${DATABASE}" = "sqlite3" ]; then
|
21
|
+
sudo apt-get update
|
22
|
+
sudo apt-get install -y libsqlite3-dev
|
23
|
+
|
24
|
+
export BUNDLE_WITHOUT="mysql postgresql oracle"
|
25
|
+
|
26
|
+
elif [ "${DATABASE}" = "oracle" ]; then
|
27
|
+
# c.f. https://github.com/kubo/ruby-oci8/blob/ruby-oci8-2.2.7/docs/install-instant-client.md#install-oracle-instant-client-packages
|
28
|
+
mkdir -p /opt/oracle
|
29
|
+
pushd /opt/oracle
|
30
|
+
|
31
|
+
wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basiclite-linux.x64-19.3.0.0.0dbru.zip
|
32
|
+
wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip
|
33
|
+
|
34
|
+
unzip instantclient-basiclite-linux.x64-19.3.0.0.0dbru.zip
|
35
|
+
unzip instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip
|
36
|
+
|
37
|
+
sudo apt-get update
|
38
|
+
sudo apt-get install -y libaio1
|
39
|
+
|
40
|
+
popd
|
41
|
+
|
42
|
+
export BUNDLE_WITHOUT="mysql postgresql sqlite3"
|
43
|
+
|
44
|
+
else
|
45
|
+
export BUNDLE_WITHOUT="mysql postgresql sqlite3 oracle"
|
46
|
+
|
47
|
+
fi
|
48
|
+
|
49
|
+
bundle config set --local path "vendor/bundle/"
|
50
|
+
bundle update --jobs $(nproc) --retry 3
|
@@ -0,0 +1,27 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "activerecord", "~> 6.0.0"
|
4
|
+
|
5
|
+
group :postgresql do
|
6
|
+
# c.f. https://github.com/rails/rails/blob/v6.0.0.rc1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L4
|
7
|
+
gem "pg", ">= 0.18", "< 2.0"
|
8
|
+
end
|
9
|
+
|
10
|
+
group :mysql do
|
11
|
+
# c.f. https://github.com/rails/rails/blob/v6.0.0.rc1/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6
|
12
|
+
gem "mysql2", ">= 0.4.4"
|
13
|
+
end
|
14
|
+
|
15
|
+
group :oracle do
|
16
|
+
gem "activerecord-oracle_enhanced-adapter", "~> 6.0.0"
|
17
|
+
gem "ruby-oci8"
|
18
|
+
end
|
19
|
+
|
20
|
+
group :sqlite3 do
|
21
|
+
# c.f. https://github.com/rails/rails/blob/v6.0.0.rc1/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13
|
22
|
+
gem "sqlite3", "~> 1.4"
|
23
|
+
end
|
24
|
+
|
25
|
+
eval_gemfile "#{__dir__}/common.gemfile"
|
26
|
+
|
27
|
+
gemspec path: "../"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "activerecord", "~> 6.1.0"
|
4
|
+
|
5
|
+
group :postgresql do
|
6
|
+
# c.f. https://github.com/rails/rails/blob/v6.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/v6.1.0/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6
|
12
|
+
gem "mysql2", "~> 0.5"
|
13
|
+
end
|
14
|
+
|
15
|
+
group :oracle do
|
16
|
+
gem "activerecord-oracle_enhanced-adapter", "~> 6.1.2"
|
17
|
+
gem "ruby-oci8"
|
18
|
+
end
|
19
|
+
|
20
|
+
group :sqlite3 do
|
21
|
+
# c.f. https://github.com/rails/rails/blob/v6.1.0/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13
|
22
|
+
gem "sqlite3", "~> 1.4"
|
23
|
+
end
|
24
|
+
|
25
|
+
eval_gemfile "#{__dir__}/common.gemfile"
|
26
|
+
|
27
|
+
gemspec path: "../"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
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"
|
6
|
+
|
7
|
+
group :postgresql do
|
8
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L3
|
9
|
+
gem "pg", "~> 1.1"
|
10
|
+
end
|
11
|
+
|
12
|
+
group :mysql do
|
13
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6
|
14
|
+
gem "mysql2", "~> 0.5"
|
15
|
+
end
|
16
|
+
|
17
|
+
group :oracle do
|
18
|
+
gem "activerecord-oracle_enhanced-adapter", "~> 7.0.0"
|
19
|
+
gem "ruby-oci8"
|
20
|
+
end
|
21
|
+
|
22
|
+
group :sqlite3 do
|
23
|
+
# c.f. https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13
|
24
|
+
gem "sqlite3", "~> 1.4"
|
25
|
+
end
|
26
|
+
|
27
|
+
eval_gemfile "#{__dir__}/common.gemfile"
|
28
|
+
|
29
|
+
gemspec path: "../"
|
@@ -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
@@ -1,3 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.4.0")
|
2
|
+
# byebug v11.1.0+ requires Ruby 2.4.0+
|
3
|
+
gem "byebug", "< 11.1.0"
|
4
|
+
|
5
|
+
# simplecov-html v0.12.3+ requires Ruby 2.4.0+
|
6
|
+
gem "simplecov-html", "< 0.12.3"
|
7
|
+
|
8
|
+
# parallel v1.20.0 requires Ruby 2.5.0+ and parallel v1.20.1+ requires Ruby 2.4.0+
|
9
|
+
gem "parallel", "< 1.20.0"
|
10
|
+
end
|
11
|
+
|
12
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.4.4")
|
13
|
+
# zeitwerk requires Ruby 2.4.4+
|
14
|
+
gem "activesupport", "< 6.0.0"
|
3
15
|
end
|
data/index_shotgun.gemspec
CHANGED
@@ -13,7 +13,13 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/sue445/index_shotgun"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
19
|
+
spec.metadata["documentation_uri"] = "https://sue445.github.io/index_shotgun/"
|
20
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
21
|
+
|
22
|
+
spec.required_ruby_version = ">= 2.4.0"
|
17
23
|
|
18
24
|
spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
|
19
25
|
spec.bindir = "exe"
|
@@ -24,15 +30,14 @@ Gem::Specification.new do |spec|
|
|
24
30
|
spec.add_dependency "thor"
|
25
31
|
|
26
32
|
spec.add_development_dependency "bundler"
|
27
|
-
spec.add_development_dependency "
|
33
|
+
spec.add_development_dependency "coveralls_reborn"
|
28
34
|
spec.add_development_dependency "onkcop", "0.53.0.2"
|
29
|
-
spec.add_development_dependency "
|
30
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rake"
|
31
36
|
spec.add_development_dependency "rake_shared_context", "0.2.2"
|
32
37
|
spec.add_development_dependency "rspec"
|
33
38
|
spec.add_development_dependency "rspec-its"
|
34
|
-
spec.add_development_dependency "rspec-power_assert"
|
35
39
|
spec.add_development_dependency "rubocop", "0.62.0"
|
36
40
|
spec.add_development_dependency "rubocop_auto_corrector"
|
37
|
-
spec.add_development_dependency "simplecov"
|
41
|
+
spec.add_development_dependency "simplecov", "< 0.18.0"
|
42
|
+
spec.add_development_dependency "yard"
|
38
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)
|
@@ -94,7 +94,6 @@ module IndexShotgun
|
|
94
94
|
|
95
95
|
# get indexes of table
|
96
96
|
# @param table [String]
|
97
|
-
# @see [ActiveRecord::ConnectionAdapters::TableDefinition#indexes]
|
98
97
|
def table_indexes(table)
|
99
98
|
ActiveRecord::Base.connection.indexes(table)
|
100
99
|
end
|
@@ -288,6 +287,18 @@ module IndexShotgun
|
|
288
287
|
@exclude_tables = tables.map(&:downcase)
|
289
288
|
@exclude_tables
|
290
289
|
end
|
290
|
+
|
291
|
+
def silence_deprecations
|
292
|
+
if ActiveSupport.version >= Gem::Version.create("7.1.0")
|
293
|
+
ActiveSupport::Deprecation::Deprecators.new.silence do
|
294
|
+
yield
|
295
|
+
end
|
296
|
+
else
|
297
|
+
ActiveSupport::Deprecation.silence do
|
298
|
+
yield
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
291
302
|
end
|
292
303
|
end
|
293
304
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-28 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
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.53.0.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '10.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '10.0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: rake_shared_context
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,20 +136,6 @@ dependencies:
|
|
150
136
|
- - ">="
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rspec-power_assert
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
139
|
- !ruby/object:Gem::Dependency
|
168
140
|
name: rubocop
|
169
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,6 +166,20 @@ dependencies:
|
|
194
166
|
version: '0'
|
195
167
|
- !ruby/object:Gem::Dependency
|
196
168
|
name: simplecov
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "<"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.18.0
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "<"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.18.0
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: yard
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
198
184
|
requirements:
|
199
185
|
- - ">="
|
@@ -214,13 +200,15 @@ executables:
|
|
214
200
|
extensions: []
|
215
201
|
extra_rdoc_files: []
|
216
202
|
files:
|
217
|
-
- ".circleci/config.yml"
|
218
203
|
- ".coveralls.yml"
|
204
|
+
- ".github/dependabot.yml"
|
205
|
+
- ".github/workflows/pages.yml"
|
206
|
+
- ".github/workflows/test.yml"
|
219
207
|
- ".github_changelog_generator"
|
220
208
|
- ".gitignore"
|
221
209
|
- ".rspec"
|
222
210
|
- ".rubocop.yml"
|
223
|
-
- ".
|
211
|
+
- ".yardopts"
|
224
212
|
- CHANGELOG.md
|
225
213
|
- Gemfile
|
226
214
|
- LICENSE.txt
|
@@ -233,10 +221,15 @@ files:
|
|
233
221
|
- ci/database.yml.oracle
|
234
222
|
- ci/database.yml.postgresql
|
235
223
|
- ci/database.yml.sqlite3
|
224
|
+
- ci/install.sh
|
236
225
|
- exe/index_shotgun
|
237
226
|
- gemfiles/activerecord_5_0.gemfile
|
238
227
|
- gemfiles/activerecord_5_1.gemfile
|
239
228
|
- gemfiles/activerecord_5_2.gemfile
|
229
|
+
- gemfiles/activerecord_6_0.gemfile
|
230
|
+
- gemfiles/activerecord_6_1.gemfile
|
231
|
+
- gemfiles/activerecord_7_0.gemfile
|
232
|
+
- gemfiles/activerecord_7_1.gemfile
|
240
233
|
- gemfiles/common.gemfile
|
241
234
|
- index_shotgun.gemspec
|
242
235
|
- lib/index_shotgun.rb
|
@@ -250,8 +243,13 @@ files:
|
|
250
243
|
homepage: https://github.com/sue445/index_shotgun
|
251
244
|
licenses:
|
252
245
|
- MIT
|
253
|
-
metadata:
|
254
|
-
|
246
|
+
metadata:
|
247
|
+
homepage_uri: https://github.com/sue445/index_shotgun
|
248
|
+
source_code_uri: https://github.com/sue445/index_shotgun
|
249
|
+
changelog_uri: https://github.com/sue445/index_shotgun/blob/master/CHANGELOG.md
|
250
|
+
documentation_uri: https://sue445.github.io/index_shotgun/
|
251
|
+
rubygems_mfa_required: 'true'
|
252
|
+
post_install_message:
|
255
253
|
rdoc_options: []
|
256
254
|
require_paths:
|
257
255
|
- lib
|
@@ -259,16 +257,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
257
|
requirements:
|
260
258
|
- - ">="
|
261
259
|
- !ruby/object:Gem::Version
|
262
|
-
version: 2.
|
260
|
+
version: 2.4.0
|
263
261
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
262
|
requirements:
|
265
263
|
- - ">="
|
266
264
|
- !ruby/object:Gem::Version
|
267
265
|
version: '0'
|
268
266
|
requirements: []
|
269
|
-
|
270
|
-
|
271
|
-
signing_key:
|
267
|
+
rubygems_version: 3.5.3
|
268
|
+
signing_key:
|
272
269
|
specification_version: 4
|
273
270
|
summary: duplicate index checker
|
274
271
|
test_files: []
|
data/.circleci/config.yml
DELETED
@@ -1,162 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
environment: &environment
|
4
|
-
LANG: en_US.UTF-8
|
5
|
-
LANGUAGE: en_US.UTF-8
|
6
|
-
LC_ALL: C.UTF-8
|
7
|
-
|
8
|
-
BUNDLE_PATH: vendor/bundle
|
9
|
-
CC_TEST_REPORTER_ID: 377596024a4c6f3c4c4b9a0cd16add92fb5e7f716663629b5efd080377c0b838
|
10
|
-
|
11
|
-
executors:
|
12
|
-
ruby:
|
13
|
-
docker:
|
14
|
-
- image: circleci/ruby
|
15
|
-
environment:
|
16
|
-
<<: *environment
|
17
|
-
|
18
|
-
working_directory: /home/circleci/app
|
19
|
-
|
20
|
-
oracle:
|
21
|
-
docker:
|
22
|
-
- image: wnameless/oracle-xe-11g:16.04
|
23
|
-
environment:
|
24
|
-
<<: *environment
|
25
|
-
DATABASE: oracle
|
26
|
-
|
27
|
-
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe
|
28
|
-
ORACLE_SID: XE
|
29
|
-
ORACLE_SYSTEM_PASSWORD: oracle
|
30
|
-
NLS_LANG: AMERICAN_AMERICA.UTF8
|
31
|
-
|
32
|
-
working_directory: /home/circleci/app
|
33
|
-
|
34
|
-
commands:
|
35
|
-
setup_bundle:
|
36
|
-
description: "Setup bundle with cache"
|
37
|
-
|
38
|
-
parameters:
|
39
|
-
bundle_without:
|
40
|
-
type: string
|
41
|
-
|
42
|
-
steps:
|
43
|
-
- restore_cache:
|
44
|
-
keys:
|
45
|
-
- v3-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
|
46
|
-
- v3-bundle-{{ .Environment.CIRCLE_JOB }}
|
47
|
-
|
48
|
-
- run:
|
49
|
-
name: Setup bundle
|
50
|
-
command: |
|
51
|
-
set -xe
|
52
|
-
ruby --version
|
53
|
-
bundle --version
|
54
|
-
gem --version
|
55
|
-
|
56
|
-
bundle check || bundle install --jobs=4 --without << parameters.bundle_without >> --path=${BUNDLE_PATH:-vendor/bundle}
|
57
|
-
bundle clean
|
58
|
-
|
59
|
-
- save_cache:
|
60
|
-
key: v3-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
|
61
|
-
paths:
|
62
|
-
- /home/circleci/app/vendor/bundle
|
63
|
-
- /home/circleci/app/gemfiles/vendor/bundle
|
64
|
-
- /home/circleci/app/Gemfile.lock
|
65
|
-
|
66
|
-
with-cc-test-reporter:
|
67
|
-
description: "Run test with cc-test-reporter"
|
68
|
-
parameters:
|
69
|
-
steps:
|
70
|
-
type: steps
|
71
|
-
default: []
|
72
|
-
description: "Run steps between `before-build` and `after-build`"
|
73
|
-
steps:
|
74
|
-
- run:
|
75
|
-
name: Setup Code Climate test-reporter
|
76
|
-
command: |
|
77
|
-
# download test reporter as a static binary
|
78
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
79
|
-
chmod +x ./cc-test-reporter
|
80
|
-
- run: ./cc-test-reporter before-build
|
81
|
-
- steps: << parameters.steps >>
|
82
|
-
- run:
|
83
|
-
command: ./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
84
|
-
when: always
|
85
|
-
|
86
|
-
jobs:
|
87
|
-
oracle_activerecord:
|
88
|
-
parameters:
|
89
|
-
gemfile:
|
90
|
-
type: string
|
91
|
-
executor:
|
92
|
-
name: oracle
|
93
|
-
environment:
|
94
|
-
BUNDLE_GEMFILE: gemfiles/<< parameters.gemfile >>.gemfile
|
95
|
-
steps:
|
96
|
-
- run:
|
97
|
-
name: Setup ruby
|
98
|
-
command: |
|
99
|
-
apt-get update
|
100
|
-
apt-get install -y software-properties-common
|
101
|
-
apt-add-repository -y ppa:brightbox/ruby-ng
|
102
|
-
apt-get update
|
103
|
-
apt-get install -y ruby2.5 ruby2.5-dev git build-essential tar curl
|
104
|
-
|
105
|
-
gem update --system --no-document
|
106
|
-
gem install bundler --no-document
|
107
|
-
shell: /bin/bash -xe
|
108
|
-
|
109
|
-
- run:
|
110
|
-
name: Setup oracle
|
111
|
-
command: |
|
112
|
-
export PATH=$ORACLE_HOME/bin:$PATH
|
113
|
-
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
|
114
|
-
/usr/sbin/startup.sh
|
115
|
-
/etc/init.d/oracle-xe status
|
116
|
-
shell: /bin/bash -xe
|
117
|
-
|
118
|
-
- checkout
|
119
|
-
- setup_bundle:
|
120
|
-
bundle_without: mysql postgresql sqlite3
|
121
|
-
|
122
|
-
- with-cc-test-reporter:
|
123
|
-
steps:
|
124
|
-
- run: ./ci/build.sh
|
125
|
-
|
126
|
-
rubocop:
|
127
|
-
executor:
|
128
|
-
name: ruby
|
129
|
-
|
130
|
-
steps:
|
131
|
-
- checkout
|
132
|
-
- setup_bundle:
|
133
|
-
bundle_without: mysql postgresql sqlite3 oracle
|
134
|
-
|
135
|
-
- run: bundle exec rubocop
|
136
|
-
|
137
|
-
build_jobs: &build_jobs
|
138
|
-
- oracle_activerecord:
|
139
|
-
name: "oracle_activerecord:5.0"
|
140
|
-
gemfile: "activerecord_5_0"
|
141
|
-
- oracle_activerecord:
|
142
|
-
name: "oracle_activerecord:5.1"
|
143
|
-
gemfile: "activerecord_5_1"
|
144
|
-
- oracle_activerecord:
|
145
|
-
name: "oracle_activerecord:5.2"
|
146
|
-
gemfile: "activerecord_5_2"
|
147
|
-
- rubocop
|
148
|
-
|
149
|
-
workflows:
|
150
|
-
version: 2
|
151
|
-
|
152
|
-
build:
|
153
|
-
jobs: *build_jobs
|
154
|
-
|
155
|
-
weekly_build:
|
156
|
-
triggers:
|
157
|
-
- schedule:
|
158
|
-
cron: "00 19 * * 5" # JST 4:00 (Sat)
|
159
|
-
filters:
|
160
|
-
branches:
|
161
|
-
only: master
|
162
|
-
jobs: *build_jobs
|
data/.travis.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.3
|
4
|
-
- 2.4
|
5
|
-
- 2.5
|
6
|
-
- 2.6
|
7
|
-
- ruby-head
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/activerecord_5_0.gemfile
|
10
|
-
- gemfiles/activerecord_5_1.gemfile
|
11
|
-
- gemfiles/activerecord_5_2.gemfile
|
12
|
-
env:
|
13
|
-
- DATABASE=mysql
|
14
|
-
- DATABASE=postgresql
|
15
|
-
- DATABASE=sqlite3
|
16
|
-
bundler_args: --without oracle
|
17
|
-
before_install:
|
18
|
-
- travis_retry gem update --system || travis_retry gem update --system 2.7.8
|
19
|
-
- travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3
|
20
|
-
before_script:
|
21
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
22
|
-
- chmod +x ./cc-test-reporter
|
23
|
-
- ./cc-test-reporter before-build
|
24
|
-
- export CC_TEST_REPORTER_ID=377596024a4c6f3c4c4b9a0cd16add92fb5e7f716663629b5efd080377c0b838
|
25
|
-
script: "./ci/build.sh"
|
26
|
-
after_script:
|
27
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
28
|
-
branches:
|
29
|
-
only:
|
30
|
-
- master
|
31
|
-
notifications:
|
32
|
-
email: false
|
33
|
-
slack:
|
34
|
-
secure: YGQKOd0oz96gfQtyfTLj7N2Riq93oj1lR9X5hf4071Zu9q3wQjLD4a5y39iVAtOpK2Lw3ShM93kcGREZfpThx9jQ0jUd26DWLLFokZvM82l5+hD7PMhLU1Pv/EbW7mTGAw1TR0su98m91A71qJghdZsT/UrP+QN/4zV72I8XiYrkAiKaTLaucEN4Pn2GgSAGV4Hs7eqT7jNBkGbxSOio3MttoYMDz7dBfR3Z8GRk7jSL5z820zejHNPbfbpwZQhtx/rY/KGSHoIRDc7je6Aiebd5wElQFKsh13LFYSbGaYvB2gRdU/ZmyG0YLV+0hUvWYS14QvCUFrCbiKmRf58tTk3Y/FVtBga+Aj11JrAgpvR9qf2y+gC3BwBwBwaElZ2gMmfZOzXPI7P+OATKbVCQOE4PCAIUkfBbaYkg6FJlYwaume5n+ObLhZPZwa8EGaOkrzonKRhU7hMBT6A+aQkwz0wfccErEog8vB/5OYSMquxZtfWywLgUpnyg97SYeC8aaON+/U8edWsYUR+0bBIySNYEAq0algQEo52cLh4qNpLJeb/zRdFX2b+CI1EYPa+rDSygD7NpT+mx5/5leAcxyvp4S3iKxjFEVkoKwIEoLnqbqjarwz2LjJ+l32wZDhmBV5UggpKoieV5KtpkIwOCJ4g6t+aq786oSW+/GWWI9s0=
|
35
|
-
matrix:
|
36
|
-
allow_failures:
|
37
|
-
- rvm: ruby-head
|
38
|
-
cache: bundler
|
39
|
-
sudo: false
|