resque-status 0.1.1 → 0.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 CHANGED
@@ -11,6 +11,12 @@ and allowing the job instances to report their status from within their iteratio
11
11
 
12
12
  == Installation
13
13
 
14
+ resque-status *requires Redis >= 1.1* (though I recommend getting the latest stable version).
15
+ You can download Redis here: http://code.google.com/p/redis/ or install it
16
+ using homebrew (brew install redis).
17
+
18
+ Install the resque-status gem (which will pull in the dependencies).
19
+
14
20
  gem install resque-status
15
21
 
16
22
  To use with Rails, you can install as a plugin or add the gem to you're config:
@@ -1,7 +1,7 @@
1
1
  <%= status_view :status_styles, :layout => false %>
2
2
 
3
3
  <h1 class='wi'>Statuses: <%= @status.uuid %>/<%= @status.name %></h1>
4
- <p class='intro'>Viewing a specific job created with JobWithStatus. <a href="/statuses">Return to the list of statuses</a></p>
4
+ <p class='intro'>Viewing a specific job created with JobWithStatus. <a href="<%= url(:statuses) %>">Return to the list of statuses</a></p>
5
5
 
6
6
  <div class="status-holder" rel="<%= @status.status %>" id="status_<%= @status.uuid %>">
7
7
  <div class="status-progress">
@@ -22,7 +22,7 @@
22
22
 
23
23
  function checkStatus($status) {
24
24
  var status_id = $status.attr('id').replace('status_', '');
25
- $.getJSON('/statuses/' + status_id + '.js', function(json) {
25
+ $.getJSON('<%= url(:statuses) %>/' + status_id + '.js', function(json) {
26
26
  if (json) {
27
27
  var pct = "0%";
28
28
  if (json.pct_complete) {
@@ -54,4 +54,4 @@
54
54
  };
55
55
 
56
56
  });
57
- </script>
57
+ </script>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h1 class='wi'>Statuses</h1>
4
4
  <%unless @statuses.empty?%>
5
- <form method="POST" action="<%=u 'statuses/clear'%>" class='clear-failed'>
5
+ <form method="POST" action="<%= url(:statuses) %>/clear" class='clear-failed'>
6
6
  <input type='submit' name='' value='Clear Statuses' />
7
7
  </form>
8
8
  <%end%>
@@ -20,7 +20,7 @@
20
20
  <% unless @statuses.empty? %>
21
21
  <% @statuses.each do |status| %>
22
22
  <tr>
23
- <td><a href="/statuses/<%= status.uuid %>"><%= status.uuid %></a></td>
23
+ <td><a href="<%= url(:statuses) %>/<%= status.uuid %>"><%= status.uuid %></a></td>
24
24
  <td><%= status.name %></td>
25
25
  <td class="status status-<%= status.status %>"><%= status.status %></td>
26
26
  <td class="time"><%= status.time %></td>
@@ -29,7 +29,7 @@
29
29
  <div class="progress-pct"><%= status.pct_complete ? "#{status.pct_complete}%" : '' %></div>
30
30
  </td>
31
31
  <td><%= status.message %></td>
32
- <td><% if status.killable? %><a href="/statuses/<%= status.uuid %>/kill" class="kill">Kill</a><% end %></td>
32
+ <td><% if status.killable? %><a href="<%= url(:statuses) %>/<%= status.uuid %>/kill" class="kill">Kill</a><% end %></td>
33
33
  </tr>
34
34
  <% end %>
35
35
  <% else %>
@@ -62,4 +62,4 @@
62
62
  });
63
63
 
64
64
  });
65
- </script>
65
+ </script>
data/lib/resque/status.rb CHANGED
@@ -7,7 +7,7 @@ module Resque
7
7
  # the common status attributes. It also has a number of class methods for
8
8
  # creating/updating/retrieving status objects from Redis
9
9
  class Status < Hash
10
- VERSION = '0.1.1'
10
+ VERSION = '0.1.2'
11
11
 
12
12
  extend Resque::Helpers
13
13
 
@@ -25,12 +25,12 @@ module Resque
25
25
 
26
26
  app.post '/statuses/:id/kill' do
27
27
  Resque::Status.kill(params[:id])
28
- redirect '/statuses'
28
+ redirect url(:statuses)
29
29
  end
30
30
 
31
31
  app.post '/statuses/clear' do
32
32
  Resque::Status.clear
33
- redirect '/statuses'
33
+ redirect url(:statuses)
34
34
  end
35
35
 
36
36
  app.helpers do
@@ -46,4 +46,4 @@ module Resque
46
46
  end
47
47
  end
48
48
 
49
- Resque::Server.register Resque::StatusServer
49
+ Resque::Server.register Resque::StatusServer
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{resque-status}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron Quint"]
12
- s.date = %q{2010-01-20}
12
+ s.date = %q{2010-01-25}
13
13
  s.description = %q{resque-status is an extension to the resque queue system that provides simple trackable jobs. It provides a Resque::Status class which can set/get the statuses of jobs and a Resque::JobWithStatus class that when subclassed provides easily trackable/killable jobs.}
14
14
  s.email = %q{aaron@quirkey.com}
15
15
  s.extra_rdoc_files = [
data/test/test_helper.rb CHANGED
@@ -46,7 +46,7 @@ end
46
46
  puts "Starting redis for testing at localhost:9736..."
47
47
  `redis-server #{dir}/redis-test.conf`
48
48
  Resque.redis = 'localhost:9736'
49
-
49
+ Redisk.redis = 'localhost:9736'
50
50
 
51
51
  #### Fixtures
52
52
 
@@ -79,4 +79,4 @@ class KillableJob < Resque::JobWithStatus
79
79
  end
80
80
  end
81
81
 
82
- end
82
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Quint
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-20 00:00:00 -05:00
12
+ date: 2010-01-25 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency