Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> basesystem : minor constant refactoring
  • From: Martin Kudlvasr <mkudlvasr@xxxxxxx>
  • Date: Mon, 24 Aug 2009 09:34:11 +0200
  • Message-id: <E1MoEMH-0006Ld-8a@xxxxxxxxxxxxxxxx>
ref: refs/heads/basesystem
commit 1e13151cb6151f18d543e42d2410fac120391da7
Author: Martin Kudlvasr <mkudlvasr@xxxxxxx>
Date: Mon Aug 24 09:34:11 2009 +0200

minor constant refactoring
---
plugins/basesystem/app/models/basesystem.rb | 10 +++++-----
.../basesystem/app/views/basesystem/show.html.erb | 2 +-
.../basesystem/app/views/basesystem/show.json.erb | 2 +-
.../basesystem/app/views/basesystem/show.xml.erb | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugins/basesystem/app/models/basesystem.rb
b/plugins/basesystem/app/models/basesystem.rb
index 07b1b27..31f00b8 100644
--- a/plugins/basesystem/app/models/basesystem.rb
+++ b/plugins/basesystem/app/models/basesystem.rb
@@ -13,7 +13,7 @@ class Basesystem
# path to file which store module then is next in queue or END_STRING if all
steps is done
CURRENT_STEP_FILE =
File.join(File.dirname(__FILE__),"..","..","var","currentstep")
# keyword that signalize finish of all steps
- END_STRING = "FINISH"
+ FINAL_STEP = "FINISH"

def self.steps_file
STEPS_FILE
@@ -24,7 +24,7 @@ class Basesystem
end

def self.end_string
- END_STRING
+ FINAL_STEP
end

#Gets instance of Basesystem with initialized steps queue.
@@ -50,11 +50,11 @@ class Basesystem
end

def finish
- @current = END_STRING
+ @current = FINAL_STEP
end

def current_step_valid?
- if @steps.include?(@current) or @current == END_STRING
+ if @steps.include?(@current) or @current == FINAL_STEP
true
else
Rails.logger.warn "Invalid step in current"
@@ -65,7 +65,7 @@ class Basesystem
def restart_setup
Rails.logger.warn "Restarting basic system setup"
# allow empty list of setup steps
- @current = @steps[0] or END_STRING
+ @current = @steps[0] or FINAL_STEP
end

def load_current_step
diff --git a/plugins/basesystem/app/views/basesystem/show.html.erb
b/plugins/basesystem/app/views/basesystem/show.html.erb
index c52b4ed..821a96e 100644
--- a/plugins/basesystem/app/views/basesystem/show.html.erb
+++ b/plugins/basesystem/app/views/basesystem/show.html.erb
@@ -1 +1 @@
-<%= @basesystem.to_xml -%>
\ No newline at end of file
+<%= @basesystem.to_xml -%>
diff --git a/plugins/basesystem/app/views/basesystem/show.json.erb
b/plugins/basesystem/app/views/basesystem/show.json.erb
index 9cfa538..ba6b132 100644
--- a/plugins/basesystem/app/views/basesystem/show.json.erb
+++ b/plugins/basesystem/app/views/basesystem/show.json.erb
@@ -1 +1 @@
-<%= @basesystem.to_json -%>
\ No newline at end of file
+<%= @basesystem.to_json -%>
diff --git a/plugins/basesystem/app/views/basesystem/show.xml.erb
b/plugins/basesystem/app/views/basesystem/show.xml.erb
index c52b4ed..821a96e 100644
--- a/plugins/basesystem/app/views/basesystem/show.xml.erb
+++ b/plugins/basesystem/app/views/basesystem/show.xml.erb
@@ -1 +1 @@
-<%= @basesystem.to_xml -%>
\ No newline at end of file
+<%= @basesystem.to_xml -%>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages