redmine_tasks_scheduler 0.3.5 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/alert.rb +3 -3
- data/config/initializers/daemon_auto_start.rb +4 -4
- data/config/initializers/menu.rb +11 -7
- data/config/locales/pt-BR.yml +1 -0
- data/lib/redmine_tasks_scheduler/patches/tasks_scheduler_controller_patch.rb +7 -8
- data/lib/redmine_tasks_scheduler/permissions.rb +7 -0
- data/lib/redmine_tasks_scheduler/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00442b8793d9aa1ea87398782546ed761e0810a5a7bb3c4e4c9b49d75b822c8a
|
4
|
+
data.tar.gz: c2e0a1948392f6b2531c99a78e85d3bf1b8af9c26e3dcf14ea8c42d4bdb2f439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 107f3f6d9494f98282d5009edbac31e80be2d33696cebe7b384c02d23b6ebdac26d9571283913ad04d3f395ffb9156680c9e701d334006a3371ef282637af996
|
7
|
+
data.tar.gz: 615c3f931b32cf7eb2edfc3b20724e4be694abe2626997acd608696407a9e97042a0b06e8a36ba1ca2104d668185c8de3048941de526d30f7581375fdce3dfcf
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
return unless
|
3
|
+
return unless RedminePluginsHelper::Available.database_schema?
|
4
4
|
|
5
|
-
GroupPermission.add_permission(
|
5
|
+
GroupPermission.add_permission(TasksSchedulerDaemonController::PERMISSIONS)
|
6
6
|
Redmine::MenuManager.map :top_menu do |menu|
|
7
7
|
menu.push :tasks_scheduler_alert,
|
8
8
|
{ controller: 'tasks_scheduler_daemon', action: 'index', id: nil },
|
9
|
-
caption: '', last: true, if: proc {
|
9
|
+
caption: '', last: true, if: proc { TasksSchedulerDaemonController::PERMISSIONS }
|
10
10
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
if
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
if RedmineTasksScheduler::Settings.daemon_autostart &&
|
4
|
+
RedmineNonprojectModules::DispatcherFinder.dispatcher &&
|
5
|
+
!TasksScheduler::Daemon.running?
|
6
|
+
TasksScheduler::Daemon.execute('start')
|
7
7
|
end
|
data/config/initializers/menu.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
GroupPermission.add_permission(RedmineTasksScheduler::Permissions::WRITE)
|
4
|
+
Redmine::Plugin.by_path(__FILE__).nonprojects_menu do |menu|
|
5
|
+
{
|
6
|
+
tasks_scheduler_daemon: { controller: 'tasks_scheduler_daemon', action: 'index', id: nil },
|
7
|
+
status_scheduled_tasks: { controller: 'scheduled_tasks', action: 'status', id: nil },
|
8
|
+
scheduled_tasks: { controller: 'scheduled_tasks', action: 'index', id: nil }
|
9
|
+
}.each do |k, v|
|
10
|
+
menu.push k, v,
|
11
|
+
caption: :"eac_rails_utils.menus.root.admin.tasks_scheduler.main_app_#{k}",
|
12
|
+
if: proc { GroupPermission.permission?(RedmineTasksScheduler::Permissions::WRITE) }
|
13
|
+
end
|
10
14
|
end
|
data/config/locales/pt-BR.yml
CHANGED
@@ -1,27 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'redmine_tasks_scheduler/permissions'
|
4
|
+
|
3
5
|
module RedmineTasksScheduler
|
4
6
|
module Patches
|
5
7
|
module TasksSchedulerControllerPatch
|
6
8
|
def self.included(base)
|
7
|
-
base.const_set('PERMISSIONS',
|
9
|
+
base.const_set('PERMISSIONS', ::RedmineTasksScheduler::Permissions::WRITE)
|
8
10
|
base.class_eval do
|
9
|
-
unloadable
|
10
|
-
|
11
11
|
require_permission const_get('PERMISSIONS')
|
12
|
-
layout '
|
12
|
+
layout 'nonproject_modules'
|
13
13
|
helper :scheduled_tasks
|
14
|
-
helper :tasks_scheduler
|
15
14
|
end
|
16
15
|
end
|
17
16
|
end
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
21
|
-
return unless
|
20
|
+
return unless RedminePluginsHelper::Available.database_schema?
|
22
21
|
|
23
|
-
[
|
24
|
-
patch_class =
|
22
|
+
[ScheduledTasksController, TasksSchedulerDaemonController].each do |controller_class|
|
23
|
+
patch_class = RedmineTasksScheduler::Patches::TasksSchedulerControllerPatch
|
25
24
|
unless controller_class.included_modules.include?(patch_class)
|
26
25
|
controller_class.send(:include, patch_class)
|
27
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_tasks_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- 0.
|
7
|
+
- 0.4.1
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tasks_scheduler
|
@@ -16,34 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.6.13
|
19
|
+
version: '0.8'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.6.13
|
26
|
+
version: '0.8'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: eac_rails_gem_support
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
33
|
+
version: '0.9'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.9.2
|
40
37
|
type: :development
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
41
|
- - "~>"
|
45
42
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
43
|
+
version: '0.9'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.9.2
|
47
47
|
description:
|
48
48
|
email:
|
49
49
|
executables: []
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- init.rb
|
64
64
|
- lib/redmine_tasks_scheduler.rb
|
65
65
|
- lib/redmine_tasks_scheduler/patches/tasks_scheduler_controller_patch.rb
|
66
|
+
- lib/redmine_tasks_scheduler/permissions.rb
|
66
67
|
- lib/redmine_tasks_scheduler/settings.rb
|
67
68
|
- lib/redmine_tasks_scheduler/version.rb
|
68
69
|
homepage: https://github.com/esquilo-azul/redmine_tasks_scheduler
|
@@ -76,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
77
|
requirements:
|
77
78
|
- - ">="
|
78
79
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
80
|
+
version: 2.7.0
|
80
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
82
|
requirements:
|
82
83
|
- - ">="
|