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 aws_lambda_builders/workflows/ruby_bundler/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RubyBundlerWorkflow(BaseWorkflow):
dependency_manager="bundler",
application_framework=None)

EXCLUDED_FILES = (".aws-sam")
EXCLUDED_FILES = (".aws-sam", ".git")

def __init__(self,
source_dir,
Expand Down
9 changes: 9 additions & 0 deletions tests/integration/workflows/ruby_bundler/test_ruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ def test_builds_project_with_dependencies(self):
output_files = set(os.listdir(self.artifacts_dir))
self.assertEquals(expected_files, output_files)

def test_builds_project_and_ignores_excluded_files(self):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "excluded-files")
self.builder.build(source_dir, self.artifacts_dir, self.scratch_dir,
os.path.join(source_dir, "Gemfile"),
runtime=self.runtime)
expected_files = {"handler.rb", "Gemfile", "Gemfile.lock", ".bundle", "vendor"}
output_files = set(os.listdir(self.artifacts_dir))
self.assertEquals(expected_files, output_files)

def test_fails_if_bundler_cannot_resolve_dependencies(self):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "broken-deps")
with self.assertRaises(WorkflowFailedError) as ctx:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# This shouldn't even need to exist, that's a pending feature request.
# If no dependencies, leave blank.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def handle(event:,context:)
"Hello!"
end