functions_framework 0.2.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -1
- data/README.md +2 -2
- data/docs/deploying-functions.md +21 -2
- data/docs/overview.md +2 -2
- data/docs/writing-functions.md +37 -22
- data/lib/functions_framework.rb +10 -17
- data/lib/functions_framework/function.rb +81 -24
- data/lib/functions_framework/legacy_event_converter.rb +38 -30
- data/lib/functions_framework/registry.rb +2 -16
- data/lib/functions_framework/server.rb +20 -14
- data/lib/functions_framework/testing.rb +60 -22
- data/lib/functions_framework/version.rb +1 -1
- metadata +17 -104
- data/lib/functions_framework/cloud_events.rb +0 -43
- data/lib/functions_framework/cloud_events/content_type.rb +0 -139
- data/lib/functions_framework/cloud_events/errors.rb +0 -42
- data/lib/functions_framework/cloud_events/event.rb +0 -79
- data/lib/functions_framework/cloud_events/event/v1.rb +0 -363
- data/lib/functions_framework/cloud_events/http_binding.rb +0 -270
- data/lib/functions_framework/cloud_events/json_format.rb +0 -122
@@ -23,19 +23,17 @@ module FunctionsFramework
|
|
23
23
|
# Decode an event from the given Rack environment hash.
|
24
24
|
#
|
25
25
|
# @param env [Hash] The Rack environment
|
26
|
-
# @return [
|
27
|
-
# be converted
|
26
|
+
# @return [::CloudEvents::Event] if the request could be converted
|
28
27
|
# @return [nil] if the event format was not recognized.
|
29
28
|
#
|
30
29
|
def decode_rack_env env
|
31
|
-
content_type = CloudEvents::ContentType.new env["CONTENT_TYPE"]
|
32
|
-
return nil unless content_type.media_type == "application" && content_type.
|
30
|
+
content_type = ::CloudEvents::ContentType.new env["CONTENT_TYPE"]
|
31
|
+
return nil unless content_type.media_type == "application" && content_type.subtype_base == "json"
|
33
32
|
input = read_input_json env["rack.input"], content_type.charset
|
34
33
|
return nil unless input
|
35
|
-
|
36
|
-
context = normalized_context raw_context
|
34
|
+
context = normalized_context input
|
37
35
|
return nil unless context
|
38
|
-
construct_cloud_event context, input["data"]
|
36
|
+
construct_cloud_event context, input["data"], content_type.charset
|
39
37
|
end
|
40
38
|
|
41
39
|
private
|
@@ -50,27 +48,27 @@ module FunctionsFramework
|
|
50
48
|
nil
|
51
49
|
end
|
52
50
|
|
53
|
-
def normalized_context
|
54
|
-
|
55
|
-
|
56
|
-
timestamp = raw_context["timestamp"]
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
return nil unless service && resource
|
51
|
+
def normalized_context input
|
52
|
+
raw_context = input["context"]
|
53
|
+
id = raw_context&.[]("eventId") || input["eventId"]
|
54
|
+
timestamp = raw_context&.[]("timestamp") || input["timestamp"]
|
55
|
+
type = raw_context&.[]("eventType") || input["eventType"]
|
56
|
+
service, resource = analyze_resource raw_context&.[]("resource") || input["resource"]
|
57
|
+
service ||= service_from_type type
|
58
|
+
return nil unless id && timestamp && type && service && resource
|
62
59
|
{ id: id, timestamp: timestamp, type: type, service: service, resource: resource }
|
63
60
|
end
|
64
61
|
|
65
|
-
def analyze_resource raw_resource
|
62
|
+
def analyze_resource raw_resource
|
63
|
+
service = resource = nil
|
66
64
|
case raw_resource
|
67
65
|
when ::Hash
|
68
|
-
|
66
|
+
service = raw_resource["service"]
|
67
|
+
resource = raw_resource["name"]
|
69
68
|
when ::String
|
70
|
-
|
71
|
-
else
|
72
|
-
[nil, nil]
|
69
|
+
resource = raw_resource
|
73
70
|
end
|
71
|
+
[service, resource]
|
74
72
|
end
|
75
73
|
|
76
74
|
def service_from_type type
|
@@ -80,18 +78,20 @@ module FunctionsFramework
|
|
80
78
|
nil
|
81
79
|
end
|
82
80
|
|
83
|
-
def construct_cloud_event context, data
|
81
|
+
def construct_cloud_event context, data, charset
|
84
82
|
source, subject = convert_source context[:service], context[:resource]
|
85
83
|
type = LEGACY_TYPE_TO_CE_TYPE[context[:type]]
|
86
84
|
return nil unless type && source
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
85
|
+
ce_data = convert_data context[:service], data
|
86
|
+
content_type = "application/json; charset=#{charset}"
|
87
|
+
::CloudEvents::Event.new id: context[:id],
|
88
|
+
source: source,
|
89
|
+
type: type,
|
90
|
+
spec_version: "1.0",
|
91
|
+
data_content_type: content_type,
|
92
|
+
data: ce_data,
|
93
|
+
subject: subject,
|
94
|
+
time: context[:timestamp]
|
95
95
|
end
|
96
96
|
|
97
97
|
def convert_source service, resource
|
@@ -104,6 +104,14 @@ module FunctionsFramework
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
def convert_data service, data
|
108
|
+
if service == "pubsub.googleapis.com"
|
109
|
+
{ "message" => data, "subscription" => nil }
|
110
|
+
else
|
111
|
+
data
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
107
115
|
LEGACY_TYPE_TO_SERVICE = {
|
108
116
|
%r{^providers/cloud\.firestore/} => "firestore.googleapis.com",
|
109
117
|
%r{^providers/cloud\.pubsub/} => "pubsub.googleapis.com",
|
@@ -75,27 +75,13 @@ module FunctionsFramework
|
|
75
75
|
self
|
76
76
|
end
|
77
77
|
|
78
|
-
##
|
79
|
-
# This is an obsolete interface that defines an event function taking two
|
80
|
-
# arguments (data and context) rather than one.
|
81
|
-
#
|
82
|
-
# @deprecated Use {Registry#add_cloud_event} instead.
|
83
|
-
#
|
84
|
-
def add_event name, &block
|
85
|
-
name = name.to_s
|
86
|
-
synchronize do
|
87
|
-
raise ::ArgumentError, "Function already defined: #{name}" if @functions.key? name
|
88
|
-
@functions[name] = Function.new name, :event, &block
|
89
|
-
end
|
90
|
-
self
|
91
|
-
end
|
92
|
-
|
93
78
|
##
|
94
79
|
# Add a CloudEvent function to the registry.
|
95
80
|
#
|
96
81
|
# You must provide a name for the function, and a block that implemets the
|
97
82
|
# function. The block should take _one_ argument: the event object of type
|
98
|
-
#
|
83
|
+
# [`CloudEvents::Event`](https://rubydoc.info/gems/cloud_events/CloudEvents/Event).
|
84
|
+
# Any return value is ignored.
|
99
85
|
#
|
100
86
|
# @param name [String] The function name
|
101
87
|
# @param block [Proc] The function code as a proc
|
@@ -47,7 +47,7 @@ module FunctionsFramework
|
|
47
47
|
case function.type
|
48
48
|
when :http
|
49
49
|
HttpApp.new function, @config
|
50
|
-
when :
|
50
|
+
when :cloud_event
|
51
51
|
EventApp.new function, @config
|
52
52
|
else
|
53
53
|
raise "Unrecognized function type: #{function.type}"
|
@@ -149,8 +149,12 @@ module FunctionsFramework
|
|
149
149
|
::Signal.trap "SIGINT" do
|
150
150
|
Server.signal_enqueue "SIGINT", @config.logger, @server
|
151
151
|
end
|
152
|
-
|
153
|
-
|
152
|
+
begin
|
153
|
+
::Signal.trap "SIGHUP" do
|
154
|
+
Server.signal_enqueue "SIGHUP", @config.logger, @server
|
155
|
+
end
|
156
|
+
rescue ::ArgumentError # rubocop:disable Lint/HandleExceptions
|
157
|
+
# Not available on all systems
|
154
158
|
end
|
155
159
|
@signals_installed = true
|
156
160
|
end
|
@@ -340,7 +344,7 @@ module FunctionsFramework
|
|
340
344
|
string_response response, "text/plain", 200
|
341
345
|
when ::Hash
|
342
346
|
string_response ::JSON.dump(response), "application/json", 200
|
343
|
-
when CloudEvents::CloudEventsError
|
347
|
+
when ::CloudEvents::CloudEventsError
|
344
348
|
cloud_events_error_response response
|
345
349
|
when ::StandardError
|
346
350
|
error_response "#{response.class}: #{response.message}\n#{response.backtrace}\n"
|
@@ -384,10 +388,11 @@ module FunctionsFramework
|
|
384
388
|
return notfound_response if excluded_path? env
|
385
389
|
response =
|
386
390
|
begin
|
387
|
-
logger = env["rack.logger"]
|
391
|
+
logger = env["rack.logger"] ||= @config.logger
|
388
392
|
request = ::Rack::Request.new env
|
389
393
|
logger.info "FunctionsFramework: Handling HTTP #{request.request_method} request"
|
390
|
-
@function.
|
394
|
+
calling_context = @function.new_call logger: logger
|
395
|
+
calling_context.call request
|
391
396
|
rescue ::StandardError => e
|
392
397
|
e
|
393
398
|
end
|
@@ -400,21 +405,21 @@ module FunctionsFramework
|
|
400
405
|
def initialize function, config
|
401
406
|
super config
|
402
407
|
@function = function
|
403
|
-
@cloud_events = CloudEvents::HttpBinding.default
|
408
|
+
@cloud_events = ::CloudEvents::HttpBinding.default
|
404
409
|
@legacy_events = LegacyEventConverter.new
|
405
410
|
end
|
406
411
|
|
407
412
|
def call env
|
408
413
|
return notfound_response if excluded_path? env
|
409
|
-
logger = env["rack.logger"]
|
414
|
+
logger = env["rack.logger"] ||= @config.logger
|
410
415
|
event = decode_event env
|
411
416
|
response =
|
412
417
|
case event
|
413
|
-
when CloudEvents::Event
|
418
|
+
when ::CloudEvents::Event
|
414
419
|
handle_cloud_event event, logger
|
415
420
|
when ::Array
|
416
|
-
CloudEvents::HttpContentError.new "Batched CloudEvents are not supported"
|
417
|
-
when CloudEvents::CloudEventsError
|
421
|
+
::CloudEvents::HttpContentError.new "Batched CloudEvents are not supported"
|
422
|
+
when ::CloudEvents::CloudEventsError
|
418
423
|
event
|
419
424
|
else
|
420
425
|
raise "Unexpected event type: #{event.class}"
|
@@ -427,14 +432,15 @@ module FunctionsFramework
|
|
427
432
|
def decode_event env
|
428
433
|
@cloud_events.decode_rack_env(env) ||
|
429
434
|
@legacy_events.decode_rack_env(env) ||
|
430
|
-
raise(CloudEvents::HttpContentError, "Unrecognized event format")
|
431
|
-
rescue CloudEvents::CloudEventsError => e
|
435
|
+
raise(::CloudEvents::HttpContentError, "Unrecognized event format")
|
436
|
+
rescue ::CloudEvents::CloudEventsError => e
|
432
437
|
e
|
433
438
|
end
|
434
439
|
|
435
440
|
def handle_cloud_event event, logger
|
436
441
|
logger.info "FunctionsFramework: Handling CloudEvent"
|
437
|
-
@function.
|
442
|
+
calling_context = @function.new_call logger: logger
|
443
|
+
calling_context.call event
|
438
444
|
"ok"
|
439
445
|
rescue ::StandardError => e
|
440
446
|
e
|
@@ -87,7 +87,7 @@ module FunctionsFramework
|
|
87
87
|
function = ::FunctionsFramework.global_registry[name]
|
88
88
|
case function&.type
|
89
89
|
when :http
|
90
|
-
Testing.interpret_response { function.call request }
|
90
|
+
Testing.interpret_response { function.new_call.call request }
|
91
91
|
when nil
|
92
92
|
raise "Unknown function name #{name}"
|
93
93
|
else
|
@@ -97,17 +97,17 @@ module FunctionsFramework
|
|
97
97
|
|
98
98
|
##
|
99
99
|
# Call the given event function for testing. The underlying function must
|
100
|
-
# be of type
|
100
|
+
# be of type :cloud_event`.
|
101
101
|
#
|
102
102
|
# @param name [String] The name of the function to call
|
103
|
-
# @param event [
|
103
|
+
# @param event [::CloudEvents::Event] The event to send
|
104
104
|
# @return [nil]
|
105
105
|
#
|
106
106
|
def call_event name, event
|
107
107
|
function = ::FunctionsFramework.global_registry[name]
|
108
108
|
case function&.type
|
109
|
-
when :
|
110
|
-
function.call event
|
109
|
+
when :cloud_event
|
110
|
+
function.new_call.call event
|
111
111
|
nil
|
112
112
|
when nil
|
113
113
|
raise "Unknown function name #{name}"
|
@@ -116,30 +116,52 @@ module FunctionsFramework
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
+
##
|
120
|
+
# Make a Rack request, for passing to a function test.
|
121
|
+
#
|
122
|
+
# @param url [URI,String] The URL to get, including query params.
|
123
|
+
# @param method [String] The HTTP method (defaults to "GET").
|
124
|
+
# @param body [String] The HTTP body, if any.
|
125
|
+
# @param headers [Array,Hash] HTTP headers. May be given as a hash (of
|
126
|
+
# header names mapped to values), an array of strings (where each
|
127
|
+
# string is of the form `Header-Name: Header value`), or an array of
|
128
|
+
# two-element string arrays.
|
129
|
+
# @return [Rack::Request]
|
130
|
+
#
|
131
|
+
def make_request url, method: ::Rack::GET, body: nil, headers: []
|
132
|
+
env = Testing.build_standard_env URI(url), headers
|
133
|
+
env[::Rack::REQUEST_METHOD] = method
|
134
|
+
env[::Rack::RACK_INPUT] = ::StringIO.new body if body
|
135
|
+
::Rack::Request.new env
|
136
|
+
end
|
137
|
+
|
119
138
|
##
|
120
139
|
# Make a simple GET request, for passing to a function test.
|
121
140
|
#
|
122
141
|
# @param url [URI,String] The URL to get.
|
142
|
+
# @param headers [Array,Hash] HTTP headers. May be given as a hash (of
|
143
|
+
# header names mapped to values), an array of strings (where each
|
144
|
+
# string is of the form `Header-Name: Header value`), or an array of
|
145
|
+
# two-element string arrays.
|
123
146
|
# @return [Rack::Request]
|
124
147
|
#
|
125
148
|
def make_get_request url, headers = []
|
126
|
-
|
127
|
-
env[::Rack::REQUEST_METHOD] = ::Rack::GET
|
128
|
-
::Rack::Request.new env
|
149
|
+
make_request url, headers: headers
|
129
150
|
end
|
130
151
|
|
131
152
|
##
|
132
153
|
# Make a simple POST request, for passing to a function test.
|
133
154
|
#
|
134
155
|
# @param url [URI,String] The URL to post to.
|
135
|
-
# @param
|
156
|
+
# @param body [String] The body to post.
|
157
|
+
# @param headers [Array,Hash] HTTP headers. May be given as a hash (of
|
158
|
+
# header names mapped to values), an array of strings (where each
|
159
|
+
# string is of the form `Header-Name: Header value`), or an array of
|
160
|
+
# two-element string arrays.
|
136
161
|
# @return [Rack::Request]
|
137
162
|
#
|
138
|
-
def make_post_request url,
|
139
|
-
|
140
|
-
env[::Rack::REQUEST_METHOD] = ::Rack::POST
|
141
|
-
env[::Rack::RACK_INPUT] = ::StringIO.new data
|
142
|
-
::Rack::Request.new env
|
163
|
+
def make_post_request url, body, headers = []
|
164
|
+
make_request url, method: ::Rack::POST, body: body, headers: headers
|
143
165
|
end
|
144
166
|
|
145
167
|
##
|
@@ -152,23 +174,35 @@ module FunctionsFramework
|
|
152
174
|
# @param source [String,URI] Event source (optional)
|
153
175
|
# @param type [String] Event type (optional)
|
154
176
|
# @param spec_version [String] Spec version (optional)
|
155
|
-
# @param data_content_type [String
|
177
|
+
# @param data_content_type [String,::CloudEvents::ContentType]
|
156
178
|
# Content type for the data (optional)
|
157
179
|
# @param data_schema [String,URI] Data schema (optional)
|
158
180
|
# @param subject [String] Subject (optional)
|
159
181
|
# @param time [String,DateTime] Event timestamp (optional)
|
160
|
-
# @return [
|
182
|
+
# @return [::CloudEvents::Event]
|
161
183
|
#
|
162
184
|
def make_cloud_event data,
|
163
|
-
id: nil,
|
164
|
-
|
185
|
+
id: nil,
|
186
|
+
source: nil,
|
187
|
+
type: nil,
|
188
|
+
spec_version: nil,
|
189
|
+
data_content_type: nil,
|
190
|
+
data_schema: nil,
|
191
|
+
subject: nil,
|
192
|
+
time: nil
|
165
193
|
id ||= "random-id-#{rand 100_000_000}"
|
166
194
|
source ||= "functions-framework-testing"
|
167
195
|
type ||= "com.example.test"
|
168
196
|
spec_version ||= "1.0"
|
169
|
-
CloudEvents::Event.new id:
|
170
|
-
|
171
|
-
|
197
|
+
::CloudEvents::Event.new id: id,
|
198
|
+
source: source,
|
199
|
+
type: type,
|
200
|
+
spec_version: spec_version,
|
201
|
+
data_content_type: data_content_type,
|
202
|
+
data_schema: data_schema,
|
203
|
+
subject: subject,
|
204
|
+
time: time,
|
205
|
+
data: data
|
172
206
|
end
|
173
207
|
|
174
208
|
extend self
|
@@ -245,7 +279,11 @@ module FunctionsFramework
|
|
245
279
|
::Rack::RACK_ERRORS => ::StringIO.new
|
246
280
|
}
|
247
281
|
headers.each do |header|
|
248
|
-
|
282
|
+
if header.is_a? String
|
283
|
+
name, value = header.split ":"
|
284
|
+
elsif header.is_a? Array
|
285
|
+
name, value = header
|
286
|
+
end
|
249
287
|
next unless name && value
|
250
288
|
name = name.strip.upcase.tr "-", "_"
|
251
289
|
name = "HTTP_#{name}" unless ["CONTENT_TYPE", "CONTENT_LENGTH"].include? name
|
metadata
CHANGED
@@ -1,141 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: functions_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: cloud_events
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: puma
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: google-style
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.24.0
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.24.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: minitest
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '5.13'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '5.13'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: minitest-focus
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.1'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.1'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: minitest-rg
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5.2'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '5.2'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: redcarpet
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '3.5'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3.5'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: toys
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.10.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.10.0
|
40
|
+
version: '4.3'
|
125
41
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
42
|
+
name: rack
|
127
43
|
requirement: !ruby/object:Gem::Requirement
|
128
44
|
requirements:
|
129
45
|
- - "~>"
|
130
46
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
132
|
-
type: :
|
47
|
+
version: '2.1'
|
48
|
+
type: :runtime
|
133
49
|
prerelease: false
|
134
50
|
version_requirements: !ruby/object:Gem::Requirement
|
135
51
|
requirements:
|
136
52
|
- - "~>"
|
137
53
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
54
|
+
version: '2.1'
|
139
55
|
description: The Functions Framework implementation for Ruby.
|
140
56
|
email:
|
141
57
|
- dazuma@google.com
|
@@ -158,13 +74,6 @@ files:
|
|
158
74
|
- docs/writing-functions.md
|
159
75
|
- lib/functions_framework.rb
|
160
76
|
- lib/functions_framework/cli.rb
|
161
|
-
- lib/functions_framework/cloud_events.rb
|
162
|
-
- lib/functions_framework/cloud_events/content_type.rb
|
163
|
-
- lib/functions_framework/cloud_events/errors.rb
|
164
|
-
- lib/functions_framework/cloud_events/event.rb
|
165
|
-
- lib/functions_framework/cloud_events/event/v1.rb
|
166
|
-
- lib/functions_framework/cloud_events/http_binding.rb
|
167
|
-
- lib/functions_framework/cloud_events/json_format.rb
|
168
77
|
- lib/functions_framework/function.rb
|
169
78
|
- lib/functions_framework/legacy_event_converter.rb
|
170
79
|
- lib/functions_framework/registry.rb
|
@@ -174,7 +83,11 @@ files:
|
|
174
83
|
homepage: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
175
84
|
licenses:
|
176
85
|
- Apache-2.0
|
177
|
-
metadata:
|
86
|
+
metadata:
|
87
|
+
changelog_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby/blob/master/CHANGELOG.md
|
88
|
+
source_code_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
89
|
+
bug_tracker_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby/issues
|
90
|
+
documentation_uri: https://rubydoc.info/gems/functions_framework/0.5.0
|
178
91
|
post_install_message:
|
179
92
|
rdoc_options: []
|
180
93
|
require_paths:
|