public this repo is viewable by everyone
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
Piston::WorkingCopy#recall returns saved values.
francois (author)
29 days ago
commit  e90f935a38bb88f37da5a3ba849531173c107413
tree    0755fdbf6d95bc51b4ec83248c2d10c676a80f46
parent  b6776eee6a822c7644b49807e3060d794fed93cf
...
95
96
97
98
99
 
 
100
101
102
...
110
111
112
113
...
95
96
97
 
 
98
99
100
101
102
...
110
111
112
 
0
@@ -95,8 +95,8 @@ module Piston
0
     end
0
 
0
     # Recalls a Hash of values from the working copy.
0
- # The expected keys are passed as parameters.
0
- def recall(keys)
0
+ def recall
0
+ YAML.load(File.read(yaml_path))
0
     end
0
 
0
     def finalize
0
@@ -110,4 +110,3 @@ module Piston
0
     end
0
   end
0
 end
0
-
...
38
39
40
 
 
 
 
 
 
 
41
...
38
39
40
41
42
43
44
45
46
47
48
0
@@ -38,4 +38,11 @@ class TestWorkingCopyRememberance < Test::Unit::TestCase
0
     actual = YAML.load((@wcdir + ".piston.yml").read)
0
     assert_equal values.merge("format" => 1, "handler" => handler_values), actual
0
   end
0
+
0
+ def test_recall_returns_hash_of_values
0
+ values = {"a" => "b", "handler" => {"b" => "c"}}
0
+ File.expects(:read).with(@wcdir + ".piston.yml").returns(:data)
0
+ YAML.expects(:load).with(:data).returns(values)
0
+ assert_equal values, @wc.recall
0
+ end
0
 end

Comments

    No one has commented yet.