12 factor application testing

2013-02-05 Thread Keenan Brock
Hi All, 

I have all my configuration values in environment variables.

But this seems to break down for running tests.
We only have 1 .env file that we source from .rvmrc.
So the same environment variables are used for both development and test (rails 
console and rake spec)


The solution for handling the 2 environments with one set of variables is 
currently to hack ENV['DATABASE_NAME'] in spec_helper and use code like this 
all over the place:
ENV['RABITMQ_URL'] + ENV['DATABASE_NAME']
Or to hardcore the test environment values in the yml files. and add 
Rails.env.test? int he ruby code.

As you'd imagine, this is starting to break down.


I assume the solution is to have 2 different environments, but I'm not sure how 
to do this.
Where would I load in the second environment file so I don't by mistake run 
rails console in the test environment or vice versa and blow away my 
environment.



How are other people handling the 2 different environments?


Thanks for any insight,
Keenan

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: heroku login error

2013-02-05 Thread geemus
Looks like the error I would expect if one tried to make Ruby based web 
requests (as the toolbelt does) without being connected to the internet. So 
probably you just had a temporary local connectivity issue which, once 
resolved, got you back to working order. Do let us know if you have 
problems again though and we can always dig in deeper.
Thanks!
wes

On Monday, February 4, 2013 9:39:53 AM UTC-6, rxzx zx wrote:
>
> Well, In a hope of it might work, i just tried again. And it worked. 
> Authentication successful :)
> I have no clue what had went wrong. :)
>
> On Monday, February 4, 2013 8:59:06 PM UTC+5:30, Neil Middleton wrote:
>>
>> Sounds to me like you have some sort of connectivity issues to the API 
>> then.  Not sure what I can suggest.
>>
>>
>> On Mon, Feb 4, 2013 at 3:28 PM,  wrote:
>>
>>> Hi Neil Middleton,
>>> I tried the following command
>>> *ping api.heroku.com
>>> *PING elb013951-2081682805.us-east-1.elb.amazonaws.com (23.23.122.21) 
>>> 56(84) bytes of data
>>>
>>>
>>> And it just freezes. Nothing displayed.
>>>
>>>
>>>
>>>
>>> On Monday, February 4, 2013 8:52:32 PM UTC+5:30, Neil Middleton wrote:
>>>
 Can you get to / ping / whatever api.heroku.com?


 On Mon, Feb 4, 2013 at 3:19 PM,  wrote:

> Hi Everyone!
>
> I'm new to heroku. When i execute the command *heroku login** *i get 
> the following error. I have cross verified my login credentials multiple 
> times. 
>
> Error Link: 
> http://paste.ubuntu.com/**1609191/
>
> Please help me resolve the prob.
>
> Thanks in Advance 
>
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Heroku" group.
>  
> To unsubscribe from this group, send email to
> heroku+un...@**googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/**group/heroku?hl=en_US?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google 
> Groups "Heroku Community" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to heroku+un...@**googlegroups.com.
>
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>  
>  
>

  -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Heroku" group.
>>>  
>>> To unsubscribe from this group, send email to
>>> heroku+un...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/heroku?hl=en_US?hl=en
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Heroku Community" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to heroku+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.