From 58cf93e1ed267776e96b4db835a158efb338444b Mon Sep 17 00:00:00 2001 From: Clinton Forbes Date: Sat, 29 Nov 2008 08:43:12 +1100 Subject: [PATCH 01/12] Correctly format default 'Start from' date for new recurring items --- app/views/recurring_todos/_recurring_todo_form.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/recurring_todos/_recurring_todo_form.erb b/app/views/recurring_todos/_recurring_todo_form.erb index a9709e45..5bda90fe 100644 --- a/app/views/recurring_todos/_recurring_todo_form.erb +++ b/app/views/recurring_todos/_recurring_todo_form.erb @@ -73,7 +73,7 @@

<%= - text_field(:recurring_todo, :start_from, "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %>
+ text_field(:recurring_todo, :start_from, "value" => format_date(@recurring_todo.start_from), "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %>


<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> No end date
From cb7a1182fad6282dfae725046e96d04c370e51f3 Mon Sep 17 00:00:00 2001 From: Clinton Forbes Date: Sat, 29 Nov 2008 08:55:51 +1100 Subject: [PATCH 02/12] Got format correct, but the default date was wrong. Set it to today. --- app/views/recurring_todos/_recurring_todo_form.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/recurring_todos/_recurring_todo_form.erb b/app/views/recurring_todos/_recurring_todo_form.erb index 5bda90fe..1e45250f 100644 --- a/app/views/recurring_todos/_recurring_todo_form.erb +++ b/app/views/recurring_todos/_recurring_todo_form.erb @@ -73,7 +73,7 @@

<%= - text_field(:recurring_todo, :start_from, "value" => format_date(@recurring_todo.start_from), "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %>
+ text_field(:recurring_todo, :start_from, "value" => format_date(Time.today), "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %>


<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> No end date
From f42025e5da2ddaf55451bb24a46ddeb49c583dbf Mon Sep 17 00:00:00 2001 From: "Jakub A.Tesinsky" Date: Tue, 2 Dec 2008 10:16:00 +0100 Subject: [PATCH 03/12] Converting data to datetime to prevent the in_time_zone unknown function error on line 118. --- app/controllers/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index b24dfd54..84649bd9 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base def format_date(date) if date date_format = prefs.date_format - formatted_date = date.in_time_zone(prefs.time_zone).strftime("#{date_format}") + formatted_date = date.to_datetime.in_time_zone(prefs.time_zone).strftime("#{date_format}") else formatted_date = '' end From 96dc05e4f1031a8d1c8f066845ec058e61fa1d15 Mon Sep 17 00:00:00 2001 From: "Jakub A.Tesinsky" Date: Wed, 3 Dec 2008 11:50:20 +0100 Subject: [PATCH 04/12] Changes in styleshet and generated html to conform more to mobile w3c reccomendations. --- app/controllers/application.rb | 2 +- app/helpers/todos_helper.rb | 2 +- app/views/contexts/_mobile_context.rhtml | 4 +- app/views/layouts/mobile.m.erb | 15 ++++-- app/views/login/login_mobile.html.erb | 14 +++--- app/views/todos/_edit_mobile.rhtml | 12 +++-- app/views/todos/_mobile_todo.rhtml | 11 ++-- public/.htaccess | 2 +- public/stylesheets/mobile.css | 64 +++++++++++++++++------- 9 files changed, 82 insertions(+), 44 deletions(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 84649bd9..b24dfd54 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base def format_date(date) if date date_format = prefs.date_format - formatted_date = date.to_datetime.in_time_zone(prefs.time_zone).strftime("#{date_format}") + formatted_date = date.in_time_zone(prefs.time_zone).strftime("#{date_format}") else formatted_date = '' end diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index aee59c90..79e058e9 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -117,7 +117,7 @@ module TodosHelper "" + link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) + ""}.join('') - "#{tag_list}" + if tag_list.empty? then "" else "#{tag_list}" end end def deferred_due_date diff --git a/app/views/contexts/_mobile_context.rhtml b/app/views/contexts/_mobile_context.rhtml index 6510aeb4..3122bc32 100644 --- a/app/views/contexts/_mobile_context.rhtml +++ b/app/views/contexts/_mobile_context.rhtml @@ -6,9 +6,9 @@ if not @not_done.empty? # only show a context when there are actions in it -%>

<%=mobile_context.name%>

- +
    <%= render :partial => "todos/mobile_todo", :collection => @not_done, :locals => { :parent_container_type => "context" }-%> -
+ <% end -%> \ No newline at end of file diff --git a/app/views/layouts/mobile.m.erb b/app/views/layouts/mobile.m.erb index c53ea4c3..3ee740a5 100644 --- a/app/views/layouts/mobile.m.erb +++ b/app/views/layouts/mobile.m.erb @@ -2,35 +2,40 @@ new_todo_params = {} new_todo_params[:from_project] = @mobile_from_project if @mobile_from_project new_todo_params[:from_context] = @mobile_from_context if @mobile_from_context --%> +-%> + -<%= stylesheet_link_tag "mobile"%> +<%= stylesheet_link_tag "mobile", :media => 'handheld,all' %> <%= @page_title %> <% if !(@new_mobile || @edit_mobile) if !@prefs.nil? -%>

<%= @down_count %> <%= user_time.strftime(@prefs.title_date_format) -%>

-<%= (link_to("0-Add new action", formatted_new_todo_path(:m, new_todo_params))+" | ") unless @new_mobile -%> + +<%= yield -%>
<% if !@prefs.nil? -%> + <% end -%> <%= render :partial => "shared/mobile_footer" -%> \ No newline at end of file diff --git a/app/views/login/login_mobile.html.erb b/app/views/login/login_mobile.html.erb index d88b3316..f3ff6511 100644 --- a/app/views/login/login_mobile.html.erb +++ b/app/views/login/login_mobile.html.erb @@ -14,19 +14,19 @@ <% form_tag formatted_login_path(:format => 'm') do %> - - + + - - + + - - + + - +
 
diff --git a/app/views/todos/_edit_mobile.rhtml b/app/views/todos/_edit_mobile.rhtml index 0837f026..4bf4d9ea 100644 --- a/app/views/todos/_edit_mobile.rhtml +++ b/app/views/todos/_edit_mobile.rhtml @@ -3,14 +3,16 @@ <%= error_messages_for("todo") %> -<% this_year = user_time.to_date.strftime("%Y").to_i -if parent_container_type == 'show_mobile' -%> +<% + this_year = user_time.to_date.strftime("%Y").to_i + if parent_container_type == 'show_mobile' +-%>

 <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %>

<% end -%>

<%= text_field( "todo", "description", "tabindex" => 2) %>

-<%= text_area( "todo", "notes", "cols" => 30, "rows" => 5, "tabindex" => 3) %> +<%= text_area( "todo", "notes", "cols" => 30, "rows" => 2, "tabindex" => 3) %>

<%= unless @mobile_from_context collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} ) @@ -22,7 +24,7 @@ end %>

<%= unless @mobile_from_project collection_select( "todo", "project_id", @projects, "id", "name", - {:include_blank => true}, {"tabindex" => 5} ) + {:include_blank => '--No project--'}, {"tabindex" => 5} ) else # manually add blank option since :include_blank does not work # with options_from_collection_for_select @@ -34,7 +36,7 @@ end %> <%= text_field_tag "tag_list", @tag_list_text, :size => 30, :tabindex => 6 %>

<%= date_select("todo", "due", {:order => [:day, :month, :year], - :start_year => this_year, :include_blank => true}, :tabindex => 7) %> + :start_year => this_year, :include_blank => '--'}, :tabindex => 7) %>

<%= date_select("todo", "show_from", {:order => [:day, :month, :year], :start_year => this_year, :include_blank => true}, :tabindex => 8) %> diff --git a/app/views/todos/_mobile_todo.rhtml b/app/views/todos/_mobile_todo.rhtml index fafdd164..bac40118 100644 --- a/app/views/todos/_mobile_todo.rhtml +++ b/app/views/todos/_mobile_todo.rhtml @@ -1,11 +1,12 @@ <% @todo = mobile_todo if mobile_todo.starred? - bullet = ""+image_tag("menustar_small.gif")+"" + bullet = ""+image_tag("menustar_small.gif")+"" + li_class = " class=\"star\"" else - bullet = "» " + bullet = "» " + li_class = "" end -%> -
-<%= bullet %><% +
  • ><%= bullet %><% if mobile_todo.completed? -%> <% else @@ -23,4 +24,4 @@ end -%> ")" -%> <% end -%> <%= tag_list_mobile -%> -
  • \ No newline at end of file + \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess index 3b66fccd..51a97fd7 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -39,4 +39,4 @@ RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] # Example: # ErrorDocument 500 /500.html -ErrorDocument 500 "

    Application error

    Rails application failed to start properly" \ No newline at end of file +ErrorDocument 500 "

    Application error

    Rails application failed to start properly" diff --git a/public/stylesheets/mobile.css b/public/stylesheets/mobile.css index dc7a74f0..00ed8d09 100644 --- a/public/stylesheets/mobile.css +++ b/public/stylesheets/mobile.css @@ -29,15 +29,18 @@ div.footer a { } h1 { - color: #f00; - font-size: small; + color: #f00; + font-size: small; + margin-top:.3em; + margin-bottom:.3em; } h2 { - background-color: #cccccc; - font-size : small; - margin-top: 10px; - margin-bottom: 0; + background-color: #aaaaaa; + font-size : small; + margin: .3em 0; + padding: .3em 0 .1em .3em; + border-top: 1px solid #777777; } h4.alert { @@ -60,12 +63,8 @@ h4.notice { color: #007E00; } -div.t { - padding-left:5px; -} - span.tag { - font-size: XX-small; + font-size: x-small; background-color: #CCE7FF; color: #000; padding: 1px; @@ -86,43 +85,74 @@ span.prj, span.ctx{ color: #fff; background: #f00; padding: 1px; - font-size: 10px; + font-size: 1em; } .amber { color: #fff; background: #ff6600; padding: 1px; - font-size: 10px; + font-size: 1em; } .orange { color: #fff; background: #FFA500; padding: 1px; - font-size: 10px; + font-size: 1em; } .green { color: #fff; background: #33cc00; padding: 1px; - font-size: 10px; + font-size: 1em; } .grey { color: #fff; background: #999; padding: 1px; - font-size: 10px; + font-size: 1em; } .count { color: #fff; background: #000; - font-size: medium; + font-size: medium; } .errors { background: #FFC2C2; +} + +ul.c li.star { + list-style-type: circle; +} + +ul.c { + padding: 0; + margin: 0; + padding-left: 1.1em; +} + +ul.c li { + padding: 0; + margin: 0; +} + +ul.c li span.r { + display: none; +} + +span.r { + display:none; +} + +.nav { + font-size: x-small; +} + +#database_auth_form table td { + width:7em; } \ No newline at end of file From eadeafbe2495b68644939d12bfb15ed5c4798194 Mon Sep 17 00:00:00 2001 From: "Jakub A.Tesinsky" Date: Wed, 3 Dec 2008 12:03:23 +0100 Subject: [PATCH 05/12] Merging. --- app/helpers/todos_helper.rb | 4 ---- app/views/contexts/_mobile_context.rhtml | 7 ------- app/views/todos/_mobile_todo.rhtml | 9 +-------- public/stylesheets/mobile.css | 3 --- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index f260b7e6..79e058e9 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -117,11 +117,7 @@ module TodosHelper "" + link_to(t.name, {:action => "tag", :controller => "todos", :id => t.name+".m"}) + ""}.join('') -<<<<<<< HEAD/app/helpers/todos_helper.rb if tag_list.empty? then "" else "#{tag_list}" end -======= - if not tag_list.empty? then "#{tag_list}" end ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/app/helpers/todos_helper.rb end def deferred_due_date diff --git a/app/views/contexts/_mobile_context.rhtml b/app/views/contexts/_mobile_context.rhtml index a9f829ae..99c06233 100644 --- a/app/views/contexts/_mobile_context.rhtml +++ b/app/views/contexts/_mobile_context.rhtml @@ -6,17 +6,10 @@ if not @not_done.empty? # only show a context when there are actions in it -%>

    <%=mobile_context.name%>

    -<<<<<<< HEAD/app/views/contexts/_mobile_context.rhtml
      -======= ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/app/views/contexts/_mobile_context.rhtml <%= render :partial => "todos/mobile_todo", :collection => @not_done, :locals => { :parent_container_type => "context" }-%> -<<<<<<< HEAD/app/views/contexts/_mobile_context.rhtml -<% end -%>======= -
      <% end -%> ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/app/views/contexts/_mobile_context.rhtml diff --git a/app/views/todos/_mobile_todo.rhtml b/app/views/todos/_mobile_todo.rhtml index 2621389f..88147afa 100644 --- a/app/views/todos/_mobile_todo.rhtml +++ b/app/views/todos/_mobile_todo.rhtml @@ -6,11 +6,7 @@ else bullet = "» " li_class = "" end -%> -<<<<<<< HEAD/app/views/todos/_mobile_todo.rhtml
    • ><%= bullet %><% -======= -<%= bullet %><% ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/app/views/todos/_mobile_todo.rhtml if mobile_todo.completed? -%> <% else @@ -28,7 +24,4 @@ end -%> ")" -%> <% end -%> <%= tag_list_mobile -%> -<<<<<<< HEAD/app/views/todos/_mobile_todo.rhtml -
    • ======= - ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/app/views/todos/_mobile_todo.rhtml + diff --git a/public/stylesheets/mobile.css b/public/stylesheets/mobile.css index c7e25c17..a9be930c 100644 --- a/public/stylesheets/mobile.css +++ b/public/stylesheets/mobile.css @@ -124,7 +124,6 @@ span.prj, span.ctx{ .errors { background: #FFC2C2; -<<<<<<< HEAD/public/stylesheets/mobile.css } ul.c li.star { @@ -156,10 +155,8 @@ span.r { #database_auth_form table td { width:7em; -}======= } table.c { margin-left: 5px; } ->>>>>>> f3d7fac2a4e602c21c754770903217c0a5035629/public/stylesheets/mobile.css From 152e9d6c6e509fdb2534ef1251afd785a10f89e3 Mon Sep 17 00:00:00 2001 From: Jakub Tesinsky Date: Thu, 4 Dec 2008 04:41:35 +0100 Subject: [PATCH 06/12] Refactoring changes to leave out unnecessary formatting. --- app/views/login/login.html.erb | 24 ++++++++++++------------ app/views/todos/_edit_mobile.rhtml | 6 ++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/views/login/login.html.erb b/app/views/login/login.html.erb index 317b7d69..039fdc59 100644 --- a/app/views/login/login.html.erb +++ b/app/views/login/login.html.erb @@ -14,19 +14,19 @@ <% form_tag :action=> 'login' do %> - - + + - - + + - - + + - +
      @@ -39,15 +39,15 @@ <% form_tag :action=> 'login', :action => 'begin' do %> - - + + - - + + - +
      diff --git a/app/views/todos/_edit_mobile.rhtml b/app/views/todos/_edit_mobile.rhtml index 4bf4d9ea..ef1de808 100644 --- a/app/views/todos/_edit_mobile.rhtml +++ b/app/views/todos/_edit_mobile.rhtml @@ -3,10 +3,8 @@ <%= error_messages_for("todo") %> -<% - this_year = user_time.to_date.strftime("%Y").to_i - if parent_container_type == 'show_mobile' --%> +<% this_year = user_time.to_date.strftime("%Y").to_i +if parent_container_type == 'show_mobile' -%>

       <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %>

      <% end -%>

      From d2c5775a6983baccd3c84e7aee8d5002790b9efd Mon Sep 17 00:00:00 2001 From: Piotr Adamski Date: Mon, 15 Dec 2008 20:48:50 +0100 Subject: [PATCH 07/12] Fix for Ticket #630 http://dev.rousette.org.uk/ticket/630 --- app/views/shared/_add_new_item_form.rhtml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_add_new_item_form.rhtml b/app/views/shared/_add_new_item_form.rhtml index c84e0580..0055f847 100644 --- a/app/views/shared/_add_new_item_form.rhtml +++ b/app/views/shared/_add_new_item_form.rhtml @@ -24,7 +24,21 @@ :html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }, :before => "$('todo_new_action_submit').startWaiting()", :complete => "$('todo_new_action_submit').stopWaiting()", - :condition => "!$('todo_new_action_submit').isWaiting()") do -%> + :condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%> + +
      <%= error_messages_for("item", :object_name => 'action') %>
      From 7bb953c45b6f87b43202bc32c071c039ddf2e17f Mon Sep 17 00:00:00 2001 From: Piotr Adamski Date: Mon, 15 Dec 2008 20:48:50 +0100 Subject: [PATCH 08/12] Fix for Ticket #630 http://dev.rousette.org.uk/ticket/630 --- app/views/shared/_add_new_item_form.rhtml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_add_new_item_form.rhtml b/app/views/shared/_add_new_item_form.rhtml index 3c3b6f8a..3e3f749f 100644 --- a/app/views/shared/_add_new_item_form.rhtml +++ b/app/views/shared/_add_new_item_form.rhtml @@ -24,7 +24,21 @@ :html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }, :before => "$('todo_new_action_submit').startWaiting()", :complete => "$('todo_new_action_submit').stopWaiting()", - :condition => "!$('todo_new_action_submit').isWaiting()") do -%> + :condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%> + +
      <%= error_messages_for("item", :object_name => 'action') %>
      From 0c5737e986695148c2ed76c3364d2d08ad8dc236 Mon Sep 17 00:00:00 2001 From: Piotr Adamski Date: Wed, 17 Dec 2008 17:15:04 +0100 Subject: [PATCH 09/12] Missing change in ContextController, that should be supplied with fix for Ticket #630 http://dev.rousette.org.uk/ticket/630 --- app/controllers/contexts_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/contexts_controller.rb b/app/controllers/contexts_controller.rb index 348151aa..2412ba95 100644 --- a/app/controllers/contexts_controller.rb +++ b/app/controllers/contexts_controller.rb @@ -23,6 +23,7 @@ class ContextsController < ApplicationController end def show + @contexts = current_user.contexts(true) if (@context.nil?) respond_to do |format| format.html { render :text => 'Context not found', :status => 404 } From 36a80a6a24e37e43bf63caa70bb2cd2f47dc8cc6 Mon Sep 17 00:00:00 2001 From: bsag Date: Thu, 18 Dec 2008 16:45:41 +0000 Subject: [PATCH 10/12] Tried to fix highline gem error by updating gemspec. Didn't work ;-) --- vendor/gems/ruby-openid-2.1.2/.specification | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vendor/gems/ruby-openid-2.1.2/.specification b/vendor/gems/ruby-openid-2.1.2/.specification index e6c9612d..6a1a03db 100644 --- a/vendor/gems/ruby-openid-2.1.2/.specification +++ b/vendor/gems/ruby-openid-2.1.2/.specification @@ -8,7 +8,7 @@ authors: autorequire: openid bindir: bin cert_chain: -date: 2008-06-27 00:00:00 -04:00 +date: 2008-06-27 05:00:00 +01:00 default_executable: dependencies: [] @@ -265,6 +265,7 @@ rdoc_options: - --main - README require_paths: +- bin - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: @@ -281,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement requirements: [] rubyforge_project: -rubygems_version: 1.2.0 +rubygems_version: 1.0.1 signing_key: specification_version: 1 summary: A library for consuming and serving OpenID identities. From d5b35a0fed74ca2c015582b74419dda0a9ef7b5b Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 23 Dec 2008 11:46:14 +0100 Subject: [PATCH 11/12] sorry, misspelled extensions --- config/environment.rb.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environment.rb.tmpl b/config/environment.rb.tmpl index fbbc6848..fa48939e 100644 --- a/config/environment.rb.tmpl +++ b/config/environment.rb.tmpl @@ -82,7 +82,7 @@ end require 'name_part_finder' require 'tracks/todo_list' require 'tracks/config' -require 'tagging_extentions' # Needed for tagging-specific extensions +require 'tagging_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' From 94cd8dc077838622fc7cd999596b5969c3e8aace Mon Sep 17 00:00:00 2001 From: bsag Date: Fri, 26 Dec 2008 14:15:37 +0000 Subject: [PATCH 12/12] Changed Tracks version in environment.rb.tmpl to 1.7. Fixes #808. --- config/environment.rb.tmpl | 222 ++++++++++++++++++------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/config/environment.rb.tmpl b/config/environment.rb.tmpl index fa48939e..ed183c1c 100644 --- a/config/environment.rb.tmpl +++ b/config/environment.rb.tmpl @@ -1,111 +1,111 @@ -# 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 - -# 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'] - -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 ) - - config.gem "highline" - - config.action_controller.use_accept_header = true - - # 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 - - # 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 - - # 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 - - -require 'name_part_finder' -require 'tracks/todo_list' -require 'tracks/config' -require 'tagging_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 - -# setting this to true will make the cookies only available over HTTPS -TRACKS_COOKIES_SECURE = false - -tracks_version='1.7RC' - -# comment out next two lines if you do not want (or can not) the date of the -# last git commit in the footer -# info=`git log --pretty=format:"%ai" -1` -# tracks_version=tracks_version + ' ('+info+')' - -TRACKS_VERSION=tracks_version +# 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 + +# 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'] + +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 ) + + config.gem "highline" + + config.action_controller.use_accept_header = true + + # 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 + + # 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 + + # 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 + + +require 'name_part_finder' +require 'tracks/todo_list' +require 'tracks/config' +require 'tagging_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 + +# setting this to true will make the cookies only available over HTTPS +TRACKS_COOKIES_SECURE = false + +tracks_version='1.7' + +# comment out next two lines if you do not want (or can not) the date of the +# last git commit in the footer +# info=`git log --pretty=format:"%ai" -1` +# tracks_version=tracks_version + ' ('+info+')' + +TRACKS_VERSION=tracks_version