clockwork_web 0.1.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/LICENSE.txt +1 -1
- data/README.md +3 -1
- data/app/helpers/clockwork_web/home_helper.rb +1 -3
- data/lib/clockwork_web/version.rb +1 -1
- data/lib/clockwork_web.rb +4 -5
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a45370b173a468f37dcf923e6af570d9e52a4ac556f87d39f81e0e96dfc8c61
|
4
|
+
data.tar.gz: 884678a434dfd77b397bfcd552f7cc184e7f82844ecea715dab4d20a0fc95bc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b00eb171967db113aa4228d3347c85beef7fd514e249f2c1574aa1758ec6bf55fd860488b33b82449e00e8f83a85a1b93da9302cf6aebd6cd3b310a4a5551859
|
7
|
+
data.tar.gz: 26644936cba3e75636b995b65f6e73d5eca2cb0c4baa2f8ff42d7fbc4493b3ad96eeb734c263e57e34c84e792369d57e016df43138375146b27a76318403b623
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 0.3.0 (2024-06-24)
|
2
|
+
|
3
|
+
- Dropped support for Clockwork < 3
|
4
|
+
- Dropped support for Ruby < 3.1 and Rails < 6.1
|
5
|
+
|
6
|
+
## 0.2.0 (2023-02-01)
|
7
|
+
|
8
|
+
- Dropped support for Ruby < 2.7 and Rails < 6
|
9
|
+
|
1
10
|
## 0.1.2 (2023-02-01)
|
2
11
|
|
3
12
|
- Fixed CSRF vulnerability with Rails < 5.2 - [more info](https://github.com/ankane/clockwork_web/issues/4)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Clockwork Web
|
2
2
|
|
3
|
-
A web interface for Clockwork
|
3
|
+
A web interface for [Clockwork](https://github.com/Rykian/clockwork)
|
4
4
|
|
5
5
|
[View the demo](https://clockwork.dokkuapp.com/)
|
6
6
|
|
@@ -10,6 +10,8 @@ A web interface for Clockwork
|
|
10
10
|
|
11
11
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
12
12
|
|
13
|
+
[![Build Status](https://github.com/ankane/clockwork_web/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/clockwork_web/actions)
|
14
|
+
|
13
15
|
## Installation
|
14
16
|
|
15
17
|
Add this line to your application’s Gemfile:
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module ClockworkWeb
|
2
2
|
module HomeHelper
|
3
|
-
|
4
3
|
def friendly_period(period)
|
5
4
|
if period % 1.day == 0
|
6
5
|
pluralize(period / 1.day, "day")
|
@@ -15,7 +14,7 @@ module ClockworkWeb
|
|
15
14
|
|
16
15
|
def last_run(time)
|
17
16
|
if time
|
18
|
-
time_ago_in_words(time)
|
17
|
+
"#{time_ago_in_words(time, include_seconds: true)} ago"
|
19
18
|
end
|
20
19
|
end
|
21
20
|
|
@@ -26,6 +25,5 @@ module ClockworkWeb
|
|
26
25
|
"**"
|
27
26
|
end
|
28
27
|
end
|
29
|
-
|
30
28
|
end
|
31
29
|
end
|
data/lib/clockwork_web.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
require "clockwork_web/version"
|
2
|
-
|
3
1
|
# dependencies
|
4
2
|
require "clockwork"
|
5
3
|
require "safely/core"
|
6
4
|
|
7
|
-
#
|
8
|
-
|
5
|
+
# modules
|
6
|
+
require_relative "clockwork_web/engine"
|
7
|
+
require_relative "clockwork_web/version"
|
9
8
|
|
10
9
|
module ClockworkWeb
|
11
10
|
LAST_RUNS_KEY = "clockwork:last_runs"
|
@@ -59,7 +58,7 @@ module ClockworkWeb
|
|
59
58
|
|
60
59
|
def self.last_runs
|
61
60
|
if redis
|
62
|
-
Hash[
|
61
|
+
Hash[redis.hgetall(LAST_RUNS_KEY).map { |job, timestamp| [job, Time.at(timestamp.to_i)] }.sort_by { |job, time| [time, job] }]
|
63
62
|
else
|
64
63
|
{}
|
65
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clockwork
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: safely_block
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: '0.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: railties
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '6.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '6.1'
|
55
55
|
description:
|
56
56
|
email: andrew@ankane.org
|
57
57
|
executables: []
|
@@ -80,14 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '3.1'
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.5.11
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: A web interface for Clockwork
|