summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-04-19 22:34:01 +0000
committerLuke Kanies <luke@madstop.com>2005-04-19 22:34:01 +0000
commitf98419241ca2cf1ff89240e3a4d12abdb4800dcf (patch)
treec20022fef5517f7bdca6c8dfecf06935ccb5878f
parentc01bc8108b913e62090096e3ef43c699ddc7af6a (diff)
downloadpuppet-f98419241ca2cf1ff89240e3a4d12abdb4800dcf.tar.gz
puppet-f98419241ca2cf1ff89240e3a4d12abdb4800dcf.tar.xz
puppet-f98419241ca2cf1ff89240e3a4d12abdb4800dcf.zip
noop seems to basically be working, but i need to reorganize the whole type/state structure -- that is starting after this commit
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@199 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/blink/statechange.rb2
-rw-r--r--lib/blink/type.rb24
-rw-r--r--lib/blink/type/state.rb6
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/blink/statechange.rb b/lib/blink/statechange.rb
index a9177a7bd..10f53be9d 100644
--- a/lib/blink/statechange.rb
+++ b/lib/blink/statechange.rb
@@ -32,7 +32,7 @@ module Blink
#---------------------------------------------------------------
def to_s
- puts "%s: %s => %s" % [@path,@is,@should]
+ return "%s: %s => %s" % [@path,@is,@should]
end
#---------------------------------------------------------------
end
diff --git a/lib/blink/type.rb b/lib/blink/type.rb
index 2c9eae5b4..d5b78583a 100644
--- a/lib/blink/type.rb
+++ b/lib/blink/type.rb
@@ -466,24 +466,24 @@ module Blink
#---------------------------------------------------------------
def evaluate
- self.retrieve
- unless self.insync?
- if self.noop
- Blink.verbose("%s is noop" % self)
- else
- self.each { |state|
- #Blink.notice("getting state change on %s" % state)
- statechange = Blink::StateChange.new(state)
- puts statechange
- }
+ self.each { |state|
+ state.retrieve
+ unless state.insync?
+ change = Blink::StateChange.new(state)
+
+ if self.noop
+ Blink.verbose("NOOP: %s" % change.to_s)
+ else
+ # what?
+ end
end
#if @performoperation == :sync
# self.sync
#else
# # we, uh, don't do anything
#end
- end
- self.retrieve
+ state.retrieve
+ }
end
#---------------------------------------------------------------
diff --git a/lib/blink/type/state.rb b/lib/blink/type/state.rb
index 4e17e4124..c8629f80d 100644
--- a/lib/blink/type/state.rb
+++ b/lib/blink/type/state.rb
@@ -107,11 +107,11 @@ module Blink
end
def retrieve
- true
+ return true
end
def insync?
- true
+ return true
end
def should=(value)
@@ -120,7 +120,7 @@ module Blink
end
def sync
- true
+ return true
end
def is=(value)