Skip to content

Commit

Permalink
ruby upgrade (#3)
Browse files Browse the repository at this point in the history
* ruby&gems up

* rubocop

* Update version.rb

---------

Co-authored-by: Dominik <dominik.alberski@gmail.com>
  • Loading branch information
gbarc-dt and DominikAlberski authored Feb 27, 2024
1 parent 50726df commit aeee7b5
Show file tree
Hide file tree
Showing 16 changed files with 315 additions and 147 deletions.
75 changes: 75 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
require: rubocop-performance
require: rubocop-rspec

Documentation:
Enabled: false
Metrics/ClassLength:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Max: 40
Metrics/CyclomaticComplexity:
Max: 20
Metrics/PerceivedComplexity:
Max: 16
Style/AsciiComments:
Enabled: false
Metrics/AbcSize:
Enabled: false
Style/GuardClause:
Enabled: false
Style/FormatStringToken:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Naming/MemoizedInstanceVariableName:
EnforcedStyleForLeadingUnderscores: required
Style/MultilineBlockChain:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Naming/VariableNumber:
Enabled: false
Metrics/BlockLength:
Enabled: false
Lint/ImplicitStringConcatenation:
Enabled: false
Metrics/MethodLength:
Enabled: false
Style/StructInheritance:
Enabled: false
Lint/RescueException:
Enabled: false
Lint/SuppressedException:
Enabled: false
Naming/MemoizedInstanceVariableName:
Enabled: false
Style/SymbolProc:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/NamedSubject:
Enabled: false
RSpec/AnyInstance:
Enabled: false
RSpec/ContextWording:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/FilePath:
Enabled: false
Naming/MethodParameterName:
Enabled: false
Style/FormatString:
Enabled: false
RSpec/NestedGroups:
Max: 5
RSpec/InstanceVariable:
Enabled: false
16 changes: 13 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec

gem "activerecord", "~> 4.2"
gem 'activerecord', '~> 7'
gem 'redlock'

platform :ruby do
gem 'pg'
end

group :test do
gem 'rspec', '~> 3.0'
gem 'mocha', '~> 1.1'
gem 'mocha', '~> 2.0'
gem 'rspec', '~> 3.12'
end

group :development, :test do
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rspec', require: false
gem 'simplecov', require: false
gem 'simplecov-console', require: false
end
139 changes: 96 additions & 43 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,112 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
activerecord (4.2.10)
activemodel (= 4.2.10)
activesupport (= 4.2.10)
arel (~> 6.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.4)
builder (3.2.3)
concurrent-ruby (1.1.3)
diff-lcs (1.2.5)
i18n (0.9.5)
activemodel (7.0.5)
activesupport (= 7.0.5)
activerecord (7.0.5)
activemodel (= 7.0.5)
activesupport (= 7.0.5)
activesupport (7.0.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
ansi (1.5.0)
ast (2.4.2)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
diff-lcs (1.5.0)
docile (1.4.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
metaclass (0.0.4)
minitest (5.11.3)
mocha (1.1.0)
metaclass (~> 0.0.1)
pg (0.18.3)
redis (3.2.1)
redlock (0.1.1)
redis (~> 3, >= 3.0.5)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
json (2.6.3)
language_server-protocol (3.17.0.3)
minitest (5.18.1)
mocha (2.0.4)
ruby2_keywords (>= 0.0.5)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pg (1.5.3)
racc (1.7.1)
rainbow (3.1.1)
redis-client (0.14.1)
connection_pool
redlock (2.0.2)
redis-client (~> 0.14.1)
regexp_parser (2.8.1)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.54.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-console (0.9.1)
ansi
simplecov
terminal-table
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 4.2)
mocha (~> 1.1)
activerecord (~> 7)
mocha (~> 2.0)
pg
redlock
rspec (~> 3.0)
rspec (~> 3.12)
rubocop
rubocop-performance
rubocop-rspec
simplecov
simplecov-console
travis-lock!

BUNDLED WITH
1.16.3
2.4.14
8 changes: 5 additions & 3 deletions lib/travis/lock.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'travis/lock/none'
require 'travis/lock/postgresql'
require 'travis/lock/redis'
Expand All @@ -21,8 +23,8 @@ def exclusive(name, options = {}, &block)

private

def camelize(object)
object.to_s.split('_').collect(&:capitalize).join
end
def camelize(object)
object.to_s.split('_').collect(&:capitalize).join
end
end
end
2 changes: 2 additions & 0 deletions lib/travis/lock/none.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Travis
module Lock
class None < Struct.new(:name, :options)
Expand Down
Loading

0 comments on commit aeee7b5

Please sign in to comment.