Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plain ruby docs #374

Merged
merged 6 commits into from
Feb 9, 2016
Merged

Conversation

Crisfole
Copy link
Contributor

@Crisfole Crisfole commented Feb 2, 2016

Document how to use Rollbar without Rack or Rails

run_script ARGV

Rollbar.info "Script ran successfully"
rescue Exception => e
Copy link
Contributor

Choose a reason for hiding this comment

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

Since rescuing Exception is a bad practice, let's remove it.

You can do just rescue => e here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

http://stackoverflow.com/a/10048406/456188

Better yet, let's rethrow afterward

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@Crisfole
Copy link
Contributor Author

Crisfole commented Feb 2, 2016

@jondeandres Fixed

end

begin
Rollbar.debug "Running Script"
Copy link
Contributor

Choose a reason for hiding this comment

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

@Crisfole I think that conceptually we should left the the .debug() and .info() calls outside the begin/rescue block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Crisfole
Copy link
Contributor Author

Crisfole commented Feb 5, 2016

@jondeandres Should be good to go.

require 'rollbar'

Rollbar.configure do |config|
config.access_token = "SERVER_POST_ACCESS_TOKEN"
Copy link
Member

Choose a reason for hiding this comment

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

This should be "POST_SERVER_ITEM_ACCESS_TOKEN" to be consistent with the rest of this file (and work with the replacements that happen in our logged-in site)

jondeandres added a commit that referenced this pull request Feb 9, 2016
@jondeandres jondeandres merged commit 6e5cdea into rollbar:master Feb 9, 2016
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.

5 participants