azure-contrib 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8711075efe16a0b736679abaf6fe1963233d550
4
- data.tar.gz: cc79173e49cea71e8c4d06cde0a9810ca9cb4145
3
+ metadata.gz: 9418ccdef476d7c73758258da3d650175341fc1c
4
+ data.tar.gz: 4434cbce0e53d937ca455db5582c164c8df6422c
5
5
  SHA512:
6
- metadata.gz: 438504a38c8e01f93e7fc076ba6695213caac53b73d8437500913688d38613014c02632ce12195aa88108a2a360615ef1da3aacf1254d06673c37332116c621f
7
- data.tar.gz: 1faeee74211ba03f2dc5db74d492ee6321525830d57b61a9d272b5727a6e03f2205cb483c402fea832a473870a9f5630ca147c67b0107e6608ebf1c7a5ef0674
6
+ metadata.gz: 370fb0b9b9c1f9cbf36ea123cfb3a143f3fe785706fada49eeb88344223c4428bf6136fce79b5e45e60b79a91eb1f5d34d484ff2a922f6ed5884c05b7a09ce54
7
+ data.tar.gz: 3e41158dd0f39a763c58e50b2f5947be18ada5c6b2b798b7f0db8e902b7ba4cc4c4e00237ccff6622559ee1fa56920f0415d22f871844ed0172b9f26f95c21d2
@@ -0,0 +1,19 @@
1
+ module Azure
2
+ class ServiceBusService
3
+ # TODO: This needs to be moved to the contrib lib
4
+ def find_or_create_topic(name)
5
+ topic = self.list_topics.find {|topic| topic.name == name }
6
+ topic = self.create_topic(name) if topic.nil?
7
+
8
+ topic
9
+ end
10
+
11
+ # TODO: This needs to be moved to the contrib lib
12
+ def find_or_create_subscription(topic, name)
13
+ subscription = self.list_subscriptions(topic.name).find {|subscription| subscription.name == name }
14
+ subscription = self.create_subscription(topic.name, name) if subscription.nil?
15
+
16
+ subscription
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  module Azure
2
2
  module Contrib
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Michael
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,6 +109,7 @@ files:
109
109
  - azure-contrib.gemspec
110
110
  - lib/azure-contrib.rb
111
111
  - lib/azure-contrib/blob_service.rb
112
+ - lib/azure-contrib/service_bus_service.rb
112
113
  - lib/azure-contrib/shared_access_signature.rb
113
114
  - lib/azure-contrib/version.rb
114
115
  homepage: ''