Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- ruby 3.2
- address standardrb concerns
  • Loading branch information
aelkiss committed Oct 3, 2023
1 parent 488fc72 commit 740c7de
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 53 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM ruby:3.1
FROM ruby:3.2
ARG UNAME=app
ARG UID=1000
ARG GID=1000

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
nodejs \
netcat
netcat-traditional


# COPY Gemfile* /usr/src/app/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1
FROM ruby:3.2
LABEL org.opencontainers.image.source https://github.com/hathitrust/hathifiles

ARG UNAME=holdings
Expand Down
92 changes: 54 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.2)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
canister (0.9.1)
base64 (0.1.1)
bigdecimal (3.1.4)
canister (0.9.2)
coderay (1.1.3)
concurrent-ruby (1.2.0)
concurrent-ruby (1.2.2)
deep_merge (1.2.2)
diff-lcs (1.5.0)
docile (1.4.0)
Expand All @@ -38,13 +40,14 @@ GEM
dotenv (2.8.1)
ettin (1.3.0)
deep_merge
factory_bot (6.2.1)
factory_bot (6.3.0)
activesupport (>= 5.0.0)
faraday (2.7.4)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.2)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
Expand All @@ -58,10 +61,11 @@ GEM
domain_name (~> 0.5)
http-form_data (2.3.0)
httpclient (2.8.3)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
llhttp-ffi (0.4.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
Expand All @@ -73,67 +77,79 @@ GEM
marc (~> 1.0)
method_source (1.0.0)
milemarker (1.0.0)
minitest (5.17.0)
minitest (5.20.0)
mysql2 (0.5.5)
nokogiri (1.14.0-x86_64-linux)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.0.0)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
prometheus-client (4.0.0)
racc
prometheus-client (4.2.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.1)
racc (1.6.2)
public_suffix (5.0.3)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.2)
rexml (3.2.5)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.42.0)
rspec-support (3.12.1)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.2.1)
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.24.1, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-performance (1.15.2)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
scrub_rb (1.0.1)
sequel (5.64.0)
sequel (5.73.0)
bigdecimal
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
slop (4.9.3)
standard (1.22.1)
slop (4.10.1)
standard (1.31.1)
language_server-protocol (~> 3.17.0.2)
rubocop (= 1.42.0)
rubocop-performance (= 1.15.2)
lint_roller (~> 1.0)
rubocop (~> 1.56.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.2.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.0)
standardrb (1.0.1)
standard
traject (3.8.1)
Expand All @@ -147,12 +163,12 @@ GEM
nokogiri (~> 1.9)
slop (~> 4.0)
yell
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
yell (2.2.2)

PLATFORMS
Expand All @@ -178,4 +194,4 @@ DEPENDENCIES
traject

BUNDLED WITH
2.3.25
2.4.20
6 changes: 3 additions & 3 deletions bin/setup_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
docker-compose build
docker-compose run --rm hf bundle install
docker-compose up -d mariadb pushgateway
docker compose build
docker compose run --rm hf bundle install
docker compose up -d mariadb pushgateway
6 changes: 2 additions & 4 deletions lib/collections_database/collections_db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class CollectionsDB < SimpleDelegator
attr_reader :rawdb
attr_accessor :connection_string

def initialize(connection_string = ENV["DB_CONNECTION_STRING"], **kwargs)
@rawdb = self.class.connection(connection_string, **kwargs)
def initialize(connection_string = ENV["DB_CONNECTION_STRING"], **)
@rawdb = self.class.connection(connection_string, **)
super(@rawdb)
end

Expand Down Expand Up @@ -43,8 +43,6 @@ def self.connection(connection_string = ENV["DB_CONNECTION_STRING"],
else
Sequel.connect(connection_string)
end
rescue Sequel::DatabaseConnectionError => e
raise e
end

class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/rights_database/rights.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Rights
def initialize(item_id:, attribute: nil, reason: nil, source: nil, time: nil, note: nil, access_profile: nil,
user: nil)
@item_id = item_id
@namespace, @id = @item_id.split(/\./, 2)
@namespace, @id = @item_id.split(".", 2)
if @attribute.nil?
load_from_db
else
Expand Down
6 changes: 2 additions & 4 deletions lib/rights_database/rights_db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class RightsDB < SimpleDelegator
attr_reader :rawdb
attr_accessor :connection_string

def initialize(connection_string = ENV["DB_CONNECTION_STRING"], **kwargs)
@rawdb = self.class.connection(connection_string, **kwargs)
def initialize(connection_string = ENV["DB_CONNECTION_STRING"], **)
@rawdb = self.class.connection(connection_string, **)
super(@rawdb)
end

Expand Down Expand Up @@ -46,8 +46,6 @@ def self.connection(connection_string = ENV["DB_CONNECTION_STRING"],
else
Sequel.connect(connection_string)
end
rescue Sequel::DatabaseConnectionError => e
raise e
end

class << self
Expand Down

0 comments on commit 740c7de

Please sign in to comment.