class Object
Constants
- OAUTH_CREDENTIALS
edit this file to contain credentials for the
OAuth
services you support. each entry needs a corresponding token model.eg. :twitter =>
TwitterToken
, :hour_feed => HourFeedToken etc.:twitter=>{ :key=>"", :secret=>"", :client=>:twitter_gem, # :twitter_gem or :oauth_gem (defaults to :twitter_gem) :expose => false, # expose client at /oauth_consumers/twitter/client see docs :allow_login => true # Use :allow_login => true to allow user to login to account }, :google=>{ :key=>"", :secret=>"", :expose => false, # expose client at /oauth_consumers/google/client see docs :scope=>"" # see http://code.google.com/apis/gdata/faq.html#AuthScopes }, :github=>{ :key => "", :secret => "", :expose => false, # expose client at /oauth_consumers/twitter/client see docs }, :facebook=>{ :key => "", :secret => "" }, :agree2=>{ :key=>"", :secret=>"" }, :fireeagle=>{ :key=>"", :secret=>"" }, :oauth2_server => { :key=>"", :secret=>"", :oauth_version => 2 :options=>{ # OAuth::Consumer options :site=>"http://hourfeed.com" # Remember to add a site for a generic OAuth site } }, :hour_feed=>{ :key=>"", :secret=>"", :options=>{ # OAuth::Consumer options :site=>"http://hourfeed.com" # Remember to add a site for a generic OAuth site } }, :nu_bux=>{ :key=>"", :secret=>"", :super_class=>"OpenTransactToken", # if a OAuth service follows a particular standard # with a token implementation you can set the superclass # to use :options=>{ # OAuth::Consumer options :site=>"http://nubux.heroku.com" } }
}
Public Instance Methods
do_delete()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 133 def do_delete delete :destroy, :id => '1' end
do_get()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 20 def do_get get :index end
do_invalid_post()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 115 def do_invalid_post post :create end
do_invalid_update()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 156 def do_invalid_update put :update, :id => '1', 'client_application'=>{'name' => nil} end
do_valid_post()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 110 def do_valid_post post :create, 'client_application'=>{'name' => 'my site', :url=>"http://test.com"} @client_application = ClientApplication.last end
do_valid_update()
click to toggle source
# File lib/generators/rspec/templates/clients_controller_spec.rb, line 152 def do_valid_update put :update, :id => '1', 'client_application'=>{'name' => 'updated site'} end