backlog 0.36.2 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +16 -4
- data/Gemfile.lock +130 -0
- data/History.txt +17 -0
- data/README.txt +0 -2
- data/Rakefile +17 -7
- data/app/controllers/absences_controller.rb +1 -2
- data/app/controllers/application_controller.rb +13 -14
- data/app/controllers/application_controller.rb.rails2 +186 -0
- data/app/controllers/estimates_controller.rb +1 -1
- data/app/controllers/groups_controller.rb +3 -1
- data/app/controllers/periods_controller.rb +61 -50
- data/app/controllers/{backlogs_controller.rb → projects_controller.rb} +35 -35
- data/app/controllers/search_controller.rb +2 -2
- data/app/controllers/tasks_controller.rb +11 -11
- data/app/controllers/user_controller.rb +6 -4
- data/app/controllers/welcome_controller.rb +4 -4
- data/app/controllers/work_locks_controller.rb +2 -2
- data/app/controllers/works_controller.rb +31 -31
- data/app/helpers/application_helper.rb +2 -2
- data/app/helpers/application_helper.rb.rails2 +118 -0
- data/app/helpers/periods_helper.rb +3 -3
- data/app/helpers/{backlogs_helper.rb → projects_helper.rb} +5 -5
- data/app/helpers/user_helper.rb +2 -2
- data/app/{models → mailers}/user_notify.rb +1 -0
- data/app/models/absence.rb +2 -2
- data/{lib → app/models}/clock.rb +0 -0
- data/app/models/estimate.rb +2 -2
- data/app/models/party.rb +1 -2
- data/app/models/period.rb +17 -18
- data/app/models/{backlog.rb → project.rb} +2 -2
- data/app/models/sidebar.rb +2 -2
- data/app/models/task.rb +28 -28
- data/app/models/user.rb +5 -4
- data/app/models/work.rb +29 -23
- data/app/models/work_lock_nagger.rb +1 -1
- data/app/models/works_report_filter.rb +4 -4
- data/app/views/customers/_name_list.rhtml +1 -1
- data/app/views/layouts/_headers.rhtml +2 -1
- data/app/views/layouts/_left_top.rhtml +32 -29
- data/app/views/layouts/_shortcuts.rhtml +15 -9
- data/app/views/layouts/_shortcuts_js.rhtml +4 -4
- data/app/views/layouts/mwrt002.html.erb +44 -0
- data/app/views/periods/_burn_down_chart.rhtml +1 -1
- data/app/views/periods/_show_active.rhtml +3 -3
- data/app/views/periods/_title.rhtml +1 -1
- data/app/views/{backlogs → projects}/_buttons.rhtml +4 -4
- data/app/views/projects/_form.rhtml +44 -0
- data/app/views/projects/_name_list.rhtml +5 -0
- data/app/views/projects/edit.rhtml +14 -0
- data/app/views/{backlogs → projects}/finish_task.rjs +0 -0
- data/app/views/projects/list.rhtml +16 -0
- data/app/views/{backlogs → projects}/move_task_to_period.rjs +0 -0
- data/app/views/{backlogs → projects}/new.rhtml +1 -1
- data/app/views/{backlogs → projects}/reopen_task.rjs +0 -0
- data/app/views/{backlogs → projects}/show.rhtml +6 -6
- data/app/views/search/results.rhtml +3 -3
- data/app/views/tasks/_backlog_header.rhtml +4 -4
- data/app/views/tasks/_completed.rhtml +2 -2
- data/app/views/tasks/_form.rhtml +13 -13
- data/app/views/tasks/_task.rhtml +10 -10
- data/app/views/tasks/edit.rhtml +1 -1
- data/app/views/tasks/list.rhtml +3 -3
- data/app/views/tasks/list_started.rhtml +4 -4
- data/app/views/tasks/start_work.rjs +1 -1
- data/app/views/user/login.rhtml +1 -1
- data/app/views/user/signup.rhtml +1 -1
- data/app/views/user/welcome.rhtml +1 -1
- data/app/views/works/_description_list.rhtml +1 -1
- data/app/views/works/_form.rhtml +5 -5
- data/app/views/works/_new_row.rhtml +8 -8
- data/app/views/works/_row.rhtml +1 -1
- data/app/views/works/_task_id_list.rhtml +1 -1
- data/app/views/works/daily_work_sheet.rhtml +1 -1
- data/app/views/works/list.rhtml +5 -5
- data/app/views/works/list_excel.rhtml +2 -2
- data/app/views/works/timeliste.rhtml +14 -14
- data/app/views/works/weekly_work_sheet.rhtml +5 -5
- data/app/views/works/weekly_work_sheet_details.rhtml +5 -5
- data/backlog.gemspec +44 -0
- data/bin/backlog +5 -1
- data/config.ru +4 -0
- data/config/application.rb +10 -0
- data/config/boot.rb +12 -116
- data/config/database.yml +3 -6
- data/config/database.yml~ +17 -0
- data/config/environment.rb +28 -49
- data/config/environments/development.rb +24 -20
- data/config/environments/development.rb.rails2 +26 -0
- data/config/environments/production.rb +26 -22
- data/config/environments/test.rb +20 -15
- data/config/environments/user_environment.rb +1 -1
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/jdbc.rb +1 -1
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/locales/en.yml +22 -11
- data/config/locales/no.yml +1 -0
- data/config/routes.rb +4 -5
- data/cruise_build.sh +6 -2
- data/db/migrate/004_add_period.rb +22 -22
- data/db/migrate/015_add_user_option.rb +5 -19
- data/db/migrate/017_increase_backlog_name_limit.rb +10 -0
- data/db/migrate/021_create_work_accounts.rb +0 -2
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb +22 -0
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb~ +22 -0
- data/db/schema.rb +27 -30
- data/db/seeds.rb +7 -0
- data/lib/array_helper.rb +0 -8
- data/lib/class_table_inheritance.rb +8 -7
- data/lib/tasks/backup.rake +3 -3
- data/lib/tasks/jdbc.rake +2 -2
- data/lib/version_from_history.rb +1 -1
- data/public/404.html +23 -7
- data/public/422.html +26 -0
- data/public/500.html +23 -6
- data/public/images/rails.png +0 -0
- data/public/javascripts/controls.js +5 -3
- data/public/javascripts/dragdrop.js +7 -6
- data/public/javascripts/effects.js +8 -13
- data/public/javascripts/prototype.js +3381 -1700
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -1
- data/script/rails +6 -0
- data/test/client/login.rb +0 -2
- data/test/client/login_test.rb +1 -1
- data/test/client/setup.rb +25 -24
- data/test/fixtures/{backlogs.yml → projects.yml} +2 -2
- data/test/fixtures/tasks.yml +9 -9
- data/test/fixtures/work_lock_subscriptions.yml +2 -2
- data/test/fixtures/works.yml +7 -7
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/{backlogs_controller_test.rb → projects_controller_test.rb} +22 -21
- data/test/functional/search_controller_test.rb +1 -1
- data/test/functional/tasks_controller_test.rb +17 -17
- data/test/functional/user_controller_test.rb +16 -21
- data/test/functional/welcome_controller_test.rb +4 -3
- data/test/functional/works_controller_test.rb +5 -5
- data/test/integration/user_system_test.rb +1 -1
- data/test/mocks/test/clock.rb +1 -1
- data/test/performance/browsing_test.rb +9 -0
- data/test/performance/common.rb +1 -1
- data/test/test_helper.rb +23 -6
- data/test/test_helper.rb~ +121 -0
- data/test/unit/user_test.rb +3 -3
- data/test/unit/work_test.rb +7 -7
- data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +0 -2
- data/vendor/plugins/{foreign_key_migrations → dynamic_form}/MIT-LICENSE +1 -1
- data/vendor/plugins/dynamic_form/README +13 -0
- data/vendor/plugins/dynamic_form/Rakefile +10 -0
- data/vendor/plugins/dynamic_form/dynamic_form.gemspec +12 -0
- data/vendor/plugins/dynamic_form/init.rb +1 -0
- data/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +300 -0
- data/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +8 -0
- data/vendor/plugins/dynamic_form/lib/dynamic_form.rb +5 -0
- data/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +42 -0
- data/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +370 -0
- data/vendor/plugins/dynamic_form/test/test_helper.rb +9 -0
- data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
- data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
- data/vendor/plugins/rails_time/test/debug.log +1 -0
- data/vendor/plugins/{redhillonrails_core → verification}/MIT-LICENSE +1 -1
- data/vendor/plugins/verification/README +34 -0
- data/vendor/plugins/verification/Rakefile +22 -0
- data/vendor/plugins/verification/init.rb +3 -0
- data/vendor/plugins/verification/lib/action_controller/verification.rb +132 -0
- data/vendor/plugins/verification/test/test_helper.rb +18 -0
- data/vendor/plugins/verification/test/verification_test.rb +270 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +1 -1
- metadata +115 -134
- data/Gemfile~ +0 -4
- data/History.txt~ +0 -961
- data/LICENSE_LOCALIZATION +0 -20
- data/README_LOCALIZATION +0 -61
- data/README_RAILS +0 -180
- data/app/views/backlogs/_form.rhtml +0 -44
- data/app/views/backlogs/_name_list.rhtml +0 -5
- data/app/views/backlogs/edit.rhtml +0 -14
- data/app/views/backlogs/list.rhtml +0 -16
- data/app/views/layouts/mwrt002.rhtml +0 -43
- data/config/initializers/mongrel.rb +0 -83
- data/config/preinitializer.rb +0 -20
- data/config/warble.rb~ +0 -84
- data/db/migrate/017_insert_datek_projects.rb +0 -98
- data/lib/change_column_null_migration_fix.rb +0 -15
- data/no_test.rb~ +0 -6
- data/public/dispatch.cgi +0 -10
- data/public/dispatch.fcgi +0 -24
- data/public/dispatch.rb +0 -10
- data/script/about +0 -3
- data/script/breakpointer +0 -3
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/process/inspector +0 -3
- data/script/process/reaper +0 -3
- data/script/process/spawner +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/test/client/login.rb~ +0 -33
- data/test/mocks/test/user_notify.rb +0 -16
- data/vendor/plugins/foreign_key_migrations/CHANGELOG +0 -103
- data/vendor/plugins/foreign_key_migrations/README +0 -87
- data/vendor/plugins/foreign_key_migrations/about.yml +0 -5
- data/vendor/plugins/foreign_key_migrations/init.rb +0 -1
- data/vendor/plugins/foreign_key_migrations/install.rb +0 -1
- data/vendor/plugins/foreign_key_migrations/lib/foreign_key_migrations.rb +0 -3
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/base.rb +0 -22
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/abstract_adapter.rb +0 -22
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/table_definition.rb +0 -28
- data/vendor/plugins/lightwindow_helper/README +0 -33
- data/vendor/plugins/lightwindow_helper/assets/images/ajax-loading.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/arrow-down.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/arrow-up.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/black-70.png +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/black.png +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/nextlabel.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/prevlabel.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/javascripts/lightwindow.js +0 -1921
- data/vendor/plugins/lightwindow_helper/assets/stylesheets/lightwindow.css +0 -376
- data/vendor/plugins/lightwindow_helper/init.rb +0 -1
- data/vendor/plugins/lightwindow_helper/install.rb +0 -7
- data/vendor/plugins/lightwindow_helper/lib/lightwindow_helper.rb +0 -31
- data/vendor/plugins/redhillonrails_core/CHANGELOG +0 -150
- data/vendor/plugins/redhillonrails_core/README +0 -124
- data/vendor/plugins/redhillonrails_core/init.rb +0 -19
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb +0 -54
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/abstract_adapter.rb +0 -31
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/column.rb +0 -21
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/foreign_key_definition.rb +0 -26
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/index_definition.rb +0 -11
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_adapter.rb +0 -74
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_column.rb +0 -8
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/postgresql_adapter.rb +0 -99
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb +0 -16
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter.rb +0 -9
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/table_definition.rb +0 -27
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema.rb +0 -27
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema_dumper.rb +0 -47
- data/vendor/plugins/transactional_migrations/CHANGELOG +0 -9
- data/vendor/plugins/transactional_migrations/MIT-LICENSE +0 -20
- data/vendor/plugins/transactional_migrations/README +0 -15
- data/vendor/plugins/transactional_migrations/about.yml +0 -5
- data/vendor/plugins/transactional_migrations/init.rb +0 -1
- data/vendor/plugins/transactional_migrations/lib/red_hill_consulting/transactional_migrations/active_record/migration.rb +0 -19
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<table border="1">
|
|
9
9
|
<tr>
|
|
10
|
-
<th><%=l :
|
|
10
|
+
<th><%=l :project %></th>
|
|
11
11
|
<% [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday].each_with_index do |day, i| %>
|
|
12
12
|
<th align="center"><%=detour_to "#{l(day)} #{week_date(i+1)}", :action => :daily_work_sheet, :id => (@first_date + i).strftime('%Y-%m-%d'), :user_id => (@user != current_user ? @user : nil) %></th>
|
|
13
13
|
<% end %>
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
|
|
31
31
|
<% week_totals = Hash.new(0) %>
|
|
32
32
|
<% day_totals = Array.new(7, 0) %>
|
|
33
|
-
<% for
|
|
33
|
+
<% for project, totals in @projects %>
|
|
34
34
|
<tr>
|
|
35
35
|
<td valign="top">
|
|
36
|
-
<%=detour_to(h(
|
|
36
|
+
<%=detour_to(h(project.name), :controller => 'projects', :action => :show, :id => project.id) %>
|
|
37
37
|
</td>
|
|
38
38
|
<% totals.each_with_index do |total, day| %>
|
|
39
39
|
<% if total %>
|
|
40
40
|
<% day_totals[day] += total %>
|
|
41
|
-
<% week_totals[
|
|
41
|
+
<% week_totals[project] += total %>
|
|
42
42
|
<td align="right" valign="top"><%=t(total)%></td>
|
|
43
43
|
<% else %>
|
|
44
44
|
<td/>
|
|
45
45
|
<% end %>
|
|
46
46
|
<% end %>
|
|
47
|
-
<td align="right"><%=t(week_totals[
|
|
47
|
+
<td align="right"><%=t(week_totals[project])%></td>
|
|
48
48
|
</tr>
|
|
49
49
|
<% end %>
|
|
50
50
|
<tr>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<% @page_title = l(:weekly_work_sheet) + (@period ? " for #{@period}" : '') + (user? ? " for #{user.login}" : '')%>
|
|
2
2
|
|
|
3
3
|
<div id="spotlight">
|
|
4
|
-
<% track_times = @rows.find {|r| r.find {|w| w && w.
|
|
5
|
-
<% invoicing = @rows.find {|r| r.find {|w| w && w.
|
|
4
|
+
<% track_times = @rows.find {|r| r.find {|w| w && w.project.track_times?}} %>
|
|
5
|
+
<% invoicing = @rows.find {|r| r.find {|w| w && w.project.enable_invoicing?}} %>
|
|
6
6
|
<% columns = 2 + (track_times ? 1 : 0) + (invoicing ? 1 : 0) %>
|
|
7
7
|
|
|
8
8
|
<h1>Work for week <%=@week%><%=user? ? " for #{user.login}" : ''%></h1>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</tr>
|
|
19
19
|
<tr>
|
|
20
20
|
<% (1..7).each do %>
|
|
21
|
-
<th><%=l :
|
|
21
|
+
<th><%=l :project %></th>
|
|
22
22
|
<% if invoicing %>
|
|
23
23
|
<th><%=l :invoice_short %></th>
|
|
24
24
|
<% end %>
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
<!--
|
|
52
52
|
<%=detour_to(h(@work.task.period.name), :controller => 'periods', :action => :show, :id => @work.task.period) if @work.task && @work.task.period %>
|
|
53
53
|
-->
|
|
54
|
-
<%=detour_to(h(@work.
|
|
54
|
+
<%=detour_to(h(@work.project.name), :controller => 'projects', :action => :show, :id => @work.project_id) %>
|
|
55
55
|
</td>
|
|
56
56
|
<% if invoicing %>
|
|
57
57
|
<td id="invoice_<%=@work.id%>" valign="top">
|
|
58
58
|
<% form_id = "work_#{@work.id}_invoice_form" %>
|
|
59
59
|
<% field_id = "work_#{@work.id}_invoice" %>
|
|
60
|
-
<%=check_box(:work, :invoice, :id => field_id, :name => field_id, :onchange => "new Ajax.Updater('invoice_#{@work}', '#{url_for(:action => :set_work_invoice, :id => @work)}' + '?value=' + this.checked);", :disabled => @lock) if @work.
|
|
60
|
+
<%=check_box(:work, :invoice, :id => field_id, :name => field_id, :onchange => "new Ajax.Updater('invoice_#{@work}', '#{url_for(:action => :set_work_invoice, :id => @work)}' + '?value=' + this.checked);", :disabled => @lock) if @work.project.enable_invoicing? %>
|
|
61
61
|
</td>
|
|
62
62
|
<% end %>
|
|
63
63
|
<% if track_times %>
|
data/backlog.gemspec
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
|
3
|
+
$:.unshift lib unless $:.include?(lib)
|
|
4
|
+
|
|
5
|
+
require 'version_from_history'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |s|
|
|
8
|
+
s.name = "backlog"
|
|
9
|
+
s.version = APP::VERSION
|
|
10
|
+
s.platform = Gem::Platform::RUBY
|
|
11
|
+
s.authors = ["Uwe Kubosch", "Lars Ingjer", "Espen Westgaard", 'Arndt Kubosch', 'Kåre Gunnar Bolling Nesheim']
|
|
12
|
+
s.email = ["uwe@kubosch.no"]
|
|
13
|
+
s.homepage = "http://rubyforge.org/projects/backlog/"
|
|
14
|
+
s.summary = "Application to aid collecting, processing, organizing, reviewing and doing tasks."
|
|
15
|
+
s.description = s.paragraphs_of('README.txt', 2..3).join("\n\n")
|
|
16
|
+
|
|
17
|
+
s.required_rubygems_version = ">= 1.3.6"
|
|
18
|
+
s.rubyforge_project = "backlog"
|
|
19
|
+
|
|
20
|
+
s.add_development_dependency "rspec"
|
|
21
|
+
|
|
22
|
+
s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md ROADMAP.md CHANGELOG.md)
|
|
23
|
+
s.executables = ['backlog']
|
|
24
|
+
s.require_path = 'lib'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
Hoe.new("backlog", ) do |p|
|
|
28
|
+
p.remote_rdoc_dir = '' # Release to root
|
|
29
|
+
|
|
30
|
+
p.changes = File.read('History.txt').scan(/^== .*?(?=^== )/m).first
|
|
31
|
+
# p.extra_rdoc_files = [/^(app\/(controllers|helpers|models)|lib|bin)|txt$/]
|
|
32
|
+
p.clean_globs = ['doc', 'log/*']
|
|
33
|
+
p.spec_extras = {
|
|
34
|
+
:files => Dir['**/*'].reject{|file_name| file_name =~ /^(doc|log|pkg|profiling|tmp|WEB-INF)/},
|
|
35
|
+
:rdoc_options => ['--inline-source'],
|
|
36
|
+
:requirements => ['ImageMagick', 'PostgreSQL'],
|
|
37
|
+
}
|
|
38
|
+
p.need_zip = true
|
|
39
|
+
p.extra_deps = [['daemons', '~> 1.1.0'], ['rails', '~> 3.0.0'], ['gruff', '~> 0.3.6'], ['postgres-pr', '~> 0.6.3'],
|
|
40
|
+
['slave', '~> 1.2.1'], ['mechanize', '~> 1.0.0'], ['bundler', '~> 1.0.5']]
|
|
41
|
+
# ['rmagick', '~> 1.15.12'],
|
|
42
|
+
p.rsync_args = "-acv --delete --exclude=wiki*"
|
|
43
|
+
end
|
|
44
|
+
|
data/bin/backlog
CHANGED
|
@@ -53,7 +53,10 @@ def start(config)
|
|
|
53
53
|
puts "Unknown status: #{status}. Stopping"
|
|
54
54
|
exit 2
|
|
55
55
|
end
|
|
56
|
-
|
|
56
|
+
Dir.chdir INSTALL_DIR
|
|
57
|
+
ENV['RAILS_ENV'] = 'production'
|
|
58
|
+
# `mongrel_rails start -p #{config['port'] || 3000} -e production -c #{INSTALL_DIR} -d -m #{INSTALL_DIR}/config/mime_types.yaml -P #{PID_FILE} 1>#{LOG_DIR}/stdout.log 2>#{LOG_DIR}/stderr.log`
|
|
59
|
+
`glassfish -p #{config['port'] || 3000} -e production -d -P #{PID_FILE} 1>#{LOG_DIR}/stdout.log 2>#{LOG_DIR}/stderr.log`
|
|
57
60
|
end
|
|
58
61
|
|
|
59
62
|
def stop(config)
|
|
@@ -137,6 +140,7 @@ when 'setup_unix'
|
|
|
137
140
|
Dir.chdir INSTALL_DIR
|
|
138
141
|
Dir.mkdir LOG_DIR unless File.exists? LOG_DIR
|
|
139
142
|
ENV['RAILS_ENV'] = 'production'
|
|
143
|
+
puts `bundle install`
|
|
140
144
|
puts `rake db:migrate #{'--trace' if debug}`
|
|
141
145
|
raise "Could not migrate database: #{$? >> 8}:#{$? & 0xff}" unless ($? >> 8) == 0
|
|
142
146
|
|
data/config.ru
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
require 'rails/all'
|
|
3
|
+
|
|
4
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
|
5
|
+
|
|
6
|
+
module Backlog
|
|
7
|
+
class Application < Rails::Application
|
|
8
|
+
config.secret_token = "Uffsbarr, I'hll pha<dr, cum rAgdios, Vixef."
|
|
9
|
+
end
|
|
10
|
+
end
|
data/config/boot.rb
CHANGED
|
@@ -1,117 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
# Configure your app in config/environment.rb and config/environments/*.rb
|
|
1
|
+
require 'rubygems'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def booted?
|
|
16
|
-
defined? Rails::Initializer
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def pick_boot
|
|
20
|
-
(vendor_rails? ? VendorBoot : GemBoot).new
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def vendor_rails?
|
|
24
|
-
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def preinitialize
|
|
28
|
-
load(preinitializer_path) if File.exist?(preinitializer_path)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def preinitializer_path
|
|
32
|
-
"#{RAILS_ROOT}/config/preinitializer.rb"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
class Boot
|
|
37
|
-
def run
|
|
38
|
-
load_initializer
|
|
39
|
-
|
|
40
|
-
Rails::Initializer.class_eval do
|
|
41
|
-
def load_gems
|
|
42
|
-
@bundler_loaded ||= Bundler.require :default, Rails.env
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
Rails::Initializer.run(:set_load_path)
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
class VendorBoot < Boot
|
|
51
|
-
def load_initializer
|
|
52
|
-
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
|
53
|
-
Rails::Initializer.run(:install_gem_spec_stubs)
|
|
54
|
-
Rails::GemDependency.add_frozen_gem_path
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
class GemBoot < Boot
|
|
59
|
-
def load_initializer
|
|
60
|
-
self.class.load_rubygems
|
|
61
|
-
load_rails_gem
|
|
62
|
-
require 'initializer'
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def load_rails_gem
|
|
66
|
-
if version = self.class.gem_version
|
|
67
|
-
gem 'rails', version
|
|
68
|
-
else
|
|
69
|
-
gem 'rails'
|
|
70
|
-
end
|
|
71
|
-
rescue Gem::LoadError => load_error
|
|
72
|
-
$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.)
|
|
73
|
-
exit 1
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
class << self
|
|
77
|
-
def rubygems_version
|
|
78
|
-
Gem::RubyGemsVersion rescue nil
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def gem_version
|
|
82
|
-
if defined? RAILS_GEM_VERSION
|
|
83
|
-
RAILS_GEM_VERSION
|
|
84
|
-
elsif ENV.include?('RAILS_GEM_VERSION')
|
|
85
|
-
ENV['RAILS_GEM_VERSION']
|
|
86
|
-
else
|
|
87
|
-
parse_gem_version(read_environment_rb)
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def load_rubygems
|
|
92
|
-
require 'rubygems'
|
|
93
|
-
min_version = '1.3.1'
|
|
94
|
-
unless rubygems_version >= min_version
|
|
95
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
|
96
|
-
exit 1
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
rescue LoadError
|
|
100
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
|
101
|
-
exit 1
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def parse_gem_version(text)
|
|
105
|
-
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
private
|
|
109
|
-
def read_environment_rb
|
|
110
|
-
File.read("#{RAILS_ROOT}/config/environment.rb")
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# All that for this:
|
|
117
|
-
Rails.boot!
|
|
3
|
+
# Set up gems listed in the Gemfile.
|
|
4
|
+
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
|
5
|
+
begin
|
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
|
7
|
+
require 'bundler'
|
|
8
|
+
Bundler.setup
|
|
9
|
+
rescue Bundler::GemNotFound => e
|
|
10
|
+
STDERR.puts e.message
|
|
11
|
+
STDERR.puts "Try running `bundle install`."
|
|
12
|
+
exit!
|
|
13
|
+
end if File.exist?(gemfile)
|
data/config/database.yml
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
development:
|
|
2
2
|
adapter: postgresql
|
|
3
3
|
database: backlog_development
|
|
4
|
-
username:
|
|
4
|
+
username: postgres
|
|
5
5
|
|
|
6
|
-
# Warning: The database defined as 'test' will be erased and
|
|
7
|
-
# re-generated from your development database when you run 'rake'.
|
|
8
|
-
# Do not set this db to the same as development or production.
|
|
9
6
|
test:
|
|
10
7
|
adapter: postgresql
|
|
11
8
|
database: backlog_test
|
|
12
|
-
username:
|
|
9
|
+
username: postgres
|
|
13
10
|
|
|
14
11
|
production:
|
|
15
12
|
adapter: postgresql
|
|
16
13
|
database: backlog_production
|
|
17
|
-
username:
|
|
14
|
+
username: postgres
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
development:
|
|
2
|
+
adapter: postgresql
|
|
3
|
+
database: backlog_development
|
|
4
|
+
username: postgres
|
|
5
|
+
|
|
6
|
+
# Warning: The database defined as 'test' will be erased and
|
|
7
|
+
# re-generated from your development database when you run 'rake'.
|
|
8
|
+
# Do not set this db to the same as development or production.
|
|
9
|
+
test:
|
|
10
|
+
adapter: postgresql
|
|
11
|
+
database: backlog_test
|
|
12
|
+
username: postgres
|
|
13
|
+
|
|
14
|
+
production:
|
|
15
|
+
adapter: postgresql
|
|
16
|
+
database: backlog_production
|
|
17
|
+
username: postgres
|
data/config/environment.rb
CHANGED
|
@@ -17,20 +17,16 @@ unless '1.9'.respond_to?(:force_encoding)
|
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
RAILS_GEM_VERSION = '~>2.3.8'
|
|
22
|
-
|
|
23
|
-
# Bootstrap the Rails environment, frameworks, and default configuration
|
|
24
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
|
20
|
+
require File.expand_path('../application', __FILE__)
|
|
25
21
|
|
|
26
22
|
# The following section has been added to load database settings from system config.
|
|
27
23
|
APP_CONFIG_FILE = Config::CONFIG["sysconfdir"] + '/backlog.conf'
|
|
28
24
|
if File.exists? APP_CONFIG_FILE
|
|
29
25
|
puts "Found global config file (#{APP_CONFIG_FILE})"
|
|
30
26
|
module Rails
|
|
31
|
-
|
|
27
|
+
module Configuration
|
|
32
28
|
def database_configuration
|
|
33
|
-
db_conf
|
|
29
|
+
db_conf = YAML::load(ERB.new(IO.read(database_configuration_file)).result)
|
|
34
30
|
app_conf = YAML::load(ERB.new(IO.read(APP_CONFIG_FILE)).result) || {}
|
|
35
31
|
if db_settings = app_conf['database']
|
|
36
32
|
puts "Found global database connection settings: #{db_settings.inspect}"
|
|
@@ -41,14 +37,14 @@ if File.exists? APP_CONFIG_FILE
|
|
|
41
37
|
end
|
|
42
38
|
end
|
|
43
39
|
else
|
|
44
|
-
|
|
40
|
+
puts "Optional global config file not present (#{APP_CONFIG_FILE})"
|
|
45
41
|
end
|
|
46
42
|
|
|
47
43
|
DB_CONFIG_FILE = Config::CONFIG["sysconfdir"] + '/backlog/config/database.yml'
|
|
48
44
|
if File.exists? DB_CONFIG_FILE
|
|
49
45
|
puts "Found global database config file (#{DB_CONFIG_FILE})"
|
|
50
46
|
module Rails
|
|
51
|
-
|
|
47
|
+
module Configuration
|
|
52
48
|
def database_configuration_file
|
|
53
49
|
DB_CONFIG_FILE
|
|
54
50
|
end
|
|
@@ -60,39 +56,6 @@ end
|
|
|
60
56
|
|
|
61
57
|
require 'class_table_inheritance'
|
|
62
58
|
|
|
63
|
-
Rails::Initializer.run do |config|
|
|
64
|
-
# Settings in config/environments/* take precedence those specified here
|
|
65
|
-
|
|
66
|
-
# Skip frameworks you're not going to use
|
|
67
|
-
# config.frameworks -= [ :action_web_service, :action_mailer ]
|
|
68
|
-
|
|
69
|
-
# Add additional load paths for your own custom dirs
|
|
70
|
-
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
|
71
|
-
|
|
72
|
-
# Force all environments to use the same logger level
|
|
73
|
-
# (by default production uses :info, the others :debug)
|
|
74
|
-
# config.log_level = :debug
|
|
75
|
-
|
|
76
|
-
# Use the database for sessions instead of the file system
|
|
77
|
-
# (create the session table with 'rake db:sessions:create')
|
|
78
|
-
# config.action_controller.session_store = :active_record_store
|
|
79
|
-
#config.action_controller.session = { :session_key => "_backlog_session", :secret => "it is but a figment of my mind" }
|
|
80
|
-
|
|
81
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
|
82
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
|
83
|
-
# like if you have constraints or database-specific column types
|
|
84
|
-
# config.active_record.schema_format = :sql
|
|
85
|
-
|
|
86
|
-
# Activate observers that should always be running
|
|
87
|
-
# config.active_record.observers = :cacher, :garbage_collector
|
|
88
|
-
|
|
89
|
-
# Make Active Record use UTC-base instead of local time
|
|
90
|
-
# config.active_record.default_timezone = :utc
|
|
91
|
-
|
|
92
|
-
# See Rails::Configuration for more options
|
|
93
|
-
config.action_controller.session = { :key => "_backlog_session", :secret => "Uffsbarr, I'hll pha<dr, cum rAgdios, Vixef." }
|
|
94
|
-
end
|
|
95
|
-
|
|
96
59
|
# Add new inflection rules using the following format
|
|
97
60
|
# (all these examples are active by default):
|
|
98
61
|
# Inflector.inflections do |inflect|
|
|
@@ -102,20 +65,36 @@ end
|
|
|
102
65
|
# inflect.uncountable %w( fish sheep )
|
|
103
66
|
# end
|
|
104
67
|
|
|
105
|
-
# Include your application configuration below
|
|
106
|
-
|
|
107
68
|
require 'config/environments/user_environment'
|
|
108
69
|
require 'array_helper'
|
|
109
70
|
require 'big_decimal_yaml_fix'
|
|
110
71
|
|
|
111
72
|
require 'version_from_history'
|
|
112
73
|
require 'user_system'
|
|
113
|
-
require 'url_for_fix'
|
|
114
74
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
75
|
+
# JRUBY-5187
|
|
76
|
+
module ::ArJdbc::PostgreSQL::Column
|
|
77
|
+
def extract_limit_with_fix(sql_type)
|
|
78
|
+
return nil if sql_type =~ /^bytea|date|datetime|int4|text|timestamp/i
|
|
79
|
+
extract_limit_without_fix(sql_type)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
alias_method_chain :extract_limit, :fix
|
|
83
|
+
end
|
|
84
|
+
# END JRUBY-5187
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
if RUBY_PLATFORM =~ /java/
|
|
89
|
+
work_lock_nagger_thread = Thread.start{WorkLockNagger.new.nag}
|
|
90
|
+
elsif RUBY_PLATFORM !~ /(i386-mswin32)/
|
|
91
|
+
gem 'slave'
|
|
92
|
+
require 'slave'
|
|
93
|
+
work_lock_nagger_thread = Slave.object(:async => true) { WorkLockNagger.new.nag }
|
|
119
94
|
else
|
|
120
95
|
puts "Not spawning worklog nagger on #$1 platform."
|
|
121
96
|
end
|
|
97
|
+
|
|
98
|
+
Time.zone = 'CET'
|
|
99
|
+
|
|
100
|
+
Backlog::Application.initialize!
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
Backlog::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
|
2
3
|
|
|
3
|
-
# In the development environment your application's code is reloaded on
|
|
4
|
-
# every request. This slows down response time but is perfect for development
|
|
5
|
-
# since you don't have to restart the webserver when you make code changes.
|
|
6
|
-
config.
|
|
4
|
+
# In the development environment your application's code is reloaded on
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
|
7
|
+
config.serve_static_assets = true
|
|
8
|
+
config.cache_classes = false
|
|
7
9
|
|
|
8
|
-
# Log error messages when you accidentally call methods on nil.
|
|
9
|
-
config.whiny_nils = true
|
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
|
11
|
+
config.whiny_nils = true
|
|
10
12
|
|
|
11
|
-
# Show full error reports and disable caching
|
|
12
|
-
config.
|
|
13
|
-
config.action_controller.perform_caching = false
|
|
14
|
-
config.action_view.debug_rjs = true
|
|
13
|
+
# Show full error reports and disable caching
|
|
14
|
+
config.consider_all_requests_local = true
|
|
15
|
+
config.action_controller.perform_caching = false
|
|
16
|
+
config.action_view.debug_rjs = true
|
|
15
17
|
|
|
16
|
-
# Raise exceptions when mailer fails
|
|
17
|
-
config.action_mailer.raise_delivery_errors = true
|
|
18
|
+
# Raise exceptions when mailer fails
|
|
19
|
+
config.action_mailer.raise_delivery_errors = true
|
|
18
20
|
|
|
19
|
-
ActionMailer::Base.delivery_method = :sendmail
|
|
21
|
+
ActionMailer::Base.delivery_method = :sendmail
|
|
20
22
|
|
|
21
|
-
#ActionMailer::Base.delivery_method = :smtp
|
|
22
|
-
#ActionMailer::Base.smtp_settings = {
|
|
23
|
-
# :address => "localhost",
|
|
24
|
-
# :port => 25,
|
|
25
|
-
# :domain => 'localdomain'
|
|
26
|
-
#}
|
|
23
|
+
#ActionMailer::Base.delivery_method = :smtp
|
|
24
|
+
#ActionMailer::Base.smtp_settings = {
|
|
25
|
+
# :address => "localhost",
|
|
26
|
+
# :port => 25,
|
|
27
|
+
# :domain => 'localdomain'
|
|
28
|
+
#}
|
|
29
|
+
config.active_support.deprecation = :log
|
|
30
|
+
end
|