Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only enforce 1-database rule for rails

Change-Id: I80ebc4b4464f6f8809204463e3e7a5f6322e26a0
  • Loading branch information...
commit 60173689298f0500e2ed3d40fc4b13b56f47939c 1 parent 9faf9fc
Jennifer Hickey and Max Brunsfeld authored
View
2  lib/vcap/staging/plugin/buildpack/plugin.rb
@@ -123,7 +123,7 @@ def environment_variables
vars.each { |k, v| vars[k] = "${#{k}:-#{v}}" }
vars["HOME"] = "$PWD/app"
vars["PORT"] = "$VCAP_APP_PORT"
- vars["DATABASE_URL"] = database_uri if bound_database && rails_buildpack?
+ vars["DATABASE_URL"] = database_uri if rails_buildpack? && bound_database
vars["MEMORY_LIMIT"] = "#{application_memory}m"
vars
end
View
32 spec/unit/buildpack_spec.rb
@@ -201,15 +201,29 @@
let(:buildpacks_path) { buildpacks_path_with_start_cmd }
let(:staging_env) {
buildpack_staging_env([
- {:label => "postgresql-9.0", :name => "mydb-production",
- :credentials => {
- :hostname => "myhost",
- :user => "testuser",
- :port => 345,
- :password => "test",
- :name => "mydb"}
- }]
- )
+ {
+ :label => "postgresql-9.0",
+ :name => "foo12",
+ :credentials => {
+ :hostname => "myhost",
+ :user => "testuser",
+ :port => 345,
+ :password => "test",
+ :name => "mydb"
+ }
+ },
+ {
+ :label => "postgresql-9.0",
+ :name => "foo34",
+ :credentials => {
+ :hostname => "myhost-2",
+ :user => "testuser",
+ :port => 345,
+ :password => "test",
+ :name => "mydb"
+ }
+ }
+ ])
}
it "doesn't add rails console to the startup script" do
Please sign in to comment.
Something went wrong with that request. Please try again.