Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement v1 #32

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ec774fe
Implement integration_test
mirakui Aug 30, 2024
6bffb19
Move dev dependencies into Gemfile
mirakui Sep 1, 2024
aad513e
Bump AR to 7.1
mirakui Sep 1, 2024
4cfa0be
Refine gemspec
mirakui Sep 1, 2024
2fedcb1
Introduce rubocop
mirakui Sep 1, 2024
65424e6
Add rubocop rake task
mirakui Sep 1, 2024
50def5f
Change gemfiles to AR 7.1+
mirakui Sep 1, 2024
6ea73a0
AR7.1: call raw_execute() instead of execute()
mirakui Sep 8, 2024
6534098
don't pass kwargs to proxies
mirakui Sep 8, 2024
46cd60b
Patch classes
mirakui Sep 8, 2024
e991c32
Implement PostgresqlPatch
mirakui Sep 8, 2024
fbbe06c
Add sqlserver implementation
mirakui Sep 9, 2024
3a0d55c
Add missing log
mirakui Sep 9, 2024
3c22c34
ARPROXY_DB_PASSWORD
mirakui Sep 9, 2024
5b46049
Implement sqlserver_patch
mirakui Sep 9, 2024
3497eda
AR7.2: register sqlserver
mirakui Sep 9, 2024
86362c4
clear config on disable!
mirakui Sep 9, 2024
971e9d7
Test MSSQL
mirakui Sep 9, 2024
8c8de55
install freetds-common
mirakui Sep 9, 2024
f8fac78
Add build deps for sqlserver
mirakui Sep 9, 2024
71cb9b3
fix comment
mirakui Sep 9, 2024
01018f6
Add sqlite3
mirakui Sep 9, 2024
0ac49c7
Implement trilogy patch and downgrade mysql to 8.0
mirakui Sep 9, 2024
5dc155e
Refactor patches
mirakui Sep 9, 2024
b73597b
Refactor #enable_patch
mirakui Sep 9, 2024
ab0dec7
Support AR 6.1 and 7.0
mirakui Sep 10, 2024
12f5b2a
Use #execute for AR6
mirakui Sep 10, 2024
079c298
Refactor ConnectionAdapterPatch
mirakui Sep 10, 2024
bf65480
Fix broken sqlite3
mirakui Sep 10, 2024
8375c64
Add AR version into spec contexts
mirakui Sep 10, 2024
5c36ea4
shared_examples
mirakui Sep 10, 2024
da0c1bb
Refactor patches and implement postgres specific patches
mirakui Sep 10, 2024
439404a
Specify sqlite3 version for AR7.0
mirakui Sep 10, 2024
5cd183a
Add some gems to suppress warnings
mirakui Sep 10, 2024
6635cea
Remove continu-on-error
mirakui Sep 10, 2024
5b58f3c
Split shared examples into files
mirakui Sep 10, 2024
183329e
remove version (obsolete)
mirakui Sep 10, 2024
56af730
Add integration test for plugin
mirakui Sep 10, 2024
5bdd784
Refactor spec directories
mirakui Sep 14, 2024
071e59f
Fix for unit tests
mirakui Sep 14, 2024
33e3cc7
Bump version to v1.0.0
mirakui Sep 14, 2024
6197140
Add missing Trilogy
mirakui Sep 14, 2024
b8ef2c3
Fix bugs in clear configuration
mirakui Sep 14, 2024
50f1046
Fix github actions
mirakui Sep 14, 2024
02b8d40
Update gemfiles
mirakui Sep 14, 2024
a438405
Update appraisals
mirakui Sep 14, 2024
34fa32c
Bump actions/checkout version
mirakui Sep 14, 2024
81b7c2f
Ignore vendor/ directory in rubocop
mirakui Sep 14, 2024
b63cd2f
bundle install
mirakui Sep 14, 2024
a286c29
Add support for Ruby 2.7+
mirakui Sep 16, 2024
b290279
Update README
mirakui Sep 16, 2024
ba10fe1
`#execute` returns nil when proxy_chain returns nil
mirakui Sep 16, 2024
9dc753c
Add supported environments
mirakui Sep 16, 2024
210f8b9
rubocop: Layout/EmptyLinesAroundAccessModifier: around
mirakui Oct 13, 2024
5242ac1
Un-commented a test case
mirakui Oct 13, 2024
bb17093
mv docker-compose.yml compose.yaml
mirakui Oct 20, 2024
ac57386
Remove v1 branch from GH workflows
mirakui Oct 20, 2024
cc8898a
Bump postgres version to 17
mirakui Oct 20, 2024
06cdebe
Fix typo
mirakui Oct 20, 2024
5582caa
Specify db versions in README
mirakui Oct 20, 2024
fbf518b
Use `!` methods to raise errors
mirakui Oct 20, 2024
e017242
Set timeout for integration_tests
mirakui Oct 20, 2024
74de4a4
Remove redundant calling `Arproxy.clear_configuration`
mirakui Oct 20, 2024
aff8056
Bump mysql version from 8.0 to 9.0
mirakui Oct 20, 2024
0532c9c
Add Dockerfile for CI
mirakui Oct 20, 2024
4c19c12
Remove require-secure-transport for mysql2
mirakui Oct 20, 2024
08941a3
Add sleep for debugging
mirakui Oct 20, 2024
add26f4
Implement wait_for_db
mirakui Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARPROXY_DB_USER="arproxy"
ARPROXY_DB_PASSWORD="4rpr0*y#2024"
ARPROXY_DB_DATABASE="arproxy_test"
28 changes: 28 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Integration tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
integration_test:
mirakui marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
timeout-minutes: 5

strategy:
matrix:
appraisal:
- ar-6.1
- ar-7.0
- ar-7.1
- ar-7.2
steps:
- uses: actions/checkout@v4
- name: docker compose up
run: docker compose -f compose-ci.yaml up -d
- name: Run integration test
run: docker compose -f compose-ci.yaml exec ruby bundle exec appraisal ${{ matrix.appraisal }} rspec spec/integration/*_spec.rb
26 changes: 26 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: RuboCop

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
rubocop:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: How about promoting this to an environment variable?

bundler-cache: true

- name: Run RuboCop
run: bundle exec rubocop
38 changes: 0 additions & 38 deletions .github/workflows/ruby.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Unit tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- 2.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO: How about dropping the support of Ruby 2.7, which has already been deprecated?

- 3.0
- 3.1
- 3.2
- 3.3

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run unit tests on ruby-${{ matrix.ruby-version }}
run: bundle exec rspec spec/*_spec.rb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit & IMHO: How about locating the unit test files into a specific directory, say spec/unit? It could be unintuitive that test files located in any directory except for spec/integration won't be tested by any workflows.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.swp
*.gem
Gemfile.lock
gemfiles/*.lock
*.gemfile.lock
.bundle/
tmp/
db/mysql/data/*
Loading