resque-approve 0.0.7 → 0.0.11

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.
@@ -41,6 +41,16 @@ RSpec.describe "approval_keys.erb" do
41
41
  expect(Resque).not_to have_received(:enqueue_to)
42
42
  end
43
43
 
44
+ it "should respond to /approve/reset_running" do
45
+ expect(queue).to receive(:reset_running).and_call_original
46
+
47
+ post "/approve/reset_running?#{{ approval_key: key }.to_param}"
48
+
49
+ expect(last_response).to be_redirect
50
+ expect(last_response.header["Location"]).to match(%r{approve/job_list\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}$})
51
+ expect(Resque).not_to have_received(:enqueue_to)
52
+ end
53
+
44
54
  it "should respond to /approve/delete_one_queue" do
45
55
  expect(queue).to receive(:remove_one).and_call_original
46
56
 
@@ -101,6 +111,7 @@ RSpec.describe "approval_keys.erb" do
101
111
 
102
112
  expect(last_response.body).to match %r{Approval Keys(\n *)?</a>}
103
113
 
114
+ expect(last_response.body).to match %r{action="/approve/reset_running\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
104
115
  expect(last_response.body).to match %r{action="/approve/delete_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
105
116
  expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
106
117
  expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
@@ -128,6 +139,7 @@ RSpec.describe "approval_keys.erb" do
128
139
 
129
140
  expect(last_response.body).to match %r{Approval Keys(\n *)?</a>}
130
141
 
142
+ expect(last_response.body).to match %r{action="/approve/reset_running\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
131
143
  expect(last_response.body).to match %r{action="/approve/delete_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
132
144
  expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
133
145
  expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DefaultApprovalQueue < BasicJob
4
+ self.default_queue_name = "Default Approval Queue"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class MaxActiveJob < BasicJob
4
+ self.max_active_jobs = 10
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-approve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rack-test
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: resque-scheduler
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +126,16 @@ dependencies:
140
126
  name: rspec-rails
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ">="
129
+ - - ">"
144
130
  - !ruby/object:Gem::Version
145
- version: '0'
131
+ version: 3.9.1
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ">="
136
+ - - ">"
151
137
  - !ruby/object:Gem::Version
152
- version: '0'
138
+ version: 3.9.1
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: rubocop
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -182,16 +168,16 @@ dependencies:
182
168
  name: sinatra
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
- - - "~>"
171
+ - - ">="
186
172
  - !ruby/object:Gem::Version
187
- version: '1.4'
173
+ version: '0'
188
174
  type: :development
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
- - - "~>"
178
+ - - ">="
193
179
  - !ruby/object:Gem::Version
194
- version: '1.4'
180
+ version: '0'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: timecop
197
183
  requirement: !ruby/object:Gem::Requirement
@@ -219,6 +205,7 @@ files:
219
205
  - lib/resque/approve_server.rb
220
206
  - lib/resque/plugins/approve.rb
221
207
  - lib/resque/plugins/approve/approval_key_list.rb
208
+ - lib/resque/plugins/approve/auto_approve_next.rb
222
209
  - lib/resque/plugins/approve/cleaner.rb
223
210
  - lib/resque/plugins/approve/pending_job.rb
224
211
  - lib/resque/plugins/approve/pending_job_queue.rb
@@ -248,6 +235,8 @@ files:
248
235
  - spec/support/config/redis-auth.yml
249
236
  - spec/support/jobs/01_basic_job.rb
250
237
  - spec/support/jobs/auto_delete_approval_key_job.rb
238
+ - spec/support/jobs/default_approval_queue_job.rb
239
+ - spec/support/jobs/max_active_job.rb
251
240
  - spec/support/purge_all.rb
252
241
  homepage: https://github.com/RealNobody
253
242
  licenses:
@@ -268,8 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
257
  - !ruby/object:Gem::Version
269
258
  version: '0'
270
259
  requirements: []
271
- rubyforge_project:
272
- rubygems_version: 2.5.1
260
+ rubygems_version: 3.0.3
273
261
  signing_key:
274
262
  specification_version: 4
275
263
  summary: Keeps a list of jobs which require approval to run.
@@ -288,5 +276,7 @@ test_files:
288
276
  - spec/support/config/redis-auth.yml
289
277
  - spec/support/jobs/01_basic_job.rb
290
278
  - spec/support/jobs/auto_delete_approval_key_job.rb
279
+ - spec/support/jobs/max_active_job.rb
280
+ - spec/support/jobs/default_approval_queue_job.rb
291
281
  - spec/support/purge_all.rb
292
282
  - spec/rails_helper.rb