diff --git a/Gemfile b/Gemfile index a79417adf..095d1efd6 100644 --- a/Gemfile +++ b/Gemfile @@ -45,7 +45,6 @@ gem "meta_search", '>= 1.1.0.pre' gem 'fog', "~> 1.3.1" gem 'country-select' gem 'aasm', '3.0.16' -gem 'postgres-copy' gem 'eventmachine', '1.0.0' gem 'amqp', '0.9.8' diff --git a/Gemfile.lock b/Gemfile.lock index 284972e33..0811b290f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: ~/workspace/jam-db/target/ruby_package specs: jam_db (0.0.1) - pg_migrate (= 0.1.7) + pg_migrate (= 0.1.6) PATH remote: ~/workspace/jam-pb/target/ruby/jampb @@ -62,7 +62,7 @@ GEM amq-client (0.9.12) amq-protocol (>= 1.2.0) eventmachine - amq-protocol (1.5.0) + amq-protocol (1.3.0) amqp (0.9.8) amq-client (~> 0.9.5) amq-protocol (>= 0.9.4) @@ -77,7 +77,7 @@ GEM bootstrap-sass (2.0.4.0) bootstrap-will_paginate (0.0.6) will_paginate - bourbon (3.1.6) + bourbon (3.1.4) sass (>= 3.2.0) thor builder (3.0.4) @@ -122,7 +122,7 @@ GEM factory_girl (~> 4.1.0) railties (>= 3.0.0) fastercsv (1.5.5) - ffi (1.8.1) + ffi (1.7.0) fog (1.3.1) builder excon (~> 0.13.0) @@ -175,7 +175,7 @@ GEM launchy (2.3.0) addressable (~> 2.3) libv8 (3.11.8.17) - listen (1.0.3) + listen (1.0.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) rb-kqueue (>= 0.2) @@ -196,7 +196,7 @@ GEM polyamorous (~> 0.5.0) method_source (0.8.1) mime-types (1.23) - multi_json (1.7.3) + multi_json (1.7.2) net-scp (1.0.4) net-ssh (>= 1.99.1) net-ssh (2.6.7) @@ -204,7 +204,7 @@ GEM open4 (1.3.0) orm_adapter (0.4.0) pg (0.14.0) - pg_migrate (0.1.7) + pg_migrate (0.1.6) logging (= 1.7.2) pg (= 0.14.0) thor (= 0.15.4) @@ -259,7 +259,7 @@ GEM rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) - rspec-rails (2.13.1) + rspec-rails (2.13.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -296,7 +296,7 @@ GEM eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.15.4) - tilt (1.4.0) + tilt (1.3.7) treetop (1.4.12) polyglot polyglot (>= 0.3.1) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index be1a244dd..e8065d950 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,27 +1,3 @@ class ApplicationController < ActionController::Base protect_from_forgery - - def authenticate_admin_user! #use predefined method name - session["murp"] = false - puts "session id #{session["session_id"]}" - puts "session #{session.inspect}" - puts "current_user #{current_admin_user} user_signed_in? #{user_signed_in?}" - redirect_to '/' and return if user_signed_in? && !current_user.is_admin? - authenticate_user! - end - def current_admin_user #use predefined method name - puts "current user #{current_user}" - return nil if user_signed_in? && !current_user.is_admin? - current_user - end - - #def authenticate_spawn_ruby_user! - # p "oh hai: #{current_user}:redirecting3" - # - # redirect_to new_user_session_path unless current_user.try(:is_admin?) - #end - - #def current_spawn_ruby_user - # return current_user - #end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6e9385e59..a2f487023 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,4 +1,3 @@ module ApplicationHelper - end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 147256533..476a5ae2b 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -1,3 +1,2 @@ module UsersHelper - end \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1c6037853..b19a0b0c8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -14,4 +14,3 @@ - 1 \ No newline at end of file diff --git a/config/initializers/active_admin.rb b/config/initializers/active_admin.rb index cde926609..df2ef1086 100644 --- a/config/initializers/active_admin.rb +++ b/config/initializers/active_admin.rb @@ -55,7 +55,7 @@ ActiveAdmin.setup do |config| # # This setting changes the method which Active Admin calls # within the controller. - config.authentication_method = :authenticate_admin_user! + #config.authentication_method = :authenticate_admin_user! # == Current User @@ -65,7 +65,7 @@ ActiveAdmin.setup do |config| # # This setting changes the method which Active Admin calls # to return the currently logged in user. - config.current_user_method = :current_admin_user + #config.current_user_method = :current_admin_user # == Logging Out diff --git a/config/routes.rb b/config/routes.rb index 2160c0812..1e82b08ee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,14 +2,19 @@ JamAdmin::Application.routes.draw do # ActiveAdmin::Devise.config, - scope ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do - devise_for :users, :class_name => "JamRuby::User", :path_prefix => '/', :path => '', :path_names => {:sign_in => 'login', :sign_out => 'logout'} + devise_for :users, :class_name => "JamRuby::User", :path_prefix => '/admin', :path => '', :path_names => {:sign_in => 'login', :sign_out => 'logout'} + + scope ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do root :to => "admin/dashboard#index" + + ActiveAdmin.routes(self) + + # The priority is based upon order of creation: # first created -> highest priority.