spree_delayed_job 0.1.0 → 0.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/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2011 Giuseppe Privitera
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.textile ADDED
@@ -0,0 +1,46 @@
1
+ h1. Spree delayed job
2
+
3
+ The extension add a tab to the admin page to run jobs and display running jobs.
4
+ It's based on the "delayed_job":https://github.com/collectiveidea/delayed_job and "delayed_job_admin":https://github.com/trevorturk/delayed_job_admin
5
+
6
+ h2. Installation
7
+
8
+ To install, add delayed_job and spree_delayed_job to your @Gemfile@ and run `bundle install`:
9
+
10
+ <pre>
11
+ gem 'delayed_job'
12
+ gem 'spree_delayed_job'
13
+ </pre>
14
+
15
+ After spree_delayed_job is installed, run the following commands: (see "delayed_job":https://github.com/collectiveidea/delayed_job for detailed info)
16
+
17
+ <pre>
18
+ $ script/rails generate delayed_job
19
+ $ rake db:migrate
20
+ $ script/delayed_job start
21
+ </pre>
22
+
23
+
24
+ h2. Configuration
25
+
26
+ To add your jobs simply override (using Deface) or replace the app/views/admin/shared/_spree_delayed_job.html.erb:
27
+
28
+ <pre>
29
+ <!-- some sample tasks -->
30
+ <% content_for :sidebar do %>
31
+ <div class="box">
32
+ <h1>Run Jobs</h1>
33
+ <ul class="sidebar" data-hook="spree_delayed_jobs">
34
+ <li><%= button_to "rake assets:clear", :action => "create" , :job => "assets:clear" %></li>
35
+ <li><%= button_to "rake assets:precompile", :action => "create" , :job => "assets:precompile" %></li>
36
+ </ul>
37
+ </div>
38
+ <% end %>
39
+ </pre>
40
+
41
+ PLEASE NOTE: the gem it's still under development and with this version you can run only rake tasks.
42
+
43
+ This project is released under MIT-LICENSE.
44
+
45
+
46
+
@@ -8,11 +8,7 @@ class Admin::SpreeDelayedJobsController < Admin::BaseController
8
8
  end
9
9
 
10
10
  def create
11
- if params[:rake]
12
- Delayed::Job.enqueue(SpreeDelayedJob::DelayedRake.new(params[:job]))
13
- else
14
- Delayed::Job.enqueue(params[:job])
15
- end
11
+ Delayed::Job.enqueue(SpreeDelayedJob::DelayedRake.new(params[:job]))
16
12
  redirect_to :admin_spree_delayed_jobs
17
13
  end
18
14
  end
@@ -3,8 +3,8 @@
3
3
  <div class="box">
4
4
  <h1>Run Jobs</h1>
5
5
  <ul class="sidebar" data-hook="spree_delayed_jobs">
6
- <li><%= button_to "rake assets:clear", :action => "create" , :job => "assets:clear", :rake => true %></li>
7
- <li><%= button_to "rake assets:precompile", :action => "create" , :job => "assets:precompile", :rake => true %></li>
6
+ <li><%= button_to "rake assets:clear", :action => "create" , :job => "assets:clear" %></li>
7
+ <li><%= button_to "rake assets:precompile", :action => "create" , :job => "assets:precompile" %></li>
8
8
  </ul>
9
9
  </div>
10
10
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module SpreeDelayedJob
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_delayed_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-04 00:00:00.000000000Z
12
+ date: 2011-11-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: delayed_job
16
- requirement: &72990990 !ruby/object:Gem::Requirement
16
+ requirement: &73193670 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *72990990
24
+ version_requirements: *73193670
25
25
  description: Spree extension for delayed_job gem
26
26
  email:
27
27
  - priviterag@gmail.com
@@ -31,7 +31,8 @@ extra_rdoc_files: []
31
31
  files:
32
32
  - .gitignore
33
33
  - Gemfile
34
- - README
34
+ - MIT-LICENSE
35
+ - README.textile
35
36
  - Rakefile
36
37
  - Versionfile
37
38
  - app/controllers/admin/spree_delayed_jobs_controller.rb
data/README DELETED
@@ -1 +0,0 @@
1
- Spree extension for delayed_job gem