rapid-app 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -195,7 +195,7 @@ module Rapid
195
195
  end
196
196
 
197
197
  def symlink?
198
- root.database.active_record? || root.upload.private?
198
+ root.database.active_record? || root.database.mongoid? || root.upload.private?
199
199
  end
200
200
 
201
201
  def symlink= bool
@@ -1,5 +1,5 @@
1
1
  module Rapid
2
2
  module App
3
- VERSION = "0.1"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -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
@@ -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
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapid-app
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Dan Cunning