rapid-app 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rapid/app/settings.rb +1 -1
- data/lib/rapid/app/version.rb +1 -1
- data/spec/templates/config/deploy_spec.rb +24 -0
- data/templates/config/deploy.rb +3 -0
- metadata +3 -2
data/lib/rapid/app/settings.rb
CHANGED
data/lib/rapid/app/version.rb
CHANGED
@@ -105,6 +105,30 @@ describe "templates/config/deploy.rb" do
|
|
105
105
|
|
106
106
|
end
|
107
107
|
|
108
|
+
describe "database.mongoid" do
|
109
|
+
|
110
|
+
it "should push true" do
|
111
|
+
push 'database.sqlite' => false, 'database.mongoid' => true
|
112
|
+
@result.should include %(/mongoid.yml)
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should push false" do
|
116
|
+
push 'database.sqlite' => false, 'database.mongoid' => false
|
117
|
+
@result.should_not include %(/mongoid.yml)
|
118
|
+
end
|
119
|
+
|
120
|
+
it "should pull true" do
|
121
|
+
pull 'database.sqlite' => false, 'database.mongoid' => true
|
122
|
+
@result['database.mongoid'].should == true
|
123
|
+
end
|
124
|
+
|
125
|
+
it "should pull false" do
|
126
|
+
pull 'database.sqlite' => false, 'database.mongoid' => false
|
127
|
+
@result['deploy.symlink'].should == false
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
108
132
|
describe "upload.private" do
|
109
133
|
|
110
134
|
it "should push true" do
|
data/templates/config/deploy.rb
CHANGED
@@ -34,6 +34,9 @@ namespace :deploy do
|
|
34
34
|
<% if database.active_record? %>
|
35
35
|
run "ln -s #{shared_path}/database.yml #{release_path}/config/database.yml"
|
36
36
|
<% end %>
|
37
|
+
<% if database.mongoid? %>
|
38
|
+
run "ln -s #{shared_path}/mongoid.yml #{release_path}/config/mongoid.yml"
|
39
|
+
<% end %>
|
37
40
|
<% if upload.private? %>
|
38
41
|
run "ln -s #{shared_path}/private #{release_path}/private"
|
39
42
|
<% end %>
|
metadata
CHANGED