swagger 1.1.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.
- data/README.rdoc +18 -19
- data/VERSION +1 -1
- data/swagger.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -1,34 +1,33 @@
|
|
1
1
|
= swagger = (Resque - Redis) + ActiveRecord
|
2
2
|
|
3
|
-
|
3
|
+
Swagger allows you to use Resque full featured by only adding one table in your existing database.
|
4
4
|
|
5
|
-
|
6
|
-
|
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.
|
7
6
|
|
8
7
|
== Getting Started
|
9
8
|
|
10
|
-
|
9
|
+
1. Add resque and swagger to your gem dependencies (order is important)
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
config.gem 'resque'
|
12
|
+
config.gem 'swagger'
|
14
13
|
|
15
|
-
|
14
|
+
2. In your rails app, create the file initializers/resque.rb with the following:
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
Resque.swagger!
|
17
|
+
Resque.connect_to_database YAML::load(ERB.new(IO.read(File.join(File.dirname(__FILE__), '..', 'database.yml'))).result)[RAILS_ENV]
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
3. Create an active record migration
|
20
|
+
|
21
|
+
create_table :resque_values do |table|
|
22
|
+
table.column :key, :string
|
23
|
+
table.column :key_type, :string
|
24
|
+
table.column :value, :text
|
25
|
+
end
|
27
26
|
|
28
|
-
|
29
|
-
|
27
|
+
add_index :resque_values, :key
|
28
|
+
add_index :resque_values, [:key, :key_type]
|
30
29
|
|
31
|
-
|
30
|
+
NOTE: To start up the administration sinatra app with swagger, do the following: resque-web config/initializers/resque.rb
|
32
31
|
|
33
32
|
== Note on Patches/Pull Requests
|
34
33
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/swagger.gemspec
CHANGED