Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <rest-service> master : basesystem send controller and action instead path
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Tue, 25 Aug 2009 16:57:13 +0200
  • Message-id: <E1MlgpS-0006cB-Nu@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit db8d056850568a0845380ee3c79855e7188b6f21
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Tue Aug 25 16:57:13 2009 +0200

basesystem send controller and action instead path
---
plugins/basesystem/app/models/basesystem.rb | 5 ++++-
plugins/basesystem/package/basesystem.yml | 4 ++--
plugins/basesystem/test/unit/basesystem_test.rb | 7 ++++---
3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/plugins/basesystem/app/models/basesystem.rb
b/plugins/basesystem/app/models/basesystem.rb
index 8ffd19e..266e05d 100644
--- a/plugins/basesystem/app/models/basesystem.rb
+++ b/plugins/basesystem/app/models/basesystem.rb
@@ -46,7 +46,10 @@ class Basesystem
xml.steps({:type => "array"}) do
@steps.each do
|step|
- xml.step step
+ xml.step do
+ xml.controller step["controller"]
+ xml.action step["action"] if step.include? "action"
+ end
end
end
end
diff --git a/plugins/basesystem/package/basesystem.yml
b/plugins/basesystem/package/basesystem.yml
index 61d2ee2..f647ff4 100644
--- a/plugins/basesystem/package/basesystem.yml
+++ b/plugins/basesystem/package/basesystem.yml
@@ -1,3 +1,3 @@
steps:
- - systemtime
- - language
+ - controller: systemtime
+ - controller: language
diff --git a/plugins/basesystem/test/unit/basesystem_test.rb
b/plugins/basesystem/test/unit/basesystem_test.rb
index aa993a1..cfcffa6 100644
--- a/plugins/basesystem/test/unit/basesystem_test.rb
+++ b/plugins/basesystem/test/unit/basesystem_test.rb
@@ -5,11 +5,12 @@ class BasesystemTest < ActiveSupport::TestCase

YAML_CONTENT = <<EOF
steps:
- - systemtime
- - language
+ - controller: systemtime
+ - controller: language
+ action: show
EOF

- TEST_STEPS = ["systemtime","language"]
+ TEST_STEPS = [{ "controller" => "systemtime"},{"controller" => "language",
"action" => "show"}]
def setup
YaST::ConfigFile.stubs(:read_file).returns(YAML_CONTENT)
@basesystem = Basesystem.find
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages