Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
~> 3.3
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The base stage scaffolds elements which are common to building and running
# the application, such as installing ca-certificates, creating the app user,
# and installing runtime system dependencies.
FROM ruby:3.0.3-slim AS base
FROM ruby:3.3-slim AS base

# ------------------------------------------------------------
# Create the application user/group and installation directory
Expand Down
56 changes: 34 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
ast (2.4.3)
berkeley_library-docker (0.1.1)
chronic (0.10.2)
colorize (0.8.1)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
hashdiff (1.0.1)
json (2.20.0)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
net-sftp (3.0.0)
net-ssh (>= 5.0.0, < 7.0.0)
net-ssh (6.1.0)
parallel (1.21.0)
parser (3.1.1.0)
parallel (2.1.0)
parser (3.3.11.1)
ast (~> 2.4.1)
public_suffix (4.0.6)
racc
prism (1.9.0)
public_suffix (7.0.5)
racc (1.8.1)
rainbow (3.1.1)
regexp_parser (2.2.1)
rexml (3.2.5)
regexp_parser (2.12.0)
rexml (3.4.4)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
Expand All @@ -39,30 +45,36 @@ GEM
rspec-support (3.11.0)
rspec_junit_formatter (0.5.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.26.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rubocop (1.88.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.16.0)
parser (>= 3.1.1.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.49.1)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-checkstyle_formatter (0.5.0)
rubocop (>= 1.14.0)
ruby-progressbar (1.11.0)
thor (1.2.1)
ruby-progressbar (1.13.0)
thor (1.5.0)
timecop (0.9.5)
unicode-display_width (2.1.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
aarch64-linux
arm64-darwin-24
x86_64-darwin-19
x86_64-linux

Expand All @@ -81,7 +93,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 3.0.3p157
ruby 3.3.11

BUNDLED WITH
2.2.32
4.0.9
6 changes: 3 additions & 3 deletions lib/berkeley_library/sftp_handler/downloader/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def initialize(host: nil, username: nil, password: nil, keys: nil, key_data: nil
@key_data = key_data.is_a?(Array) ? key_data : [key_data].compact
end

def connect(&block)
def connect(&)
puts "Connecting to sftp://#{@username}@#{@host}"
Net::SFTP.start(@host, @username, ssh_options, sftp_options, &block)
Net::SFTP.start(@host, @username, ssh_options, sftp_options, &)
end

def ssh_options
Expand All @@ -53,7 +53,7 @@ def sftp_options
# Helper method for pulling default initializer values from the environment
def default_for(option, fallback = nil)
envvar = "#{config_prefix}#{option.to_s.upcase}"
getter = "default_#{option}".to_sym
getter = :"default_#{option}"
ENV.fetch(envvar, respond_to?(getter) ? send(getter) : fallback)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/berkeley_library/sftp_handler/downloader/gobi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def default_host
end

def default_username
ENV['LIT_GOBI_USERNAME']
ENV.fetch('LIT_GOBI_USERNAME', nil)
end

def ssh_options
Expand Down
4 changes: 2 additions & 2 deletions lib/berkeley_library/sftp_handler/downloader/lbnl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ def default_host
end

def default_username
ENV['LIT_LBNL_USERNAME']
ENV.fetch('LIT_LBNL_USERNAME', nil)
end

def default_filename
@default_filename ||= "#{ENV['LBNL_FILENAME']}_#{most_recent_monday.strftime('%Y%m%d')}.zip"
@default_filename ||= "#{ENV.fetch('LBNL_FILENAME', nil)}_#{most_recent_monday.strftime('%Y%m%d')}.zip"
end

def most_recent_monday
Expand Down
Loading