这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gudmundur
Copy link
Member

See discussion here: #160.

@rwz what do you think?

@rwz
Copy link
Contributor

rwz commented Mar 8, 2016

👍

Rollbar.configure do |config|
config.enabled = ENV.has_key?('ROLLBAR_ACCESS_TOKEN')
config.access_token = ENV["ROLLBAR_ACCESS_TOKEN"]
config.environment = ENV['ROLLBAR_ENVIRONMENT']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add ROLLBAR_ENVIRONMENT to pliny/lib/template/.env.sample.erb?

ROLLBAR_ENVIRONMENT=development

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally left this out, as ROLLBAR_ACCESS_TOKEN isn't specified there. Which causes it to default to being disabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it makes sense. Thanks for explanation! 👍

I wasn't sure how Rollbar gem acts when environment is nil, but seems like it handles everything pretty well 😄

@soulim
Copy link
Contributor

soulim commented Mar 18, 2016

I know it's just cosmetics, but would it make sense to use _ENV suffix instead of _ENVIRONMENT? Then variable name would be consistent with RACK_ENV, PLINY_ENV, and etc.

@gudmundur
Copy link
Member Author

@soulim Excellent point. I'll get it updated.

@gudmundur gudmundur merged commit 22aab15 into master Apr 16, 2016
@gudmundur gudmundur deleted the rollbar-environment branch April 16, 2016 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants