redmine_tasks_scheduler 0.3.5 → 0.4.0
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 +9 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80f907f66d05e7597970989e04b106b154a50d331fdd72f168fb2ce05eff3c07
|
4
|
+
data.tar.gz: ba527b1a0a94b0f17d61200c139630cc9ef475b8ecd3b7120c15e1d45afa9dbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30354af71a3a0e20504b615ffe3b7a4fc2fc66861eb87033ef946ffa5fedce38d95d0c6a155d2bf8fe5cd6a7894dff80d0431ea2fe57f217f63ff4147b13a08d
|
7
|
+
data.tar.gz: 80e325892255d4329e46b24baaa8fc608c44ee80fa6a14afcf4eb1265cf5fe1cdabc449fa502f3f43ab5b5e714065d2579687e26071102bcf90ceeb99ee96eb4
|
@@ -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}".to_sym,
|
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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- 0.
|
7
|
+
- 0.4.0
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tasks_scheduler
|
@@ -16,34 +16,28 @@ 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
28
|
name: eac_ruby_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.8.1
|
40
34
|
type: :development
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
38
|
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
40
|
+
version: 0.8.1
|
47
41
|
description:
|
48
42
|
email:
|
49
43
|
executables: []
|
@@ -63,6 +57,7 @@ files:
|
|
63
57
|
- init.rb
|
64
58
|
- lib/redmine_tasks_scheduler.rb
|
65
59
|
- lib/redmine_tasks_scheduler/patches/tasks_scheduler_controller_patch.rb
|
60
|
+
- lib/redmine_tasks_scheduler/permissions.rb
|
66
61
|
- lib/redmine_tasks_scheduler/settings.rb
|
67
62
|
- lib/redmine_tasks_scheduler/version.rb
|
68
63
|
homepage: https://github.com/esquilo-azul/redmine_tasks_scheduler
|
@@ -76,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
71
|
requirements:
|
77
72
|
- - ">="
|
78
73
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
74
|
+
version: 2.7.0
|
80
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
76
|
requirements:
|
82
77
|
- - ">="
|