Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
111 changes: 9 additions & 102 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,9 @@
AllCops:
TargetRubyVersion: 2.4.6
Exclude:
- 'vendor/**/*'
- 'bin/{console,setup}'

Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining

Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent

Style/ClassAndModuleChildren:
Enabled: false

Style/ClassCheck:
EnforcedStyle: kind_of?

Style/ConditionalAssignment:
Enabled: false

Style/EmptyCaseCondition:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/GuardClause:
Enabled: false

Style/MultilineBlockChain:
Enabled: false

Style/NumericLiterals:
Enabled: false

Style/PerlBackrefs:
Enabled: false

Style/RedundantSelf:
Enabled: false

Style/RegexpLiteral:
AllowInnerSlashes: true

Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation

Layout/AlignHash:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table

Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*'

Layout/ExtraSpacing:
AllowForAlignment: true

Layout/IndentFirstArrayElement:
EnforcedStyle: consistent

Layout/IndentFirstHashElement:
EnforcedStyle: consistent

Layout/MultilineMethodCallBraceLayout:
Enabled: false

Layout/SpaceInsideBlockBraces:
EnforcedStyleForEmptyBraces: space

Lint/HandleExceptions:
Exclude:
- 'spec/**/*'

Metrics/AbcSize:
Max: 25

Metrics/BlockLength:
Exclude:
- 'spec/**/*'
ExcludedMethods:
- 'Gem::Specification.new'

Metrics/ClassLength:
Max: 100

Metrics/CyclomaticComplexity:
Max: 10

Metrics/LineLength:
Max: 100
IgnoredPatterns:
- "'.+'" # Text
- '".+"' # Text
- '#.+' # Comment
- '/.+/' # Regex
- '([A-Z][A-Za-z\d]+::){2,}[A-Z]' # Long module name
- '([A-Z]+_){4,}[A-Z]' # Long constant name

Metrics/MethodLength:
Max: 25
---
inherit_mode:
merge:
- Exclude
- Include
inherit_from:
- config/.rubocop-common.yml
- config/.rubocop-permissive.yml
- config/.rubocop-strict.yml
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM ruby:2.6.0-alpine3.8
FROM ruby:3.4-bookworm

# Create application directory.
RUN mkdir /app
WORKDIR /app

# Install package
RUN apk upgrade && apk add --update build-base git linux-headers libxml2-dev libxslt-dev mariadb-dev ruby-dev tzdata yaml-dev zlib-dev
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git libxml2-dev libxslt-dev libmariadb-dev ruby-dev tzdata libyaml-dev zlib1g-dev && apt clean

# Deploy application
ADD . /app
Expand Down
52 changes: 29 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,47 @@ PATH
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
ast (2.4.3)
base64 (0.2.0)
bigdecimal (3.1.9)
coderay (1.1.3)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
diff-lcs (1.5.1)
docile (1.4.0)
json (2.7.1)
method_source (1.0.0)
diff-lcs (1.6.0)
docile (1.4.1)
json (2.10.2)
method_source (1.1.0)
mysql2 (0.5.6)
parallel (1.24.0)
parser (3.3.0.5)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.7.2)
ast (~> 2.4.1)
racc
pry (0.14.2)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.3)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rake (13.2.1)
regexp_parser (2.10.0)
rexml (3.4.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec-support (3.13.2)
rubocop (0.93.1)
parallel (~> 1.10)
parser (>= 2.7.1.5)
Expand All @@ -54,31 +57,34 @@ GEM
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-ast (1.41.0)
parser (>= 3.3.7.2)
ruby-progressbar (1.13.0)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sync (0.5.0)
term-ansicolor (1.7.2)
term-ansicolor (1.11.2)
tins (~> 1.0)
thor (1.3.1)
tins (1.32.1)
thor (1.3.2)
tins (1.38.0)
bigdecimal
sync
unicode-display_width (1.8.0)
yard (0.9.36)
yard (0.9.37)

PLATFORMS
arm64-darwin-23
ruby

DEPENDENCIES
base64
bundler (>= 1.16)
coveralls (~> 0.8)
mysql2-aurora!
ostruct
pry (~> 0.12)
rake (~> 13.0)
rspec (~> 3.0)
Expand All @@ -87,4 +93,4 @@ DEPENDENCIES
yard (~> 0.9)

BUNDLED WITH
2.5.6
2.6.2
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ services:
depends_on:
- mysql
mysql:
image: mysql:5.7
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: 'change_me'
3 changes: 3 additions & 0 deletions mysql2-aurora.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubocop', '~> 0.62'
spec.add_development_dependency 'simplecov', '~> 0.16'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'base64'
spec.add_development_dependency 'ostruct'

end
6 changes: 1 addition & 5 deletions spec/mysql2/aurora_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
end

it 'Valid version' do
expect(subject.split('.').size).to be >= 3
expect(subject.split('.')[0]).to eq(Mysql2::VERSION.split('.')[0])
expect(subject.split('.')[1]).to eq(Mysql2::VERSION.split('.')[1])
expect(subject.split('.')[2]).to eq(Mysql2::VERSION.split('.')[2])
expect(subject.split('.')[3]).to match(/^(\d+|)$/)
expect(subject.split(".").size).to eq(3)
end
end

Expand Down