foreman-tasks 0.6.14 → 0.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Njc1OWI4YzE5OWI1ZmNhMmI3YjIwMzc3NDRjZjVjMTViMzNjZjNhOQ==
4
+ OWU1NDFhZjAxYjZkNDAwYzJkZTA0YTBlOTcxMGQ3NGIxYTQzNWFiYg==
5
5
  data.tar.gz: !binary |-
6
- ZTMzODQyZWM1MDljMmNmZDcxMGM0OTc5MDExOTVjOGE3YWNhMmMyNg==
6
+ YmVmNjMwODk3YTNiYTY1NGNjYWUyMDI3NDBkZTM4ZmVjN2M1ZDllMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2M3NTQzNzFiMGVlN2NiZDE5NTU2YmM1ZmYzMWU2YWQwYWRmYmFmNzUxZDMz
10
- MDkzYzc3NmFkMjYwZGE3MjgzMTI4ZWZlMjM1NzU4NjkzY2Q4ODU3NTAxNDM5
11
- MTZmY2Q4YzU3MWM5MjNmNGU3Mzg5NmI5NzdhZTgwOWQzNzk0NWQ=
9
+ MzM3NjM1M2Y1ODA2NmYwZDMzZjE1OTZiN2I3NDRmOWNmOTFkOTc5ZWQ2Yzc3
10
+ NWI0ZTZmOGU5OWU1MzhlMTM3NmQ3MDZjYjIxNTEzOTY1OGYzYzI3ODE4ZGZi
11
+ NzhhZGExNDkxZjMwYjJmZjFmYzUyYTk5NDI2YmY0N2I1NWE0ODk=
12
12
  data.tar.gz: !binary |-
13
- YmUzZTYyNjUyOTFkZjFiZWVlZDJmNGFmMjEyNTYwYmJmM2IwMGViNGMzMWQ4
14
- Y2VkMzM2YzdhNTg2YmYzNTk3NDNhODg1Yzk2ODU2ZmY5NDE2MjU2NjU3YjE1
15
- YzUyYmU1OTZhZGYzYmJiZThmMzAwOWQ2NzUzMjEwYmQwNDNlYTI=
13
+ YTIyM2QxZDVkZjY0ODhlMTMwNjdmODMyOGYyMjViNDg3MjhhN2QyYmZjNzc3
14
+ MTJmNTAxODA0ZGNiZmJkZjVkYTRhYTEzYzc0ZjVjZWI3NTMxN2JhNjQxYTlj
15
+ ZTJkMzM4MmQyNTcwYjgyNjI1NzI2NWY1ZTFkYjgyYTE1YTUzN2Y=
data/lib/foreman_tasks.rb CHANGED
@@ -4,7 +4,6 @@ require 'foreman_tasks/engine'
4
4
  require 'foreman_tasks/dynflow'
5
5
  require 'foreman_tasks/triggers'
6
6
  require 'foreman_tasks/authorizer_ext'
7
- require 'foreman_tasks/widget_manager'
8
7
 
9
8
  module ForemanTasks
10
9
  extend Algebrick::TypeCheck
@@ -43,14 +43,17 @@ module ForemanTasks
43
43
  unless config.remote?
44
44
  at_exit { world.terminate.wait }
45
45
 
46
- # for now, we can check the consistency only when there
47
- # is no remote executor. We should be able to check the consistency
48
- # every time the new world is created when there is a register
49
- # of executors
50
- world.consistency_check
51
- world.execute_planned_execution_plans
52
-
53
- Task::DynflowTask.consistency_check
46
+ # don't try to do any rescuing until the tables are properly migrated
47
+ if !Foreman.in_rake?('db:migrate') && (ForemanTasks::Task.table_exists? rescue(false))
48
+ # for now, we can check the consistency only when there
49
+ # is no remote executor. We should be able to check the consistency
50
+ # every time the new world is created when there is a register
51
+ # of executors
52
+ world.consistency_check
53
+ world.execute_planned_execution_plans
54
+
55
+ ForemanTasks::Task::DynflowTask.consistency_check
56
+ end
54
57
  end
55
58
  end
56
59
  end
@@ -8,7 +8,7 @@ module ForemanTasks
8
8
 
9
9
  initializer 'foreman_tasks.register_plugin', :after => :finisher_hook do |app|
10
10
  Foreman::Plugin.register :"foreman-tasks" do
11
- requires_foreman '> 1.3'
11
+ requires_foreman '>= 1.6'
12
12
  divider :top_menu, :parent => :monitor_menu, :after => :audits
13
13
  menu :top_menu, :tasks,
14
14
  :url_hash => { :controller => 'foreman_tasks/tasks', :action => :index },
@@ -24,6 +24,9 @@ module ForemanTasks
24
24
 
25
25
  role "Tasks Manager", [:view_foreman_tasks, :edit_foreman_tasks]
26
26
  role "Tasks Reader", [:view_foreman_tasks]
27
+
28
+ widget 'foreman_tasks/tasks/dashboard/tasks_status', :sizex=>6, :sizey=>1, :name=> N_('Tasks Status table')
29
+ widget 'foreman_tasks/tasks/dashboard/latest_tasks_in_error_warning', :sizex=>6, :sizey=>1,:name=> N_('Tasks in Error/Warning')
27
30
  end
28
31
  end
29
32
 
@@ -80,10 +83,6 @@ module ForemanTasks
80
83
  end
81
84
  end
82
85
 
83
- initializer "foreman_tasks.initialize_dynflow", :after => 'foreman_tasks.initializer' do
84
- ::ForemanTasks::WidgetManager.register_widgets
85
- end
86
-
87
86
  config.to_prepare do
88
87
  ForemanTasks.dynflow.eager_load_actions!
89
88
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = "0.6.14"
2
+ VERSION = "0.6.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-30 00:00:00.000000000 Z
11
+ date: 2015-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow
@@ -149,7 +149,6 @@ files:
149
149
  - lib/foreman_tasks/tasks/export_tasks.rake
150
150
  - lib/foreman_tasks/triggers.rb
151
151
  - lib/foreman_tasks/version.rb
152
- - lib/foreman_tasks/widget_manager.rb
153
152
  - lib/tasks/gettext.rake
154
153
  - test/controllers/api/tasks_controller_test.rb
155
154
  - test/factories/task_factory.rb
@@ -183,12 +182,12 @@ signing_key:
183
182
  specification_version: 4
184
183
  summary: Foreman plugin for showing tasks information for resoruces and users
185
184
  test_files:
186
- - test/support/dummy_dynflow_action.rb
187
- - test/factories/task_factory.rb
188
185
  - test/helpers/foreman_tasks/tasks_helper_test.rb
186
+ - test/support/dummy_dynflow_action.rb
189
187
  - test/foreman_tasks_test_helper.rb
190
188
  - test/controllers/api/tasks_controller_test.rb
189
+ - test/factories/task_factory.rb
191
190
  - test/unit/dynflow_console_authorizer_test.rb
192
- - test/unit/task_test.rb
193
191
  - test/unit/actions/action_with_sub_plans_test.rb
192
+ - test/unit/task_test.rb
194
193
  has_rdoc:
@@ -1,16 +0,0 @@
1
- module ForemanTasks
2
- class WidgetManager
3
- DEFAULT_WIDGETS = [
4
- {:template=>'foreman_tasks/tasks/dashboard/tasks_status', :sizex=>6, :sizey=>1, :name=> N_('Tasks Status table')},
5
- {:template=>'foreman_tasks/tasks/dashboard/latest_tasks_in_error_warning', :sizex=>6, :sizey=>1,:name=> N_('Tasks in Error/Warning')}
6
- ]
7
-
8
- def self.register_widgets
9
- if ForemanTasks.dynflow.required?
10
- DEFAULT_WIDGETS.each do |widget|
11
- Dashboard::Manager.register_default_widget(widget)
12
- end
13
- end
14
- end
15
- end
16
- end