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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db3d5a7b7eed1fd5e7293fca602d03228c618c696940c8f647b163b5864637bb
4
- data.tar.gz: 8b3b6ff51b2ba28a2e545b9acfd9eaaf0636a2bdaaac0c08e4eb83f0834983d8
3
+ metadata.gz: 00442b8793d9aa1ea87398782546ed761e0810a5a7bb3c4e4c9b49d75b822c8a
4
+ data.tar.gz: c2e0a1948392f6b2531c99a78e85d3bf1b8af9c26e3dcf14ea8c42d4bdb2f439
5
5
  SHA512:
6
- metadata.gz: faeed3015651880ba97068ab8790a52377b1214bae4a9e2d76c41b014b97892e2fe163b698419935540fa2e232b14c3f1d86096dbbf413bee3afca64463aa941
7
- data.tar.gz: 4ee28e6e5170d2879a3e6a6234de31350a62edd6e0a035e925719eefe0e910533bec48385228c7e9c093535b49a8ee8de4c8f4fe3621ec38cecbdb077242169b
6
+ metadata.gz: 107f3f6d9494f98282d5009edbac31e80be2d33696cebe7b384c02d23b6ebdac26d9571283913ad04d3f395ffb9156680c9e701d334006a3371ef282637af996
7
+ data.tar.gz: 615c3f931b32cf7eb2edfc3b20724e4be694abe2626997acd608696407a9e97042a0b06e8a36ba1ca2104d668185c8de3048941de526d30f7581375fdce3dfcf
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- return unless ::RedminePluginsHelper::Available.database_schema?
3
+ return unless RedminePluginsHelper::Available.database_schema?
4
4
 
5
- GroupPermission.add_permission(::TasksSchedulerDaemonController::PERMISSIONS)
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 { ::TasksSchedulerDaemonController::PERMISSIONS }
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 ::RedmineTasksScheduler::Settings.daemon_autostart &&
4
- ::RedmineNonprojectModules::DispatcherFinder.dispatcher &&
5
- !::TasksScheduler::Daemon.running?
6
- ::TasksScheduler::Daemon.execute('start')
3
+ if RedmineTasksScheduler::Settings.daemon_autostart &&
4
+ RedmineNonprojectModules::DispatcherFinder.dispatcher &&
5
+ !TasksScheduler::Daemon.running?
6
+ TasksScheduler::Daemon.execute('start')
7
7
  end
@@ -1,10 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- return unless ::RedminePluginsHelper::Available.database_schema?
4
-
5
- GroupPermission.add_permission(::ScheduledTasksController::PERMISSIONS)
6
- Redmine::MenuManager.map :admin_menu do |menu|
7
- menu.push :scheduled_tasks, { controller: 'scheduled_tasks', action: 'status', id: nil },
8
- caption: :'activerecord.models.scheduled_task.other',
9
- if: proc { GroupPermission.permission?(::ScheduledTasksController::PERMISSIONS) }
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
@@ -1,4 +1,5 @@
1
1
  pt-BR:
2
+ menu_redmine_tasks_scheduler: ${eac_rails_utils.menus.root.admin.tasks_scheduler.__self}
2
3
  redmine_tasks_scheduler:
3
4
  daemon_autostart_description: Inicializar Daemon automaticamente junto com
4
5
  o servidor?
@@ -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', 'scheduled_tasks')
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 'admin'
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 ::RedminePluginsHelper::Available.database_schema?
20
+ return unless RedminePluginsHelper::Available.database_schema?
22
21
 
23
- [::ScheduledTasksController, ::TasksSchedulerDaemonController].each do |controller_class|
24
- patch_class = ::RedmineTasksScheduler::Patches::TasksSchedulerControllerPatch
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
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RedmineTasksScheduler
4
+ module Permissions
5
+ WRITE = 'scheduled_tasks'
6
+ end
7
+ end
@@ -4,5 +4,5 @@ module RedmineTasksScheduler
4
4
  AUTHOR = 'Eduardo Henrique Bogoni'
5
5
  HOMEPAGE = 'https://github.com/esquilo-azul/redmine_tasks_scheduler'
6
6
  SUMMARY = 'Scheduler for rake tasks on Redmine.'
7
- VERSION = '0.3.5'
7
+ VERSION = '0.4.1'
8
8
  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.3.5
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
- - 0.3.5
7
+ - 0.4.1
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-14 00:00:00.000000000 Z
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.6'
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.6'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.6.13
26
+ version: '0.8'
33
27
  - !ruby/object:Gem::Dependency
34
- name: eac_ruby_gem_support
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.5.1
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.5.1
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: '0'
80
+ version: 2.7.0
80
81
  required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  requirements:
82
83
  - - ">="