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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.5
ruby-version: 3.4.13
bundler-cache: true

- name: Lint
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Install Dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.5
ruby-version: 3.4.13
bundler-cache: true

- name: Unit Tests
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Install Dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.5
ruby-version: 3.4.13
bundler-cache: true

- name: Generate Default SSH Keypair
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.8
FROM ruby:3.4.13-bookworm

RUN apt-get clean all
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y tzdata
Expand All @@ -10,9 +10,11 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8

# Install Ruby
RUN apt-get install ruby-full -y
RUN gem install bundler -v 1.17.3
# Ruby comes from the base image (EOL Ruby 2.7 from Debian 11 is affected by CVE-2026-132825).
# Python is needed for Ansible; Debian 12 blocks system-wide pip installs (PEP 668), so use a venv.
RUN apt-get update && apt-get install -y python3 python3-venv python3-pip
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Others
RUN apt-get update
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ gem 'pastel', '~> 0.7.2'
gem 'rake', '12.3.3'
gem 'rubocop', '>= 0.89.1', require: false
gem 'tty-spinner', '0.9.3'

# No longer default gems since Ruby 3.4; pinned to the versions Ruby 3.4.13 ships.
gem 'base64', '0.2.0' # aws-sdk-core, rubocop
gem 'mutex_m', '0.3.0' # minitest
gem 'racc', '1.8.1' # parser (rubocop)
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GEM
jmespath (~> 1, >= 1.6.1)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
equatable (0.5.0)
jmespath (1.6.2)
metaclass (0.0.4)
Expand All @@ -22,12 +23,14 @@ GEM
minitest (> 5.3)
mocha (1.8.0)
metaclass (~> 0.0.1)
mutex_m (0.3.0)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pastel (0.7.2)
equatable (~> 0.5.0)
tty-color (~> 0.4.0)
racc (1.8.1)
rainbow (3.0.0)
rake (12.3.3)
regexp_parser (1.7.1)
Expand Down Expand Up @@ -55,10 +58,13 @@ PLATFORMS

DEPENDENCIES
aws-sdk-apigateway (~> 1.91.0)
base64 (= 0.2.0)
minitest (= 5.11.3)
minitest-hooks (= 1.5.0)
mocha (= 1.8.0)
mutex_m (= 0.3.0)
pastel (~> 0.7.2)
racc (= 1.8.1)
rake (= 12.3.3)
rubocop (>= 0.89.1)
tty-spinner (= 0.9.3)
Expand Down
2 changes: 1 addition & 1 deletion src/command_line/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def is_teardown?()
private
def download_file(url, filepath)
Common::Logger::LoggerFactory.get_logger().debug("Downloading from #{url} to #{filepath}")
download = open(url)
download = URI(url).open
IO.copy_stream(download, filepath)
end

Expand Down
2 changes: 1 addition & 1 deletion src/common/install/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def execute_install(action_name, install_contexts, isAsync = true)
end

def read_params_output(output_params, artifact_filename)
if File.exists?(artifact_filename)
if File.exist?(artifact_filename)
reader = Common::Install::ParamsReader.new(output_params)
reader.read_from_file(artifact_filename)
end
Expand Down
2 changes: 1 addition & 1 deletion src/install/packager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def execute()
merged_content = field_merger.merge(content)
if file.is_content_uri?()
Common::Logger::LoggerFactory.get_logger().debug("Downloading from #{merged_content} to file #{filepath}")
download = open(merged_content).read()
download = URI(merged_content).open.read()
merged_download = field_merger.merge(download)
write_file(filepath, merged_download, file_permission)
else
Expand Down
2 changes: 1 addition & 1 deletion src/provision/provisioner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def execute(template_contexts, isAsync = true)

private
def read_params_output(output_params, artifact_filename)
if File.exists?(artifact_filename)
if File.exist?(artifact_filename)
reader = Common::Install::ParamsReader.new(output_params)
reader.read_from_file(artifact_filename)
end
Expand Down
2 changes: 1 addition & 1 deletion src/teardown/terminator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def execute(template_contexts, isAsync = true)

private
def read_params_output(output_params, artifact_filename)
if File.exists?(artifact_filename)
if File.exist?(artifact_filename)
reader = Common::Install::ParamsReader.new(output_params)
reader.read_from_file(artifact_filename)
end
Expand Down
4 changes: 3 additions & 1 deletion tests/deployment/aws/type_validator_factory_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
result = validators[0].call()

result.wont_be_empty()
result.must_include("id1")
# The resource is a plain Hash, so resolving its type raises NoMethodError. Ruby 3.3+
# no longer prints the receiver in that message, so assert on the missing method instead.
result.must_include("get_type")
end

def given_resource(id, type = nil)
Expand Down
2 changes: 1 addition & 1 deletion user_acceptance_tests/spoofers/directory_spoofer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(filename)

def dispose()
filename = get_filename()
if Dir.exists?(filename)
if Dir.exist?(filename)
begin
FileUtils.remove_dir(filename)
rescue Exception => e
Expand Down
2 changes: 1 addition & 1 deletion user_acceptance_tests/spoofers/file_spoofer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(filename)
end

def dispose()
if File.exists?(@filename)
if File.exist?(@filename)
begin
File.delete(@filename)
rescue Exception => e
Expand Down
Loading