forked from OpenNeo/impress
now that we're on rails 3.2, mount resque at /resque - just for
meeeeee :) `User#admin?` is now defined as `name == 'matchu'`. I feel kinda bad about hardcoding that, but I also don't care enough right now :P
This commit is contained in:
parent
a80f70bb88
commit
5e55423dca
7 changed files with 16 additions and 11 deletions
2
Gemfile
2
Gemfile
|
@ -74,7 +74,7 @@ gem 'compass-rails', "~> 1.0.3"
|
||||||
gem 'uglifier', ">= 1.0.3"
|
gem 'uglifier', ">= 1.0.3"
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem "bullet", "~> 4.1.5"
|
#gem "bullet", "~> 4.1.5"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development_async do
|
group :development_async do
|
||||||
|
|
|
@ -114,8 +114,6 @@ GEM
|
||||||
arel (3.0.2)
|
arel (3.0.2)
|
||||||
bcrypt-ruby (3.0.1)
|
bcrypt-ruby (3.0.1)
|
||||||
builder (3.0.4)
|
builder (3.0.4)
|
||||||
bullet (4.1.6)
|
|
||||||
uniform_notifier (~> 1.0.0)
|
|
||||||
carrierwave (0.5.8)
|
carrierwave (0.5.8)
|
||||||
activesupport (~> 3.0)
|
activesupport (~> 3.0)
|
||||||
character-encodings (0.4.1)
|
character-encodings (0.4.1)
|
||||||
|
@ -290,7 +288,6 @@ GEM
|
||||||
uglifier (1.3.0)
|
uglifier (1.3.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
multi_json (~> 1.0, >= 1.0.2)
|
multi_json (~> 1.0, >= 1.0.2)
|
||||||
uniform_notifier (1.0.2)
|
|
||||||
vegas (0.1.11)
|
vegas (0.1.11)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
warden (1.2.1)
|
warden (1.2.1)
|
||||||
|
@ -310,7 +307,6 @@ DEPENDENCIES
|
||||||
RocketAMF!
|
RocketAMF!
|
||||||
addressable
|
addressable
|
||||||
airbrake (~> 3.1.8)
|
airbrake (~> 3.1.8)
|
||||||
bullet (~> 4.1.5)
|
|
||||||
carrierwave (~> 0.5.8)
|
carrierwave (~> 0.5.8)
|
||||||
character-encodings (~> 0.4.1)
|
character-encodings (~> 0.4.1)
|
||||||
compass-rails (~> 1.0.3)
|
compass-rails (~> 1.0.3)
|
||||||
|
|
|
@ -17,6 +17,10 @@ class User < ActiveRecord::Base
|
||||||
attr_accessible :neopets_username, :owned_closet_hangers_visibility,
|
attr_accessible :neopets_username, :owned_closet_hangers_visibility,
|
||||||
:wanted_closet_hangers_visibility
|
:wanted_closet_hangers_visibility
|
||||||
|
|
||||||
|
def admin?
|
||||||
|
name == 'matchu' # you know that's right.
|
||||||
|
end
|
||||||
|
|
||||||
def contribute!(pet)
|
def contribute!(pet)
|
||||||
new_contributions = []
|
new_contributions = []
|
||||||
pet.contributables.each do |contributable|
|
pet.contributables.each do |contributable|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
if Rails.env.development?
|
#if Rails.env.development?
|
||||||
Bullet.enable = true
|
# Bullet.enable = true
|
||||||
Bullet.alert = true
|
# Bullet.alert = true
|
||||||
Bullet.rails_logger = true
|
# Bullet.rails_logger = true
|
||||||
end
|
#end
|
|
@ -1,3 +1,5 @@
|
||||||
|
require 'resque/server'
|
||||||
|
|
||||||
OpenneoImpressItems::Application.routes.draw do
|
OpenneoImpressItems::Application.routes.draw do
|
||||||
get "petpages/new"
|
get "petpages/new"
|
||||||
|
|
||||||
|
@ -87,5 +89,8 @@ OpenneoImpressItems::Application.routes.draw do
|
||||||
|
|
||||||
match '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml
|
match '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml
|
||||||
match '/robots.txt' => 'sitemap#robots', :as => :robots, :format => :text
|
match '/robots.txt' => 'sitemap#robots', :as => :robots, :format => :text
|
||||||
end
|
|
||||||
|
|
||||||
|
authenticated :user, lambda { |u| u.admin? } do
|
||||||
|
mount Resque::Server, :at => '/resque'
|
||||||
|
end
|
||||||
|
end
|
BIN
vendor/cache/bullet-4.1.6.gem
vendored
BIN
vendor/cache/bullet-4.1.6.gem
vendored
Binary file not shown.
BIN
vendor/cache/uniform_notifier-1.0.2.gem
vendored
BIN
vendor/cache/uniform_notifier-1.0.2.gem
vendored
Binary file not shown.
Loading…
Reference in a new issue