resque-scheduler 4.9.0 → 4.10.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of resque-scheduler might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be1ad7d71c519660fafb8b0ccdae4b2b508e9577a1af5dbb8a57f8c7bce1a02f
4
- data.tar.gz: 742e298554473ed422e15c420a981f38c446c333636d6cdd09cd511eebda4584
3
+ metadata.gz: cf0c6b96fa880ba5a817d63c04d9e17a070061c1f3cd7fe8b9ad6c91c2ffe016
4
+ data.tar.gz: a01edeea347f025e87b7327a89a6fb509716ecea47b3cbe1a8c4eea0de08e3ff
5
5
  SHA512:
6
- metadata.gz: 91874b66e46123e8ef0476518b98ee6a1923fba44d4feff923bdf1be0b2319da8a60141dbaf91c99e0a62817c8904c223c67f38a6b153b54fc63b8717aa5235d
7
- data.tar.gz: 55d87dfb5ec01b799f5062354bfa0d80b1194833b7a52eed0e4807f55f2bd50df7e231166ea73847c6195423b12ca76b4732b94409a755bdccf280e3ce2b739b
6
+ metadata.gz: 4a8facf77afaf21a8a39ebfab4cac5f42d97e743a353f70e43dfc3caa7f97da8ff6c9f868d57e9d7ba36c96f4b91cf4c66032e0803d69a1f2f04283e0fddac65
7
+ data.tar.gz: 470bbd7ded28c0c4b62d3aa4bfa9b78c04066e3e430a124c6671c6dd336b3678ff3edab5266a72a705bb6cc8b65e1899b70891b4b06829dc417396d3aebaf8b1
@@ -27,7 +27,7 @@ jobs:
27
27
 
28
28
  steps:
29
29
  - name: Checkout repository
30
- uses: actions/checkout@v3
30
+ uses: actions/checkout@v4
31
31
 
32
32
  # Initializes the CodeQL tools for scanning.
33
33
  - name: Initialize CodeQL
@@ -14,11 +14,11 @@ jobs:
14
14
  matrix:
15
15
  os: [ubuntu-latest]
16
16
  ruby: [
17
- 2.4
17
+ 2.7
18
18
  ]
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
22
22
  - uses: ruby/setup-ruby@v1
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby }}
@@ -72,7 +72,7 @@ jobs:
72
72
  COVERAGE: 1
73
73
 
74
74
  steps:
75
- - uses: actions/checkout@v3
75
+ - uses: actions/checkout@v4
76
76
  - uses: ruby/setup-ruby@v1
77
77
  with:
78
78
  ruby-version: "${{ matrix.ruby-version }}"
data/AUTHORS.md CHANGED
@@ -89,3 +89,4 @@ Resque Scheduler authors
89
89
  - sawanoboly
90
90
  - serek
91
91
  - iloveitaly
92
+ - treacher
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  **ATTN**: This project uses [semantic versioning](http://semver.org/).
4
4
 
5
+ ## [4.10.1] - 2023-12-15
6
+ ### Fixed
7
+ * Fix json dump crasher with JSON 2.7.0+ by @PatrickTulskie in #781
8
+ * Fix for #761, reflected XSS in delayed_schedules.erb by @PatrickTulskie in #780
9
+
10
+ ## [4.10.0] - 2023-08-20
11
+ ### Added
12
+ * Add logfmt option for logging output (#763)
13
+
14
+ ### Fixed
15
+ * Rubocop Fixes (#771)
16
+
5
17
  ## [4.9.0] - 2023-05-31
6
18
  ### Changed
7
19
  - Adding batching to re-queuing for timestamp by @brennen-stripe in #767
data/README.md CHANGED
@@ -139,7 +139,7 @@ requiring `resque` and `resque/scheduler` (default empty).
139
139
  * `RESQUE_SCHEDULER_INTERVAL` - Interval in seconds for checking if a
140
140
  scheduled job must run (coerced with `Kernel#Float()`) (default `5`)
141
141
  * `LOGFILE` - Log file name (default empty, meaning `$stdout`)
142
- * `LOGFORMAT` - Log output format to use (either `'text'` or `'json'`,
142
+ * `LOGFORMAT` - Log output format to use (either `'text'`, `'json'` or `'logfmt'`,
143
143
  default `'text'`)
144
144
  * `PIDFILE` - If non-empty, write process PID to file (default empty)
145
145
  * `QUIET` - Silence most output if non-empty (equivalent to a level of
@@ -663,7 +663,7 @@ are toggled by environment variables:
663
663
  - `QUIET` will stop logging anything. Completely silent.
664
664
  - `VERBOSE` opposite of 'QUIET'; will log even debug information
665
665
  - `LOGFILE` specifies the file to write logs to. (default standard output)
666
- - `LOGFORMAT` specifies either "text" or "json" output format
666
+ - `LOGFORMAT` specifies either "text", "json" or "logfmt" output format
667
667
  (default "text")
668
668
 
669
669
  All of these variables are optional and will be given the following default
@@ -44,7 +44,7 @@ module Resque
44
44
  @logfile ||= environment['LOGFILE']
45
45
  end
46
46
 
47
- # Sets whether to log in 'text' or 'json'
47
+ # Sets whether to log in 'text', 'json' or 'logfmt'
48
48
  attr_writer :logformat
49
49
 
50
50
  def logformat
@@ -15,7 +15,7 @@ module Resque
15
15
  # - :quiet if logger needs to be silent for all levels. Default - false
16
16
  # - :verbose if there is a need in debug messages. Default - false
17
17
  # - :log_dev to output logs into a desired file. Default - STDOUT
18
- # - :format log format, either 'text' or 'json'. Default - 'text'
18
+ # - :format log format, either 'text', 'json' or 'logfmt'. Default - 'text'
19
19
  #
20
20
  # Example:
21
21
  #
@@ -32,6 +32,7 @@ module Resque
32
32
  # Returns an instance of MonoLogger
33
33
  def build
34
34
  logger = MonoLogger.new(@log_dev)
35
+ logger.progname = 'resque-scheduler'.freeze
35
36
  logger.level = level
36
37
  logger.formatter = send(:"#{@format}_formatter")
37
38
  logger
@@ -50,21 +51,31 @@ module Resque
50
51
  end
51
52
 
52
53
  def text_formatter
53
- proc do |severity, datetime, _progname, msg|
54
- "resque-scheduler: [#{severity}] #{datetime.iso8601}: #{msg}\n"
54
+ proc do |severity, datetime, progname, msg|
55
+ "#{progname}: [#{severity}] #{datetime.iso8601}: #{msg}\n"
55
56
  end
56
57
  end
57
58
 
58
59
  def json_formatter
59
60
  proc do |severity, datetime, progname, msg|
60
61
  require 'json'
61
- JSON.dump(
62
- name: 'resque-scheduler',
62
+ log_data = {
63
+ name: progname,
63
64
  progname: progname,
64
65
  level: severity,
65
66
  timestamp: datetime.iso8601,
66
67
  msg: msg
67
- ) + "\n"
68
+ }
69
+ JSON.dump(log_data) + "\n"
70
+ end
71
+ end
72
+
73
+ def logfmt_formatter
74
+ proc do |severity, datetime, progname, msg|
75
+ "timestamp=\"#{datetime.iso8601}\" " \
76
+ "level=\"#{severity}\" " \
77
+ "progname=\"#{progname}\" " \
78
+ "msg=\"#{msg}\"\n"
68
79
  end
69
80
  end
70
81
  end
@@ -1,4 +1,4 @@
1
- <h1>Delayed jobs scheduled for <%= params[:klass] %> (<%= show_job_arguments(@args) %>)</h1>
1
+ <h1>Delayed jobs scheduled for <%=h params[:klass] %> (<%= show_job_arguments(@args) %>)</h1>
2
2
 
3
3
  <table class='jobs'>
4
4
  <tr>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Resque
4
4
  module Scheduler
5
- VERSION = '4.9.0'.freeze
5
+ VERSION = '4.10.1'.freeze
6
6
  end
7
7
  end
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
12
12
  Ryan Biesemeyer
13
13
  Dan Buch
14
14
  Michael Bianco
15
+ Patrick Tulskie
15
16
  EOF
16
17
  spec.email = %w(
17
18
  bvandenbos@gmail.com
@@ -19,6 +20,7 @@ Gem::Specification.new do |spec|
19
20
  ryan@yaauie.com
20
21
  dan@meatballhat.com
21
22
  mike@mikebian.co
23
+ patricktulskie@gmail.com
22
24
  )
23
25
  spec.summary = 'Light weight job scheduling on top of Resque'
24
26
  spec.description = <<-DESCRIPTION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben VandenBos
@@ -9,10 +9,11 @@ authors:
9
9
  - Ryan Biesemeyer
10
10
  - Dan Buch
11
11
  - Michael Bianco
12
+ - Patrick Tulskie
12
13
  autorequire:
13
14
  bindir: exe
14
15
  cert_chain: []
15
- date: 2023-06-08 00:00:00.000000000 Z
16
+ date: 2023-12-15 00:00:00.000000000 Z
16
17
  dependencies:
17
18
  - !ruby/object:Gem::Dependency
18
19
  name: bundler
@@ -254,6 +255,7 @@ email:
254
255
  - ryan@yaauie.com
255
256
  - dan@meatballhat.com
256
257
  - mike@mikebian.co
258
+ - patricktulskie@gmail.com
257
259
  executables:
258
260
  - resque-scheduler
259
261
  extensions: []