gclouder 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gclouder/resources/storage/notifications.rb +4 -4
- data/lib/gclouder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c73e111c08a0c24e449a66300c9115b0192d9a6
|
4
|
+
data.tar.gz: 5635bd82f72b7cc8415e0e6dd740574daa9d5a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73700e41355989d96ed631482d3ed5fb53b45f5212101dcfadbe4622cc6bad923dfe3e81621d852a9bf9e9f635229e9d736ce1cc6df6a911a7238dcd4a8288c
|
7
|
+
data.tar.gz: 1b936d25971460cdccd18fa8310e644cf9391b083b06799e181df43437d60c615f219a2de5c2ad95b638076f783d9be1585b2d2f94e27898a4a7dc79b1285fbc
|
@@ -40,7 +40,7 @@ module GClouder
|
|
40
40
|
# We also don't support every key that gsutil does. See Notification.ensure() below.
|
41
41
|
permitted_and_required_keys = {
|
42
42
|
"bucket"=>{"type"=>"String", "required"=>true},
|
43
|
-
"
|
43
|
+
"project"=>{"type"=>"String", "required"=>true},
|
44
44
|
"events"=>{"type"=>"Array", "required"=>false},
|
45
45
|
"prefix"=>{"type"=>"String", "required"=>false}
|
46
46
|
}
|
@@ -67,13 +67,13 @@ module GClouder
|
|
67
67
|
end
|
68
68
|
|
69
69
|
return gsutil("notification list", "gs://#{notification["bucket"]}", force: true)
|
70
|
-
.include?("projects/#{
|
70
|
+
.include?("projects/#{notification["project"]}/topics/#{notification["name"]}")
|
71
71
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def self.ensure(notification)
|
75
75
|
if notification_exists?(notification)
|
76
|
-
good "notification topic:
|
76
|
+
good "notification topic: projects/#{notification["project"]}/topics/#{notification["name"]}; bucket: #{notification["bucket"]}", indent: 4
|
77
77
|
return
|
78
78
|
end
|
79
79
|
|
@@ -86,7 +86,7 @@ module GClouder
|
|
86
86
|
prefix_arg = "-p #{notification["prefix"]}"
|
87
87
|
end
|
88
88
|
|
89
|
-
args = "-t
|
89
|
+
args = "-t projects/#{notification["project"]}/topics/#{notification["name"]} #{prefix_arg} #{event_type_args} -f json gs://#{notification["bucket"]}"
|
90
90
|
|
91
91
|
add "notification topic: #{notification["name"]}; bucket: #{notification["bucket"]}", indent: 4
|
92
92
|
gsutil "notification create", args
|
data/lib/gclouder/version.rb
CHANGED