implemented Redis functionality
This commit is contained in:
@@ -1 +1,4 @@
|
||||
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||
|
||||
require "sevendigital"
|
||||
$sevendigital_client = Sevendigital::Client.new("config/sevendigital.yml", :country => "US")
|
||||
@@ -0,0 +1,8 @@
|
||||
$redis = Redis.new(:host => 'localhost', :port => 6379)
|
||||
|
||||
begin
|
||||
$redis.ping
|
||||
puts "=> Established connection to redis server"
|
||||
rescue
|
||||
puts "=> CAUTION: cound not establish connection to redis server! Check settings in initializer!"
|
||||
end
|
||||
@@ -1 +1 @@
|
||||
require "sevendigital"
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
+9
-11
@@ -1,16 +1,19 @@
|
||||
Nineminutes::Application.routes.draw do
|
||||
|
||||
get "sidebar/index"
|
||||
|
||||
get "charts/index"
|
||||
|
||||
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
|
||||
devise_for :users,
|
||||
:controllers => { :omniauth_callbacks => "users/omniauth_callbacks", :registrations => "registrations", :sessions => "sessions" }
|
||||
devise_scope :user do
|
||||
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
||||
get "/users/auth/:provider" => "users/omniauth_callbacks#passthru"
|
||||
get "/register" => "devise_auth/registrations#new", :as => :new_user_registration
|
||||
post "/users" => "devise_auth/registrations#create", :as => :user_registration
|
||||
get "/login" => "devise_auth/sessions#new", :as => :new_user_session
|
||||
post "/login" => "devise_auth/sessions#create", :as => :user_session
|
||||
get "/logout" => "devise_auth/sessions#destroy", :as => :destroy_user_session
|
||||
end
|
||||
|
||||
get "tracks/index"
|
||||
get "artists/get_artists", :as => "get_artists"
|
||||
match "/artists/:artist", :to => "artists#show"
|
||||
match "/more_tracks", :to => "artists#more_tracks"
|
||||
match "/more_albums", :to => "artists#more_albums"
|
||||
@@ -23,16 +26,11 @@ Nineminutes::Application.routes.draw do
|
||||
match "/search_video", :to => "tracks#search_video"
|
||||
|
||||
#resources :artists, :constraints => { :id => /.*/ }
|
||||
resources :users
|
||||
resources :sidebar
|
||||
resources :search
|
||||
resources :users, :only => [ :show ]
|
||||
|
||||
get "home/", :to => "home#show"
|
||||
|
||||
get "charts/", :to => "charts#index"
|
||||
|
||||
|
||||
# You can have the root of your site routed with "root"
|
||||
# just remember to delete public/index.html.
|
||||
root :to => "home#index"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user