Permalink
Browse files

Fixed issue #571, don't handle Gemfile if we are outside a Padrino pr…

…oject
  • Loading branch information...
1 parent e0c83f6 commit 00f828b997fd88fdc3855c83e5f8765f9df5ad71 @DAddYE DAddYE committed Jun 30, 2011
Showing with 4 additions and 3 deletions.
  1. +1 −0 CHANGES.rdoc
  2. +2 −2 padrino-core/bin/padrino
  3. +1 −1 padrino-gen/bin/padrino-gen
View
1 CHANGES.rdoc
@@ -26,6 +26,7 @@
* Added Hungarian translation [Thanks to Kormány Zsolt]
* Added Riak support through Ripple
* Updated couchrest_model dependency to ~>1.1.0.rc1
+* Fixed issue #571, don't handle Gemfile if we are outside a Padrino project
== 0.9.29
View
4 padrino-core/bin/padrino
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'rubygems' unless defined?(Gem) # Useful only on --dev mode
-require 'bundler/setup' if File.exist?("Gemfile")
+require 'rubygems' unless defined?(Gem)
+require 'bundler/setup' if %w(Gemfile .components).all? { |f| File.exist?(f) }
padrino_core_path = File.expand_path('../../lib', __FILE__)
$:.unshift(padrino_core_path) if File.directory?(padrino_core_path) && !$:.include?(padrino_core_path)
View
2 padrino-gen/bin/padrino-gen
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
require 'rubygems' unless defined?(Gem) # Useful only on --dev mode
-require 'bundler/setup' if File.exist?("Gemfile")
+require 'bundler/setup' if %w(Gemfile .components).all? { |f| File.exist?(f) }
padrino_gen_path = File.expand_path('../../lib', __FILE__)
$:.unshift(padrino_gen_path) if File.directory?(padrino_gen_path) && !$:.include?(padrino_gen_path)

2 comments on commit 00f828b

@nesquena
Padrino Framework member

Nice!

@achiu
Padrino Framework member

👍

Please sign in to comment.