canvas-jobs 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <script type="text/javascript" charset="utf8">
8
+ window.ENV = <%= render_javascript_env %>
9
+ </script>
10
+ <script type="text/javascript" charset="utf8 "src="//code.jquery.com/jquery-2.1.3.min.js" defer></script>
11
+ <script type="text/javascript" charset="utf8" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" defer></script>
12
+ <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.6/js/jquery.dataTables.js" defer></script>
13
+ <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.js" defer></script>
14
+ <script type="text/javascript" charset="utf8" src="<%= url_path 'js/app.js' %>" defer></script>
15
+
16
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
17
+ <link rel="stylesheet" href="//cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.css">
18
+ <link rel="stylesheet" href="<%= url_path 'css/app.css' %>">
19
+
20
+ <title>Delayed Jobs</title>
21
+ </head>
22
+ <body>
23
+ <nav class="navbar navbar-default">
24
+ <div class="container-fluid">
25
+ <!-- Brand and toggle get grouped for better mobile display -->
26
+ <div class="navbar-header">
27
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
28
+ <span class="sr-only">Toggle navigation</span>
29
+ <span class="icon-bar"></span>
30
+ <span class="icon-bar"></span>
31
+ <span class="icon-bar"></span>
32
+ </button>
33
+ <a class="navbar-brand" href="<%= url_path '/' %>">Canvas Jobs</a>
34
+ </div>
35
+
36
+ <!-- Collect the nav links, forms, and other content for toggling -->
37
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
38
+ <ul class="nav navbar-nav">
39
+ </ul>
40
+ </div><!-- /.navbar-collapse -->
41
+ </div><!-- /.container-fluid -->
42
+ </nav>
43
+ <div class="container">
44
+ <%= yield %>
45
+ </div>
46
+ </body>
47
+ </html>
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.9.13"
2
+ VERSION = "0.9.14"
3
3
  end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Delayed::Pool do
4
+ describe '#parse_cli_options!' do
5
+ it 'must correctly parse the --config option' do
6
+ pool = Delayed::Pool.new(%w{run --config /path/to/some/file.yml})
7
+ pool.parse_cli_options!
8
+ expect(pool.options).to include config_file: '/path/to/some/file.yml'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+ require 'delayed/server'
3
+
4
+ RSpec.describe Delayed::Server, sinatra: true do
5
+ include Rack::Test::Methods
6
+
7
+ def app
8
+ described_class.new
9
+ end
10
+
11
+ def parsed_body
12
+ @parsed_body ||= JSON.parse(last_response.body)
13
+ end
14
+
15
+ before :all do
16
+ Delayed.select_backend(Delayed::Backend::ActiveRecord::Job)
17
+ end
18
+
19
+ after :all do
20
+ Delayed.send(:remove_const, :Job)
21
+ end
22
+
23
+ describe "get '/running'" do
24
+ before do
25
+ 3.times do |i|
26
+ Delayed::Job.create!({
27
+ run_at: Time.now,
28
+ locked_at: Time.now,
29
+ locked_by: "dummy-runner-#{i}:${$$}",
30
+ })
31
+ end
32
+ get '/running'
33
+ end
34
+
35
+ it 'must return a json object with the running job data in an array', aggregate_failures: true do
36
+ expect(last_response).to be_ok
37
+ expect(parsed_body['data']).to be_an Array
38
+ expect(parsed_body['data'].size).to eq 3
39
+ end
40
+ end
41
+
42
+ describe "get '/jobs'" do
43
+ let!(:job_1) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-1') }
44
+ let!(:job_2) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-2') }
45
+ let!(:job_3) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-3') }
46
+
47
+ context 'with the flavor param set to id' do
48
+ before do
49
+ get "/jobs?flavor=id&search_term=#{job_2.id}"
50
+ end
51
+
52
+ it 'must only return the job with the id specified in the search_term param' do
53
+ jobs = parsed_body['data']
54
+ job_ids = jobs.map{ |j| j['id'] }
55
+ expect(job_ids).to eq [job_2.id]
56
+ end
57
+
58
+ it 'must set recordsFiltered in the response to 1' do
59
+ expect(parsed_body['recordsFiltered']).to eq 1
60
+ end
61
+ end
62
+ end
63
+ end
@@ -1,22 +1,22 @@
1
1
  PATH
2
- remote: ../../
2
+ remote: /Users/tpickett/src/canvas-jobs
3
3
  specs:
4
- canvas-jobs (0.9.7)
4
+ canvas-jobs (0.9.13)
5
5
  after_transaction_commit (= 1.0.1)
6
6
  rails (>= 3.2)
7
7
  redis (> 3.0)
8
- redis-scripting (= 1.0.1)
9
- rufus-scheduler (= 2.0.6)
8
+ redis-scripting (~> 1.0.1)
9
+ rufus-scheduler (~> 3.1.2)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionmailer (3.2.19)
15
- actionpack (= 3.2.19)
14
+ actionmailer (3.2.22)
15
+ actionpack (= 3.2.22)
16
16
  mail (~> 2.5.4)
17
- actionpack (3.2.19)
18
- activemodel (= 3.2.19)
19
- activesupport (= 3.2.19)
17
+ actionpack (3.2.22)
18
+ activemodel (= 3.2.22)
19
+ activesupport (= 3.2.22)
20
20
  builder (~> 3.0.0)
21
21
  erubis (~> 2.7.0)
22
22
  journey (~> 1.0.4)
@@ -24,71 +24,71 @@ GEM
24
24
  rack-cache (~> 1.2)
25
25
  rack-test (~> 0.6.1)
26
26
  sprockets (~> 2.2.1)
27
- activemodel (3.2.19)
28
- activesupport (= 3.2.19)
27
+ activemodel (3.2.22)
28
+ activesupport (= 3.2.22)
29
29
  builder (~> 3.0.0)
30
- activerecord (3.2.19)
31
- activemodel (= 3.2.19)
32
- activesupport (= 3.2.19)
30
+ activerecord (3.2.22)
31
+ activemodel (= 3.2.22)
32
+ activesupport (= 3.2.22)
33
33
  arel (~> 3.0.2)
34
34
  tzinfo (~> 0.3.29)
35
- activeresource (3.2.19)
36
- activemodel (= 3.2.19)
37
- activesupport (= 3.2.19)
38
- activesupport (3.2.19)
35
+ activeresource (3.2.22)
36
+ activemodel (= 3.2.22)
37
+ activesupport (= 3.2.22)
38
+ activesupport (3.2.22)
39
39
  i18n (~> 0.6, >= 0.6.4)
40
40
  multi_json (~> 1.0)
41
41
  after_transaction_commit (1.0.1)
42
42
  activerecord (>= 3.2)
43
43
  arel (3.0.3)
44
- builder (3.0.0)
45
- bump (0.5.0)
44
+ builder (3.0.4)
45
+ bump (0.5.2)
46
46
  coderay (1.1.0)
47
47
  database_cleaner (1.3.0)
48
48
  diff-lcs (1.2.5)
49
49
  erubis (2.7.0)
50
50
  hike (1.2.3)
51
- i18n (0.6.11)
51
+ i18n (0.7.0)
52
52
  journey (1.0.4)
53
- json (1.8.1)
53
+ json (1.8.3)
54
54
  mail (2.5.4)
55
55
  mime-types (~> 1.16)
56
56
  treetop (~> 1.4.8)
57
57
  method_source (0.8.2)
58
58
  mime-types (1.25.1)
59
- multi_json (1.10.1)
60
- pg (0.17.1)
59
+ multi_json (1.11.2)
60
+ pg (0.18.1)
61
61
  polyglot (0.3.5)
62
62
  pry (0.10.1)
63
63
  coderay (~> 1.1.0)
64
64
  method_source (~> 0.8.1)
65
65
  slop (~> 3.4)
66
- rack (1.4.5)
66
+ rack (1.4.7)
67
67
  rack-cache (1.2)
68
68
  rack (>= 0.4)
69
69
  rack-ssl (1.3.4)
70
70
  rack
71
- rack-test (0.6.2)
71
+ rack-test (0.6.3)
72
72
  rack (>= 1.0)
73
- rails (3.2.19)
74
- actionmailer (= 3.2.19)
75
- actionpack (= 3.2.19)
76
- activerecord (= 3.2.19)
77
- activeresource (= 3.2.19)
78
- activesupport (= 3.2.19)
73
+ rails (3.2.22)
74
+ actionmailer (= 3.2.22)
75
+ actionpack (= 3.2.22)
76
+ activerecord (= 3.2.22)
77
+ activeresource (= 3.2.22)
78
+ activesupport (= 3.2.22)
79
79
  bundler (~> 1.0)
80
- railties (= 3.2.19)
81
- railties (3.2.19)
82
- actionpack (= 3.2.19)
83
- activesupport (= 3.2.19)
80
+ railties (= 3.2.22)
81
+ railties (3.2.22)
82
+ actionpack (= 3.2.22)
83
+ activesupport (= 3.2.22)
84
84
  rack-ssl (~> 1.3.2)
85
85
  rake (>= 0.8.7)
86
86
  rdoc (~> 3.4)
87
87
  thor (>= 0.14.6, < 2.0)
88
- rake (10.3.2)
89
- rdoc (3.12)
88
+ rake (10.4.2)
89
+ rdoc (3.12.2)
90
90
  json (~> 1.4)
91
- redis (3.1.0)
91
+ redis (3.2.1)
92
92
  redis-scripting (1.0.1)
93
93
  redis (>= 3.0)
94
94
  rspec (3.1.0)
@@ -103,15 +103,15 @@ GEM
103
103
  rspec-mocks (3.1.3)
104
104
  rspec-support (~> 3.1.0)
105
105
  rspec-support (3.1.2)
106
- rufus-scheduler (2.0.6)
106
+ rufus-scheduler (3.1.3)
107
107
  slop (3.6.0)
108
- sprockets (2.2.2)
108
+ sprockets (2.2.3)
109
109
  hike (~> 1.2)
110
110
  multi_json (~> 1.0)
111
111
  rack (~> 1.0)
112
112
  tilt (~> 1.1, != 1.3.0)
113
- syck (1.0.3)
114
- test_after_commit (0.4.0)
113
+ syck (1.0.5)
114
+ test_after_commit (0.4.1)
115
115
  activerecord (>= 3.2)
116
116
  thor (0.19.1)
117
117
  tilt (1.4.1)
@@ -119,8 +119,8 @@ GEM
119
119
  treetop (1.4.15)
120
120
  polyglot
121
121
  polyglot (>= 0.3.1)
122
- tzinfo (0.3.39)
123
- wwtd (0.5.5)
122
+ tzinfo (0.3.44)
123
+ wwtd (0.7.0)
124
124
 
125
125
  PLATFORMS
126
126
  ruby
@@ -128,13 +128,13 @@ PLATFORMS
128
128
  DEPENDENCIES
129
129
  bump
130
130
  canvas-jobs!
131
- database_cleaner
131
+ database_cleaner (= 1.3.0)
132
132
  pg
133
133
  pry
134
134
  rails (~> 3.2.19)
135
135
  rake
136
- rspec
136
+ rspec (= 3.1.0)
137
137
  syck
138
- test_after_commit
139
- timecop
140
- wwtd
138
+ test_after_commit (= 0.4.1)
139
+ timecop (= 0.7.1)
140
+ wwtd (= 0.7.0)
@@ -0,0 +1,128 @@
1
+ PATH
2
+ remote: /Users/tpickett/src/canvas-jobs
3
+ specs:
4
+ canvas-jobs (0.9.13)
5
+ after_transaction_commit (= 1.0.1)
6
+ rails (>= 3.2)
7
+ redis (> 3.0)
8
+ redis-scripting (~> 1.0.1)
9
+ rufus-scheduler (~> 3.1.2)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actionmailer (4.0.13)
15
+ actionpack (= 4.0.13)
16
+ mail (~> 2.5, >= 2.5.4)
17
+ actionpack (4.0.13)
18
+ activesupport (= 4.0.13)
19
+ builder (~> 3.1.0)
20
+ erubis (~> 2.7.0)
21
+ rack (~> 1.5.2)
22
+ rack-test (~> 0.6.2)
23
+ activemodel (4.0.13)
24
+ activesupport (= 4.0.13)
25
+ builder (~> 3.1.0)
26
+ activerecord (4.0.13)
27
+ activemodel (= 4.0.13)
28
+ activerecord-deprecated_finders (~> 1.0.2)
29
+ activesupport (= 4.0.13)
30
+ arel (~> 4.0.0)
31
+ activerecord-deprecated_finders (1.0.4)
32
+ activesupport (4.0.13)
33
+ i18n (~> 0.6, >= 0.6.9)
34
+ minitest (~> 4.2)
35
+ multi_json (~> 1.3)
36
+ thread_safe (~> 0.1)
37
+ tzinfo (~> 0.3.37)
38
+ after_transaction_commit (1.0.1)
39
+ activerecord (>= 3.2)
40
+ arel (4.0.2)
41
+ builder (3.1.4)
42
+ bump (0.5.2)
43
+ coderay (1.1.0)
44
+ database_cleaner (1.3.0)
45
+ diff-lcs (1.2.5)
46
+ erubis (2.7.0)
47
+ hike (1.2.3)
48
+ i18n (0.7.0)
49
+ mail (2.6.3)
50
+ mime-types (>= 1.16, < 3)
51
+ method_source (0.8.2)
52
+ mime-types (2.4.3)
53
+ minitest (4.7.5)
54
+ multi_json (1.11.0)
55
+ pg (0.18.1)
56
+ pry (0.10.1)
57
+ coderay (~> 1.1.0)
58
+ method_source (~> 0.8.1)
59
+ slop (~> 3.4)
60
+ rack (1.5.2)
61
+ rack-test (0.6.3)
62
+ rack (>= 1.0)
63
+ rails (4.0.13)
64
+ actionmailer (= 4.0.13)
65
+ actionpack (= 4.0.13)
66
+ activerecord (= 4.0.13)
67
+ activesupport (= 4.0.13)
68
+ bundler (>= 1.3.0, < 2.0)
69
+ railties (= 4.0.13)
70
+ sprockets-rails (~> 2.0)
71
+ railties (4.0.13)
72
+ actionpack (= 4.0.13)
73
+ activesupport (= 4.0.13)
74
+ rake (>= 0.8.7)
75
+ thor (>= 0.18.1, < 2.0)
76
+ rake (10.4.2)
77
+ redis (3.2.1)
78
+ redis-scripting (1.0.1)
79
+ redis (>= 3.0)
80
+ rspec (3.1.0)
81
+ rspec-core (~> 3.1.0)
82
+ rspec-expectations (~> 3.1.0)
83
+ rspec-mocks (~> 3.1.0)
84
+ rspec-core (3.1.7)
85
+ rspec-support (~> 3.1.0)
86
+ rspec-expectations (3.1.2)
87
+ diff-lcs (>= 1.2.0, < 2.0)
88
+ rspec-support (~> 3.1.0)
89
+ rspec-mocks (3.1.3)
90
+ rspec-support (~> 3.1.0)
91
+ rspec-support (3.1.2)
92
+ rufus-scheduler (3.1.3)
93
+ slop (3.6.0)
94
+ sprockets (2.12.3)
95
+ hike (~> 1.2)
96
+ multi_json (~> 1.0)
97
+ rack (~> 1.0)
98
+ tilt (~> 1.1, != 1.3.0)
99
+ sprockets-rails (2.2.4)
100
+ actionpack (>= 3.0)
101
+ activesupport (>= 3.0)
102
+ sprockets (>= 2.8, < 4.0)
103
+ syck (1.0.5)
104
+ test_after_commit (0.4.1)
105
+ activerecord (>= 3.2)
106
+ thor (0.19.1)
107
+ thread_safe (0.3.5)
108
+ tilt (1.4.1)
109
+ timecop (0.7.1)
110
+ tzinfo (0.3.43)
111
+ wwtd (0.7.0)
112
+
113
+ PLATFORMS
114
+ ruby
115
+
116
+ DEPENDENCIES
117
+ bump
118
+ canvas-jobs!
119
+ database_cleaner (= 1.3.0)
120
+ pg
121
+ pry
122
+ rails (~> 4.0.10)
123
+ rake
124
+ rspec (= 3.1.0)
125
+ syck
126
+ test_after_commit (= 0.4.1)
127
+ timecop (= 0.7.1)
128
+ wwtd (= 0.7.0)
@@ -0,0 +1,134 @@
1
+ PATH
2
+ remote: /Users/tpickett/src/canvas-jobs
3
+ specs:
4
+ canvas-jobs (0.9.13)
5
+ after_transaction_commit (= 1.0.1)
6
+ rails (>= 3.2)
7
+ redis (> 3.0)
8
+ redis-scripting (~> 1.0.1)
9
+ rufus-scheduler (~> 3.1.2)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actionmailer (4.1.10)
15
+ actionpack (= 4.1.10)
16
+ actionview (= 4.1.10)
17
+ mail (~> 2.5, >= 2.5.4)
18
+ actionpack (4.1.10)
19
+ actionview (= 4.1.10)
20
+ activesupport (= 4.1.10)
21
+ rack (~> 1.5.2)
22
+ rack-test (~> 0.6.2)
23
+ actionview (4.1.10)
24
+ activesupport (= 4.1.10)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ activemodel (4.1.10)
28
+ activesupport (= 4.1.10)
29
+ builder (~> 3.1)
30
+ activerecord (4.1.10)
31
+ activemodel (= 4.1.10)
32
+ activesupport (= 4.1.10)
33
+ arel (~> 5.0.0)
34
+ activesupport (4.1.10)
35
+ i18n (~> 0.6, >= 0.6.9)
36
+ json (~> 1.7, >= 1.7.7)
37
+ minitest (~> 5.1)
38
+ thread_safe (~> 0.1)
39
+ tzinfo (~> 1.1)
40
+ after_transaction_commit (1.0.1)
41
+ activerecord (>= 3.2)
42
+ arel (5.0.1.20140414130214)
43
+ builder (3.2.2)
44
+ bump (0.5.2)
45
+ coderay (1.1.0)
46
+ database_cleaner (1.3.0)
47
+ diff-lcs (1.2.5)
48
+ erubis (2.7.0)
49
+ hike (1.2.3)
50
+ i18n (0.7.0)
51
+ json (1.8.2)
52
+ mail (2.6.3)
53
+ mime-types (>= 1.16, < 3)
54
+ method_source (0.8.2)
55
+ mime-types (2.4.3)
56
+ minitest (5.5.1)
57
+ multi_json (1.11.0)
58
+ pg (0.18.1)
59
+ pry (0.10.1)
60
+ coderay (~> 1.1.0)
61
+ method_source (~> 0.8.1)
62
+ slop (~> 3.4)
63
+ rack (1.5.2)
64
+ rack-test (0.6.3)
65
+ rack (>= 1.0)
66
+ rails (4.1.10)
67
+ actionmailer (= 4.1.10)
68
+ actionpack (= 4.1.10)
69
+ actionview (= 4.1.10)
70
+ activemodel (= 4.1.10)
71
+ activerecord (= 4.1.10)
72
+ activesupport (= 4.1.10)
73
+ bundler (>= 1.3.0, < 2.0)
74
+ railties (= 4.1.10)
75
+ sprockets-rails (~> 2.0)
76
+ railties (4.1.10)
77
+ actionpack (= 4.1.10)
78
+ activesupport (= 4.1.10)
79
+ rake (>= 0.8.7)
80
+ thor (>= 0.18.1, < 2.0)
81
+ rake (10.4.2)
82
+ redis (3.2.1)
83
+ redis-scripting (1.0.1)
84
+ redis (>= 3.0)
85
+ rspec (3.1.0)
86
+ rspec-core (~> 3.1.0)
87
+ rspec-expectations (~> 3.1.0)
88
+ rspec-mocks (~> 3.1.0)
89
+ rspec-core (3.1.7)
90
+ rspec-support (~> 3.1.0)
91
+ rspec-expectations (3.1.2)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.1.0)
94
+ rspec-mocks (3.1.3)
95
+ rspec-support (~> 3.1.0)
96
+ rspec-support (3.1.2)
97
+ rufus-scheduler (3.1.3)
98
+ slop (3.6.0)
99
+ sprockets (2.12.3)
100
+ hike (~> 1.2)
101
+ multi_json (~> 1.0)
102
+ rack (~> 1.0)
103
+ tilt (~> 1.1, != 1.3.0)
104
+ sprockets-rails (2.2.4)
105
+ actionpack (>= 3.0)
106
+ activesupport (>= 3.0)
107
+ sprockets (>= 2.8, < 4.0)
108
+ syck (1.0.5)
109
+ test_after_commit (0.4.1)
110
+ activerecord (>= 3.2)
111
+ thor (0.19.1)
112
+ thread_safe (0.3.5)
113
+ tilt (1.4.1)
114
+ timecop (0.7.1)
115
+ tzinfo (1.2.2)
116
+ thread_safe (~> 0.1)
117
+ wwtd (0.7.0)
118
+
119
+ PLATFORMS
120
+ ruby
121
+
122
+ DEPENDENCIES
123
+ bump
124
+ canvas-jobs!
125
+ database_cleaner (= 1.3.0)
126
+ pg
127
+ pry
128
+ rails (~> 4.1.6)
129
+ rake
130
+ rspec (= 3.1.0)
131
+ syck
132
+ test_after_commit (= 0.4.1)
133
+ timecop (= 0.7.1)
134
+ wwtd (= 0.7.0)