Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <rest-service> dmacvicar_log_viewer : first initial working version of base system, expect rapid changes
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 20 Aug 2009 13:18:55 +0200
  • Message-id: <E1MlmpE-0005d2-KV@xxxxxxxxxxxxxxxx>
ref: refs/heads/dmacvicar_log_viewer
commit 812275eb8600c279e64f867fb0af6a1fcbb0b151
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Aug 20 13:17:24 2009 +0200

first initial working version of base system, expect rapid changes
---
.../app/controllers/basesystem_controller.rb | 2 +-
plugins/basesystem/app/models/basesystem.rb | 9 +++------
2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/plugins/basesystem/app/controllers/basesystem_controller.rb
b/plugins/basesystem/app/controllers/basesystem_controller.rb
index 311861f..2e7ce57 100644
--- a/plugins/basesystem/app/controllers/basesystem_controller.rb
+++ b/plugins/basesystem/app/controllers/basesystem_controller.rb
@@ -13,7 +13,7 @@ class BasesystemController < ApplicationController
@basesystem = Basesystem.find
@basesystem.next_step params[:basesystem][:current]
@basesystem.save
- render :index
+ render :show
end

def create
diff --git a/plugins/basesystem/app/models/basesystem.rb
b/plugins/basesystem/app/models/basesystem.rb
index f87cb1f..14988bc 100644
--- a/plugins/basesystem/app/models/basesystem.rb
+++ b/plugins/basesystem/app/models/basesystem.rb
@@ -33,9 +33,9 @@ class Basesystem
ret.current = ret.steps.empty? ? END_STRING : ret.steps[0]
else
fh = File.new(CURRENT_STEP_FILE,"r")
- ret.current = fh.gets
+ ret.current = fh.gets.chomp
fh.close
- if ret.steps.include(ret.current) #invalid step
+ if ret.steps.include?(ret.current) #invalid step
Rails.logger.warn "invalid step in current"
ret.current = END_STRING
end
@@ -45,12 +45,9 @@ class Basesystem
end

def next_step (current)
- if (current != @current) #concurent modification
- return
- end

index = @steps.index current
- if index == (@steps.size -1)
+ if index == @steps.size() -1
@current = END_STRING
else
@current = @steps[index+1]
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages