Sha256: dae800e192e1857b6abb6281457be7714f29dceb107cf2d8934749545daecbf1

Contents?: true

Size: 763 Bytes

Versions: 8

Compression:

Stored size: 763 Bytes

Contents

class << Rails
  def vendor_rails?
    false
  end
end

require "yaml"
YAML::ENGINE.yamler= "syck" if defined?(YAML::ENGINE) # see http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml

Rails::Initializer.run do |config|
  config.frameworks = [ :action_controller ]
  config.action_controller.session = { :key=>"_myapp_session", :secret=>"Stay hungry. Stay foolish. -- Steve Jobs" }

  config.after_initialize do
    config.oauth.database = DATABASE
    config.oauth.host = "example.org"
    config.oauth.collection_prefix = "oauth2_prefix"
    config.oauth.authenticator = lambda do |username, password|
      "Batman" if username == "cowbell" && password == "more"
    end
  end
  config.middleware.use Rack::OAuth2::Server::Admin.mount
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-oauth2-server-2.8.1 test/rails2/config/environment.rb
rack-oauth2-server-2.8.0 test/rails2/config/environment.rb
rack-oauth2-server-2.7.0 test/rails2/config/environment.rb
rack-oauth2-server-2.6.1 test/rails2/config/environment.rb
rack-oauth2-server-2.6.0 test/rails2/config/environment.rb
rack-oauth2-server-2.5.1 test/rails2/config/environment.rb
rack-oauth2-server-2.5.0 test/rails2/config/environment.rb
rack-oauth2-server-2.4.2 test/rails2/config/environment.rb