Skip to content

Commit f26e7da

Browse files
author
Frank Natividad
committed
Consistent environment variable names!!!
1 parent 7ed0b87 commit f26e7da

File tree

25 files changed

+73
-75
lines changed

25 files changed

+73
-75
lines changed

appengine/datastore/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ project id with `gcloud config list`.
1515

1616

1717
```
18-
export GCLOUD_PROJECT=<your-project-id>
18+
export GOOGLE_CLOUD_PROJECT=<your-project-id>
1919
bundle
2020
bundle exec ruby ./app.rb
2121
```

appengine/pubsub/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ string.
3434
```
3535
export PUBSUB_VERIFICATION_TOKEN=<your-token>
3636
export PUBSUB_TOPIC=<your-topic-name>
37-
export GCLOUD_PROJECT=<your-project-id>
37+
export GOOGLE_CLOUD_PROJECT=<your-project-id>
3838
bundle
3939
bundle exec ruby ./app.rb
4040
```
@@ -65,7 +65,7 @@ your repo.
6565

6666
```
6767
gcloud auth activate-service-account --key-file ../../client_secrets.json
68-
export GCLOUD_PROJECT=<your-project-id>
68+
export GOOGLE_CLOUD_PROJECT=<your-project-id>
6969
export TEST_DIR=appengine/pubsub/
7070
bundle exec rspec
7171
```

appengine/storage/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ $ gsutil mb gs://<your-project-id>
2323
## Run
2424

2525
```
26-
export GCLOUD_PROJECT=<your-project-id>
27-
export GCLOUD_STORAGE_BUCKET=<your-project-id>
26+
export GOOGLE_CLOUD_PROJECT=<your-project-id>
27+
export GOOGLE_CLOUD_STORAGE_BUCKET=<your-project-id>
2828
bundle
2929
bundle exec ruby app.rb
3030
```
@@ -52,7 +52,7 @@ your repo.
5252

5353
```
5454
gcloud auth activate-service-account --key-file ../../client_secrets.json
55-
export GCLOUD_PROJECT=<your-project-id>
55+
export GOOGLE_CLOUD_PROJECT=<your-project-id>
5656
export TEST_DIR=appengine/storage/
5757
bundle exec rspec
5858
```

appengine/storage/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
gcloud = Google::Cloud.new
2020
storage = gcloud.storage
21-
bucket = storage.bucket ENV["GCLOUD_STORAGE_BUCKET"]
21+
bucket = storage.bucket ENV["GOOGLE_CLOUD_STORAGE_BUCKET"]
2222

2323
get "/" do
2424
# Present the user with an upload form

appengine/storage/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ vm: true
1818
entrypoint: bundle exec ruby app.rb -p 8080
1919

2020
env_variables:
21-
GCLOUD_STORAGE_BUCKET: <your-bucket-name>
21+
GOOGLE_CLOUD_STORAGE_BUCKET: <your-bucket-name>
2222
# [END app_yaml]

appengine/storage/spec/storage_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
before :all do
2424
app_yaml = File.expand_path("../../app.yaml", __FILE__)
2525
configuration = File.read(app_yaml)
26-
.sub("<your-bucket-name>", ENV["GCLOUD_STORAGE_BUCKET"])
26+
.sub("<your-bucket-name>", ENV["GOOGLE_CLOUD_STORAGE_BUCKET"])
2727
File.write(app_yaml, configuration)
2828

2929
@url = E2E.url

bigquery/spec/bigquery_sample_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
require "google/cloud"
1919
require "csv"
2020

21-
RSpec.describe "Google Cloud BigQuery samples" do
21+
describe "Google Cloud BigQuery samples" do
2222

2323
before do
24-
@project_id = ENV["GOOGLE_PROJECT_ID"]
24+
@project_id = ENV["GOOGLE_CLOUD_PROJECT"]
2525
@gcloud = Google::Cloud.new @project_id
2626
@bigquery = @gcloud.bigquery
2727
@storage = @gcloud.storage
28-
@bucket = @storage.bucket ENV["STORAGE_BUCKET"]
28+
@bucket = @storage.bucket ENV["GOOGLE_CLOUD_STORAGE_BUCKET"]
2929
@tempfiles = []
3030

3131
# Examples assume that newly created test_dataset and test_table exist

datastore/spec/sample_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
attr_reader :datastore
2020

2121
before :all do
22-
@gcloud = Google::Cloud.new
22+
@gcloud = Google::Cloud.new ENV["GOOGLE_CLOUD_PROJECT"]
2323
@datastore = @gcloud.datastore
2424

2525
task_list = datastore.entity "TaskList", "default"

language/spec/language_samples_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
require "tempfile"
44
require "google/cloud"
55

6-
RSpec.describe "Google Cloud Natural Language API samples" do
6+
describe "Google Cloud Natural Language API samples" do
77

88
before do
99
@project_id = ENV["GOOGLE_CLOUD_PROJECT"]
10-
@bucket_name = ENV["STORAGE_BUCKET"]
10+
@bucket_name = ENV["GOOGLE_CLOUD_STORAGE_BUCKET"]
1111
@gcloud = Google::Cloud.new @project_id
1212
@storage = @gcloud.storage
1313
@bucket = @storage.bucket @bucket_name

logging/spec/sample_spec.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ def my_application_log_entries
4242

4343
# Tests require environment variables:
4444
#
45-
# GCLOUD_PROJECT ID of your Google Cloud Platform project
46-
# BUCKET Name of Google Cloud Storage bucket to use for log sink
47-
# ALT_BUCKET Name of an alternative bucket to also use for log sink
45+
# GOOGLE_CLOUD_PROJECT - ID of your Google Cloud Platform project
46+
# GOOGLE_CLOUD_STORAGE_BUCKET - Name of Google Cloud Storage bucket to use
47+
# for log sink
48+
# ALTERNATE_GOOGLE_CLOUD_STORAGE_BUCKET - Name of an alternative bucket to
49+
# also use for log sink
4850
#
4951
before :all do
50-
@project_id = ENV["GCLOUD_PROJECT"]
52+
@project_id = ENV["GOOGLE_CLOUD_PROJECT"]
5153
@gcloud = Google::Cloud.new @project_id
5254
@logging = @gcloud.logging
5355
@storage = @gcloud.storage
54-
@bucket = @storage.bucket ENV["BUCKET"]
55-
@alt_bucket = @storage.bucket ENV["ALT_BUCKET"]
56+
@bucket = @storage.bucket ENV["GOOGLE_CLOUD_STORAGE_BUCKET"]
57+
@alt_bucket = @storage.bucket ENV["ALTERNATE_GOOGLE_CLOUD_STORAGE_BUCKET"]
5658

5759
# Cloud Logging needs owner permissions on the buckets used
5860
@bucket.acl.add_owner "[email protected]"

0 commit comments

Comments
 (0)