reservoir 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/rails_server.yml +2 -2
- data/lib/reservoir/application.rb +3 -0
- data/lib/reservoir/version.rb +1 -1
- data/spec/application_spec.rb +13 -8
- data/spec/project_spec.rb +1 -1
- data/spec/sample_project.yml +1 -1
- data/spec/sample_project2.yml +2 -2
- data/spec/sample_project3.yml +2 -2
- metadata +11 -11
data/examples/rails_server.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "pathname"
|
2
|
+
|
1
3
|
module Reservoir
|
2
4
|
|
3
5
|
class Application
|
@@ -89,6 +91,7 @@ module Reservoir
|
|
89
91
|
if @display == :stdio
|
90
92
|
STDOUT.puts output
|
91
93
|
elsif is_file?
|
94
|
+
system("mkdir -p #{Pathname.new(@display[:filename]).parent}")
|
92
95
|
open(@display[:filename], 'a+') { |f| f.puts(output) }
|
93
96
|
else
|
94
97
|
output
|
data/lib/reservoir/version.rb
CHANGED
data/spec/application_spec.rb
CHANGED
@@ -23,14 +23,20 @@ module Reservoir
|
|
23
23
|
Caller.stub!(:exec).with("node -version").and_return("")
|
24
24
|
Caller.stub!(:exec).with("ssh aforward@a4word.com 'ruby --version'").and_return("1.2.6")
|
25
25
|
|
26
|
-
|
27
|
-
File.delete("a4word.com.reservoir") if File.exist?("a4word.com.reservoir")
|
26
|
+
cleanup
|
28
27
|
end
|
29
28
|
|
30
29
|
after(:all) do
|
30
|
+
cleanup
|
31
|
+
end
|
32
|
+
|
33
|
+
def cleanup
|
31
34
|
File.delete("output.txt") if File.exist?("output.txt")
|
35
|
+
File.delete("a4word.com") if File.exist?("a4word.com")
|
36
|
+
system("rm -rf ./tmp")
|
32
37
|
end
|
33
38
|
|
39
|
+
|
34
40
|
describe "#run" do
|
35
41
|
|
36
42
|
describe "no args" do
|
@@ -102,20 +108,19 @@ module Reservoir
|
|
102
108
|
|
103
109
|
it "should save files to disk" do
|
104
110
|
@application.run([@project_file,@project_file2])
|
105
|
-
File.exists?("a4word.com
|
111
|
+
File.exists?("a4word.com").should == true
|
106
112
|
end
|
107
113
|
|
108
114
|
|
109
115
|
it "should clean up existing files" do
|
110
|
-
open("a4word.com
|
116
|
+
open("a4word.com", 'a+') { |f| f.puts("garble") }
|
111
117
|
@application.run([@project_file,@project_file2])
|
112
|
-
IO.read("a4word.com
|
118
|
+
IO.read("a4word.com").should == "reservoir, version 0.1.1\nserver: aforward@a4word.com\nfile: /Users/aforward/tp/projects/cenx/reservoir/spec/sample_project2.yml\nruby : 1.2.6 : /path/to/a4word/ruby\n"
|
113
119
|
end
|
114
120
|
|
115
121
|
it "should support mode: data_only" do
|
116
|
-
open("a4word.com.reservoir", 'a+') { |f| f.puts("garble") }
|
117
122
|
@application.run([@project_file3])
|
118
|
-
IO.read("a4word.com
|
123
|
+
IO.read("./tmp/moretmp/a4word.com").should == "reservoir, version 0.1.1\nruby : 1.2.6 : /path/to/a4word/ruby\n"
|
119
124
|
end
|
120
125
|
|
121
126
|
end
|
@@ -147,7 +152,7 @@ module Reservoir
|
|
147
152
|
describe "#messages" do
|
148
153
|
|
149
154
|
it "should version_message" do
|
150
|
-
@application.version_message.should == "reservoir, version 0.1.
|
155
|
+
@application.version_message.should == "reservoir, version 0.1.1\n"
|
151
156
|
end
|
152
157
|
|
153
158
|
it "should usage_message" do
|
data/spec/project_spec.rb
CHANGED
@@ -64,7 +64,7 @@ module Reservoir
|
|
64
64
|
t = project.template(clazz)
|
65
65
|
t.remote_user.should == 'aforward'
|
66
66
|
t.remote_server.should == 'a4word.com'
|
67
|
-
project.display.should == { :filename => "a4word.com
|
67
|
+
project.display.should == { :filename => "a4word.com" }
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should ignore remote data if not set" do
|
data/spec/sample_project.yml
CHANGED
data/spec/sample_project2.yml
CHANGED
data/spec/sample_project3.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reservoir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-16 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156756840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156756840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: autotest
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156756420 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156756420
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: autotest-fsevent
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156755960 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156755960
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rb-fsevent
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156755540 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156755540
|
58
58
|
description: Helps manage cloud-based server instances by enumerating, comparing and
|
59
59
|
diff'ing application configurations
|
60
60
|
email:
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project: reservoir
|
111
|
-
rubygems_version: 1.8.
|
111
|
+
rubygems_version: 1.8.5
|
112
112
|
signing_key:
|
113
113
|
specification_version: 3
|
114
114
|
summary: What apps, versions and configurations to you have setup on your server
|