Skip to content

Commit

Permalink
add comments and more setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
bencornelis committed Sep 14, 2015
1 parent 2fd8283 commit ba323f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/concerns/evernote_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def evernote_client
token: evernote_oauth_token,
consumer_key: evernote_consumer_key,
consumer_secret: evernote_consumer_secret,
sandbox: false
# set to false in production
sandbox: true
)
end

Expand Down
6 changes: 5 additions & 1 deletion app/models/agents/evernote_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ class EvernoteAgent < Agent
description <<-MD
The Evernote Agent connects with a user's Evernote note store.
To be able to use this agent with your account you need to authenticate with Evernote in the [Services](/services) section.
Visit [Evernote](https://dev.evernote.com/doc/) to set up an Evernote app and receive an api key and secret.
Store these in the Evernote environment variables in the .env file.
You will also need to create a [Sandbox](https://sandbox.evernote.com/Registration.action) account to use during development.
Next, you'll need to authenticate with Evernote in the [Services](/services) section.
Options:
Expand Down
8 changes: 4 additions & 4 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@
if defined?(OmniAuth::Strategies::Evernote) &&
(key = ENV["EVERNOTE_OAUTH_KEY"]).present? &&
(secret = ENV["EVERNOTE_OAUTH_SECRET"]).present?
# for production:
config.omniauth :evernote, key, secret

# for development:
# config.omniauth :evernote, key, secret, client_options: { :site => 'https://sandbox.evernote.com' }
config.omniauth :evernote, key, secret, client_options: { :site => 'https://sandbox.evernote.com' }

# for production:
# config.omniauth :evernote, key, secret
end

# ==> Warden configuration
Expand Down

0 comments on commit ba323f4

Please sign in to comment.