File tree Expand file tree Collapse file tree 20 files changed +87
-12
lines changed
Expand file tree Collapse file tree 20 files changed +87
-12
lines changed Original file line number Diff line number Diff line change 1616require "sinatra"
1717require "net/http"
1818
19+ # [END gae_flex_analytics_track_event]
20+ # Allows all hosts in development
21+ configure :development do
22+ set :host_authorization , { permitted_hosts : [ ] }
23+ end
24+
25+ # [START gae_flex_analytics_track_event]
1926# The following environment variable is set by app.yaml when running on GAE,
2027# but will need to be manually set when running locally. See README.md.
2128GA_TRACKING_ID = ENV [ "GA_TRACKING_ID" ]
Original file line number Diff line number Diff line change 1818require "sinatra"
1919require "json"
2020
21+ # [END cloud_tasks_appengine_quickstart]
22+ # Allows all hosts in development
23+ configure :development do
24+ set :host_authorization , { permitted_hosts : [ ] }
25+ end
26+
27+ # [START cloud_tasks_appengine_quickstart]
2128get "/" do
2229 # Basic index to verify app is serving
2330 "Hello World!"
Original file line number Diff line number Diff line change 1717require "sinatra"
1818require "google/cloud/datastore"
1919
20+ # [END gae_flex_datastore_app]
21+ # Allows all hosts in development
22+ configure :development do
23+ set :host_authorization , { permitted_hosts : [ ] }
24+ end
25+
26+ # [START gae_flex_datastore_app]
2027get "/" do
2128 datastore = Google ::Cloud ::Datastore . new
2229
Original file line number Diff line number Diff line change 1515# [START gae_flex_quickstart]
1616require "sinatra"
1717
18+ # [END gae_flex_quickstart]
19+ # Allows all hosts in development
20+ configure :development do
21+ set :host_authorization , { permitted_hosts : [ ] }
22+ end
23+
24+ # [START gae_flex_quickstart]
1825get "/" do
1926 "Hello world!"
2027end
Original file line number Diff line number Diff line change 1414
1515source "https://rubygems.org"
1616
17- gem "sinatra" , "~> 3.2"
17+ gem "puma"
18+ gem "rackup" , "~> 1.0"
19+ gem "sinatra"
1820
1921group :test do
2022 gem "faraday"
Original file line number Diff line number Diff line change 1111 ruby2_keywords (~> 0.0.1 )
1212 net-http (0.4.1 )
1313 uri
14+ nio4r (2.7.4 )
15+ puma (6.6.0 )
16+ nio4r (~> 2.0 )
1417 rack (2.2.8.1 )
1518 rack-protection (3.2.0 )
1619 base64 (>= 0.1.0 )
1720 rack (~> 2.2 , >= 2.2.4 )
21+ rackup (1.0.1 )
22+ rack (< 3 )
23+ webrick
1824 rspec (3.13.0 )
1925 rspec-core (~> 3.13.0 )
2026 rspec-expectations (~> 3.13.0 )
3844 tilt (~> 2.0 )
3945 tilt (2.3.0 )
4046 uri (0.13.0 )
47+ webrick (1.9.1 )
4148
4249PLATFORMS
4350 ruby
4451
4552DEPENDENCIES
4653 faraday
54+ puma
55+ rackup (~> 1.0 )
4756 rspec
4857 rspec_junit_formatter
49- sinatra ( ~> 3.2 )
58+ sinatra
5059
5160BUNDLED WITH
5261 2.4.22
Original file line number Diff line number Diff line change 1616require "sinatra"
1717require "net/http"
1818
19+ # [END gae_flex_metadata]
20+ # Allows all hosts in development
21+ configure :development do
22+ set :host_authorization , { permitted_hosts : [ ] }
23+ end
24+
25+ # [START gae_flex_metadata]
1926get "/" do
2027 uri = URI . parse (
2128 "http://metadata.google.internal/computeMetadata/v1" +
Original file line number Diff line number Diff line change 1515runtime : ruby
1616env : flex
1717entrypoint : bundle exec ruby app.rb
18+
19+ runtime_config :
20+ operating_system : " ubuntu22"
Original file line number Diff line number Diff line change 2121
2222pubsub = Google ::Cloud ::Pubsub . new
2323
24+ # Allows all hosts in development
25+ configure :development do
26+ set :host_authorization , { permitted_hosts : [ ] }
27+ end
28+
2429# [START gae_flex_pubsub_env]
2530topic = pubsub . topic ENV [ "PUBSUB_TOPIC" ]
2631PUBSUB_VERIFICATION_TOKEN = ENV [ "PUBSUB_VERIFICATION_TOKEN" ]
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515# [START gae_standard_analytics_env_variables]
16- runtime : ruby30
16+ runtime : ruby33
1717entrypoint : bundle exec ruby app.rb
1818
1919env_variables :
You can’t perform that action at this time.
0 commit comments