Skip to content

Commit 903543f

Browse files
committed
Initial commit for Ruby layer example
1 parent 227a6c0 commit 903543f

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require 'json'
2+
require 'tzinfo'
3+
4+
def lambda_handler(event:, context:)
5+
tz = TZInfo::Timezone.get('America/New_York')
6+
{ statusCode: 200, body: tz.to_local(Time.utc(2018, 2, 1, 12, 30, 0)) }
7+
end
8+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bundle config set --local path 'vendor/bundle'
2+
bundle install
3+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mkdir -p ruby/gems/3.3.0
2+
cp -r vendor/bundle/ruby/3.3.0/* ruby/gems/3.3.0/
3+
zip -r layer_content.zip ruby

sample-apps/layer-ruby/layer/Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gem "tzinfo"

0 commit comments

Comments
 (0)