travis_github_deployer 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -96,6 +96,11 @@ class TravisGithubDeployer
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def commit_and_push_files
|
99
|
+
files_to_deploy.each { |source_location, destination_location|
|
100
|
+
@git.add(Pathname.new(destination_location))
|
101
|
+
}
|
102
|
+
@git.commit("File deployed with Travis Github Deployer")
|
103
|
+
@git.push
|
99
104
|
end
|
100
105
|
|
101
106
|
end
|
@@ -101,8 +101,11 @@ describe "travis github deployer" do
|
|
101
101
|
context "Actually committing the files" do
|
102
102
|
|
103
103
|
it "can add, commit and push up the files" do
|
104
|
-
|
105
|
-
|
104
|
+
subject.should_receive(:files_to_deploy).and_return({ "dir/onefile" => "destonefile", "twofile" => "dir/desttwofile"})
|
105
|
+
@git.should_receive(:add).with(Pathname.new("destonefile"))
|
106
|
+
@git.should_receive(:add).with(Pathname.new("dir/desttwofile"))
|
107
|
+
@git.should_receive(:commit).with("File deployed with Travis Github Deployer")
|
108
|
+
@git.should_receive(:push)
|
106
109
|
subject.commit_and_push_files
|
107
110
|
end
|
108
111
|
end
|