resque 3.0.0 → 3.0.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.
- checksums.yaml +4 -4
- data/HISTORY.md +10 -0
- data/README.markdown +7 -5
- data/lib/resque/helpers.rb +13 -8
- data/lib/resque/server/views/key_sets.erb +1 -1
- data/lib/resque/version.rb +1 -1
- data/lib/resque.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e48882e2b37c0256d7fb756dd585af487b5fd3d1161aa8e9aa0e06780ab51840
|
|
4
|
+
data.tar.gz: dd5cf203cb498beb074acf2d024343a948ad6658d52e9fc645c01450369176b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 259841b283671d350964b422526e1ef05ef789f72a2c03afea5a74cd15d7f162dfd32ce2dce54d058cc1d62ea859603ba0f6f6e45a7da017d0f2a36322212dcc
|
|
7
|
+
data.tar.gz: 4bc3a3159deef3f51ba4546c8c23cc2203e0b127558a6beb84f502d8668122feaf2e61ba7640a1292d1c790a1b77c9590d62ad1afbabad950a660feb55dc9351
|
data/HISTORY.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 3.0.1
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
* resque-web: Fix reflected XSS in the key sets endpoint (#1942)
|
|
6
|
+
* Address multi_json class name deprecation warning (#1940)
|
|
7
|
+
* Update the Rails initializer docs to load Redis config with `config_for` (#1936)
|
|
8
|
+
* Add tests covering queue priority ordering with wildcards (#1930)
|
|
9
|
+
|
|
1
10
|
## 3.0.0
|
|
2
11
|
|
|
3
12
|
### Breaking Changes
|
|
@@ -5,6 +14,7 @@
|
|
|
5
14
|
* **Minimum Ruby version is now 3.0.0** - Ruby 2.x is no longer supported
|
|
6
15
|
* **Minimum Sinatra version is now 2.0** - old Sinatra versions (0.9-1.x) are no longer supported
|
|
7
16
|
* **Rack 1.x is no longer supported** - Resque now requires Rack 2.x or greater
|
|
17
|
+
* **Minimum Rails version is now 7.2** - You can use Resque without Rails, but if you use it with Rails it must be a version that is still supported
|
|
8
18
|
|
|
9
19
|
### Added
|
|
10
20
|
|
data/README.markdown
CHANGED
|
@@ -495,12 +495,14 @@ Here's our `config/resque.yml`:
|
|
|
495
495
|
And our initializer:
|
|
496
496
|
|
|
497
497
|
``` ruby
|
|
498
|
-
|
|
499
|
-
rails_env = ENV['RAILS_ENV'] ||
|
|
500
|
-
config_file = rails_root + '/config/resque.yml'
|
|
498
|
+
config_file = 'config/resque.yml'
|
|
499
|
+
rails_env = ENV['RAILS_ENV'] || Rails.env
|
|
501
500
|
|
|
502
|
-
resque_config = YAML::
|
|
501
|
+
resque_config = YAML::load_file(config_file)
|
|
503
502
|
Resque.redis = resque_config[rails_env]
|
|
503
|
+
|
|
504
|
+
# OR auto load with current env
|
|
505
|
+
Resque.redis = Rails.application.config_for(:resque)
|
|
504
506
|
```
|
|
505
507
|
|
|
506
508
|
Easy peasy! Why not just use `RAILS_ROOT` and `RAILS_ENV`? Because
|
|
@@ -632,7 +634,7 @@ Choose DelayedJob if:
|
|
|
632
634
|
* You like numeric priorities
|
|
633
635
|
* You're not doing a gigantic amount of jobs each day
|
|
634
636
|
* Your queue stays small and nimble
|
|
635
|
-
* There is not a lot failure / chaos
|
|
637
|
+
* There is not a lot of failure / chaos
|
|
636
638
|
* You want to easily throw anything on the queue
|
|
637
639
|
* You don't want to setup Redis
|
|
638
640
|
|
data/lib/resque/helpers.rb
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
require 'multi_json'
|
|
2
2
|
|
|
3
|
-
# OkJson won't work because it doesn't serialize symbols
|
|
4
|
-
# in the same way yajl and json do.
|
|
5
|
-
if MultiJson.respond_to?(:adapter)
|
|
6
|
-
raise "Please install the yajl-ruby or json gem" if MultiJson.adapter.to_s == 'MultiJson::Adapters::OkJson'
|
|
7
|
-
elsif MultiJson.respond_to?(:engine)
|
|
8
|
-
raise "Please install the yajl-ruby or json gem" if MultiJson.engine.to_s == 'MultiJson::Engines::OkJson'
|
|
9
|
-
end
|
|
10
|
-
|
|
11
3
|
module Resque
|
|
4
|
+
# multi_json renamed it's top-level constant from MultiJson to MultiJSON,
|
|
5
|
+
# keeping MultiJson as a deprecated alias until v2.0. Reference whichever name the
|
|
6
|
+
# installed version exposes so we stay compatible with future versions of multi_json
|
|
7
|
+
MultiJson = defined?(::MultiJSON) ? ::MultiJSON : ::MultiJson
|
|
8
|
+
|
|
9
|
+
# OkJson won't work because it doesn't serialize symbols
|
|
10
|
+
# in the same way yajl and json do.
|
|
11
|
+
if MultiJson.respond_to?(:adapter)
|
|
12
|
+
raise "Please install the yajl-ruby or json gem" if MultiJson.adapter.to_s.end_with?('::OkJson')
|
|
13
|
+
elsif MultiJson.respond_to?(:engine)
|
|
14
|
+
raise "Please install the yajl-ruby or json gem" if MultiJson.engine.to_s.end_with?('::OkJson')
|
|
15
|
+
end
|
|
16
|
+
|
|
12
17
|
# Methods used by various classes in Resque.
|
|
13
18
|
module Helpers
|
|
14
19
|
class DecodeException < StandardError; end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p class='sub'><%= page_entries_info start = params[:start].to_i, start + 20, size = redis_get_size(key) %></p>
|
|
4
4
|
|
|
5
|
-
<h1>Key "<%= key %>" is a <%= resque.redis.type key %></h1>
|
|
5
|
+
<h1>Key "<%= escape_html(key) %>" is a <%= resque.redis.type key %></h1>
|
|
6
6
|
<table>
|
|
7
7
|
<% for row in redis_get_value_as_array(key, start) %>
|
|
8
8
|
<tr>
|
data/lib/resque/version.rb
CHANGED
data/lib/resque.rb
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resque
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Wanstrath
|
|
8
8
|
- Steve Klabnik
|
|
9
9
|
- Terence Lee
|
|
10
10
|
- Michael Bianco
|
|
11
|
-
autorequire:
|
|
12
11
|
bindir: bin
|
|
13
12
|
cert_chain: []
|
|
14
|
-
date:
|
|
13
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
15
14
|
dependencies:
|
|
16
15
|
- !ruby/object:Gem::Dependency
|
|
17
16
|
name: base64
|
|
@@ -229,7 +228,6 @@ licenses:
|
|
|
229
228
|
metadata:
|
|
230
229
|
changelog_uri: https://github.com/resque/resque/blob/master/HISTORY.md
|
|
231
230
|
rubygems_mfa_required: 'true'
|
|
232
|
-
post_install_message:
|
|
233
231
|
rdoc_options:
|
|
234
232
|
- "--charset=UTF-8"
|
|
235
233
|
require_paths:
|
|
@@ -245,8 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
245
243
|
- !ruby/object:Gem::Version
|
|
246
244
|
version: '0'
|
|
247
245
|
requirements: []
|
|
248
|
-
rubygems_version:
|
|
249
|
-
signing_key:
|
|
246
|
+
rubygems_version: 4.0.6
|
|
250
247
|
specification_version: 4
|
|
251
248
|
summary: Resque is a Redis-backed queueing system.
|
|
252
249
|
test_files: []
|