clockwork_web 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74d73597a4897bf13454c224f641f29f33f4eb7f52f601d61310fb49c633e6da
4
- data.tar.gz: ba1c41be2a4ca03b4c3a96988683b79223dcfc5a65c94ae6608249acf3ae4a15
3
+ metadata.gz: a9a6a6fcd5a87e3848e50285aa3b2e944f1626655ed6e050e26da5a1786cb736
4
+ data.tar.gz: d801facdca13e168a85cc7742c864f668bf85667704131ad88fb0b1cb67121f9
5
5
  SHA512:
6
- metadata.gz: 4c88b828b6c387fba8cbe67d874df5eea3ed0b5464701be2ef21be3ecbc311c713e50e01885b3e24e9b3b654321ebba18a0cdb287eeff2e9b1bf7f89075d3e14
7
- data.tar.gz: 2597b48a72c38ae3cd9fda8abc068a0767a857489c018a3398d1ba3b1978cfbd75c13a3a3fdb5b5534de30c108c0c80c458d89836a1ffd8a45fdf55a2142a6ec
6
+ metadata.gz: ba1872f8b0cb315cf465ab0a01c04277d0f74d6dd1f48e531ac6166dfc1779a595db064ad32dde4aad7f2c3e040ef55cd3bee4727c70bb10f1161e175cd1316e
7
+ data.tar.gz: 4658e9088d8b1243e53a1a90d789c2ef19e36c9a0a4c8cf6313aa51e3809532ecaede3c70064afc6333b53b7a6ac0a59cedbf8c7e42c23504e6feafb1c64fd6d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.3.1 (2024-09-04)
2
+
3
+ - Improved CSP support
4
+
5
+ ## 0.3.0 (2024-06-24)
6
+
7
+ - Dropped support for Clockwork < 3
8
+ - Dropped support for Ruby < 3.1 and Rails < 6.1
9
+
1
10
  ## 0.2.0 (2023-02-01)
2
11
 
3
12
  - Dropped support for Ruby < 2.7 and Rails < 6
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2022 Andrew Kane
1
+ Copyright (c) 2015-2024 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
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,7 +10,7 @@ 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/workflows/build/badge.svg?branch=master)](https://github.com/ankane/clockwork_web/actions)
13
+ [![Build Status](https://github.com/ankane/clockwork_web/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/clockwork_web/actions)
14
14
 
15
15
  ## Installation
16
16
 
@@ -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")
@@ -26,6 +25,5 @@ module ClockworkWeb
26
25
  "**"
27
26
  end
28
27
  end
29
-
30
28
  end
31
29
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  <meta charset="utf-8" />
7
7
 
8
- <style>
8
+ <%= content_tag :style, nonce: request.content_security_policy_nonce_directives&.include?("style-src") ? content_security_policy_nonce : nil do %>
9
9
  body {
10
10
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
11
11
  margin: 0;
@@ -47,7 +47,11 @@
47
47
  .disabled {
48
48
  background-color: pink;
49
49
  }
50
- </style>
50
+
51
+ .width-15 {
52
+ width: 15%;
53
+ }
54
+ <% end %>
51
55
  </head>
52
56
  <body>
53
57
  <div class="container">
@@ -74,9 +78,9 @@
74
78
  <thead>
75
79
  <tr>
76
80
  <th>Job</th>
77
- <th style="width: 15%;">Period</th>
78
- <th style="width: 15%;">Last Run</th>
79
- <th style="width: 15%;">Action</th>
81
+ <th class="width-15">Period</th>
82
+ <th class="width-15">Last Run</th>
83
+ <th class="width-15">Action</th>
80
84
  </tr>
81
85
  </thead>
82
86
  <tbody>
@@ -1,3 +1,3 @@
1
1
  module ClockworkWeb
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  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
- # engine
8
- require "clockwork_web/engine"
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[ redis.hgetall(LAST_RUNS_KEY).map{|job, timestamp| [job, Time.at(timestamp.to_i)] }.sort_by{|job, time| [time, job] } ]
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.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-02 00:00:00.000000000 Z
11
+ date: 2024-09-05 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: '0'
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: '0'
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.1.1
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.1.1
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: '6'
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: '6'
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: '2.7'
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.4.1
90
+ rubygems_version: 3.5.11
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: A web interface for Clockwork