q3 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -0
  2. data/lib/q3.rb +3 -3
  3. metadata +3 -2
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
data/lib/q3.rb CHANGED
@@ -53,14 +53,14 @@ class Q3 < Sinatra::Base
53
53
  hash[attribute] = attributes[attribute] || DEFAULTS[attribute]
54
54
  hash
55
55
  end
56
- redis.rpush("Queues", params[:QueueName])
56
+ redis.sadd("Queues", params[:QueueName])
57
57
  redis.hmset("Queues:#{params[:QueueName]}", *hash.to_a)
58
58
  return_xml {|xml| xml.QueueUrl queue_url("#{params[:QueueName]}") }
59
59
  end
60
60
 
61
61
  action('ListQueues') do
62
62
  return_xml do |xml|
63
- redis.lrange('Queues', 0, -1).each {|queue_name| xml.QueueUrl queue_url(queue_name) }
63
+ redis.smembers('Queues').each {|queue_name| xml.QueueUrl queue_url(queue_name) }
64
64
  end
65
65
  end
66
66
 
@@ -97,7 +97,7 @@ class Q3 < Sinatra::Base
97
97
  action('DeleteQueue', '/*/:QueueName') do
98
98
  validate_queue_existence
99
99
  redis.keys("Queues:#{params[:QueueName]}*").each {|key| redis.del(key) }
100
- redis.lrem("Queues", 0, params[:QueueName])
100
+ redis.srem("Queues", params[:QueueName])
101
101
  return_xml {}
102
102
  end
103
103
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: q3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -139,6 +139,7 @@ files:
139
139
  - LICENSE.txt
140
140
  - README.md
141
141
  - Rakefile
142
+ - VERSION
142
143
  - bin/q3
143
144
  - config.ru
144
145
  - lib/q3.rb
@@ -159,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
160
  version: '0'
160
161
  segments:
161
162
  - 0
162
- hash: 1071069083813068665
163
+ hash: -4506912366061653846
163
164
  required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  none: false
165
166
  requirements: