Sha256: 82cb5542b9a26b258f2fa7752a1dad0edb1c2f468cf78d53024aea0336786004

Contents?: true

Size: 725 Bytes

Versions: 3

Compression:

Stored size: 725 Bytes

Contents

Rails.configuration.DAILYCRED_CLIENT_ID = "<%= client_id %>"
Rails.configuration.DAILYCRED_SECRET_KEY = "<%= secret_key %>"

dc_id = Rails.configuration.DAILYCRED_CLIENT_ID
dc_secret = Rails.configuration.DAILYCRED_SECRET_KEY

dc_options = { :client_options => {} }

if File.exists?('/etc/ssl/certs')
  dc_options[:client_options][:ssl] = { :ca_path => '/etc/ssl/certs'}
end
if File.exists?('/opt/local/share/curl/curl-ca-bundle.crt')
  dc_options[:client_options][:ssl] = { :ca_file => '/opt/local/share/curl/curl-ca-bundle.crt' }
end

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :dailycred, dc_id, dc_secret, dc_options
end

Rails.application.config.middleware.use "Dailycred::Middleware", dc_id

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dailycred-0.1.30 lib/generators/templates/omniauth.rb
dailycred-0.1.21 lib/generators/templates/omniauth.rb
dailycred-0.1.2 lib/generators/templates/omniauth.rb