backlog 0.36.2 → 0.37.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,20 +0,0 @@
1
- Copyright (c) 2004 Andreas Schwarz
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a
4
- copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included
12
- in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,61 +0,0 @@
1
- == Installation
2
-
3
- After generating the login system, edit your app/controllers/application.rb
4
- and app/helpers/application_helper.rb files. The beginning of your
5
- ApplicationController should look something like this:
6
-
7
- require 'localization'
8
-
9
- class ApplicationController < ActionController::Base
10
- include Localization
11
-
12
- And your ApplicationHelper module should look like this:
13
-
14
- module ApplicationHelper
15
- include Localization
16
-
17
- Additionally, you'll need to includes this module as appropriate to use it
18
- elsewhere, such as in your views. You also need to add the following at the end
19
- of your config/environment.rb file:
20
-
21
- require 'environments/localization_environment'
22
- require 'localization'
23
- Localization::load_localized_strings
24
-
25
- Under the 'enviroments' subdirectory, you'll find localization_environment.rb.
26
- Edit this file as necessary...
27
-
28
- == Requirements
29
-
30
- This module requires iconv support. This is installed by default on most
31
- *nix distributions, but not on Windows.
32
-
33
- You need to put your translations in the files lang/[language].yaml. Then, the
34
- :default_language => [language] configuration variable will ensure that the
35
- appropriate file is loaded.
36
-
37
- == How to use it
38
-
39
- When you want a localized string such as "localized_hello", simply create a new
40
- entry in all supported lannguage YAML files of the form:
41
-
42
- In en.yaml:
43
-
44
- localized_hello: hello
45
-
46
- In sp.yaml:
47
-
48
- localized_hello: hola
49
-
50
- Then in your code, you assign the string as follows:
51
-
52
- str_var = l(:localized_hello)
53
-
54
- In the environments/localization_environment file, set the
55
- configuration variable :default_language to either 'en' or 'sp.' That's it!
56
-
57
- == Changelog
58
-
59
- 1.0.7 Fixed README to indicate dependency on iconv
60
- 1.0.1 Fixed a few problems, including with test suite
61
- 1.0.0 First gem release
@@ -1,180 +0,0 @@
1
- == Welcome to Rails
2
-
3
- Rails is a web-application and persistence framework that includes everything
4
- needed to create database-backed web-applications according to the
5
- Model-View-Control pattern of separation. This pattern splits the view (also
6
- called the presentation) into "dumb" templates that are primarily responsible
7
- for inserting pre-built data in between HTML tags. The model contains the
8
- "smart" domain objects (such as Account, Product, Person, Post) that holds all
9
- the business logic and knows how to persist themselves to a database. The
10
- controller handles the incoming requests (such as Save New Account, Update
11
- Product, Show Post) by manipulating the model and directing data to the view.
12
-
13
- In Rails, the model is handled by what's called an object-relational mapping
14
- layer entitled Active Record. This layer allows you to present the data from
15
- database rows as objects and embellish these data objects with business logic
16
- methods. You can read more about Active Record in
17
- link:files/vendor/rails/activerecord/README.html.
18
-
19
- The controller and view are handled by the Action Pack, which handles both
20
- layers by its two parts: Action View and Action Controller. These two layers
21
- are bundled in a single package due to their heavy interdependence. This is
22
- unlike the relationship between the Active Record and Action Pack that is much
23
- more separate. Each of these packages can be used independently outside of
24
- Rails. You can read more about Action Pack in
25
- link:files/vendor/rails/actionpack/README.html.
26
-
27
-
28
- == Getting started
29
-
30
- 1. Start the web server: <tt>ruby script/server</tt> (run with --help for options)
31
- 2. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!"
32
- 3. Follow the guidelines to start developing your application
33
-
34
-
35
- == Web servers
36
-
37
- Rails uses the built-in web server in Ruby called WEBrick by default, so you don't
38
- have to install or configure anything to play around.
39
-
40
- If you have lighttpd installed, though, it'll be used instead when running script/server.
41
- It's considerably faster than WEBrick and suited for production use, but requires additional
42
- installation and currently only works well on OS X/Unix (Windows users are encouraged
43
- to start with WEBrick). We recommend version 1.4.11 and higher. You can download it from
44
- http://www.lighttpd.net.
45
-
46
- If you want something that's halfway between WEBrick and lighttpd, we heartily recommend
47
- Mongrel. It's a Ruby-based web server with a C-component (so it requires compilation) that
48
- also works very well with Windows. See more at http://mongrel.rubyforge.org/.
49
-
50
- But of course its also possible to run Rails with the premiere open source web server Apache.
51
- To get decent performance, though, you'll need to install FastCGI. For Apache 1.3, you want
52
- to use mod_fastcgi. For Apache 2.0+, you want to use mod_fcgid.
53
-
54
- See http://wiki.rubyonrails.com/rails/pages/FastCGI for more information on FastCGI.
55
-
56
- == Example for Apache conf
57
-
58
- <VirtualHost *:80>
59
- ServerName rails
60
- DocumentRoot /path/application/public/
61
- ErrorLog /path/application/log/server.log
62
-
63
- <Directory /path/application/public/>
64
- Options ExecCGI FollowSymLinks
65
- AllowOverride all
66
- Allow from all
67
- Order allow,deny
68
- </Directory>
69
- </VirtualHost>
70
-
71
- NOTE: Be sure that CGIs can be executed in that directory as well. So ExecCGI
72
- should be on and ".cgi" should respond. All requests from 127.0.0.1 go
73
- through CGI, so no Apache restart is necessary for changes. All other requests
74
- go through FCGI (or mod_ruby), which requires a restart to show changes.
75
-
76
-
77
- == Debugging Rails
78
-
79
- Have "tail -f" commands running on both the server.log, production.log, and
80
- test.log files. Rails will automatically display debugging and runtime
81
- information to these files. Debugging info will also be shown in the browser
82
- on requests from 127.0.0.1.
83
-
84
-
85
- == Breakpoints
86
-
87
- Breakpoint support is available through the script/breakpointer client. This
88
- means that you can break out of execution at any point in the code, investigate
89
- and change the model, AND then resume execution! Example:
90
-
91
- class WeblogController < ActionController::Base
92
- def index
93
- @posts = Post.find_all
94
- breakpoint "Breaking out from the list"
95
- end
96
- end
97
-
98
- So the controller will accept the action, run the first line, then present you
99
- with a IRB prompt in the breakpointer window. Here you can do things like:
100
-
101
- Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint'
102
-
103
- >> @posts.inspect
104
- => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
105
- #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
106
- >> @posts.first.title = "hello from a breakpoint"
107
- => "hello from a breakpoint"
108
-
109
- ...and even better is that you can examine how your runtime objects actually work:
110
-
111
- >> f = @posts.first
112
- => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
113
- >> f.
114
- Display all 152 possibilities? (y or n)
115
-
116
- Finally, when you're ready to resume execution, you press CTRL-D
117
-
118
-
119
- == Console
120
-
121
- You can interact with the domain model by starting the console through script/console.
122
- Here you'll have all parts of the application configured, just like it is when the
123
- application is running. You can inspect domain models, change values, and save to the
124
- database. Starting the script without arguments will launch it in the development environment.
125
- Passing an argument will specify a different environment, like <tt>script/console production</tt>.
126
-
127
-
128
- == Description of contents
129
-
130
- app
131
- Holds all the code that's specific to this particular application.
132
-
133
- app/controllers
134
- Holds controllers that should be named like weblog_controller.rb for
135
- automated URL mapping. All controllers should descend from
136
- ActionController::Base.
137
-
138
- app/models
139
- Holds models that should be named like post.rb.
140
- Most models will descend from ActiveRecord::Base.
141
-
142
- app/views
143
- Holds the template files for the view that should be named like
144
- weblog/index.rhtml for the WeblogController#index action. All views use eRuby
145
- syntax. This directory can also be used to keep stylesheets, images, and so on
146
- that can be symlinked to public.
147
-
148
- app/helpers
149
- Holds view helpers that should be named like weblog_helper.rb.
150
-
151
- app/apis
152
- Holds API classes for web services.
153
-
154
- config
155
- Configuration files for the Rails environment, the routing map, the database, and other dependencies.
156
-
157
- components
158
- Self-contained mini-applications that can bundle together controllers, models, and views.
159
-
160
- db
161
- Contains the database schema in schema.rb. db/migrate contains all
162
- the sequence of Migrations for your schema.
163
-
164
- lib
165
- Application specific libraries. Basically, any kind of custom code that doesn't
166
- belong under controllers, models, or helpers. This directory is in the load path.
167
-
168
- public
169
- The directory available for the web server. Contains subdirectories for images, stylesheets,
170
- and javascripts. Also contains the dispatchers and the default HTML files.
171
-
172
- script
173
- Helper scripts for automation and generation.
174
-
175
- test
176
- Unit and functional tests along with fixtures.
177
-
178
- vendor
179
- External libraries that the application depends on. Also includes the plugins subdirectory.
180
- This directory is in the load path.
@@ -1,44 +0,0 @@
1
- <!--[form:task]-->
2
- <p>
3
- <label for="backlog_name"><%=l :name%></label><br/>
4
- <%= text_field 'backlog', 'name', :maxlength => 64 %>
5
- </p>
6
-
7
- <h3>Options</h3>
8
-
9
- <p>
10
- <%= check_box 'backlog', 'track_times' %>
11
- <label for="backlog_track_times"><%=l :track_times%></label>
12
- </p>
13
-
14
- <p>
15
- <%= check_box 'backlog', 'track_todo' %>
16
- <label for="backlog_track_todo"><%=l :track_todo%></label>
17
- </p>
18
-
19
- <p>
20
- <%= check_box 'backlog', 'enable_subtasks' %>
21
- <label for="backlog_enable_subtasks"><%=l :enable_subtasks%></label>
22
- </p>
23
-
24
- <p>
25
- <%= check_box 'backlog', 'enable_periods' %>
26
- <label for="backlog_enable_periods"><%=l :enable_periods%></label>
27
- </p>
28
-
29
- <p>
30
- <%= check_box 'backlog', 'enable_customer' %>
31
- <label for="backlog_enable_customer"><%=l :enable_customer%></label>
32
- </p>
33
-
34
- <p>
35
- <%= check_box 'backlog', 'enable_users' %>
36
- <label for="backlog_enable_users"><%=l :enable_users%></label>
37
- </p>
38
-
39
- <!--[eoform:task]-->
40
-
41
-
42
- <script type="text/JavaScript">
43
- document.getElementById('backlog_name').focus();
44
- </script>
@@ -1,5 +0,0 @@
1
- <ul class="backlogs">
2
- <% for backlog in @backlogs do -%>
3
- <li class="task"><div class="name"><%=h backlog.name %></div></li>
4
- <% end -%>
5
- </ul>
@@ -1,14 +0,0 @@
1
- <% @page_title = "#{l(:editing)} #{l(:backlog)}" %>
2
-
3
- <div id="spotlight">
4
- <div class="btitle">
5
- <%=render :partial => 'buttons'%>
6
- <h4><%=@backlog.name%></h4>
7
- </div>
8
-
9
- <% form_tag :action => 'update', :id => @backlog do %>
10
- <%=render :partial => 'form' %>
11
- <%=submit_tag l(:save) %>
12
- <%=back_or_link_to l(:back), :action => 'show', :id => @backlog %>
13
- <% end %>
14
- </div>
@@ -1,16 +0,0 @@
1
- <% @page_title = "#{l(:listing)} #{l(:backlogs)}" %>
2
-
3
- <div id="spotlight">
4
- <div class="btitle">
5
- <h4><%=l :backlogs%></h4>
6
- </div>
7
-
8
- <table>
9
- <% i = 0 %>
10
- <% for @backlog in @backlogs %>
11
- <tr>
12
- <td><%=link_to @backlog.name, :action => :show, :id => @backlog.id%></td>
13
- </tr>
14
- <% end %>
15
- </table>
16
- </div>
@@ -1,43 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
-
3
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
- <head>
6
- <%=render :partial => '/layouts/headers' %>
7
- </head>
8
-
9
- <%=render :partial => '/layouts/shortcuts_js'%>
10
-
11
- <body onkeypress="handlePageEvent(event);">
12
- <div id="wrap">
13
- <div id="leftcol">
14
- <%=render :partial => '/layouts/left_top'%>
15
- <div id="content">
16
- <%= yield %>
17
- </div>
18
- </div>
19
- <div id="rightcol">
20
- <%=render :partial => '/layouts/shortcuts'%>
21
-
22
- <% @sidebars = @sidebar.blocks(@period) %>
23
- <% if @sidebars %>
24
- <% @sidebars.each do |sidebar| %>
25
- <div class="rblock" id="sidebar_<%=sidebar[:id]%>">
26
- <div class="btitle">
27
- <% if sidebar[:options] %>
28
- <h4><%= link_to h(sidebar[:title]), sidebar[:options] %></h4>
29
- <% else %>
30
- <h4><%= h(sidebar[:title]) %></h4>
31
- <% end %>
32
- </div>
33
- <%= sidebar[:content] %>
34
- </div>
35
- <% end %>
36
- <% end %>
37
-
38
- </div>
39
- <div id="footer">
40
- <div id="footertext">Copyright &copy; 2006 Kubosch Consulting | All Rights Reserved<br />Design By <a href="http://mywebresource.com" title="Design By MyWebResource">MyWebResource</a> | <a href="http://validator.w3.org/check?uri=referer" title="W3C XHTML 1.0 Strict Compliant">W3C XHTML 1.0</a> | <a href="http://jigsaw.w3.org/css-validator/" title="W3C CSS 2.0 Compliant">W3C CSS 2.0</a></div>
41
- </div>
42
- </body>
43
- </html>
@@ -1,83 +0,0 @@
1
-
2
- if Rails.version == '2.3.8' && self.class.const_defined?(:Mongrel)
3
-
4
- # Pulled right from latest rack. Old looked like this in 1.1.0 version.
5
- #
6
- # def [](k)
7
- # super(@names[k] ||= @names[k.downcase])
8
- # end
9
- #
10
- module Rack
11
- module Utils
12
- class HeaderHash < Hash
13
- def [](k)
14
- super(@names[k]) if @names[k]
15
- super(@names[k.downcase])
16
- end
17
- end
18
- end
19
- end
20
-
21
- # Code pulled from the ticket above.
22
- #
23
- class Mongrel::CGIWrapper
24
- def header_with_rails_fix(options = 'text/html')
25
- @head['cookie'] = options.delete('cookie').flatten.map { |v| v.sub(/^\n/,'') } if options.class != String and options['cookie']
26
- header_without_rails_fix(options)
27
- end
28
- alias_method_chain :header, :rails_fix
29
- end
30
-
31
- # Pulled right from 2.3.8 ActionPack. Simple diff was
32
- #
33
- # if headers.include?('Set-Cookie')
34
- # headers['cookie'] = headers.delete('Set-Cookie').split("\n")
35
- # end
36
- #
37
- # to
38
- #
39
- # if headers['Set-Cookie']
40
- # headers['cookie'] = headers.delete('Set-Cookie').split("\n")
41
- # end
42
- #
43
- module ActionController
44
- class CGIHandler
45
- def self.dispatch_cgi(app, cgi, out = $stdout)
46
- env = cgi.__send__(:env_table)
47
- env.delete "HTTP_CONTENT_LENGTH"
48
- cgi.stdinput.extend ProperStream
49
- env["SCRIPT_NAME"] = "" if env["SCRIPT_NAME"] == "/"
50
- env.update({
51
- "rack.version" => [0,1],
52
- "rack.input" => cgi.stdinput,
53
- "rack.errors" => $stderr,
54
- "rack.multithread" => false,
55
- "rack.multiprocess" => true,
56
- "rack.run_once" => false,
57
- "rack.url_scheme" => ["yes", "on", "1"].include?(env["HTTPS"]) ? "https" : "http"
58
- })
59
- env["QUERY_STRING"] ||= ""
60
- env["HTTP_VERSION"] ||= env["SERVER_PROTOCOL"]
61
- env["REQUEST_PATH"] ||= "/"
62
- env.delete "PATH_INFO" if env["PATH_INFO"] == ""
63
- status, headers, body = app.call(env)
64
- begin
65
- out.binmode if out.respond_to?(:binmode)
66
- out.sync = false if out.respond_to?(:sync=)
67
- headers['Status'] = status.to_s
68
- if headers['Set-Cookie']
69
- headers['cookie'] = headers.delete('Set-Cookie').split("\n")
70
- end
71
- out.write(cgi.header(headers))
72
- body.each { |part|
73
- out.write part
74
- out.flush if out.respond_to?(:flush)
75
- }
76
- ensure
77
- body.close if body.respond_to?(:close)
78
- end
79
- end
80
- end
81
- end
82
-
83
- end