functions_framework 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faa749d3b692f754f7ad60dfc3a5b18c2b9b26c757769ab51e16786a6289b4ad
4
- data.tar.gz: 8d918a95adc8caa077fdc19fbc1ec3f3b531a6de279b19da2282bbd4479305d5
3
+ metadata.gz: f6d562086a839aaf78661b9417d3b931df10c74c98cb07b1710d40d6294b0490
4
+ data.tar.gz: fd070c121ce3e0c1bab7f1a738178a37c72c5d25c7726d3f3540e687d01bbe25
5
5
  SHA512:
6
- metadata.gz: 8e372039d4885f765f634f1f90975282b12c28f97acf7ba9a5ad4dba100a444c5d6a494a8792a9ed2c2fe6cb6f969ee886dab0f26eda8334ebe21288d506413e
7
- data.tar.gz: 1f61e76bbc9ba84283e120e77da66dc488ded6178bd07691d42d8c5472605b8d839dd85c75747b3611dfe87bffae3db2d2a4803389ff56fb3b0415f663fce2b3
6
+ metadata.gz: 478554bfc8b8bafb2efd5bb880b8e053e2442a878bcd1363a4c6ddeab77a811b49530b84f467009b01f2299b70105f17a8a9840d9b35ebbec94359ca14d7114c
7
+ data.tar.gz: 6873da52a257f542cb782fde59ba7da7f96042f4b69eaf470ea23d81cdb8479e8ff2791a6fbd0fd36ec166039f9718b7ce1b14632c690b44bea2833e280835b5
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### v0.7.1 / 2021-01-26
4
+
5
+ * DOCS: Fixed several errors in the writing-functions doc samples
6
+ * DOCS: Updated documentation to note public release of GCF support
7
+
3
8
  ### v0.7.0 / 2020-09-25
4
9
 
5
10
  * Now requires Ruby 2.5 or later.
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # Functions Framework [![Documentation](https://img.shields.io/badge/docs-FunctionsFramework-red.svg)](https://googlecloudplatform.github.io/functions-framework-ruby/latest) [![Gem Version](https://badge.fury.io/rb/functions_framework.svg)](https://badge.fury.io/rb/functions_framework)
1
+ # Functions Framework for Ruby [![Documentation](https://img.shields.io/badge/docs-FunctionsFramework-red.svg)](https://googlecloudplatform.github.io/functions-framework-ruby/latest) [![Gem Version](https://badge.fury.io/rb/functions_framework.svg)](https://badge.fury.io/rb/functions_framework)
2
2
 
3
3
  An open source framework for writing lightweight, portable Ruby functions that
4
4
  run in a serverless environment. Functions written to this Framework will run
5
5
  in many different environments, including:
6
6
 
7
- * [Google Cloud Functions](https://cloud.google.com/functions) *(alpha)*
7
+ * [Google Cloud Functions](https://cloud.google.com/functions) *(public preview)*
8
8
  * [Google Cloud Run](https://cloud.google.com/run)
9
9
  * Any other [Knative](https://github.com/knative)-based environment
10
10
  * Your local development machine
@@ -31,12 +31,8 @@ Functions Framework is designed especially for functions that can be hosted on
31
31
  Cloud Functions.
32
32
 
33
33
  You can run Ruby functions on Google Cloud Functions by selecting the `ruby26`
34
- runtime. This runtime uses a recent release of Ruby 2.6. Support for other
35
- versions of Ruby may be added in the future.
36
-
37
- > **Note:** Ruby support on Cloud Functions is currently in limited alpha.
38
- > It is not yet suitable for production workloads, and support is best-effort
39
- > only. Access is currently limited to selected early-access users.
34
+ runtime or `ruby27` runtime to use a recent release of Ruby 2.6 or Ruby 2.7.
35
+ Support for Ruby 3.0 is forthcoming.
40
36
 
41
37
  ### Deploying and updating your function
42
38
 
@@ -64,7 +60,7 @@ Then, issue the gcloud command to deploy:
64
60
  ```sh
65
61
  gcloud functions deploy $YOUR_FUNCTION_NAME \
66
62
  --project=$YOUR_PROJECT_ID \
67
- --runtime=ruby26 \
63
+ --runtime=ruby27 \
68
64
  --trigger-http \
69
65
  --entry-point=$YOUR_FUNCTION_TARGET
70
66
  ```
@@ -90,7 +86,7 @@ and above, set `FUNCTION_LOGGING_LEVEL` to `WARN` when deploying:
90
86
 
91
87
  ```sh
92
88
  gcloud functions deploy $YOUR_FUNCTION_NAME --project=$YOUR_PROJECT_ID \
93
- --runtime=ruby26 --trigger-http --source=$YOUR_FUNCTION_SOURCE \
89
+ --runtime=ruby27 --trigger-http --source=$YOUR_FUNCTION_SOURCE \
94
90
  --entry-point=$YOUR_FUNCTION_TARGET \
95
91
  --set-env-vars=FUNCTION_LOGGING_LEVEL=WARN
96
92
  ```
@@ -125,7 +121,7 @@ Dockerfile that you can use as a starting point. Feel free to adjust it to the
125
121
  needs of your project:
126
122
 
127
123
  ```
128
- FROM ruby:2.6
124
+ FROM ruby:2.7
129
125
  WORKDIR /app
130
126
  COPY . .
131
127
  RUN gem install --no-document bundler \
@@ -151,8 +147,8 @@ command may ask you for permission to enable the Cloud Build API for the project
151
147
  if it isn't already enabled.
152
148
 
153
149
  Because you provide your own Docker image when deploying to Cloud Run, you can
154
- use any version of Ruby supported by the Functions Framework, from 2.4 through
155
- 2.7.
150
+ use any version of Ruby supported by the Functions Framework, from 2.5 through
151
+ 3.0.
156
152
 
157
153
  ### Deploying an image to Cloud Run
158
154
 
@@ -8,7 +8,7 @@ The Functions Framework is an open source framework for writing lightweight,
8
8
  portable Ruby functions that run in a serverless environment. Functions written
9
9
  to this Framework will run in many different environments, including:
10
10
 
11
- * [Google Cloud Functions](https://cloud.google.com/functions) *(alpha)*
11
+ * [Google Cloud Functions](https://cloud.google.com/functions) *(public preview)*
12
12
  * [Google Cloud Run](https://cloud.google.com/run)
13
13
  * Any other [Knative](https://github.com/knative)-based environment
14
14
  * Your local development machine
@@ -53,7 +53,7 @@ require "functions_framework"
53
53
 
54
54
  FunctionsFramework.http "request_info_example" do |request|
55
55
  # Include some request info in the response body.
56
- "Received #{request.method} from #{request.url}!\n"
56
+ "Received #{request.request_method} from #{request.url}!\n"
57
57
  end
58
58
  ```
59
59
 
@@ -68,7 +68,7 @@ require "functions_framework"
68
68
 
69
69
  FunctionsFramework.http "logging_example" do |request|
70
70
  # Log some request info.
71
- request.logger.info "I received #{request.method} from #{request.url}!"
71
+ request.logger.info "I received #{request.request_method} from #{request.url}!"
72
72
  # A simple response body.
73
73
  "ok"
74
74
  end
@@ -446,7 +446,7 @@ class Hello
446
446
  end
447
447
 
448
448
  def build_response
449
- "Received request: #{request.method} #{request.url}\n"
449
+ "Received request: #{@request.request_method} #{@request.url}\n"
450
450
  end
451
451
  end
452
452
  ```
@@ -17,5 +17,5 @@ module FunctionsFramework
17
17
  # Version of the Ruby Functions Framework
18
18
  # @return [String]
19
19
  #
20
- VERSION = "0.7.0".freeze
20
+ VERSION = "0.7.1".freeze
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: functions_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
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-09-25 00:00:00.000000000 Z
11
+ date: 2021-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cloud_events
@@ -87,10 +87,10 @@ homepage: https://github.com/GoogleCloudPlatform/functions-framework-ruby
87
87
  licenses:
88
88
  - Apache-2.0
89
89
  metadata:
90
- changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v0.7.0/file.CHANGELOG.html
90
+ changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v0.7.1/file.CHANGELOG.html
91
91
  source_code_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby
92
92
  bug_tracker_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby/issues
93
- documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v0.7.0
93
+ documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v0.7.1
94
94
  post_install_message:
95
95
  rdoc_options: []
96
96
  require_paths:
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.0.3
109
+ rubygems_version: 3.1.4
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Functions Framework for Ruby