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.
Files changed (250) hide show
  1. data/Gemfile +16 -4
  2. data/Gemfile.lock +130 -0
  3. data/History.txt +17 -0
  4. data/README.txt +0 -2
  5. data/Rakefile +17 -7
  6. data/app/controllers/absences_controller.rb +1 -2
  7. data/app/controllers/application_controller.rb +13 -14
  8. data/app/controllers/application_controller.rb.rails2 +186 -0
  9. data/app/controllers/estimates_controller.rb +1 -1
  10. data/app/controllers/groups_controller.rb +3 -1
  11. data/app/controllers/periods_controller.rb +61 -50
  12. data/app/controllers/{backlogs_controller.rb → projects_controller.rb} +35 -35
  13. data/app/controllers/search_controller.rb +2 -2
  14. data/app/controllers/tasks_controller.rb +11 -11
  15. data/app/controllers/user_controller.rb +6 -4
  16. data/app/controllers/welcome_controller.rb +4 -4
  17. data/app/controllers/work_locks_controller.rb +2 -2
  18. data/app/controllers/works_controller.rb +31 -31
  19. data/app/helpers/application_helper.rb +2 -2
  20. data/app/helpers/application_helper.rb.rails2 +118 -0
  21. data/app/helpers/periods_helper.rb +3 -3
  22. data/app/helpers/{backlogs_helper.rb → projects_helper.rb} +5 -5
  23. data/app/helpers/user_helper.rb +2 -2
  24. data/app/{models → mailers}/user_notify.rb +1 -0
  25. data/app/models/absence.rb +2 -2
  26. data/{lib → app/models}/clock.rb +0 -0
  27. data/app/models/estimate.rb +2 -2
  28. data/app/models/party.rb +1 -2
  29. data/app/models/period.rb +17 -18
  30. data/app/models/{backlog.rb → project.rb} +2 -2
  31. data/app/models/sidebar.rb +2 -2
  32. data/app/models/task.rb +28 -28
  33. data/app/models/user.rb +5 -4
  34. data/app/models/work.rb +29 -23
  35. data/app/models/work_lock_nagger.rb +1 -1
  36. data/app/models/works_report_filter.rb +4 -4
  37. data/app/views/customers/_name_list.rhtml +1 -1
  38. data/app/views/layouts/_headers.rhtml +2 -1
  39. data/app/views/layouts/_left_top.rhtml +32 -29
  40. data/app/views/layouts/_shortcuts.rhtml +15 -9
  41. data/app/views/layouts/_shortcuts_js.rhtml +4 -4
  42. data/app/views/layouts/mwrt002.html.erb +44 -0
  43. data/app/views/periods/_burn_down_chart.rhtml +1 -1
  44. data/app/views/periods/_show_active.rhtml +3 -3
  45. data/app/views/periods/_title.rhtml +1 -1
  46. data/app/views/{backlogs → projects}/_buttons.rhtml +4 -4
  47. data/app/views/projects/_form.rhtml +44 -0
  48. data/app/views/projects/_name_list.rhtml +5 -0
  49. data/app/views/projects/edit.rhtml +14 -0
  50. data/app/views/{backlogs → projects}/finish_task.rjs +0 -0
  51. data/app/views/projects/list.rhtml +16 -0
  52. data/app/views/{backlogs → projects}/move_task_to_period.rjs +0 -0
  53. data/app/views/{backlogs → projects}/new.rhtml +1 -1
  54. data/app/views/{backlogs → projects}/reopen_task.rjs +0 -0
  55. data/app/views/{backlogs → projects}/show.rhtml +6 -6
  56. data/app/views/search/results.rhtml +3 -3
  57. data/app/views/tasks/_backlog_header.rhtml +4 -4
  58. data/app/views/tasks/_completed.rhtml +2 -2
  59. data/app/views/tasks/_form.rhtml +13 -13
  60. data/app/views/tasks/_task.rhtml +10 -10
  61. data/app/views/tasks/edit.rhtml +1 -1
  62. data/app/views/tasks/list.rhtml +3 -3
  63. data/app/views/tasks/list_started.rhtml +4 -4
  64. data/app/views/tasks/start_work.rjs +1 -1
  65. data/app/views/user/login.rhtml +1 -1
  66. data/app/views/user/signup.rhtml +1 -1
  67. data/app/views/user/welcome.rhtml +1 -1
  68. data/app/views/works/_description_list.rhtml +1 -1
  69. data/app/views/works/_form.rhtml +5 -5
  70. data/app/views/works/_new_row.rhtml +8 -8
  71. data/app/views/works/_row.rhtml +1 -1
  72. data/app/views/works/_task_id_list.rhtml +1 -1
  73. data/app/views/works/daily_work_sheet.rhtml +1 -1
  74. data/app/views/works/list.rhtml +5 -5
  75. data/app/views/works/list_excel.rhtml +2 -2
  76. data/app/views/works/timeliste.rhtml +14 -14
  77. data/app/views/works/weekly_work_sheet.rhtml +5 -5
  78. data/app/views/works/weekly_work_sheet_details.rhtml +5 -5
  79. data/backlog.gemspec +44 -0
  80. data/bin/backlog +5 -1
  81. data/config.ru +4 -0
  82. data/config/application.rb +10 -0
  83. data/config/boot.rb +12 -116
  84. data/config/database.yml +3 -6
  85. data/config/database.yml~ +17 -0
  86. data/config/environment.rb +28 -49
  87. data/config/environments/development.rb +24 -20
  88. data/config/environments/development.rb.rails2 +26 -0
  89. data/config/environments/production.rb +26 -22
  90. data/config/environments/test.rb +20 -15
  91. data/config/environments/user_environment.rb +1 -1
  92. data/config/initializers/backtrace_silencers.rb +7 -0
  93. data/config/initializers/inflections.rb +10 -0
  94. data/config/initializers/jdbc.rb +1 -1
  95. data/config/initializers/mime_types.rb +5 -0
  96. data/config/initializers/secret_token.rb +7 -0
  97. data/config/initializers/session_store.rb +8 -0
  98. data/config/locales/en.yml +22 -11
  99. data/config/locales/no.yml +1 -0
  100. data/config/routes.rb +4 -5
  101. data/cruise_build.sh +6 -2
  102. data/db/migrate/004_add_period.rb +22 -22
  103. data/db/migrate/015_add_user_option.rb +5 -19
  104. data/db/migrate/017_increase_backlog_name_limit.rb +10 -0
  105. data/db/migrate/021_create_work_accounts.rb +0 -2
  106. data/db/migrate/20101006092700_rename_backlogs_to_projects.rb +22 -0
  107. data/db/migrate/20101006092700_rename_backlogs_to_projects.rb~ +22 -0
  108. data/db/schema.rb +27 -30
  109. data/db/seeds.rb +7 -0
  110. data/lib/array_helper.rb +0 -8
  111. data/lib/class_table_inheritance.rb +8 -7
  112. data/lib/tasks/backup.rake +3 -3
  113. data/lib/tasks/jdbc.rake +2 -2
  114. data/lib/version_from_history.rb +1 -1
  115. data/public/404.html +23 -7
  116. data/public/422.html +26 -0
  117. data/public/500.html +23 -6
  118. data/public/images/rails.png +0 -0
  119. data/public/javascripts/controls.js +5 -3
  120. data/public/javascripts/dragdrop.js +7 -6
  121. data/public/javascripts/effects.js +8 -13
  122. data/public/javascripts/prototype.js +3381 -1700
  123. data/public/javascripts/rails.js +175 -0
  124. data/public/robots.txt +5 -1
  125. data/script/rails +6 -0
  126. data/test/client/login.rb +0 -2
  127. data/test/client/login_test.rb +1 -1
  128. data/test/client/setup.rb +25 -24
  129. data/test/fixtures/{backlogs.yml → projects.yml} +2 -2
  130. data/test/fixtures/tasks.yml +9 -9
  131. data/test/fixtures/work_lock_subscriptions.yml +2 -2
  132. data/test/fixtures/works.yml +7 -7
  133. data/test/functional/periods_controller_test.rb +1 -1
  134. data/test/functional/{backlogs_controller_test.rb → projects_controller_test.rb} +22 -21
  135. data/test/functional/search_controller_test.rb +1 -1
  136. data/test/functional/tasks_controller_test.rb +17 -17
  137. data/test/functional/user_controller_test.rb +16 -21
  138. data/test/functional/welcome_controller_test.rb +4 -3
  139. data/test/functional/works_controller_test.rb +5 -5
  140. data/test/integration/user_system_test.rb +1 -1
  141. data/test/mocks/test/clock.rb +1 -1
  142. data/test/performance/browsing_test.rb +9 -0
  143. data/test/performance/common.rb +1 -1
  144. data/test/test_helper.rb +23 -6
  145. data/test/test_helper.rb~ +121 -0
  146. data/test/unit/user_test.rb +3 -3
  147. data/test/unit/work_test.rb +7 -7
  148. data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +0 -2
  149. data/vendor/plugins/{foreign_key_migrations → dynamic_form}/MIT-LICENSE +1 -1
  150. data/vendor/plugins/dynamic_form/README +13 -0
  151. data/vendor/plugins/dynamic_form/Rakefile +10 -0
  152. data/vendor/plugins/dynamic_form/dynamic_form.gemspec +12 -0
  153. data/vendor/plugins/dynamic_form/init.rb +1 -0
  154. data/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +300 -0
  155. data/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +8 -0
  156. data/vendor/plugins/dynamic_form/lib/dynamic_form.rb +5 -0
  157. data/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +42 -0
  158. data/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +370 -0
  159. data/vendor/plugins/dynamic_form/test/test_helper.rb +9 -0
  160. data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
  161. data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
  162. data/vendor/plugins/rails_time/test/debug.log +1 -0
  163. data/vendor/plugins/{redhillonrails_core → verification}/MIT-LICENSE +1 -1
  164. data/vendor/plugins/verification/README +34 -0
  165. data/vendor/plugins/verification/Rakefile +22 -0
  166. data/vendor/plugins/verification/init.rb +3 -0
  167. data/vendor/plugins/verification/lib/action_controller/verification.rb +132 -0
  168. data/vendor/plugins/verification/test/test_helper.rb +18 -0
  169. data/vendor/plugins/verification/test/verification_test.rb +270 -0
  170. data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +1 -1
  171. metadata +115 -134
  172. data/Gemfile~ +0 -4
  173. data/History.txt~ +0 -961
  174. data/LICENSE_LOCALIZATION +0 -20
  175. data/README_LOCALIZATION +0 -61
  176. data/README_RAILS +0 -180
  177. data/app/views/backlogs/_form.rhtml +0 -44
  178. data/app/views/backlogs/_name_list.rhtml +0 -5
  179. data/app/views/backlogs/edit.rhtml +0 -14
  180. data/app/views/backlogs/list.rhtml +0 -16
  181. data/app/views/layouts/mwrt002.rhtml +0 -43
  182. data/config/initializers/mongrel.rb +0 -83
  183. data/config/preinitializer.rb +0 -20
  184. data/config/warble.rb~ +0 -84
  185. data/db/migrate/017_insert_datek_projects.rb +0 -98
  186. data/lib/change_column_null_migration_fix.rb +0 -15
  187. data/no_test.rb~ +0 -6
  188. data/public/dispatch.cgi +0 -10
  189. data/public/dispatch.fcgi +0 -24
  190. data/public/dispatch.rb +0 -10
  191. data/script/about +0 -3
  192. data/script/breakpointer +0 -3
  193. data/script/console +0 -3
  194. data/script/dbconsole +0 -3
  195. data/script/destroy +0 -3
  196. data/script/generate +0 -3
  197. data/script/performance/benchmarker +0 -3
  198. data/script/performance/profiler +0 -3
  199. data/script/plugin +0 -3
  200. data/script/process/inspector +0 -3
  201. data/script/process/reaper +0 -3
  202. data/script/process/spawner +0 -3
  203. data/script/runner +0 -3
  204. data/script/server +0 -3
  205. data/test/client/login.rb~ +0 -33
  206. data/test/mocks/test/user_notify.rb +0 -16
  207. data/vendor/plugins/foreign_key_migrations/CHANGELOG +0 -103
  208. data/vendor/plugins/foreign_key_migrations/README +0 -87
  209. data/vendor/plugins/foreign_key_migrations/about.yml +0 -5
  210. data/vendor/plugins/foreign_key_migrations/init.rb +0 -1
  211. data/vendor/plugins/foreign_key_migrations/install.rb +0 -1
  212. data/vendor/plugins/foreign_key_migrations/lib/foreign_key_migrations.rb +0 -3
  213. data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/base.rb +0 -22
  214. data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/abstract_adapter.rb +0 -22
  215. data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/table_definition.rb +0 -28
  216. data/vendor/plugins/lightwindow_helper/README +0 -33
  217. data/vendor/plugins/lightwindow_helper/assets/images/ajax-loading.gif +0 -0
  218. data/vendor/plugins/lightwindow_helper/assets/images/arrow-down.gif +0 -0
  219. data/vendor/plugins/lightwindow_helper/assets/images/arrow-up.gif +0 -0
  220. data/vendor/plugins/lightwindow_helper/assets/images/black-70.png +0 -0
  221. data/vendor/plugins/lightwindow_helper/assets/images/black.png +0 -0
  222. data/vendor/plugins/lightwindow_helper/assets/images/nextlabel.gif +0 -0
  223. data/vendor/plugins/lightwindow_helper/assets/images/prevlabel.gif +0 -0
  224. data/vendor/plugins/lightwindow_helper/assets/javascripts/lightwindow.js +0 -1921
  225. data/vendor/plugins/lightwindow_helper/assets/stylesheets/lightwindow.css +0 -376
  226. data/vendor/plugins/lightwindow_helper/init.rb +0 -1
  227. data/vendor/plugins/lightwindow_helper/install.rb +0 -7
  228. data/vendor/plugins/lightwindow_helper/lib/lightwindow_helper.rb +0 -31
  229. data/vendor/plugins/redhillonrails_core/CHANGELOG +0 -150
  230. data/vendor/plugins/redhillonrails_core/README +0 -124
  231. data/vendor/plugins/redhillonrails_core/init.rb +0 -19
  232. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb +0 -54
  233. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/abstract_adapter.rb +0 -31
  234. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/column.rb +0 -21
  235. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/foreign_key_definition.rb +0 -26
  236. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/index_definition.rb +0 -11
  237. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_adapter.rb +0 -74
  238. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_column.rb +0 -8
  239. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/postgresql_adapter.rb +0 -99
  240. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb +0 -16
  241. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter.rb +0 -9
  242. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/table_definition.rb +0 -27
  243. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema.rb +0 -27
  244. data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema_dumper.rb +0 -47
  245. data/vendor/plugins/transactional_migrations/CHANGELOG +0 -9
  246. data/vendor/plugins/transactional_migrations/MIT-LICENSE +0 -20
  247. data/vendor/plugins/transactional_migrations/README +0 -15
  248. data/vendor/plugins/transactional_migrations/about.yml +0 -5
  249. data/vendor/plugins/transactional_migrations/init.rb +0 -1
  250. 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 :backlog %></th>
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 backlog, totals in @backlogs %>
33
+ <% for project, totals in @projects %>
34
34
  <tr>
35
35
  <td valign="top">
36
- <%=detour_to(h(backlog.name), :controller => 'backlogs', :action => :show, :id => backlog.id) %>
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[backlog] += total %>
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[backlog])%></td>
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.backlog.track_times?}} %>
5
- <% invoicing = @rows.find {|r| r.find {|w| w && w.backlog.enable_invoicing?}} %>
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 :backlog %></th>
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.backlog.name), :controller => 'backlogs', :action => :show, :id => @work.backlog_id) %>
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.backlog.enable_invoicing? %>
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 %>
@@ -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
+
@@ -53,7 +53,10 @@ def start(config)
53
53
  puts "Unknown status: #{status}. Stopping"
54
54
  exit 2
55
55
  end
56
- `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`
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
 
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Backlog::Application
@@ -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
@@ -1,117 +1,13 @@
1
- # Don't change this file!
2
- # Configure your app in config/environment.rb and config/environments/*.rb
1
+ require 'rubygems'
3
2
 
4
- RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5
-
6
- module Rails
7
- class << self
8
- def boot!
9
- unless booted?
10
- preinitialize
11
- pick_boot.run
12
- end
13
- end
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)
@@ -1,17 +1,14 @@
1
1
  development:
2
2
  adapter: postgresql
3
3
  database: backlog_development
4
- username: root
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: cruisecontrol
9
+ username: postgres
13
10
 
14
11
  production:
15
12
  adapter: postgresql
16
13
  database: backlog_production
17
- username: root
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
@@ -17,20 +17,16 @@ unless '1.9'.respond_to?(:force_encoding)
17
17
  end
18
18
  end
19
19
 
20
- # Specifies gem version of Rails to use when vendor/rails is not present
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
- class Configuration
27
+ module Configuration
32
28
  def database_configuration
33
- db_conf = YAML::load(ERB.new(IO.read(database_configuration_file)).result)
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
- puts "Optional global config file not present (#{APP_CONFIG_FILE})"
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
- class Configuration
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
- if RUBY_PLATFORM !~ /(i386-mswin32|java)/
116
- gem 'slave'
117
- require 'slave'
118
- work_lock_nagger_thread = Slave.object(:async=>true) {WorkLockNagger.new.nag}
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
- # Settings specified here will take precedence over those in config/environment.rb
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.cache_classes = false
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.action_controller.consider_all_requests_local = true
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