Skip to content

Commit 69ce74b

Browse files
authored
chore: Add missing gem for running test (#1691)
1 parent f1fd5e0 commit 69ce74b

3 files changed

Lines changed: 77 additions & 52 deletions

File tree

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ group :development, :test do
2222
gem "minitest-junit"
2323
gem "ostruct", "~> 0.6.3"
2424
gem "rake", "~> 13.0"
25+
gem "rubocop", "~> 1.57"
2526
gem "tsort", "~> 0.2.0"
2627
end

functions/Gemfile.lock

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.8.5)
5-
public_suffix (>= 2.0.2, < 6.0)
6-
base64 (0.1.1)
4+
addressable (2.8.9)
5+
public_suffix (>= 2.0.2, < 8.0)
6+
base64 (0.3.0)
7+
benchmark (0.5.0)
8+
bigdecimal (3.3.1)
79
builder (3.2.4)
810
cloud_events (0.7.1)
9-
concurrent-ruby (1.2.2)
11+
concurrent-ruby (1.3.6)
1012
declarative (0.0.20)
1113
digest-crc (0.6.5)
1214
rake (>= 12.0.0, < 14.0.0)
13-
faraday (2.7.11)
14-
base64
15-
faraday-net_http (>= 2.0, < 3.1)
16-
ruby2_keywords (>= 0.0.4)
17-
faraday-mashify (0.1.1)
15+
faraday (2.14.1)
16+
faraday-net_http (>= 2.0, < 3.5)
17+
json
18+
logger
19+
faraday-mashify (1.0.2)
1820
faraday (~> 2.0)
1921
hashie
20-
faraday-multipart (1.0.4)
21-
multipart-post (~> 2)
22-
faraday-net_http (3.0.2)
23-
faraday-retry (2.2.0)
22+
faraday-multipart (1.2.0)
23+
multipart-post (~> 2.0)
24+
faraday-net_http (3.4.2)
25+
net-http (~> 0.5)
26+
faraday-retry (2.4.0)
2427
faraday (~> 2.0)
2528
functions_framework (1.4.1)
2629
cloud_events (>= 0.7.0, < 2.a)
2730
puma (>= 4.3.0, < 7.a)
2831
rack (>= 2.1, < 4.a)
29-
gapic-common (0.20.0)
32+
gapic-common (1.3.0)
3033
faraday (>= 1.9, < 3.a)
3134
faraday-retry (>= 1.0, < 3.a)
32-
google-protobuf (~> 3.14)
33-
googleapis-common-protos (>= 1.3.12, < 2.a)
34-
googleapis-common-protos-types (>= 1.3.1, < 2.a)
35-
googleauth (~> 1.0)
36-
grpc (~> 1.36)
35+
google-cloud-env (~> 2.2)
36+
google-logging-utils (~> 0.1)
37+
google-protobuf (~> 4.26)
38+
googleapis-common-protos (~> 1.6)
39+
googleapis-common-protos-types (~> 1.15)
40+
googleauth (~> 1.12)
41+
grpc (~> 1.66)
3742
gli (2.21.1)
3843
google-apis-bigquery_v2 (0.59.0)
3944
google-apis-core (>= 0.11.0, < 2.a)
@@ -58,23 +63,25 @@ GEM
5863
google-cloud-core (~> 1.6)
5964
googleauth (>= 0.16.2, < 2.a)
6065
mini_mime (~> 1.0)
61-
google-cloud-core (1.6.0)
62-
google-cloud-env (~> 1.0)
66+
google-cloud-core (1.8.0)
67+
google-cloud-env (>= 1.0, < 3.a)
6368
google-cloud-errors (~> 1.0)
64-
google-cloud-env (1.6.0)
65-
faraday (>= 0.17.3, < 3.0)
66-
google-cloud-errors (1.3.1)
67-
google-cloud-firestore (2.13.1)
69+
google-cloud-env (2.3.1)
70+
base64 (~> 0.2)
71+
faraday (>= 1.0, < 3.a)
72+
google-cloud-errors (1.6.0)
73+
google-cloud-firestore (2.16.1)
74+
bigdecimal (~> 3.0)
6875
concurrent-ruby (~> 1.0)
6976
google-cloud-core (~> 1.5)
70-
google-cloud-firestore-v1 (~> 0.10)
77+
google-cloud-firestore-v1 (>= 0.10, < 2.a)
7178
rbtree (~> 0.4.2)
72-
google-cloud-firestore-v1 (0.10.0)
73-
gapic-common (>= 0.17.1, < 2.a)
79+
google-cloud-firestore-v1 (1.3.0)
80+
gapic-common (>= 0.25.0, < 2.a)
7481
google-cloud-errors (~> 1.0)
75-
google-cloud-location (>= 0.4, < 2.a)
76-
google-cloud-location (0.6.0)
77-
gapic-common (>= 0.20.0, < 2.a)
82+
google-cloud-location (>= 0.7, < 2.a)
83+
google-cloud-location (1.3.0)
84+
gapic-common (~> 1.2)
7885
google-cloud-errors (~> 1.0)
7986
google-cloud-storage (1.44.0)
8087
addressable (~> 2.8)
@@ -94,38 +101,48 @@ GEM
94101
google-cloud-vision-v1p3beta1 (0.11.0)
95102
gapic-common (>= 0.20.0, < 2.a)
96103
google-cloud-errors (~> 1.0)
97-
google-protobuf (3.24.4)
98-
googleapis-common-protos (1.4.0)
99-
google-protobuf (~> 3.14)
100-
googleapis-common-protos-types (~> 1.2)
101-
grpc (~> 1.27)
102-
googleapis-common-protos-types (1.9.0)
103-
google-protobuf (~> 3.18)
104-
googleauth (1.8.1)
105-
faraday (>= 0.17.3, < 3.a)
106-
jwt (>= 1.4, < 3.0)
104+
google-logging-utils (0.2.0)
105+
google-protobuf (4.33.6)
106+
bigdecimal
107+
rake (>= 13)
108+
googleapis-common-protos (1.9.0)
109+
google-protobuf (~> 4.26)
110+
googleapis-common-protos-types (~> 1.21)
111+
grpc (~> 1.41)
112+
googleapis-common-protos-types (1.22.0)
113+
google-protobuf (~> 4.26)
114+
googleauth (1.16.2)
115+
faraday (>= 1.0, < 3.a)
116+
google-cloud-env (~> 2.2)
117+
google-logging-utils (~> 0.1)
118+
jwt (>= 1.4, < 4.0)
107119
multi_json (~> 1.11)
108120
os (>= 0.9, < 2.0)
109121
signet (>= 0.16, < 2.a)
110-
grpc (1.58.0)
111-
google-protobuf (~> 3.23)
122+
grpc (1.80.0-x86_64-linux-gnu)
123+
google-protobuf (>= 3.25, < 5.0)
112124
googleapis-common-protos-types (~> 1.0)
113125
hashie (5.0.0)
114126
httpclient (2.8.3)
115-
jwt (2.7.1)
127+
json (2.19.3)
128+
jwt (3.1.2)
129+
base64
130+
logger (1.7.0)
116131
mini_magick (4.12.0)
117132
mini_mime (1.1.5)
118-
minitest (5.20.0)
133+
minitest (5.27.0)
119134
minitest-focus (1.4.0)
120135
minitest (>= 4, < 6)
121136
minitest-junit (1.1.0)
122137
builder (~> 3.2)
123138
minitest (~> 5.11)
124-
multi_json (1.15.0)
139+
multi_json (1.19.1)
125140
multipart-post (2.3.0)
141+
net-http (0.9.1)
142+
uri (>= 0.11.1)
126143
nio4r (2.7.0)
127144
os (1.1.4)
128-
public_suffix (5.0.3)
145+
public_suffix (7.0.5)
129146
puma (6.4.2)
130147
nio4r (~> 2.0)
131148
rack (3.0.9.1)
@@ -137,11 +154,10 @@ GEM
137154
uber (< 0.2.0)
138155
retriable (3.1.2)
139156
rexml (3.2.6)
140-
ruby2_keywords (0.0.5)
141-
signet (0.18.0)
157+
signet (0.21.0)
142158
addressable (~> 2.8)
143159
faraday (>= 0.17.5, < 3.a)
144-
jwt (>= 1.5, < 3.0)
160+
jwt (>= 1.5, < 4.0)
145161
multi_json (~> 1.10)
146162
slack-ruby-client (2.2.0)
147163
faraday (>= 2.0)
@@ -151,12 +167,14 @@ GEM
151167
hashie
152168
trailblazer-option (0.1.2)
153169
uber (0.1.0)
170+
uri (1.1.1)
154171
webrick (1.8.1)
155172

156173
PLATFORMS
157-
ruby
174+
x86_64-linux
158175

159176
DEPENDENCIES
177+
benchmark
160178
functions_framework (~> 1.4, >= 1.4.1)
161179
google-apis-kgsearch_v1 (~> 0.13)
162180
google-cloud-bigquery (~> 1.45)

functions/helloworld/http/app.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
# The request parameter is a Rack::Request object.
2222
# See https://www.rubydoc.info/gems/rack/Rack/Request
2323
name = request.params["name"] ||
24-
(request.body.rewind && JSON.parse(request.body.read)["name"]) rescue "World"
24+
begin
25+
request.body.rewind
26+
JSON.parse(request.body.read)["name"]
27+
rescue StandardError
28+
nil
29+
end ||
30+
"World"
2531
# Return the response body as a string.
2632
# You can also return a Rack::Response object, a Rack response array, or
2733
# a hash which will be JSON-encoded into a response.

0 commit comments

Comments
 (0)