swagger 1.1.1
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.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/LICENSE +20 -0
- data/README.rdoc +45 -0
- data/Rakefile +47 -0
- data/VERSION +1 -0
- data/lib/redis_impersonator.rb +113 -0
- data/lib/resque_extension.rb +11 -0
- data/lib/resque_value.rb +3 -0
- data/lib/swagger.rb +4 -0
- data/spec/redis_impersonator_spec.rb +136 -0
- data/spec/resque_extension_spec.rb +12 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +31 -0
- data/swagger.gemspec +66 -0
- metadata +118 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 mdeiters
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
= swagger = (Resque - Redis) + ActiveRecord
|
2
|
+
|
3
|
+
Swagger allows you to use Resque full featured by only adding one table in your existing database.
|
4
|
+
|
5
|
+
Resque is a great library for creating/running/administering background jobs. Redis is great too but may be overkill for just a few simple background jobs. Swagger marries the power and robustness of Resque with the trivial setup of delayed_job.
|
6
|
+
|
7
|
+
|
8
|
+
== Getting Started
|
9
|
+
|
10
|
+
1. Add resque and swagger to your gem dependencies (order is important)
|
11
|
+
|
12
|
+
config.gem 'resque'
|
13
|
+
config.gem 'swagger'
|
14
|
+
|
15
|
+
2. In your rails app, create the file initializers/resque.rb with the following:
|
16
|
+
|
17
|
+
Resque.swagger!
|
18
|
+
Resque.connect_to_database YAML::load(ERB.new(IO.read(File.join(File.dirname(__FILE__), '..', 'database.yml'))).result)[RAILS_ENV]
|
19
|
+
|
20
|
+
3. Create an active record migration
|
21
|
+
|
22
|
+
create_table :resque_values do |table|
|
23
|
+
table.column :key, :string
|
24
|
+
table.column :key_type, :string
|
25
|
+
table.column :value, :text
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index :resque_values, :key
|
29
|
+
add_index :resque_values, [:key, :key_type]
|
30
|
+
|
31
|
+
NOTE: To start up the administration sinatra app with swagger, do the following: resque-web config/initializers/resque.rb
|
32
|
+
|
33
|
+
== Note on Patches/Pull Requests
|
34
|
+
|
35
|
+
* Fork the project.
|
36
|
+
* Make your feature addition or bug fix.
|
37
|
+
* Add tests for it. This is important so I don't break it in a
|
38
|
+
future version unintentionally.
|
39
|
+
* Commit, do not mess with rakefile, version, or history.
|
40
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
41
|
+
* Send me a pull request. Bonus points for topic branches.
|
42
|
+
|
43
|
+
== Copyright
|
44
|
+
|
45
|
+
Copyright (c) 2010 Matthew Deiters. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "swagger"
|
8
|
+
gem.summary = %Q{Everything Resque provides minus Redis}
|
9
|
+
gem.description = %Q{Duck punch Resque to use active record for backround jobs instead of redis}
|
10
|
+
gem.email = "mdeiters@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/mdeiters/swagger"
|
12
|
+
gem.authors = ["mdeiters"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
gem.add_dependency "activerecord" #, "2.3.8"
|
16
|
+
gem.add_dependency "resque", "1.9.7"
|
17
|
+
end
|
18
|
+
Jeweler::GemcutterTasks.new
|
19
|
+
rescue LoadError
|
20
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
+
end
|
22
|
+
|
23
|
+
require 'spec/rake/spectask'
|
24
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
25
|
+
spec.libs << 'lib' << 'spec'
|
26
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
27
|
+
end
|
28
|
+
|
29
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
30
|
+
spec.libs << 'lib' << 'spec'
|
31
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
32
|
+
spec.rcov = true
|
33
|
+
end
|
34
|
+
|
35
|
+
task :spec => :check_dependencies
|
36
|
+
|
37
|
+
task :default => :spec
|
38
|
+
|
39
|
+
require 'rake/rdoctask'
|
40
|
+
Rake::RDocTask.new do |rdoc|
|
41
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
42
|
+
|
43
|
+
rdoc.rdoc_dir = 'rdoc'
|
44
|
+
rdoc.title = "swagger #{version}"
|
45
|
+
rdoc.rdoc_files.include('README*')
|
46
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
47
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.1.1
|
@@ -0,0 +1,113 @@
|
|
1
|
+
class RedisImpersonator
|
2
|
+
SET = 'set'
|
3
|
+
LIST = 'list'
|
4
|
+
|
5
|
+
def self.swallow(method, return_value = nil)
|
6
|
+
define_method(method) do |*args|
|
7
|
+
LOGGER.write("RedisImpersonator: Swallowed #{method} with the following arguments #{args.inspect}") if defined?(LOGGER)
|
8
|
+
return_value
|
9
|
+
end
|
10
|
+
end
|
11
|
+
swallow(:namespace=)
|
12
|
+
swallow(:namespace, 'not applicable')
|
13
|
+
swallow(:server, 'ActiveRecord')
|
14
|
+
swallow(:info, self.inspect)
|
15
|
+
|
16
|
+
def srem(set_name, value)
|
17
|
+
ResqueValue.delete_all(:key => set_name.to_s, :key_type => SET, :value => value.to_s)
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
def smembers(set_name)
|
22
|
+
ResqueValue.all(:conditions => {:key => set_name.to_s, :key_type => SET}).map(&:value)
|
23
|
+
end
|
24
|
+
|
25
|
+
def sismember(set_name, value)
|
26
|
+
ResqueValue.exists?(:key => set_name.to_s, :key_type => SET, :value => value.to_s)
|
27
|
+
end
|
28
|
+
|
29
|
+
def sadd(set_name, value)
|
30
|
+
sismember(set_name, value) || ResqueValue.create!(:key => set_name.to_s, :key_type => SET, :value => value.to_s)
|
31
|
+
end
|
32
|
+
|
33
|
+
def set(key, value)
|
34
|
+
resque_value = ResqueValue.find_or_initialize_by_key(key.to_s)
|
35
|
+
resque_value.value = value
|
36
|
+
resque_value.save!
|
37
|
+
value
|
38
|
+
end
|
39
|
+
|
40
|
+
def get(key)
|
41
|
+
resque_value = ResqueValue.first(:conditions => {:key => key})
|
42
|
+
resque_value.value if resque_value
|
43
|
+
end
|
44
|
+
|
45
|
+
def del(key)
|
46
|
+
ResqueValue.delete_all(:key => key.to_s)
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
|
50
|
+
def exists(key)
|
51
|
+
ResqueValue.exists?(:key => key.to_s)
|
52
|
+
end
|
53
|
+
|
54
|
+
def incrby(key, value)
|
55
|
+
object = ResqueValue.find_or_initialize_by_key(key.to_s)
|
56
|
+
object.value = (object.value.to_i + value.to_i).to_s
|
57
|
+
object.save!
|
58
|
+
object.value
|
59
|
+
end
|
60
|
+
|
61
|
+
def decrby(key, value)
|
62
|
+
object = ResqueValue.find_or_initialize_by_key(key.to_s)
|
63
|
+
object.value = (object.value.to_i - value.to_i).to_s
|
64
|
+
object.save!
|
65
|
+
object.value
|
66
|
+
end
|
67
|
+
|
68
|
+
def mapped_mget(*keys)
|
69
|
+
Hash[*keys.zip(mget(*keys)).flatten]
|
70
|
+
end
|
71
|
+
|
72
|
+
def mget(*keys)
|
73
|
+
keys.collect!{|key| key.to_s }
|
74
|
+
resque_values = ResqueValue.all(:conditions => {:key => keys})
|
75
|
+
resque_values.map(&:value)
|
76
|
+
end
|
77
|
+
|
78
|
+
def llen(list_name)
|
79
|
+
ResqueValue.all(:conditions => {:key => list_name.to_s, :key_type=> LIST }).size
|
80
|
+
end
|
81
|
+
|
82
|
+
def lset(list_name, index, value)
|
83
|
+
rpush(list_name, value)
|
84
|
+
end
|
85
|
+
|
86
|
+
def lrange(list_name, start_range, end_range)
|
87
|
+
values = ResqueValue.all(
|
88
|
+
:conditions => {
|
89
|
+
:key => list_name.to_s,
|
90
|
+
:key_type=> LIST},
|
91
|
+
:offset => start_range,
|
92
|
+
:limit => end_range)
|
93
|
+
values.map(&:value)
|
94
|
+
end
|
95
|
+
|
96
|
+
def lpop(list_name)
|
97
|
+
last = ResqueValue.last(:conditions => {:key => list_name.to_s, :key_type => LIST})
|
98
|
+
if last
|
99
|
+
last.destroy
|
100
|
+
return last.value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def rpush(list_name, value)
|
105
|
+
ResqueValue.create!(:key => list_name.to_s, :key_type => LIST, :value => value.to_s)
|
106
|
+
end
|
107
|
+
|
108
|
+
def keys(pattern = '*')
|
109
|
+
raise "Pattern '#{pattern}' not supported" if pattern != '*'
|
110
|
+
ResqueValue.all(:select => 'DISTINCT resque_values.key').map(&:key)
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
data/lib/resque_value.rb
ADDED
data/lib/swagger.rb
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
require 'spec/spec_helper'
|
2
|
+
|
3
|
+
describe 'RedisImpersonator' do
|
4
|
+
let(:impersonator) { RedisImpersonator.new }
|
5
|
+
|
6
|
+
|
7
|
+
it 'responds to info' do
|
8
|
+
impersonator.info.should_not be_nil
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'swallows calls to namespace' do
|
12
|
+
lambda{impersonator.namespace = 'value'}.should_not raise_error
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'manipulating key values' do
|
16
|
+
it 'it can get key values' do
|
17
|
+
impersonator.set('key', 'value').should == 'value'
|
18
|
+
impersonator.get('key').should == 'value'
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'can create new key values' do
|
22
|
+
impersonator.set('key', 'value').should == 'value'
|
23
|
+
ResqueValue.first.value.should == 'value'
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'can delete key values' do
|
27
|
+
impersonator.set('key', 'value').should == 'value'
|
28
|
+
impersonator.del('key')
|
29
|
+
impersonator.get('key').should be_nil
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'can get multiple values by keys' do
|
33
|
+
impersonator.set('key-1', 'one')
|
34
|
+
impersonator.set('key-2', 'two')
|
35
|
+
impersonator.mapped_mget('key-1', 'key-2')['key-1'].should == 'one'
|
36
|
+
impersonator.mapped_mget('key-1', 'key-2')['key-2'].should == 'two'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'always returns all keys when pattern is *' do
|
40
|
+
impersonator.set('key-1', 'one')
|
41
|
+
impersonator.set('key-2', 'two')
|
42
|
+
impersonator.keys('*').should include('key-1', 'key-2')
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'raies error when pattern is not *' do
|
46
|
+
lambda{impersonator.keys('something not *')}.should raise_error
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe 'managing workes in a set' do
|
51
|
+
it 'can add workers to the queue' do
|
52
|
+
worker = Resque::Worker.new(queues = ['queue1'])
|
53
|
+
impersonator.sadd(:workers, worker)
|
54
|
+
ResqueValue.first.value.should == worker.to_s
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'returns all values in the workers set' do
|
58
|
+
worker = Resque::Worker.new(queues = ['queue1'])
|
59
|
+
impersonator.sadd(:workers, worker)
|
60
|
+
impersonator.smembers(:workers).first.should == worker.to_s
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'removes a worker from the workers set by name' do
|
64
|
+
worker = Resque::Worker.new(queues = ['queue1'])
|
65
|
+
impersonator.sadd(:workers, worker)
|
66
|
+
impersonator.srem(:workers, worker)
|
67
|
+
impersonator.smembers(:workers).should be_empty
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'should only add a value to a set once' do
|
71
|
+
impersonator.sadd(:test, 'one')
|
72
|
+
impersonator.sadd(:test, 'one')
|
73
|
+
impersonator.smembers(:test).size.should == 1
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'indicates when worker is in the workers set' do
|
77
|
+
worker = Resque::Worker.new(queues = ['queue1'])
|
78
|
+
|
79
|
+
impersonator.sismember(:workers, worker).should == false
|
80
|
+
impersonator.sadd(:workers, worker)
|
81
|
+
impersonator.sismember(:workers, worker).should == true
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'can delete a whole set by name' do
|
85
|
+
impersonator.sadd(:test, 'one')
|
86
|
+
impersonator.sadd(:test, 'two')
|
87
|
+
impersonator.del(:test)
|
88
|
+
impersonator.smembers(:test).should be_empty
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe 'working with lists' do
|
93
|
+
it 'should return nil if no items on a queue' do
|
94
|
+
impersonator.lpop('some_queue').should be_nil
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'ingores index and adds item to list' do
|
98
|
+
impersonator.lset('some_queue', 88, 'value')
|
99
|
+
impersonator.llen('some_queue').should == 1
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'should add item to queue and then pop it back off' do
|
103
|
+
impersonator.rpush('some_queue', 'value')
|
104
|
+
impersonator.lpop('some_queue').should == 'value'
|
105
|
+
impersonator.lpop('some_queue').should be_nil
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'should tell you how many items are in a list' do
|
109
|
+
impersonator.rpush('some_queue', 'one')
|
110
|
+
impersonator.rpush('some_queue', 'two')
|
111
|
+
impersonator.llen('some_queue').should == 2
|
112
|
+
end
|
113
|
+
|
114
|
+
it 'should be able to paginate through a list' do
|
115
|
+
impersonator.rpush('some_queue', 'one')
|
116
|
+
impersonator.rpush('some_queue', 'two')
|
117
|
+
impersonator.rpush('some_queue', 'three')
|
118
|
+
impersonator.lrange('some_queue', 0, 1).first.should == 'one'
|
119
|
+
impersonator.lrange('some_queue', 2, 3).first.should == 'three'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'should increment a value' do
|
124
|
+
impersonator.incrby('something', 2)
|
125
|
+
impersonator.get('something').should == '2'
|
126
|
+
impersonator.incrby('something', 1)
|
127
|
+
impersonator.get('something').should == '3'
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'should decrement a value' do
|
131
|
+
impersonator.incrby('something', 2)
|
132
|
+
impersonator.get('something').should == '2'
|
133
|
+
impersonator.decrby('something', 1)
|
134
|
+
impersonator.get('something').should == '1'
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec/spec_helper'
|
2
|
+
|
3
|
+
describe 'Resque' do
|
4
|
+
|
5
|
+
it 'swaps redis implementation with impersonator' do
|
6
|
+
Resque.redis.should be_a(RedisImpersonator)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'can connect to the database' do
|
10
|
+
Resque.should.respond_to?(:connect_to_database)
|
11
|
+
end
|
12
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'resque'
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
require 'swagger'
|
7
|
+
require 'spec'
|
8
|
+
require 'spec/autorun'
|
9
|
+
|
10
|
+
Spec::Runner.configure do |config|
|
11
|
+
|
12
|
+
config.prepend_before :each do
|
13
|
+
ResqueValue.delete_all
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
Resque.swagger!
|
19
|
+
|
20
|
+
ActiveRecord::Base.establish_connection('adapter' => 'sqlite3', 'database' => 'test.db')
|
21
|
+
|
22
|
+
ActiveRecord::Base.connection.drop_table :resque_values rescue puts "unable to drop resque_values, probably because it has not been created yet"
|
23
|
+
ActiveRecord::Base.connection.create_table :resque_values do |table|
|
24
|
+
table.column :key, :string
|
25
|
+
table.column :key_type, :string
|
26
|
+
table.column :value, :text
|
27
|
+
end
|
28
|
+
|
29
|
+
ActiveRecord::Base.connection.add_index :resque_values, :key
|
30
|
+
ActiveRecord::Base.connection.add_index :resque_values, [:key, :key_type]
|
31
|
+
|
data/swagger.gemspec
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{swagger}
|
8
|
+
s.version = "1.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["mdeiters"]
|
12
|
+
s.date = %q{2010-07-14}
|
13
|
+
s.description = %q{Duck punch Resque to use active record for backround jobs instead of redis}
|
14
|
+
s.email = %q{mdeiters@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/redis_impersonator.rb",
|
27
|
+
"lib/resque_extension.rb",
|
28
|
+
"lib/resque_value.rb",
|
29
|
+
"lib/swagger.rb",
|
30
|
+
"spec/redis_impersonator_spec.rb",
|
31
|
+
"spec/resque_extension_spec.rb",
|
32
|
+
"spec/spec.opts",
|
33
|
+
"spec/spec_helper.rb",
|
34
|
+
"swagger.gemspec"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/mdeiters/swagger}
|
37
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.3.6}
|
40
|
+
s.summary = %q{Everything Resque provides minus Redis}
|
41
|
+
s.test_files = [
|
42
|
+
"spec/redis_impersonator_spec.rb",
|
43
|
+
"spec/resque_extension_spec.rb",
|
44
|
+
"spec/spec_helper.rb"
|
45
|
+
]
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
|
+
s.specification_version = 3
|
50
|
+
|
51
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
52
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
53
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 0"])
|
54
|
+
s.add_runtime_dependency(%q<resque>, ["= 1.9.7"])
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
57
|
+
s.add_dependency(%q<activerecord>, [">= 0"])
|
58
|
+
s.add_dependency(%q<resque>, ["= 1.9.7"])
|
59
|
+
end
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
62
|
+
s.add_dependency(%q<activerecord>, [">= 0"])
|
63
|
+
s.add_dependency(%q<resque>, ["= 1.9.7"])
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swagger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
version: 1.1.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- mdeiters
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-07-14 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 9
|
31
|
+
version: 1.2.9
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: activerecord
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: resque
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 1
|
55
|
+
- 9
|
56
|
+
- 7
|
57
|
+
version: 1.9.7
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id003
|
60
|
+
description: Duck punch Resque to use active record for backround jobs instead of redis
|
61
|
+
email: mdeiters@gmail.com
|
62
|
+
executables: []
|
63
|
+
|
64
|
+
extensions: []
|
65
|
+
|
66
|
+
extra_rdoc_files:
|
67
|
+
- LICENSE
|
68
|
+
- README.rdoc
|
69
|
+
files:
|
70
|
+
- .document
|
71
|
+
- .gitignore
|
72
|
+
- LICENSE
|
73
|
+
- README.rdoc
|
74
|
+
- Rakefile
|
75
|
+
- VERSION
|
76
|
+
- lib/redis_impersonator.rb
|
77
|
+
- lib/resque_extension.rb
|
78
|
+
- lib/resque_value.rb
|
79
|
+
- lib/swagger.rb
|
80
|
+
- spec/redis_impersonator_spec.rb
|
81
|
+
- spec/resque_extension_spec.rb
|
82
|
+
- spec/spec.opts
|
83
|
+
- spec/spec_helper.rb
|
84
|
+
- swagger.gemspec
|
85
|
+
has_rdoc: true
|
86
|
+
homepage: http://github.com/mdeiters/swagger
|
87
|
+
licenses: []
|
88
|
+
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options:
|
91
|
+
- --charset=UTF-8
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
requirements: []
|
109
|
+
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 1.3.6
|
112
|
+
signing_key:
|
113
|
+
specification_version: 3
|
114
|
+
summary: Everything Resque provides minus Redis
|
115
|
+
test_files:
|
116
|
+
- spec/redis_impersonator_spec.rb
|
117
|
+
- spec/resque_extension_spec.rb
|
118
|
+
- spec/spec_helper.rb
|