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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ group :development, :test do
gem "minitest-junit"
gem "ostruct", "~> 0.6.3"
gem "rake", "~> 13.0"
gem "rubocop", "~> 1.57"
gem "tsort", "~> 0.2.0"
end
120 changes: 69 additions & 51 deletions functions/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
addressable (2.8.9)
public_suffix (>= 2.0.2, < 8.0)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
builder (3.2.4)
cloud_events (0.7.1)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.6)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-mashify (0.1.1)
faraday (2.14.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-mashify (1.0.2)
faraday (~> 2.0)
hashie
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (3.0.2)
faraday-retry (2.2.0)
faraday-multipart (1.2.0)
multipart-post (~> 2.0)
faraday-net_http (3.4.2)
net-http (~> 0.5)
faraday-retry (2.4.0)
faraday (~> 2.0)
functions_framework (1.4.1)
cloud_events (>= 0.7.0, < 2.a)
puma (>= 4.3.0, < 7.a)
rack (>= 2.1, < 4.a)
gapic-common (0.20.0)
gapic-common (1.3.0)
faraday (>= 1.9, < 3.a)
faraday-retry (>= 1.0, < 3.a)
google-protobuf (~> 3.14)
googleapis-common-protos (>= 1.3.12, < 2.a)
googleapis-common-protos-types (>= 1.3.1, < 2.a)
googleauth (~> 1.0)
grpc (~> 1.36)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
google-protobuf (~> 4.26)
googleapis-common-protos (~> 1.6)
googleapis-common-protos-types (~> 1.15)
googleauth (~> 1.12)
grpc (~> 1.66)
gli (2.21.1)
google-apis-bigquery_v2 (0.59.0)
google-apis-core (>= 0.11.0, < 2.a)
Expand All @@ -58,23 +63,25 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-core (1.8.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-firestore (2.13.1)
google-cloud-env (2.3.1)
base64 (~> 0.2)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.6.0)
google-cloud-firestore (2.16.1)
bigdecimal (~> 3.0)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.5)
google-cloud-firestore-v1 (~> 0.10)
google-cloud-firestore-v1 (>= 0.10, < 2.a)
rbtree (~> 0.4.2)
google-cloud-firestore-v1 (0.10.0)
gapic-common (>= 0.17.1, < 2.a)
google-cloud-firestore-v1 (1.3.0)
gapic-common (>= 0.25.0, < 2.a)
google-cloud-errors (~> 1.0)
google-cloud-location (>= 0.4, < 2.a)
google-cloud-location (0.6.0)
gapic-common (>= 0.20.0, < 2.a)
google-cloud-location (>= 0.7, < 2.a)
google-cloud-location (1.3.0)
gapic-common (~> 1.2)
google-cloud-errors (~> 1.0)
google-cloud-storage (1.44.0)
addressable (~> 2.8)
Expand All @@ -94,38 +101,48 @@ GEM
google-cloud-vision-v1p3beta1 (0.11.0)
gapic-common (>= 0.20.0, < 2.a)
google-cloud-errors (~> 1.0)
google-protobuf (3.24.4)
googleapis-common-protos (1.4.0)
google-protobuf (~> 3.14)
googleapis-common-protos-types (~> 1.2)
grpc (~> 1.27)
googleapis-common-protos-types (1.9.0)
google-protobuf (~> 3.18)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
google-logging-utils (0.2.0)
google-protobuf (4.33.6)
bigdecimal
rake (>= 13)
googleapis-common-protos (1.9.0)
google-protobuf (~> 4.26)
googleapis-common-protos-types (~> 1.21)
grpc (~> 1.41)
googleapis-common-protos-types (1.22.0)
google-protobuf (~> 4.26)
googleauth (1.16.2)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
jwt (>= 1.4, < 4.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
grpc (1.58.0)
google-protobuf (~> 3.23)
grpc (1.80.0-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
hashie (5.0.0)
httpclient (2.8.3)
jwt (2.7.1)
json (2.19.3)
jwt (3.1.2)
base64
logger (1.7.0)
mini_magick (4.12.0)
mini_mime (1.1.5)
minitest (5.20.0)
minitest (5.27.0)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
minitest-junit (1.1.0)
builder (~> 3.2)
minitest (~> 5.11)
multi_json (1.15.0)
multi_json (1.19.1)
multipart-post (2.3.0)
net-http (0.9.1)
uri (>= 0.11.1)
nio4r (2.7.0)
os (1.1.4)
public_suffix (5.0.3)
public_suffix (7.0.5)
puma (6.4.2)
nio4r (~> 2.0)
rack (3.0.9.1)
Expand All @@ -137,11 +154,10 @@ GEM
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.6)
ruby2_keywords (0.0.5)
signet (0.18.0)
signet (0.21.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
jwt (>= 1.5, < 4.0)
multi_json (~> 1.10)
slack-ruby-client (2.2.0)
faraday (>= 2.0)
Expand All @@ -151,12 +167,14 @@ GEM
hashie
trailblazer-option (0.1.2)
uber (0.1.0)
uri (1.1.1)
webrick (1.8.1)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
benchmark
functions_framework (~> 1.4, >= 1.4.1)
google-apis-kgsearch_v1 (~> 0.13)
google-cloud-bigquery (~> 1.45)
Expand Down
8 changes: 7 additions & 1 deletion functions/helloworld/http/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
# The request parameter is a Rack::Request object.
# See https://www.rubydoc.info/gems/rack/Rack/Request
name = request.params["name"] ||
(request.body.rewind && JSON.parse(request.body.read)["name"]) rescue "World"
begin
request.body.rewind
JSON.parse(request.body.read)["name"]
rescue StandardError
nil
end ||
"World"
# Return the response body as a string.
# You can also return a Rack::Response object, a Rack response array, or
# a hash which will be JSON-encoded into a response.
Expand Down