mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 17:14:20 +01:00
Updated to svn tags/tracks-1.6
This commit is contained in:
parent
103fcb8049
commit
02496f2d44
2274 changed files with 0 additions and 0 deletions
23
config/asset_packages.yml
Normal file
23
config/asset_packages.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
javascripts:
|
||||
- tracks:
|
||||
- prototype
|
||||
- effects
|
||||
- dragdrop
|
||||
- controls
|
||||
- application
|
||||
- selector-addon-v1
|
||||
- calendar
|
||||
- calendar-en
|
||||
- calendar-setup
|
||||
- accesskey-hints
|
||||
- todo-items
|
||||
- niftycube
|
||||
- protoload
|
||||
- lowpro
|
||||
- flashobject
|
||||
stylesheets:
|
||||
- tracks:
|
||||
- standard
|
||||
- calendar-system
|
||||
- niftyCorners
|
||||
109
config/boot.rb
Normal file
109
config/boot.rb
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
# Don't change this file!
|
||||
# Configure your app in config/environment.rb and config/environments/*.rb
|
||||
|
||||
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
||||
|
||||
module Rails
|
||||
class << self
|
||||
def boot!
|
||||
unless booted?
|
||||
preinitialize
|
||||
pick_boot.run
|
||||
end
|
||||
end
|
||||
|
||||
def booted?
|
||||
defined? Rails::Initializer
|
||||
end
|
||||
|
||||
def pick_boot
|
||||
(vendor_rails? ? VendorBoot : GemBoot).new
|
||||
end
|
||||
|
||||
def vendor_rails?
|
||||
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
||||
end
|
||||
|
||||
# FIXME : Ruby 1.9
|
||||
def preinitialize
|
||||
load(preinitializer_path) if File.exists?(preinitializer_path)
|
||||
end
|
||||
|
||||
def preinitializer_path
|
||||
"#{RAILS_ROOT}/config/preinitializer.rb"
|
||||
end
|
||||
end
|
||||
|
||||
class Boot
|
||||
def run
|
||||
load_initializer
|
||||
Rails::Initializer.run(:set_load_path)
|
||||
end
|
||||
end
|
||||
|
||||
class VendorBoot < Boot
|
||||
def load_initializer
|
||||
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
||||
end
|
||||
end
|
||||
|
||||
class GemBoot < Boot
|
||||
def load_initializer
|
||||
self.class.load_rubygems
|
||||
load_rails_gem
|
||||
require 'initializer'
|
||||
end
|
||||
|
||||
def load_rails_gem
|
||||
if version = self.class.gem_version
|
||||
gem 'rails', version
|
||||
else
|
||||
gem 'rails'
|
||||
end
|
||||
rescue Gem::LoadError => load_error
|
||||
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
||||
exit 1
|
||||
end
|
||||
|
||||
class << self
|
||||
def rubygems_version
|
||||
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
||||
end
|
||||
|
||||
def gem_version
|
||||
if defined? RAILS_GEM_VERSION
|
||||
RAILS_GEM_VERSION
|
||||
elsif ENV.include?('RAILS_GEM_VERSION')
|
||||
ENV['RAILS_GEM_VERSION']
|
||||
else
|
||||
parse_gem_version(read_environment_rb)
|
||||
end
|
||||
end
|
||||
|
||||
def load_rubygems
|
||||
require 'rubygems'
|
||||
|
||||
unless rubygems_version >= '0.9.4'
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
||||
exit 1
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
||||
exit 1
|
||||
end
|
||||
|
||||
def parse_gem_version(text)
|
||||
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
||||
end
|
||||
|
||||
private
|
||||
def read_environment_rb
|
||||
File.read("#{RAILS_ROOT}/config/environment.rb")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# All that for this:
|
||||
Rails.boot!
|
||||
17
config/database.yml.tmpl
Normal file
17
config/database.yml.tmpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
development:
|
||||
adapter: mysql
|
||||
database: tracks
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
|
||||
test:
|
||||
adapter: sqlite3
|
||||
database: ":memory:"
|
||||
|
||||
production:
|
||||
adapter: mysql
|
||||
database: tracks
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
101
config/environment.rb.tmpl
Normal file
101
config/environment.rb.tmpl
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# Be sure to restart your webserver when you modify this file.
|
||||
# Uncomment below to force Rails into production mode
|
||||
|
||||
# (Use only when you can't set environment variables through your web/app server)
|
||||
# ENV['RAILS_ENV'] = 'production'
|
||||
|
||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||
require File.join(File.dirname(__FILE__), 'boot')
|
||||
|
||||
# This is the 'salt' to add to the password before it is encrypted
|
||||
# You need to change this to something unique for yourself
|
||||
SALT = "change-me"
|
||||
|
||||
class Rails::Configuration
|
||||
attr_accessor :action_web_service
|
||||
end
|
||||
|
||||
Rails::Initializer.run do |config|
|
||||
# Skip frameworks you're not going to use
|
||||
# config.frameworks -= [ :action_web_service, :action_mailer ]
|
||||
config.frameworks += [ :action_web_service]
|
||||
config.action_web_service = Rails::OrderedOptions.new
|
||||
config.load_paths += %W( #{RAILS_ROOT}/app/apis )
|
||||
|
||||
# Add additional load paths for your own custom dirs
|
||||
# config.load_paths += %W( #{RAILS_ROOT}/app/services )
|
||||
|
||||
# Force all environments to use the same logger level
|
||||
# (by default production uses :info, the others :debug)
|
||||
# config.log_level = :debug
|
||||
|
||||
# Use the database for sessions instead of the file system
|
||||
# (create the session table with 'rake create_sessions_table')
|
||||
config.action_controller.session_store = :active_record_store
|
||||
|
||||
# config.action_controller.session = {
|
||||
# :session_key => '_tracks_session_id',
|
||||
# :secret => SALT * (30.0 / SALT.length).ceil #must be at least 30 characters
|
||||
# }
|
||||
|
||||
# Enable page/fragment caching by setting a file-based store
|
||||
# (remember to create the caching directory and make it readable to the application)
|
||||
# config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
||||
|
||||
# Activate observers that should always be running
|
||||
# config.active_record.observers = :cacher, :garbage_collector
|
||||
|
||||
# Make Active Record use UTC-base instead of local time
|
||||
config.active_record.default_timezone = :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
|
||||
|
||||
# See Rails::Configuration for more options
|
||||
end
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
# (all these examples are active by default):
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# 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 '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'
|
||||
|
||||
if (AUTHENTICATION_SCHEMES.include? 'ldap')
|
||||
require 'net/ldap' #requires ruby-net-ldap gem be installed
|
||||
require 'simple_ldap_authenticator'
|
||||
SimpleLdapAuthenticator.ldap_library = 'net/ldap'
|
||||
SimpleLdapAuthenticator.servers = %w'localhost'
|
||||
SimpleLdapAuthenticator.use_ssl = false
|
||||
SimpleLdapAuthenticator.login_format = 'cn=%s,dc=example,dc=com'
|
||||
end
|
||||
if (AUTHENTICATION_SCHEMES.include? 'open_id')
|
||||
#requires ruby-openid gem to be installed
|
||||
end
|
||||
|
||||
|
||||
MOBILE_CONTENT_TYPE = 'tracks/mobile'
|
||||
Mime::Type.register(MOBILE_CONTENT_TYPE, :m)
|
||||
|
||||
TRACKS_VERSION='1.6'
|
||||
17
config/environments/development.rb
Normal file
17
config/environments/development.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# In the development environment your application's code is reloaded on
|
||||
# every request. This slows down response time but is perfect for development
|
||||
# since you don't have to restart the webserver when you make code changes.
|
||||
config.cache_classes = false
|
||||
|
||||
# Log error messages when you accidentally call methods on nil.
|
||||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.action_controller.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Unique cookies
|
||||
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = "TrackDev"
|
||||
17
config/environments/production.rb
Normal file
17
config/environments/production.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# The production environment is meant for finished, "live" apps.
|
||||
# Code is not reloaded between requests
|
||||
config.cache_classes = true
|
||||
|
||||
# Use a different logger for distributed setups
|
||||
# config.logger = SyslogLogger.new
|
||||
|
||||
|
||||
# Full error reports are disabled and caching is turned on
|
||||
config.action_controller.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
# Disable delivery errors if you bad email addresses should just be ignored
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
31
config/environments/test.rb
Normal file
31
config/environments/test.rb
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# The test environment is used exclusively to run your application's
|
||||
# test suite. You never need to work with it otherwise. Remember that
|
||||
# your test database is "scratch space" for the test suite and is wiped
|
||||
# and recreated between test runs. Don't rely on the data there!
|
||||
config.cache_classes = true
|
||||
|
||||
# Log error messages when you accidentally call methods on nil.
|
||||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.action_controller.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Tell ActionMailer not to deliver emails to the real world.
|
||||
# The :test delivery method accumulates sent emails in the
|
||||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
# Disable request forgery protection in test environment
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
# Overwrite the default settings for fixtures in tests. See Fixtures
|
||||
# for more details about these settings.
|
||||
# config.transactional_fixtures = true
|
||||
# config.instantiated_fixtures = false
|
||||
# config.pre_loaded_fixtures = false
|
||||
SALT = "change-me" unless defined?( SALT ).nil?
|
||||
|
||||
config.after_initialize do
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../../test/selenium_helper")
|
||||
end
|
||||
3
config/initializers/mime_types.rb
Normal file
3
config/initializers/mime_types.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
# Mime::Type.register "application/x-mobile", :mobile
|
||||
64
config/routes.rb
Normal file
64
config/routes.rb
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
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'
|
||||
|
||||
# Install the default route as the lowest priority.
|
||||
map.connect ':controller/:action/:id'
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue