making create environmentally aware

2010-08-24 Thread David Susco
Not talking about having it recycle (I assume all Camping apps have a small carbon footprint). I'm talking about letting the create method know this is the dev/test/prod environment and have it load the appropriate database connection info etc. Any thoughts on this? Having create take an env

Re: making create environmentally aware

2010-08-24 Thread Magnus Holm
Why don't add this? def App.create(env = :development) end And in production, you can call App.create(:production) yourself. // Magnus Holm On Tue, Aug 24, 2010 at 15:36, David Susco dsu...@gmail.com wrote: Not talking about having it recycle (I assume all Camping apps have a small

Re: making create environmentally aware

2010-08-24 Thread David Susco
Ya, that's what I'm doing. Just wondering if there was another way to go about it. I modified your camping-test/base file to call 'create :test' and specified a test db adapter in my config file to get around the problem I e-mailed you about. Dave On Tue, Aug 24, 2010 at 9:44 AM, Magnus Holm

Re: making create environmentally aware

2010-08-24 Thread Magnus Holm
What about this: def App.create(env = (ENV['CAMPING_ENV'] || :development)) end Then you can simply set ENV['CAMPING_ENV'] = test before loading any tests. // Magnus Holm On Tue, Aug 24, 2010 at 16:21, David Susco dsu...@gmail.com wrote: Ya, that's what I'm doing. Just wondering if