Skip to content

Commit

Permalink
Remove code which is moved to yast-caasp
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Mar 24, 2017
1 parent c2280d9 commit deb0b36
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 196 deletions.
11 changes: 1 addition & 10 deletions src/Makefile.am
Expand Up @@ -219,15 +219,6 @@ ylibwidget_DATA = \
lib/installation/widgets/overview.rb \
lib/installation/widgets/system_role.rb

ylibcfadir = "${yast2dir}/lib/installation/cfa"
ylibcfa_DATA = \
lib/installation/cfa/salt.rb

ylibrolehandlerdir = "${yast2dir}/lib/installation/system_role_handlers"
ylibrolehandler_DATA = \
lib/installation/system_role_handlers/dashboard_role_finish.rb \
lib/installation/system_role_handlers/worker_role_finish.rb

EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA) $(ylibdialog_DATA) $(ylib_DATA) $(ylibtransfer_DATA) $(ylibcfa_DATA) $(ylibrolehandler_DATA)
EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA) $(ylibdialog_DATA) $(ylib_DATA) $(ylibtransfer_DATA)

include $(top_srcdir)/Makefile.am.common
28 changes: 0 additions & 28 deletions src/lib/installation/cfa/salt.rb

This file was deleted.

38 changes: 0 additions & 38 deletions src/lib/installation/system_role_handlers/dashboard_role_finish.rb

This file was deleted.

49 changes: 0 additions & 49 deletions src/lib/installation/system_role_handlers/worker_role_finish.rb

This file was deleted.

5 changes: 2 additions & 3 deletions src/lib/installation/system_role_handlers_runner.rb
Expand Up @@ -20,7 +20,6 @@
# ------------------------------------------------------------------------------

require "yast"
require "installation/cfa/salt"

module Installation
# Run system roles handlers
Expand All @@ -36,7 +35,7 @@ def finish(role_id)
return unless require_handler(role_id)

class_name_role = role_id.split("_").map(&:capitalize).join
handler = "::Installation::SystemRoleHandlers::#{class_name_role}Finish"
handler = "Y2SystemRoleHandlers::#{class_name_role}Finish"

if Object.const_defined?(handler)
Object.const_get(handler).new.run
Expand All @@ -51,7 +50,7 @@ def finish(role_id)
#
# @return [Boolean] True if the file was loaded; false otherwise.
def require_handler(role_id)
filename = "installation/system_role_handlers/#{role_id}_finish"
filename = "y2system_role_handlers/#{role_id}_finish"
require filename
true
rescue LoadError
Expand Down
4 changes: 1 addition & 3 deletions test/Makefile.am
Expand Up @@ -35,9 +35,7 @@ TESTS = \
updates_manager_test.rb \
widgets_overview_test.rb \
widgets_system_role_test.rb \
lib/system_role_handlers_runner_test.rb \
lib/system_role_handlers/dashboard_role_finish_test.rb \
lib/system_role_handlers/worker_role_finish_test.rb
lib/system_role_handlers_runner_test.rb

TEST_EXTENSIONS = .rb
RB_LOG_COMPILER = rspec
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/minion.d/master.conf_existent

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/minion.d/master.conf_expected

This file was deleted.

15 changes: 0 additions & 15 deletions test/lib/system_role_handlers/dashboard_role_finish_test.rb

This file was deleted.

45 changes: 0 additions & 45 deletions test/lib/system_role_handlers/worker_role_finish_test.rb

This file was deleted.

6 changes: 3 additions & 3 deletions test/lib/system_role_handlers_runner_test.rb
Expand Up @@ -11,9 +11,9 @@
let(:handler) { double("HandlerInstance") }

before do
stub_const("::Installation::SystemRoleHandlers::TestRoleFinish", handler_class)
stub_const("Y2SystemRoleHandlers::TestRoleFinish", handler_class)
allow(handler_class).to receive(:new).and_return(handler)
allow(runner).to receive(:require).with("installation/system_role_handlers/test_role_finish")
allow(runner).to receive(:require).with("y2system_role_handlers/test_role_finish")
end

it "runs the handler's 'run' method" do
Expand All @@ -34,7 +34,7 @@

context "when handler class is not defined" do
before do
allow(runner).to receive(:require).with("installation/system_role_handlers/undefined_role_finish")
allow(runner).to receive(:require).with("y2system_role_handlers/undefined_role_finish")
end

it "logs the error" do
Expand Down

0 comments on commit deb0b36

Please sign in to comment.