2013-03-05 19:09:08 -08:00
|
|
|
require 'resque/server'
|
|
|
|
|
2013-03-05 13:10:25 -08:00
|
|
|
OpenneoImpressItems::Application.routes.draw do
|
2011-07-30 23:48:16 -07:00
|
|
|
get "petpages/new"
|
|
|
|
|
2011-07-26 17:27:23 -07:00
|
|
|
get "closet_lists/new"
|
|
|
|
|
|
|
|
get "closet_lists/create"
|
|
|
|
|
2010-11-05 15:45:05 -07:00
|
|
|
root :to => 'outfits#new'
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-01-26 10:40:15 -08:00
|
|
|
devise_for :users
|
2011-03-23 15:23:01 -07:00
|
|
|
|
wardrobe now considers item.species_support_ids when deciding compatibility
For example, the Meerca Maid Tray is a foreground item, so the SWF is marked
as compatible with all body types, but the item itself is clearly marked as
Meercas-only. items#show reflected this properly, but the swf_assets#index
call that the wardrobe uses ignored item.species_support_ids.
So, /bodies/:body_id/swf_assets.json?item_ids[]=... was deprecated in favor
of /pet_types/:pet_type_id/items/swf_assets.json?item_ids=[]..., which is
much like the former route but, before loading assets, also loads the pet
type and items, then filters the items by compatibility, then only loads
assets for the compatible items.
2013-01-02 20:15:32 -08:00
|
|
|
# DEPRECATED
|
2010-10-10 19:18:42 -07:00
|
|
|
match '/bodies/:body_id/swf_assets.json' => 'swf_assets#index', :as => :body_swf_assets
|
wardrobe now considers item.species_support_ids when deciding compatibility
For example, the Meerca Maid Tray is a foreground item, so the SWF is marked
as compatible with all body types, but the item itself is clearly marked as
Meercas-only. items#show reflected this properly, but the swf_assets#index
call that the wardrobe uses ignored item.species_support_ids.
So, /bodies/:body_id/swf_assets.json?item_ids[]=... was deprecated in favor
of /pet_types/:pet_type_id/items/swf_assets.json?item_ids=[]..., which is
much like the former route but, before loading assets, also loads the pet
type and items, then filters the items by compatibility, then only loads
assets for the compatible items.
2013-01-02 20:15:32 -08:00
|
|
|
|
2010-06-08 15:35:39 -07:00
|
|
|
match '/items/:item_id/swf_assets.json' => 'swf_assets#index', :as => :item_swf_assets
|
|
|
|
match '/items/:item_id/bodies/:body_id/swf_assets.json' => 'swf_assets#index', :as => :item_swf_assets_for_body_id
|
2011-03-23 15:23:01 -07:00
|
|
|
match '/pet_types/:pet_type_id/swf_assets.json' => 'swf_assets#index', :as => :pet_type_swf_assets
|
wardrobe now considers item.species_support_ids when deciding compatibility
For example, the Meerca Maid Tray is a foreground item, so the SWF is marked
as compatible with all body types, but the item itself is clearly marked as
Meercas-only. items#show reflected this properly, but the swf_assets#index
call that the wardrobe uses ignored item.species_support_ids.
So, /bodies/:body_id/swf_assets.json?item_ids[]=... was deprecated in favor
of /pet_types/:pet_type_id/items/swf_assets.json?item_ids=[]..., which is
much like the former route but, before loading assets, also loads the pet
type and items, then filters the items by compatibility, then only loads
assets for the compatible items.
2013-01-02 20:15:32 -08:00
|
|
|
match '/pet_types/:pet_type_id/items/swf_assets.json' => 'swf_assets#index', :as => :item_swf_assets_for_pet_type
|
2010-10-10 19:18:42 -07:00
|
|
|
match '/pet_states/:pet_state_id/swf_assets.json' => 'swf_assets#index', :as => :pet_state_swf_assets
|
2010-05-16 12:33:56 -07:00
|
|
|
match '/species/:species_id/color/:color_id/pet_type.json' => 'pet_types#show'
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-01-27 13:35:46 -08:00
|
|
|
match '/roulette' => 'roulettes#new', :as => :roulette
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-08-07 15:23:44 -07:00
|
|
|
resources :broken_image_reports, :only => [:new, :create]
|
2010-11-05 15:45:05 -07:00
|
|
|
resources :contributions, :only => [:index]
|
2010-11-06 10:07:12 -07:00
|
|
|
resources :items, :only => [:index, :show] do
|
2010-11-05 15:45:05 -07:00
|
|
|
collection do
|
|
|
|
get :needed
|
|
|
|
end
|
|
|
|
end
|
2010-11-12 17:58:28 -08:00
|
|
|
resources :outfits, :only => [:show, :create, :update, :destroy]
|
2010-10-10 19:18:42 -07:00
|
|
|
resources :pet_attributes, :only => [:index]
|
2015-05-03 14:57:42 -07:00
|
|
|
resources :swf_assets, :only => [:index, :show] do
|
|
|
|
collection do
|
|
|
|
get :links
|
|
|
|
end
|
|
|
|
end
|
2014-04-02 18:56:42 -07:00
|
|
|
resources :zones, only: [:index]
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-08-02 19:42:56 -07:00
|
|
|
scope 'import' do
|
|
|
|
resources :closet_pages, :only => [:new, :create],
|
|
|
|
:controller => 'neopets_pages', :path => 'closet/pages', :type => 'closet'
|
|
|
|
|
|
|
|
resources :safety_deposit_pages, :only => [:new, :create],
|
|
|
|
:controller => 'neopets_pages', :path => 'sdb/pages', :type => 'sdb'
|
2011-08-03 08:35:06 -07:00
|
|
|
|
|
|
|
resources :neopets_users, :only => [:new, :create], :path => 'neopets-users'
|
2011-08-02 19:42:56 -07:00
|
|
|
end
|
2011-07-12 17:51:43 -07:00
|
|
|
|
2011-03-23 15:23:01 -07:00
|
|
|
match '/users/current-user/outfits' => 'outfits#index', :as => :current_user_outfits
|
|
|
|
|
2010-11-05 15:45:05 -07:00
|
|
|
match '/pets/load' => 'pets#load', :method => :post, :as => :load_pet
|
2013-12-08 20:59:36 -08:00
|
|
|
match '/pets/submit' => 'pets#submit', :method => :post
|
2012-08-06 18:15:31 -07:00
|
|
|
match '/modeling' => 'pets#bulk', :as => :bulk_pets
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2010-10-18 14:58:45 -07:00
|
|
|
match '/login' => 'sessions#new', :as => :login
|
|
|
|
match '/logout' => 'sessions#destroy', :as => :logout
|
|
|
|
match '/users/authorize' => 'sessions#create'
|
2013-01-11 09:46:14 -08:00
|
|
|
|
|
|
|
match '/locales/choose' => 'locales#choose', :as => :choose_locale
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-08-05 08:28:11 -07:00
|
|
|
resources :users, :path => 'user', :only => [:index, :update] do
|
2010-11-05 15:45:05 -07:00
|
|
|
resources :contributions, :only => [:index]
|
2011-10-31 15:13:36 -07:00
|
|
|
resources :closet_hangers, :only => [:index, :update, :destroy], :path => 'closet' do
|
2011-07-30 23:48:16 -07:00
|
|
|
collection do
|
|
|
|
get :petpage
|
|
|
|
end
|
|
|
|
end
|
2011-07-29 07:52:04 -07:00
|
|
|
resources :closet_lists, :only => [:new, :create, :edit, :update, :destroy], :path => 'closet/lists'
|
2011-07-15 13:15:57 -07:00
|
|
|
|
|
|
|
resources :items, :only => [] do
|
2011-10-10 19:43:46 -07:00
|
|
|
resources :closet_hangers, :only => [:create] do
|
|
|
|
collection do
|
|
|
|
put :update_quantities
|
|
|
|
end
|
|
|
|
end
|
2011-07-15 13:15:57 -07:00
|
|
|
end
|
2014-01-18 19:54:11 -08:00
|
|
|
|
|
|
|
resources :neopets_connections, path: 'neopets-connections',
|
|
|
|
only: [:create, :destroy]
|
2010-11-05 15:45:05 -07:00
|
|
|
end
|
2011-07-12 17:51:43 -07:00
|
|
|
|
2014-09-10 13:38:26 -07:00
|
|
|
resources :donations, only: [:create, :show, :update] do
|
|
|
|
collection do
|
|
|
|
resources :donation_features, path: 'features', only: [:index]
|
|
|
|
end
|
|
|
|
end
|
2014-09-09 19:06:38 -07:00
|
|
|
|
2011-07-31 19:17:59 -07:00
|
|
|
match 'users/current-user/closet' => 'closet_hangers#index', :as => :your_items
|
2011-07-31 15:45:53 -07:00
|
|
|
|
2010-11-05 15:45:05 -07:00
|
|
|
match 'users/top-contributors' => 'users#top_contributors', :as => :top_contributors
|
|
|
|
match 'users/top_contributors' => redirect('/users/top-contributors')
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2010-10-10 19:18:42 -07:00
|
|
|
match '/wardrobe' => 'outfits#edit', :as => :wardrobe
|
2012-06-05 09:44:11 -07:00
|
|
|
match '/start/:color_name/:species_name' => 'outfits#start'
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2011-06-28 10:24:40 -07:00
|
|
|
match '/donate' => 'static#donate', :as => :donate
|
2011-07-02 14:09:42 -07:00
|
|
|
match 'image-mode' => 'static#image_mode', :as => :image_mode
|
2010-11-05 15:55:27 -07:00
|
|
|
match '/terms' => 'static#terms', :as => :terms
|
2011-05-20 17:49:48 -07:00
|
|
|
|
|
|
|
match '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml
|
2011-05-20 17:59:35 -07:00
|
|
|
match '/robots.txt' => 'sitemap#robots', :as => :robots, :format => :text
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2013-03-05 19:09:08 -08:00
|
|
|
authenticated :user, lambda { |u| u.admin? } do
|
|
|
|
mount Resque::Server, :at => '/resque'
|
|
|
|
end
|
|
|
|
end
|