mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Merge branch 'master' of git://github.com/bsag/tracks
Conflicts: config/routes.rb
This commit is contained in:
commit
952a73e39d
1092 changed files with 52802 additions and 20798 deletions
|
|
@ -24,9 +24,8 @@ module Rails
|
|||
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
||||
end
|
||||
|
||||
# FIXME : Ruby 1.9
|
||||
def preinitialize
|
||||
load(preinitializer_path) if File.exists?(preinitializer_path)
|
||||
load(preinitializer_path) if File.exist?(preinitializer_path)
|
||||
end
|
||||
|
||||
def preinitializer_path
|
||||
|
|
@ -44,6 +43,7 @@ module Rails
|
|||
class VendorBoot < Boot
|
||||
def load_initializer
|
||||
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
||||
Rails::Initializer.run(:install_gem_spec_stubs)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ Rails::Initializer.run do |config|
|
|||
# Make Active Record use UTC-base instead of local time
|
||||
config.active_record.default_timezone = :utc
|
||||
|
||||
# You''ll probably want to change this to the time zone of the computer where Tracks is running
|
||||
# run rake time:zones:local have Rails suggest time zone names on your system
|
||||
config.time_zone = 'UTC'
|
||||
|
||||
# Use Active Record's schema dumper instead of SQL when creating the test database
|
||||
# (enables use of different database adapters for development and test environments)
|
||||
config.active_record.schema_format = :ruby
|
||||
|
|
@ -66,18 +70,13 @@ end
|
|||
|
||||
# Include your application configuration below
|
||||
|
||||
# Time zone setting. Set your local time zone here. #
|
||||
# You should be able to find a list of time zones in /usr/share/zoneinfo
|
||||
# e.g. if you are in the Eastern time zone of the US, set the value below.
|
||||
# ENV['TZ'] = 'US/Eastern'
|
||||
|
||||
# Leave this alone or set it to one or more of ['database', 'ldap', 'open_id'].
|
||||
# If you choose ldap, see the additional configuration options further down.
|
||||
AUTHENTICATION_SCHEMES = ['database']
|
||||
|
||||
require 'name_part_finder'
|
||||
require 'todo_list'
|
||||
require 'config'
|
||||
require 'tracks/todo_list'
|
||||
require 'tracks/config'
|
||||
require 'activerecord_base_tag_extensions' # Needed for tagging-specific extensions
|
||||
require 'digest/sha1' #Needed to support 'rake db:fixtures:load' on some ruby installs: http://dev.rousette.org.uk/ticket/557
|
||||
require 'prototype_helper_extensions'
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ config.action_controller.allow_forgery_protection = false
|
|||
# config.pre_loaded_fixtures = false
|
||||
SALT = "change-me" unless defined?( SALT ).nil?
|
||||
|
||||
config.time_zone = 'UTC'
|
||||
|
||||
config.after_initialize do
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../../test/selenium_helper")
|
||||
end
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< HEAD:config/routes.rb
|
||||
ActionController::Routing::Routes.draw do |map|
|
||||
UJS::routes
|
||||
|
||||
|
|
@ -62,3 +63,73 @@ ActionController::Routing::Routes.draw do |map|
|
|||
map.connect ':controller/:action/:id'
|
||||
|
||||
end
|
||||
=======
|
||||
ActionController::Routing::Routes.draw do |map|
|
||||
UJS::routes
|
||||
|
||||
map.with_options :controller => 'login' do |login|
|
||||
login.login 'login', :action => 'login'
|
||||
login.formatted_login 'login.:format', :action => 'login'
|
||||
login.logout 'logout', :action => 'logout'
|
||||
login.formatted_logout 'logout.:format', :action => 'logout'
|
||||
login.open_id_begin 'begin', :action => 'begin'
|
||||
login.formatted_open_id_begin 'begin.:format', :action => 'begin'
|
||||
login.open_id_complete 'complete', :action => 'complete'
|
||||
login.formatted_open_id_complete 'complete.:format', :action => 'complete'
|
||||
end
|
||||
|
||||
map.resources :users,
|
||||
:member => {:change_password => :get, :update_password => :post,
|
||||
:change_auth_type => :get, :update_auth_type => :post, :complete => :get,
|
||||
:refresh_token => :post }
|
||||
map.with_options :controller => "users" do |users|
|
||||
users.signup 'signup', :action => "new"
|
||||
end
|
||||
|
||||
map.resources :contexts, :collection => {:order => :post} do |contexts|
|
||||
contexts.resources :todos, :name_prefix => "context_"
|
||||
end
|
||||
|
||||
map.resources :projects, :collection => {:order => :post, :alphabetize => :post} do |projects|
|
||||
projects.resources :todos, :name_prefix => "project_"
|
||||
end
|
||||
|
||||
map.resources :todos,
|
||||
:member => {:toggle_check => :put, :toggle_star => :put},
|
||||
:collection => {:check_deferred => :post, :filter_to_context => :post, :filter_to_project => :post}
|
||||
map.with_options :controller => "todos" do |todos|
|
||||
todos.home '', :action => "index"
|
||||
todos.tickler 'tickler', :action => "list_deferred"
|
||||
todos.mobile_tickler 'tickler.m', :action => "list_deferred", :format => 'm'
|
||||
todos.done 'done', :action => "completed"
|
||||
todos.done_archive 'done/archive', :action => "completed_archive"
|
||||
|
||||
# This route works for tags with dots like /todos/tag/version1.5
|
||||
# please note that this pattern consumes everything after /todos/tag
|
||||
# so /todos/tag/version1.5.xml will result in :name => 'version1.5.xml'
|
||||
# UPDATE: added support for mobile view. All tags ending on .m will be
|
||||
# routed to mobile view of tags.
|
||||
todos.tag 'todos/tag/:name', :action => "tag", :format => 'm', :name => /.*\.m/
|
||||
todos.tag 'todos/tag/:name', :action => "tag", :name => /.*/
|
||||
|
||||
todos.mobile 'mobile', :action => "index", :format => 'm'
|
||||
todos.mobile_abbrev 'm', :action => "index", :format => 'm'
|
||||
todos.mobile_abbrev_new 'm/new', :action => "new", :format => 'm'
|
||||
end
|
||||
|
||||
map.resources :notes
|
||||
map.feeds 'feeds', :controller => 'feedlist', :action => 'index'
|
||||
map.feeds 'feeds.m', :controller => 'feedlist', :action => 'index', :format => 'm'
|
||||
|
||||
map.preferences 'preferences', :controller => 'preferences', :action => 'index'
|
||||
map.integrations 'integrations', :controller => 'integrations', :action => 'index'
|
||||
|
||||
if Rails.env == 'test'
|
||||
map.connect '/selenium_helper/login', :controller => 'selenium_helper', :action => 'login'
|
||||
end
|
||||
|
||||
# Install the default route as the lowest priority.
|
||||
map.connect ':controller/:action/:id'
|
||||
|
||||
end
|
||||
>>>>>>> 0600756bbf8ab3f3654cbb0e6bcbf9ea03068918:config/routes.rb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue