arel_toolkit 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/coverage.yml +48 -0
- data/.github/workflows/test.yml +65 -0
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +20 -21
- data/README.md +14 -3
- data/gemfiles/active_record_6.gemfile.lock +2 -2
- data/gemfiles/arel_gems.gemfile.lock +2 -2
- data/gemfiles/default.gemfile.lock +2 -2
- data/lib/arel_toolkit/version.rb +1 -1
- metadata +4 -4
- data/.github/workflows/develop.yml +0 -90
- data/.github/workflows/master.yml +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ec4e730f2f7355ee2fa0b302a9f049862f7237c1f3e6bf8f228b8f9223ed312
|
4
|
+
data.tar.gz: c7ef39a83b86e5d888207ed2583df85fa66e85a9e9e1ac20f3639bd1920e2476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b78ae6d01c41b79cd9ea626e30a0f569a2f5830b3dec2871ee97bc5d8e77dd9b9fc11d510fe9154a6046a105c7d8fb735d1d5e0b238c38b2238acc3242b168
|
7
|
+
data.tar.gz: '09b54ca9ad02dba0d6b883322fb5c574f7bf2af1de111531e64b34d87329a5d2094760da3370977cafbebf7d55d83e5c9729c5d5131078acab29b4fece6c0878'
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Coverage
|
2
|
+
on:
|
3
|
+
workflow_run:
|
4
|
+
workflows: ["Test"]
|
5
|
+
types:
|
6
|
+
- completed
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
upload_coverage:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
with:
|
15
|
+
ref: ${{ github.event.workflow_run.head_sha }}
|
16
|
+
- env:
|
17
|
+
GITHUB: ${{ toJson(github) }}
|
18
|
+
run: |
|
19
|
+
env
|
20
|
+
- name: Download coverage
|
21
|
+
uses: dawidd6/action-download-artifact@v2
|
22
|
+
with:
|
23
|
+
workflow: test.yml
|
24
|
+
commit: ${{ github.event.workflow_run.head_sha }}
|
25
|
+
run_id: ${{ github.event.workflow_run.id }}
|
26
|
+
run_number: ${{ github.event.workflow_run.run_number }}
|
27
|
+
name: rspec-coverage
|
28
|
+
path: ./coverage
|
29
|
+
- name: Report to codeclimate
|
30
|
+
if: always()
|
31
|
+
shell: bash
|
32
|
+
env:
|
33
|
+
JOB_STATUS: ${{ job.status == 'Success' }}
|
34
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
35
|
+
GIT_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
36
|
+
GIT_COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
|
37
|
+
run: |
|
38
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
39
|
+
chmod +x ./cc-test-reporter
|
40
|
+
EXIT_CODE=$([[ "$JOB_STATUS" == true ]] && echo 0 || echo 1)
|
41
|
+
./cc-test-reporter after-build --exit-code $EXIT_CODE
|
42
|
+
|
43
|
+
- name: Upload coverage to GitHub pages
|
44
|
+
if: ${{ github.event.workflow_run.head_branch == 'master' }}
|
45
|
+
uses: maxheld83/ghpages@v0.2.1
|
46
|
+
env:
|
47
|
+
BUILD_DIR: ./coverage
|
48
|
+
GH_PAT: ${{ secrets.GH_PAT }}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
rspec:
|
10
|
+
name: RSpec
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
services:
|
13
|
+
postgres:
|
14
|
+
options: >-
|
15
|
+
--health-cmd pg_isready
|
16
|
+
--health-interval 10s
|
17
|
+
--health-timeout 5s
|
18
|
+
--health-retries 5
|
19
|
+
image: postgres:10.10
|
20
|
+
ports:
|
21
|
+
- 5432:5432
|
22
|
+
env:
|
23
|
+
POSTGRES_DB: arel_toolkit_test
|
24
|
+
POSTGRES_USER: postgres
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v2
|
27
|
+
|
28
|
+
# Based on https://github.com/paambaati/codeclimate-action/blob/0f8af43fca84b500025ca48b581bcff933244252/src/main.ts#L39-L57
|
29
|
+
- name: Set env for push event
|
30
|
+
run: |
|
31
|
+
GIT_BRANCH=$(echo "${{ github.ref }}" | sed 's/refs\/heads\///g')
|
32
|
+
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
|
33
|
+
echo "GIT_COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV
|
34
|
+
if: ${{ github.event_name == 'push' }}
|
35
|
+
- name: Set env for pull_request event
|
36
|
+
run: |
|
37
|
+
echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
38
|
+
echo "GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
|
39
|
+
if: ${{ github.event_name == 'pull_request' }}
|
40
|
+
|
41
|
+
# From https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#contexts
|
42
|
+
- env:
|
43
|
+
GITHUB: ${{ toJson(github) }}
|
44
|
+
run: |
|
45
|
+
env
|
46
|
+
- uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
bundler-cache: true
|
49
|
+
- run: bundle exec appraisal install
|
50
|
+
- name: Compile extension
|
51
|
+
run: |
|
52
|
+
bundle exec rake clean
|
53
|
+
bundle exec rake compile
|
54
|
+
- name: Start coverage
|
55
|
+
run: |
|
56
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
57
|
+
chmod +x ./cc-test-reporter
|
58
|
+
./cc-test-reporter before-build
|
59
|
+
- name: RSpec
|
60
|
+
run: |
|
61
|
+
bundle exec appraisal rspec --force-color
|
62
|
+
- uses: actions/upload-artifact@v2
|
63
|
+
with:
|
64
|
+
name: rspec-coverage
|
65
|
+
path: ./coverage
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.4.5](https://github.com/mvgijssel/arel_toolkit/tree/v0.4.5) (2021-07-08)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/mvgijssel/arel_toolkit/compare/v0.4.4...v0.4.5)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Refactor test setup [\#181](https://github.com/mvgijssel/arel_toolkit/issues/181)
|
10
|
+
- Bump nokogiri from 1.11.1 to 1.11.7 [\#176](https://github.com/mvgijssel/arel_toolkit/pull/176) ([dependabot[bot]](https://github.com/apps/dependabot))
|
11
|
+
- Bump activerecord from 5.2.4.3 to 6.1.3 [\#173](https://github.com/mvgijssel/arel_toolkit/pull/173) ([dependabot[bot]](https://github.com/apps/dependabot))
|
12
|
+
|
3
13
|
## [v0.4.4](https://github.com/mvgijssel/arel_toolkit/tree/v0.4.4) (2021-02-11)
|
4
14
|
|
5
15
|
[Full Changelog](https://github.com/mvgijssel/arel_toolkit/compare/v0.4.3...v0.4.4)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
arel_toolkit (0.4.
|
4
|
+
arel_toolkit (0.4.5)
|
5
5
|
activerecord
|
6
6
|
pg (~> 1.1.4)
|
7
7
|
pg_query (~> 1.3)
|
@@ -9,17 +9,17 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activemodel (
|
13
|
-
activesupport (=
|
14
|
-
activerecord (
|
15
|
-
activemodel (=
|
16
|
-
activesupport (=
|
17
|
-
|
18
|
-
activesupport (5.2.4.3)
|
12
|
+
activemodel (6.1.3)
|
13
|
+
activesupport (= 6.1.3)
|
14
|
+
activerecord (6.1.3)
|
15
|
+
activemodel (= 6.1.3)
|
16
|
+
activesupport (= 6.1.3)
|
17
|
+
activesupport (6.1.3)
|
19
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
-
i18n (>=
|
21
|
-
minitest (
|
22
|
-
tzinfo (~>
|
19
|
+
i18n (>= 1.6, < 2)
|
20
|
+
minitest (>= 5.1)
|
21
|
+
tzinfo (~> 2.0)
|
22
|
+
zeitwerk (~> 2.3)
|
23
23
|
addressable (2.7.0)
|
24
24
|
public_suffix (>= 2.0.2, < 5.0)
|
25
25
|
ansi (1.5.0)
|
@@ -30,12 +30,11 @@ GEM
|
|
30
30
|
approvals (0.0.24)
|
31
31
|
nokogiri (~> 1.6)
|
32
32
|
thor (~> 0.18)
|
33
|
-
arel (9.0.0)
|
34
33
|
ast (2.4.0)
|
35
34
|
binding_of_caller (0.8.0)
|
36
35
|
debug_inspector (>= 0.0.1)
|
37
36
|
coderay (1.1.2)
|
38
|
-
concurrent-ruby (1.1.
|
37
|
+
concurrent-ruby (1.1.8)
|
39
38
|
database_cleaner (1.7.0)
|
40
39
|
debug_inspector (0.0.3)
|
41
40
|
diff-lcs (1.3)
|
@@ -76,7 +75,7 @@ GEM
|
|
76
75
|
guard (~> 2.0)
|
77
76
|
rubocop (~> 0.20)
|
78
77
|
hirb (0.7.3)
|
79
|
-
i18n (1.8.
|
78
|
+
i18n (1.8.9)
|
80
79
|
concurrent-ruby (~> 1.0)
|
81
80
|
interception (0.5)
|
82
81
|
jaro_winkler (1.5.3)
|
@@ -88,12 +87,12 @@ GEM
|
|
88
87
|
lumberjack (1.0.13)
|
89
88
|
memory_profiler (0.9.14)
|
90
89
|
method_source (0.9.2)
|
91
|
-
mini_portile2 (2.5.
|
92
|
-
minitest (5.14.
|
90
|
+
mini_portile2 (2.5.3)
|
91
|
+
minitest (5.14.4)
|
93
92
|
multi_json (1.14.1)
|
94
93
|
multipart-post (2.1.1)
|
95
94
|
nenv (0.3.0)
|
96
|
-
nokogiri (1.11.
|
95
|
+
nokogiri (1.11.7)
|
97
96
|
mini_portile2 (~> 2.5.0)
|
98
97
|
racc (~> 1.4)
|
99
98
|
notiffany (0.1.1)
|
@@ -170,11 +169,11 @@ GEM
|
|
170
169
|
simplecov-html (0.10.2)
|
171
170
|
stackprof (0.2.13)
|
172
171
|
thor (0.20.3)
|
173
|
-
|
174
|
-
|
175
|
-
thread_safe (~> 0.1)
|
172
|
+
tzinfo (2.0.4)
|
173
|
+
concurrent-ruby (~> 1.0)
|
176
174
|
unicode-display_width (1.6.0)
|
177
175
|
yard (0.9.20)
|
176
|
+
zeitwerk (2.4.2)
|
178
177
|
|
179
178
|
PLATFORMS
|
180
179
|
ruby
|
@@ -207,4 +206,4 @@ DEPENDENCIES
|
|
207
206
|
stackprof (~> 0.2)
|
208
207
|
|
209
208
|
BUNDLED WITH
|
210
|
-
2.
|
209
|
+
2.2.19
|
data/README.md
CHANGED
@@ -143,9 +143,20 @@ This gem aims to have full support for PostgreSQL's SQL. In order to do so, it n
|
|
143
143
|
|
144
144
|
## Development
|
145
145
|
|
146
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
147
|
-
|
148
|
-
|
146
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.
|
147
|
+
|
148
|
+
## Releasing
|
149
|
+
|
150
|
+
1. Update version in `version.rb`
|
151
|
+
1. Create a new branch `v<<VERSION_HERE>>`
|
152
|
+
1. Run `bundle install`
|
153
|
+
1. Run `bundle exec appraisal install`
|
154
|
+
1. Run `bundle exec rake changelog`
|
155
|
+
1. Commit the changes
|
156
|
+
1. Open a PR with name `Version <<VERSION_HERE>>` ([example](https://github.com/mvgijssel/arel_toolkit/pull/172))
|
157
|
+
1. Merge the PR
|
158
|
+
1. Checkout the master branch and pull latest changes
|
159
|
+
1. Run `bundle exec rake release`
|
149
160
|
|
150
161
|
## Contributing
|
151
162
|
|
data/lib/arel_toolkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maarten
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -400,8 +400,8 @@ extensions:
|
|
400
400
|
extra_rdoc_files: []
|
401
401
|
files:
|
402
402
|
- ".codeclimate.yml"
|
403
|
-
- ".github/workflows/
|
404
|
-
- ".github/workflows/
|
403
|
+
- ".github/workflows/coverage.yml"
|
404
|
+
- ".github/workflows/test.yml"
|
405
405
|
- ".gitignore"
|
406
406
|
- ".rspec"
|
407
407
|
- ".rubocop.yml"
|
@@ -1,90 +0,0 @@
|
|
1
|
-
name: CI - develop
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches-ignore:
|
5
|
-
- master
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
rspec:
|
9
|
-
name: RSpec - ${{ matrix.title }}
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
strategy:
|
12
|
-
fail-fast: false
|
13
|
-
matrix:
|
14
|
-
checkout: [branch, master]
|
15
|
-
include:
|
16
|
-
- checkout: branch
|
17
|
-
ref: null
|
18
|
-
title: current branch
|
19
|
-
rebase: false
|
20
|
-
codeclimate: true
|
21
|
-
- checkout: master
|
22
|
-
ref: master
|
23
|
-
title: merge with master
|
24
|
-
rebase: true
|
25
|
-
codeclimate: false
|
26
|
-
|
27
|
-
services:
|
28
|
-
postgres:
|
29
|
-
options: >-
|
30
|
-
--health-cmd pg_isready
|
31
|
-
--health-interval 10s
|
32
|
-
--health-timeout 5s
|
33
|
-
--health-retries 5
|
34
|
-
image: postgres:10.10
|
35
|
-
ports:
|
36
|
-
- 5432:5432
|
37
|
-
env:
|
38
|
-
POSTGRES_DB: arel_toolkit_test
|
39
|
-
POSTGRES_USER: postgres
|
40
|
-
steps:
|
41
|
-
- uses: actions/checkout@v1
|
42
|
-
with:
|
43
|
-
ref: ${{ matrix.ref }}
|
44
|
-
|
45
|
-
# Based on
|
46
|
-
# https://discourse.drone.io/t/planned-change-to-git-clone-logic/1165
|
47
|
-
- name: Rebase
|
48
|
-
if: matrix.rebase
|
49
|
-
run: |
|
50
|
-
export GIT_AUTHOR_NAME=${CI_COMMIT_AUTHOR_NAME=GithubCI}
|
51
|
-
export GIT_AUTHOR_EMAIL=${CI_COMMIT_AUTHOR_EMAIL=ci@github.comm}
|
52
|
-
export GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
53
|
-
export GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
54
|
-
git fetch origin $GITHUB_REF
|
55
|
-
git rebase $GITHUB_SHA
|
56
|
-
|
57
|
-
- name: Set up Ruby 2.5.x
|
58
|
-
uses: actions/setup-ruby@v1
|
59
|
-
with:
|
60
|
-
ruby-version: 2.5.x
|
61
|
-
|
62
|
-
- name: Setup
|
63
|
-
run: |
|
64
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
65
|
-
chmod +x ./cc-test-reporter
|
66
|
-
./cc-test-reporter before-build
|
67
|
-
|
68
|
-
sudo apt-get install -y libpq-dev
|
69
|
-
|
70
|
-
gem install bundler
|
71
|
-
|
72
|
-
bundle install --jobs 4 --retry 3
|
73
|
-
bundle exec appraisal install
|
74
|
-
|
75
|
-
bundle exec rake clean
|
76
|
-
bundle exec rake compile
|
77
|
-
|
78
|
-
- name: RSpec
|
79
|
-
run: |
|
80
|
-
bundle exec appraisal rspec --force-color
|
81
|
-
|
82
|
-
- name: Report to codeclimate
|
83
|
-
if: always() && matrix.codeclimate
|
84
|
-
shell: bash
|
85
|
-
env:
|
86
|
-
JOB_STATUS: ${{ job.status == 'Success' }}
|
87
|
-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
88
|
-
run: |
|
89
|
-
EXIT_CODE=$([[ "$JOB_STATUS" == true ]] && echo 0 || echo 1)
|
90
|
-
./cc-test-reporter after-build --exit-code $EXIT_CODE
|
@@ -1,67 +0,0 @@
|
|
1
|
-
name: CI - master
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches:
|
5
|
-
- master
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
rspec:
|
9
|
-
name: RSpec - master
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
|
12
|
-
services:
|
13
|
-
postgres:
|
14
|
-
options: >-
|
15
|
-
--health-cmd pg_isready
|
16
|
-
--health-interval 10s
|
17
|
-
--health-timeout 5s
|
18
|
-
--health-retries 5
|
19
|
-
image: postgres:10.10
|
20
|
-
ports:
|
21
|
-
- 5432:5432
|
22
|
-
env:
|
23
|
-
POSTGRES_DB: arel_toolkit_test
|
24
|
-
POSTGRES_USER: postgres
|
25
|
-
steps:
|
26
|
-
- uses: actions/checkout@v1
|
27
|
-
|
28
|
-
- name: Set up Ruby 2.5.x
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: 2.5.x
|
32
|
-
|
33
|
-
- name: Setup
|
34
|
-
run: |
|
35
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
36
|
-
chmod +x ./cc-test-reporter
|
37
|
-
./cc-test-reporter before-build
|
38
|
-
|
39
|
-
sudo apt-get install -y libpq-dev
|
40
|
-
|
41
|
-
gem install bundler
|
42
|
-
|
43
|
-
bundle install --jobs 4 --retry 3
|
44
|
-
bundle exec appraisal install
|
45
|
-
|
46
|
-
bundle exec rake clean
|
47
|
-
bundle exec rake compile
|
48
|
-
|
49
|
-
- name: RSpec
|
50
|
-
run: |
|
51
|
-
bundle exec appraisal rspec --force-color
|
52
|
-
|
53
|
-
- name: Report to codeclimate
|
54
|
-
if: always()
|
55
|
-
shell: bash
|
56
|
-
env:
|
57
|
-
JOB_STATUS: ${{ job.status == 'Success' }}
|
58
|
-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
59
|
-
run: |
|
60
|
-
EXIT_CODE=$([[ "$JOB_STATUS" == true ]] && echo 0 || echo 1)
|
61
|
-
./cc-test-reporter after-build --exit-code $EXIT_CODE
|
62
|
-
|
63
|
-
- name: Upload coverage to GitHub pages
|
64
|
-
uses: maxheld83/ghpages@v0.2.1
|
65
|
-
env:
|
66
|
-
BUILD_DIR: ./coverage
|
67
|
-
GH_PAT: ${{ secrets.GH_PAT }}
|