Skip to content

Commit d26bc63

Browse files
author
remi Taylor
authored
Merge pull request #48 from GoogleCloudPlatform/fix-travis
Remove explicit installation of Google Cloud SDK
2 parents f41debf + 392bd00 commit d26bc63

12 files changed

Lines changed: 48 additions & 74 deletions

File tree

.travis.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ cache:
2828

2929
env:
3030
global:
31-
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin
3231
- GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/client_secrets.json
3332
matrix:
3433
- TEST_DIR=storage
@@ -39,30 +38,8 @@ env:
3938
- TEST_DIR=appengine/endpoints
4039

4140
before_install:
42-
#ENCRYPT YOUR PRIVATE KEY (If you need authentication)
43-
# 1. Install and login to the Travis CLI:
44-
# $ gem install travis
45-
# $ travis login
46-
# 2. Move your json private key to client_secrets.json
47-
# 3. Run:
48-
# $ travis encrypt-file client_secrets.json --add
49-
# 4. Commit changes:
50-
# $ git add client_secrets.json.enc
51-
# $ git commit client_secrets.json.enc .travis.yml
5241
- openssl aes-256-cbc -K $encrypted_aeb4e2af7332_key -iv $encrypted_aeb4e2af7332_iv
5342
-in client_secrets.json.enc -out client_secrets.json -d
54-
- if [ ! -d $HOME/gcloud/google-cloud-sdk ]; then
55-
mkdir -p $HOME/gcloud &&
56-
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --directory-prefix=$HOME/gcloud &&
57-
cd $HOME/gcloud &&
58-
tar xzf google-cloud-sdk.tar.gz &&
59-
printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
60-
cd $TRAVIS_BUILD_DIR;
61-
fi
62-
- gcloud -q components update
63-
- if [ -a client_secrets.json ]; then
64-
gcloud -q auth activate-service-account --key-file client_secrets.json;
65-
fi
6643

6744
install:
6845
- cd $TEST_DIR

appengine/endpoints/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--tty --color --format documentation --order random

bigquery/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--tty --color --format documentation --order random

datastore/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--tty --color --format documentation

datastore/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
source "https://rubygems.org"
1616

1717
gem "sinatra"
18-
gem "gcloud", "~> 0.9.0"
18+
gem "gcloud", "~> 0.12.2"
1919

2020
group :test do
2121
gem "rake"

datastore/Gemfile.lock

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (4.2.6)
5-
i18n (~> 0.7)
6-
json (~> 1.7, >= 1.7.7)
7-
minitest (~> 5.1)
8-
thread_safe (~> 0.3, >= 0.3.4)
9-
tzinfo (~> 1.1)
104
addressable (2.4.0)
115
ast (2.2.0)
12-
autoparse (0.3.3)
13-
addressable (>= 2.3.1)
14-
extlib (>= 0.9.15)
15-
multi_json (>= 1.0.0)
166
diff-lcs (1.2.5)
177
digest-crc (0.4.1)
18-
extlib (0.9.16)
198
faraday (0.9.2)
209
multipart-post (>= 1.2, < 3)
21-
gcloud (0.9.0)
10+
gcloud (0.12.2)
2211
digest-crc (~> 0.4)
23-
google-api-client (~> 0.8.3)
24-
google-protobuf (~> 3.0.0.alpha.5.0.5)
25-
grpc (~> 0.13.1)
26-
mime-types (~> 2.4)
12+
google-api-client (~> 0.9.11)
13+
google-protobuf (= 3.0.0.alpha.5.0.5.1)
14+
grpc (= 1.0.0.pre1)
15+
mime-types (>= 2.4, < 4.0)
2716
zonefile (~> 1.04)
28-
google-api-client (0.8.6)
29-
activesupport (>= 3.2)
17+
google-api-client (0.9.12)
3018
addressable (~> 2.3)
31-
autoparse (~> 0.3)
32-
extlib (~> 0.9)
33-
faraday (~> 0.9)
34-
googleauth (~> 0.3)
35-
launchy (~> 2.4)
36-
multi_json (~> 1.10)
37-
retriable (~> 1.4)
38-
signet (~> 0.6)
19+
googleauth (~> 0.5)
20+
httpclient (~> 2.7)
21+
hurley (~> 0.1)
22+
memoist (~> 0.11)
23+
mime-types (>= 1.6)
24+
representable (~> 2.3.0)
25+
retriable (~> 2.0)
26+
thor (~> 0.19)
3927
google-protobuf (3.0.0.alpha.5.0.5.1)
4028
googleauth (0.5.1)
4129
faraday (~> 0.9)
@@ -45,21 +33,20 @@ GEM
4533
multi_json (~> 1.11)
4634
os (~> 0.9)
4735
signet (~> 0.7)
48-
grpc (0.13.1)
36+
grpc (1.0.0.pre1)
4937
google-protobuf (~> 3.0.0.alpha.5.0.3)
5038
googleauth (~> 0.5.1)
51-
i18n (0.7.0)
52-
json (1.8.3)
39+
httpclient (2.8.2.3)
40+
hurley (0.2)
5341
jwt (1.5.4)
54-
launchy (2.4.3)
55-
addressable (~> 2.3)
5642
little-plugger (1.1.4)
5743
logging (2.1.0)
5844
little-plugger (~> 1.1)
5945
multi_json (~> 1.10)
60-
memoist (0.14.0)
61-
mime-types (2.99.2)
62-
minitest (5.9.0)
46+
memoist (0.15.0)
47+
mime-types (3.1)
48+
mime-types-data (~> 3.2015)
49+
mime-types-data (3.2016.0521)
6350
multi_json (1.12.1)
6451
multipart-post (2.0.0)
6552
os (0.9.6)
@@ -73,7 +60,9 @@ GEM
7360
rack (>= 1.0)
7461
rainbow (2.1.0)
7562
rake (11.1.2)
76-
retriable (1.4.1)
63+
representable (2.3.0)
64+
uber (~> 0.0.7)
65+
retriable (2.1.0)
7766
rspec (3.4.0)
7867
rspec-core (~> 3.4.0)
7968
rspec-expectations (~> 3.4.0)
@@ -94,7 +83,7 @@ GEM
9483
ruby-progressbar (~> 1.7)
9584
unicode-display_width (~> 1.0, >= 1.0.1)
9685
ruby-progressbar (1.8.1)
97-
signet (0.7.2)
86+
signet (0.7.3)
9887
addressable (~> 2.3)
9988
faraday (~> 0.9)
10089
jwt (~> 1.5)
@@ -103,23 +92,22 @@ GEM
10392
rack (~> 1.5)
10493
rack-protection (~> 1.4)
10594
tilt (>= 1.3, < 3)
106-
thread_safe (0.3.5)
95+
thor (0.19.1)
10796
tilt (2.0.4)
108-
tzinfo (1.2.2)
109-
thread_safe (~> 0.1)
97+
uber (0.0.15)
11098
unicode-display_width (1.0.5)
11199
zonefile (1.04)
112100

113101
PLATFORMS
114102
ruby
115103

116104
DEPENDENCIES
117-
gcloud (~> 0.9.0)
105+
gcloud (~> 0.12.2)
118106
rack-test
119107
rake
120108
rspec
121109
rubocop
122110
sinatra
123111

124112
BUNDLED WITH
125-
1.11.2
113+
1.12.5

datastore/sample.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def properties
9191
t.exclude_from_indexes! "description", true
9292
end
9393
# [END properties]
94+
95+
task
9496
end
9597

9698
def array_value

datastore/spec/sample_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
def create_task task_key
4747
task = datastore.entity task_key do |t|
48-
t["type"] = "Personal"
48+
t["category"] = "Personal"
4949
t["created"] = Time.utc(1999, 12, 31)
5050
t["done"] = false
5151
t["priority"] = 4
@@ -175,7 +175,7 @@ def delete_accounts
175175

176176
expect(task.persisted?).to be(true)
177177
expect(task.properties.to_h.size).to eq(4)
178-
expect(task["type"]).to eq("Personal")
178+
expect(task["category"]).to eq("Personal")
179179
expect(task["done"]).to be(false)
180180
expect(task["priority"]).to eq(5)
181181
expect(task["description"]).to eq("Learn Cloud Datastore")
@@ -307,7 +307,7 @@ def delete_accounts
307307

308308
expect(tasks.empty?).to be(false)
309309
expect(tasks.first.key.kind).to eq("Task")
310-
expect(tasks.first["type"]).to eq("Personal")
310+
expect(tasks.first["category"]).to eq("Personal")
311311
expect(tasks.first["priority"]).to eq(4)
312312
expect(tasks.first.properties.to_h.size).to eq(2)
313313
end
@@ -318,7 +318,7 @@ def delete_accounts
318318

319319
expect(tasks.empty?).to be(false)
320320
expect(tasks.first.key.kind).to eq("Task")
321-
expect(tasks.first["type"]).to eq("Personal")
321+
expect(tasks.first["category"]).to eq("Personal")
322322
expect(tasks.first["priority"]).to eq(4)
323323
expect(tasks.first.properties.to_h.size).to eq(2)
324324
end
@@ -506,16 +506,16 @@ def delete_accounts
506506
representations = property_by_kind_run_query
507507

508508
expect(representations.empty?).to be(false)
509-
expect(representations.first.first).to eq("created")
510-
expect(representations.first.last).to eq(["INT64"])
509+
expect(representations["created"]).to eq(["INT64"])
510+
expect(representations["category"]).to eq(["STRING"])
511511
end
512512

513513
it "supports property_filtering_run_query" do
514514
properties_by_kind = property_filtering_run_query
515515

516516
expect(properties_by_kind.empty?).to be(false)
517-
expect(properties_by_kind.first.first).to eq("Task")
518-
expect(properties_by_kind.first.last).to eq(["priority", "tag", "type"])
517+
expect(properties_by_kind["Task"]).to include "priority"
518+
expect(properties_by_kind["Task"]).to include "tag"
519519
end
520520

521521
it "supports gql_run_query" do
@@ -560,7 +560,7 @@ def delete_accounts
560560

561561
def expect_basic_task task
562562
expect(task.key.kind).to eq("Task")
563-
expect(task["type"]).to eq("Personal")
563+
expect(task["category"]).to eq("Personal")
564564
expect(task["done"]).to be(false)
565565
end
566566
end

logging/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--tty --color --format documentation --order random

pubsub/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--tty --color --format documentation --order random

0 commit comments

Comments
 (0)