semq-client 1.1 → 1.2

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.
Files changed (2) hide show
  1. data/lib/semq_client.rb +14 -1
  2. metadata +4 -4
data/lib/semq_client.rb CHANGED
@@ -36,11 +36,24 @@ class SemqClient
36
36
  end
37
37
  end
38
38
 
39
+ def allQueuesOnServer
40
+ url = URI.parse(@server + "/queues")
41
+ req = Net::HTTP::Get.new(url.path)
42
+ res = Net::HTTP.start(url.host, url.port) {|http|
43
+ http.request(req)
44
+ }
45
+ case res
46
+ when Net::HTTPSuccess
47
+ return res.body
48
+ else
49
+ return nil
50
+ end
51
+ end
39
52
 
40
53
  private
41
54
 
42
55
  def constructQueueUrl
43
- URI.parse(@server + '/' + @queue)
56
+ URI.parse(@server + '/queue/' + @queue)
44
57
  end
45
58
 
46
59
  def getNextItem
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semq-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- version: "1.1"
8
+ - 2
9
+ version: "1.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ian Calvert
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-10-19 00:00:00 Z
17
+ date: 2011-11-03 00:00:00 Z
18
18
  dependencies: []
19
19
 
20
20
  description: A simple client for using semq message servers. Supports push and pop methods to named queues. Pop can wait indefinitely, using long polling to remain lightweight.