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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b301187b82d56498d5048872bad4c43f2839e99b
4
- data.tar.gz: bba5bbd845a223e04a1ca27c21d6b3e6d140698c
3
+ metadata.gz: 5c73e111c08a0c24e449a66300c9115b0192d9a6
4
+ data.tar.gz: 5635bd82f72b7cc8415e0e6dd740574daa9d5a55
5
5
  SHA512:
6
- metadata.gz: '008c6fd979952e93abaa91b78b9f0a371c1d05f387e6051c205a57b70d5bb01f5d1c82ac8ea9b2201f97ca1282b7c6ee45faadd16b1343c7b464a23b53c57fa3'
7
- data.tar.gz: e32791cce0fc36efec4076d4160cb90502c741b2fd0d1a23ac179a5334c9365bd00015588e4506291ad387cd027b5f8c3515e87cc91940363d57314381006b18
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
- "topic"=>{"type"=>"String", "required"=>true},
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/#{project["project_id"]}/topics/#{notification["topic"]}")
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: #{notification["name"]}; bucket: #{notification["bucket"]}", indent: 4
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 #{notification["name"]} #{prefix_arg} #{event_type_args} -f json gs://#{notification["bucket"]}"
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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module GClouder
4
- VERSION = "0.1.12"
4
+ VERSION = "0.1.13"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gclouder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Wilson