Skip to content

Instantly share code, notes, and snippets.

def index
@movies = Dir.glob("public/movies/*/*")
@sports = Dir.glob("public/movies/Sports/*")
@entertainments = Dir.glob("public/movies/Entertainment/*")
respond_to do |format|
format.html # index.html.erb
format.xml { render xml: @movie }
end
end
def index
@movies = Dir.glob("public/movies/*/*")
respond_to do |format|
format.html # index.html.erb
format.xml { render xml: @movies }
end
end
#!/bin/bash
git add --all
git commit -am $1
git push origin master
git push live
cap deploy:update
cap deploy:migrate
cap deploy:restar
@sports_news_feeds = SportsNewsFeed.where('created_at >= ?', 2.days.ago);
@off_beat_news_feeds = OffBeatNewsFeed.where('created_at >= ?', 2.days.ago);
@entertainment_news_feeds = EntertainmentNewsFeed.where('created_at >= ?', 2.days.ago);
@mashup_news_feeds = @sports_news_feeds + @off_beat_news_feeds + @entertainment_news_feeds
Started GET "/auth/stripeplatform/callback?scope=read_write&code=ac_yt3ABgKB0p3QbzChvdnBIQPVeVrlLAuA" for 66.165.126.130 at 2012-06-03 17:40:59 -0500
(stripeplatform) Callback phase initiated.
(stripeplatform) Authentication failure! invalid_credentials: OAuth2::Error, :
{
"error": "invalid_client",
"error_description": "No authentication credentials were provided. Send your secret API key in the Authorization header using the Bearer authentication method"
}
Started GET "/auth/failure?message=invalid_credentials&origin=https%3A%2F%2Fhomey.zapto.org%2F&strategy=stripeplatform" for 66.165.126.130 at 2012-06-03 17:40:59 -0500
require 'omniauth-oauth2'
require 'stripe'
module OmniAuth
module Strategies
class StripePlatform < OmniAuth::Strategies::OAuth2
DEFAULT_SCOPE = 'read_write'
require 'omniauth/strategies/oauth2'
require 'base64'
require 'openssl'
require 'rack/utils'
require 'multi_json'
require 'stripe'
module OmniAuth
module Strategies
class Stripeplatform < OmniAuth::Strategies::OAuth2
S::Application.routes.draw do
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
resources :merchants
resources :users
resources :digital_products
require 'omniauth/strategies/oauth2'
require 'base64'
require 'openssl'
require 'rack/utils'
require 'multi_json'
module OmniAuth
module Strategies
class Stripeplatform < OmniAuth::Strategies::OAuth2
class NoAuthorizationCodeError < StandardError; end
Started GET "/users/auth/stripeplatform/callback?scope=read_only&code=ac_ifbaq95Z0c6ZBTt3uNIalsIeoUyJgTP0" for 127.0.0.1 at 2012-06-01 13:37:52 -0500
Processing by Users::OmniauthCallbacksController#failure as HTML
Parameters: {"scope"=>"read_only", "code"=>"ac_ifbaq95Z0c6ZBTt3uNIalsIeoUyJgTP0"}
Redirected to https://127.0.0.1/users/sign_in
Completed 302 Found in 8ms (ActiveRecord: 0.0ms)
Started GET "/users/sign_in" for 127.0.0.1 at 2012-06-01 13:37:53 -0500
Processing by Devise::SessionsController#new as HTML
Redirected to https://127.0.0.1/