serum-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +3 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +42 -0
  6. data/LICENSE +22 -0
  7. data/README.md +40 -0
  8. data/bin/serum-rails +13 -0
  9. data/lib/serum/rails/app.rb +50 -0
  10. data/lib/serum/rails/code_scanner.rb +49 -0
  11. data/lib/serum/rails/metrics.rb +118 -0
  12. data/lib/serum/rails/type_selection.rb +31 -0
  13. data/lib/serum/rails/version.rb +7 -0
  14. data/lib/serum-rails.rb +5 -0
  15. data/serum-rails.gemspec +23 -0
  16. data/spec/serum/rails/metrics_spec.rb +87 -0
  17. data/spec/spec_helper.rb +80 -0
  18. data/spec/test_app/Capfile +4 -0
  19. data/spec/test_app/Gemfile +54 -0
  20. data/spec/test_app/Gemfile.lock +163 -0
  21. data/spec/test_app/Rakefile +11 -0
  22. data/spec/test_app/app/controllers/admin/categories_controller.rb +17 -0
  23. data/spec/test_app/app/controllers/admin/users_controller.rb +30 -0
  24. data/spec/test_app/app/controllers/application_controller/i18n_trait.rb +24 -0
  25. data/spec/test_app/app/controllers/application_controller/navigation_trait.rb +19 -0
  26. data/spec/test_app/app/controllers/application_controller/security_trait/disabled_clearance_accounts_trait.rb +41 -0
  27. data/spec/test_app/app/controllers/application_controller/security_trait.rb +65 -0
  28. data/spec/test_app/app/controllers/application_controller.rb +13 -0
  29. data/spec/test_app/app/controllers/conferences_controller.rb +67 -0
  30. data/spec/test_app/app/controllers/friendship_requests_controller.rb +31 -0
  31. data/spec/test_app/app/controllers/invitations_controller.rb +39 -0
  32. data/spec/test_app/app/controllers/members_controller.rb +21 -0
  33. data/spec/test_app/app/controllers/passwords_controller.rb +33 -0
  34. data/spec/test_app/app/controllers/sessions_controller.rb +17 -0
  35. data/spec/test_app/app/controllers/shared/boring_controller_trait/deletable_trait.rb +23 -0
  36. data/spec/test_app/app/controllers/shared/boring_controller_trait/flash_trait.rb +23 -0
  37. data/spec/test_app/app/controllers/shared/boring_controller_trait/helpers_trait.rb +35 -0
  38. data/spec/test_app/app/controllers/shared/boring_controller_trait/index_trait.rb +39 -0
  39. data/spec/test_app/app/controllers/shared/boring_controller_trait/log_changes_trait.rb +18 -0
  40. data/spec/test_app/app/controllers/shared/boring_controller_trait.rb +16 -0
  41. data/spec/test_app/app/controllers/users_controller.rb +49 -0
  42. data/spec/test_app/app/controllers/ws/api_controller/formatters_trait.rb +91 -0
  43. data/spec/test_app/app/controllers/ws/api_controller/parsers_trait.rb +59 -0
  44. data/spec/test_app/app/controllers/ws/api_controller.rb +70 -0
  45. data/spec/test_app/app/controllers/ws/attendees_controller.rb +43 -0
  46. data/spec/test_app/app/controllers/ws/categories_controller.rb +30 -0
  47. data/spec/test_app/app/controllers/ws/conferences_controller.rb +62 -0
  48. data/spec/test_app/app/controllers/ws/contacts_controller.rb +41 -0
  49. data/spec/test_app/app/controllers/ws/factory_controller.rb +45 -0
  50. data/spec/test_app/app/controllers/ws/members_controller.rb +34 -0
  51. data/spec/test_app/app/controllers/ws/series_controller.rb +19 -0
  52. data/spec/test_app/app/controllers/ws/tests_controller.rb +23 -0
  53. data/spec/test_app/app/helpers/application_helper.rb +180 -0
  54. data/spec/test_app/app/helpers/mail_helper.rb +9 -0
  55. data/spec/test_app/app/helpers/tags_helper.rb +16 -0
  56. data/spec/test_app/app/helpers/user_helper.rb +23 -0
  57. data/spec/test_app/app/models/attendance.rb +11 -0
  58. data/spec/test_app/app/models/category/ancestry_trait.rb +23 -0
  59. data/spec/test_app/app/models/category.rb +25 -0
  60. data/spec/test_app/app/models/conference/attendance_trait.rb +23 -0
  61. data/spec/test_app/app/models/conference/categories_trait.rb +26 -0
  62. data/spec/test_app/app/models/conference/icalendar_trait.rb +36 -0
  63. data/spec/test_app/app/models/conference/search_trait.rb +44 -0
  64. data/spec/test_app/app/models/conference.rb +24 -0
  65. data/spec/test_app/app/models/conference_category.rb +6 -0
  66. data/spec/test_app/app/models/conference_search.rb +51 -0
  67. data/spec/test_app/app/models/error.rb +25 -0
  68. data/spec/test_app/app/models/friendship.rb +14 -0
  69. data/spec/test_app/app/models/friendship_request.rb +19 -0
  70. data/spec/test_app/app/models/invitation.rb +38 -0
  71. data/spec/test_app/app/models/member_search.rb +18 -0
  72. data/spec/test_app/app/models/navigation.rb +38 -0
  73. data/spec/test_app/app/models/patterns.rb +14 -0
  74. data/spec/test_app/app/models/permissions.rb +106 -0
  75. data/spec/test_app/app/models/shared/afterlife_trait.rb +18 -0
  76. data/spec/test_app/app/models/shared/choice_trait.rb +37 -0
  77. data/spec/test_app/app/models/shared/deletable_trait.rb +8 -0
  78. data/spec/test_app/app/models/shared/flag_trait.rb +30 -0
  79. data/spec/test_app/app/models/shared/indestructible_trait.rb +19 -0
  80. data/spec/test_app/app/models/shared/list_field_trait.rb +70 -0
  81. data/spec/test_app/app/models/shared/person_name_trait.rb +25 -0
  82. data/spec/test_app/app/models/shared/searchable_trait.rb +71 -0
  83. data/spec/test_app/app/models/shared/sortable_trait.rb +24 -0
  84. data/spec/test_app/app/models/user/authentication_trait.rb +33 -0
  85. data/spec/test_app/app/models/user/authorization_trait.rb +17 -0
  86. data/spec/test_app/app/models/user/friends_trait.rb +42 -0
  87. data/spec/test_app/app/models/user/search_trait.rb +43 -0
  88. data/spec/test_app/app/models/user.rb +61 -0
  89. data/spec/test_app/app/models/util.rb +19 -0
  90. data/spec/test_app/app/views/admin/categories/_form.html.haml +18 -0
  91. data/spec/test_app/app/views/admin/categories/_list.html.haml +17 -0
  92. data/spec/test_app/app/views/admin/categories/edit.html.haml +6 -0
  93. data/spec/test_app/app/views/admin/categories/index.html.haml +6 -0
  94. data/spec/test_app/app/views/admin/categories/new.html.haml +6 -0
  95. data/spec/test_app/app/views/admin/categories/show.html.haml +27 -0
  96. data/spec/test_app/app/views/admin/users/_form.html.haml +49 -0
  97. data/spec/test_app/app/views/admin/users/_head.html.haml +5 -0
  98. data/spec/test_app/app/views/admin/users/_list.html.haml +20 -0
  99. data/spec/test_app/app/views/admin/users/_search.html.haml +9 -0
  100. data/spec/test_app/app/views/admin/users/deleted.html.haml +5 -0
  101. data/spec/test_app/app/views/admin/users/edit.html.haml +5 -0
  102. data/spec/test_app/app/views/admin/users/index.html.haml +7 -0
  103. data/spec/test_app/app/views/admin/users/new.html.haml +6 -0
  104. data/spec/test_app/app/views/clearance_mailer/change_password.erb +9 -0
  105. data/spec/test_app/app/views/conferences/_categories_list.html.haml +8 -0
  106. data/spec/test_app/app/views/conferences/_form.html.haml +32 -0
  107. data/spec/test_app/app/views/conferences/_head.html.haml +4 -0
  108. data/spec/test_app/app/views/conferences/_list.html.haml +22 -0
  109. data/spec/test_app/app/views/conferences/_search.html.haml +24 -0
  110. data/spec/test_app/app/views/conferences/edit.html.haml +8 -0
  111. data/spec/test_app/app/views/conferences/index.html.haml +22 -0
  112. data/spec/test_app/app/views/conferences/new.html.haml +9 -0
  113. data/spec/test_app/app/views/conferences/search.html.haml +7 -0
  114. data/spec/test_app/app/views/conferences/show.html.haml +78 -0
  115. data/spec/test_app/app/views/invitations/index.html.haml +26 -0
  116. data/spec/test_app/app/views/invitations/new.html.haml +22 -0
  117. data/spec/test_app/app/views/layouts/_flashes.html.haml +13 -0
  118. data/spec/test_app/app/views/layouts/_javascript_requirement.html.haml +8 -0
  119. data/spec/test_app/app/views/layouts/_javascripts.html.haml +4 -0
  120. data/spec/test_app/app/views/layouts/_notifications.html.haml +11 -0
  121. data/spec/test_app/app/views/layouts/_session_navigation.html.haml +12 -0
  122. data/spec/test_app/app/views/layouts/_stylesheets.html.haml +6 -0
  123. data/spec/test_app/app/views/layouts/screen.html.haml +30 -0
  124. data/spec/test_app/app/views/members/index.html.haml +40 -0
  125. data/spec/test_app/app/views/passwords/edit.html.haml +21 -0
  126. data/spec/test_app/app/views/passwords/new.html.haml +14 -0
  127. data/spec/test_app/app/views/sessions/new.html.haml +19 -0
  128. data/spec/test_app/app/views/users/_form.html.haml +45 -0
  129. data/spec/test_app/app/views/users/_head.html.haml +3 -0
  130. data/spec/test_app/app/views/users/edit.html.haml +5 -0
  131. data/spec/test_app/app/views/users/new.html.haml +6 -0
  132. data/spec/test_app/app/views/users/show.html.haml +49 -0
  133. data/spec/test_app/assets/data.json +981 -0
  134. data/spec/test_app/config/boot.rb +125 -0
  135. data/spec/test_app/config/cucumber.yml +8 -0
  136. data/spec/test_app/config/database.sample.yml +24 -0
  137. data/spec/test_app/config/deploy/production.rb +9 -0
  138. data/spec/test_app/config/deploy.rb +100 -0
  139. data/spec/test_app/config/environment.rb +27 -0
  140. data/spec/test_app/config/environments/cucumber.rb +28 -0
  141. data/spec/test_app/config/environments/development.rb +22 -0
  142. data/spec/test_app/config/environments/production.rb +35 -0
  143. data/spec/test_app/config/environments/test.rb +30 -0
  144. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  145. data/spec/test_app/config/initializers/clearance.rb +5 -0
  146. data/spec/test_app/config/initializers/collect_hash.rb +23 -0
  147. data/spec/test_app/config/initializers/collection_path_with_params.rb +18 -0
  148. data/spec/test_app/config/initializers/cookie_verification_secret.rb +10 -0
  149. data/spec/test_app/config/initializers/form_builder.rb +166 -0
  150. data/spec/test_app/config/initializers/inflections.rb +10 -0
  151. data/spec/test_app/config/initializers/invert_ordered_hash.rb +12 -0
  152. data/spec/test_app/config/initializers/localize_textfield_input_for_numbers.rb +30 -0
  153. data/spec/test_app/config/initializers/mime_types.rb +7 -0
  154. data/spec/test_app/config/initializers/new_rails_defaults.rb +21 -0
  155. data/spec/test_app/config/initializers/preload_associations.rb +7 -0
  156. data/spec/test_app/config/initializers/query_diet.rb +6 -0
  157. data/spec/test_app/config/initializers/saner_field_with_errors.rb +5 -0
  158. data/spec/test_app/config/initializers/session_store.rb +18 -0
  159. data/spec/test_app/config/locales/en.yml +231 -0
  160. data/spec/test_app/config/preinitializer.rb +22 -0
  161. data/spec/test_app/config/routes.rb +47 -0
  162. data/spec/test_app/db/migrate/20110114164517_initial_tables.rb +52 -0
  163. data/spec/test_app/db/migrate/20110118090858_add_profile_fields_to_user.rb +15 -0
  164. data/spec/test_app/db/migrate/20110118092741_create_conference.rb +20 -0
  165. data/spec/test_app/db/migrate/20110118093503_create_category.rb +17 -0
  166. data/spec/test_app/db/migrate/20110118104438_create_conference_category.rb +16 -0
  167. data/spec/test_app/db/migrate/20110118105959_create_attendance.rb +17 -0
  168. data/spec/test_app/db/migrate/20110118122324_create_friendship_requests.rb +15 -0
  169. data/spec/test_app/db/migrate/20110118162436_create_invitation.rb +16 -0
  170. data/spec/test_app/db/migrate/20110118170347_create_friendships.rb +15 -0
  171. data/spec/test_app/db/migrate/20110118193528_add_timestamps_to_conference.rb +12 -0
  172. data/spec/test_app/db/migrate/20110119075012_set_unique_index_on_username_for_user.rb +11 -0
  173. data/spec/test_app/db/migrate/20110119093458_remove_first_and_last_name_from_user.rb +12 -0
  174. data/spec/test_app/db/migrate/20110119110857_add_missing_indexes.rb +23 -0
  175. data/spec/test_app/db/migrate/20110119115751_add_uniqueness_of_name_to_category.rb +9 -0
  176. data/spec/test_app/db/seeds.rb +5 -0
  177. data/spec/test_app/lib/scripts/create_many_users_sql.rb +14 -0
  178. data/spec/test_app/lib/tasks/cucumber.rake +53 -0
  179. data/spec/test_app/lib/tasks/pending_migrations.rake +24 -0
  180. data/spec/test_app/lib/tasks/rcov.rake +42 -0
  181. data/spec/test_app/lib/tasks/rspec.rake +144 -0
  182. data/spec/test_app/public/404.html +30 -0
  183. data/spec/test_app/public/422.html +30 -0
  184. data/spec/test_app/public/500.html +30 -0
  185. data/spec/test_app/public/favicon.ico +0 -0
  186. data/spec/test_app/public/images/ajax-loader.gif +0 -0
  187. data/spec/test_app/public/images/icons/balloon-quotation.png +0 -0
  188. data/spec/test_app/public/images/icons/balloon-sound.png +0 -0
  189. data/spec/test_app/public/images/icons/balloon.png +0 -0
  190. data/spec/test_app/public/images/icons/bell.png +0 -0
  191. data/spec/test_app/public/images/icons/bin.png +0 -0
  192. data/spec/test_app/public/images/icons/bookmark.png +0 -0
  193. data/spec/test_app/public/images/icons/cake.png +0 -0
  194. data/spec/test_app/public/images/icons/calendar-blue.png +0 -0
  195. data/spec/test_app/public/images/icons/calendar-month.png +0 -0
  196. data/spec/test_app/public/images/icons/calendar-month_light.png +0 -0
  197. data/spec/test_app/public/images/icons/calendar-select.png +0 -0
  198. data/spec/test_app/public/images/icons/card-address.png +0 -0
  199. data/spec/test_app/public/images/icons/cards-address.png +0 -0
  200. data/spec/test_app/public/images/icons/cross-script.png +0 -0
  201. data/spec/test_app/public/images/icons/cross-small.png +0 -0
  202. data/spec/test_app/public/images/icons/cross.png +0 -0
  203. data/spec/test_app/public/images/icons/crown-silver.png +0 -0
  204. data/spec/test_app/public/images/icons/crown.png +0 -0
  205. data/spec/test_app/public/images/icons/dashboard.png +0 -0
  206. data/spec/test_app/public/images/icons/document-list.png +0 -0
  207. data/spec/test_app/public/images/icons/document-node.png +0 -0
  208. data/spec/test_app/public/images/icons/document-number.png +0 -0
  209. data/spec/test_app/public/images/icons/document-stamp.png +0 -0
  210. data/spec/test_app/public/images/icons/document-task.png +0 -0
  211. data/spec/test_app/public/images/icons/document-text.png +0 -0
  212. data/spec/test_app/public/images/icons/fire.png +0 -0
  213. data/spec/test_app/public/images/icons/folder-medium.png +0 -0
  214. data/spec/test_app/public/images/icons/folder.png +0 -0
  215. data/spec/test_app/public/images/icons/gear.png +0 -0
  216. data/spec/test_app/public/images/icons/globe-green.png +0 -0
  217. data/spec/test_app/public/images/icons/globe-green_light.png +0 -0
  218. data/spec/test_app/public/images/icons/globe-medium-green.png +0 -0
  219. data/spec/test_app/public/images/icons/heart-break.png +0 -0
  220. data/spec/test_app/public/images/icons/heart.png +0 -0
  221. data/spec/test_app/public/images/icons/images-flickr.png +0 -0
  222. data/spec/test_app/public/images/icons/information-balloon.png +0 -0
  223. data/spec/test_app/public/images/icons/key.png +0 -0
  224. data/spec/test_app/public/images/icons/light-bulb.png +0 -0
  225. data/spec/test_app/public/images/icons/lock--exclamation.png +0 -0
  226. data/spec/test_app/public/images/icons/lock.png +0 -0
  227. data/spec/test_app/public/images/icons/magnifier-medium.png +0 -0
  228. data/spec/test_app/public/images/icons/magnifier.png +0 -0
  229. data/spec/test_app/public/images/icons/mail.png +0 -0
  230. data/spec/test_app/public/images/icons/paper-clip-small.png +0 -0
  231. data/spec/test_app/public/images/icons/paper-clip.png +0 -0
  232. data/spec/test_app/public/images/icons/pencil.png +0 -0
  233. data/spec/test_app/public/images/icons/plus-circle.png +0 -0
  234. data/spec/test_app/public/images/icons/plus-small.png +0 -0
  235. data/spec/test_app/public/images/icons/plus.png +0 -0
  236. data/spec/test_app/public/images/icons/printer.png +0 -0
  237. data/spec/test_app/public/images/icons/question-balloon.png +0 -0
  238. data/spec/test_app/public/images/icons/question-white.png +0 -0
  239. data/spec/test_app/public/images/icons/question.png +0 -0
  240. data/spec/test_app/public/images/icons/quill.png +0 -0
  241. data/spec/test_app/public/images/icons/robot.png +0 -0
  242. data/spec/test_app/public/images/icons/ruby_16.png +0 -0
  243. data/spec/test_app/public/images/icons/ruby_2_16.png +0 -0
  244. data/spec/test_app/public/images/icons/ruby_32.png +0 -0
  245. data/spec/test_app/public/images/icons/show.png +0 -0
  246. data/spec/test_app/public/images/icons/star.png +0 -0
  247. data/spec/test_app/public/images/icons/sticky-note-text.png +0 -0
  248. data/spec/test_app/public/images/icons/telephone-fax.png +0 -0
  249. data/spec/test_app/public/images/icons/telephone-fax_light.png +0 -0
  250. data/spec/test_app/public/images/icons/telephone.png +0 -0
  251. data/spec/test_app/public/images/icons/telephone_light.png +0 -0
  252. data/spec/test_app/public/images/icons/thumb-up.png +0 -0
  253. data/spec/test_app/public/images/icons/thumb.png +0 -0
  254. data/spec/test_app/public/images/icons/tick.png +0 -0
  255. data/spec/test_app/public/images/icons/trophy-silver.png +0 -0
  256. data/spec/test_app/public/images/icons/trophy.png +0 -0
  257. data/spec/test_app/public/images/icons/user-gray.png +0 -0
  258. data/spec/test_app/public/images/icons/user-gray_gray.png +0 -0
  259. data/spec/test_app/public/images/icons/user-medium.png +0 -0
  260. data/spec/test_app/public/images/icons/user-red.png +0 -0
  261. data/spec/test_app/public/images/icons/users.png +0 -0
  262. data/spec/test_app/public/images/icons/users_gray.png +0 -0
  263. data/spec/test_app/public/images/icons/xfn.png +0 -0
  264. data/spec/test_app/public/images/legend_bg.png +0 -0
  265. data/spec/test_app/public/images/poshytip/tip-deepgray.png +0 -0
  266. data/spec/test_app/public/images/poshytip/tip-deepgray_arrows.png +0 -0
  267. data/spec/test_app/public/images/stripes_bottom_dark.png +0 -0
  268. data/spec/test_app/public/images/stripes_top_dark.png +0 -0
  269. data/spec/test_app/public/images/ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  270. data/spec/test_app/public/images/ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  271. data/spec/test_app/public/images/ui/ui-bg_flat_10_000000_40x100.png +0 -0
  272. data/spec/test_app/public/images/ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  273. data/spec/test_app/public/images/ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  274. data/spec/test_app/public/images/ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  275. data/spec/test_app/public/images/ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  276. data/spec/test_app/public/images/ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  277. data/spec/test_app/public/images/ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  278. data/spec/test_app/public/images/ui/ui-icons_222222_256x240.png +0 -0
  279. data/spec/test_app/public/images/ui/ui-icons_228ef1_256x240.png +0 -0
  280. data/spec/test_app/public/images/ui/ui-icons_ef8c08_256x240.png +0 -0
  281. data/spec/test_app/public/images/ui/ui-icons_ffd27a_256x240.png +0 -0
  282. data/spec/test_app/public/images/ui/ui-icons_ffffff_256x240.png +0 -0
  283. data/spec/test_app/public/javascripts/application.js +175 -0
  284. data/spec/test_app/public/javascripts/lib/jquery-1.4.2.min.js +154 -0
  285. data/spec/test_app/public/javascripts/lib/jquery-ui-1.8.5.custom.min.js +249 -0
  286. data/spec/test_app/public/javascripts/lib/jquery-ui-1.8.5.custom.min.txt +9 -0
  287. data/spec/test_app/public/javascripts/lib/jquery-ui-timepicker-addon.js +682 -0
  288. data/spec/test_app/public/javascripts/lib/jquery-ui-timepicker-addon.min.js +22 -0
  289. data/spec/test_app/public/javascripts/lib/jquery.elastic.js +6 -0
  290. data/spec/test_app/public/javascripts/lib/jquery.elastic.performance.js +128 -0
  291. data/spec/test_app/public/javascripts/lib/jquery.elastic.source.js +117 -0
  292. data/spec/test_app/public/javascripts/lib/jquery.poshytip.js +414 -0
  293. data/spec/test_app/public/javascripts/lib/jquery.poshytip.min.js +7 -0
  294. data/spec/test_app/public/javascripts/lib/jquery.ui.datepicker-de.js +23 -0
  295. data/spec/test_app/public/javascripts/lib/jrails.js +1 -0
  296. data/spec/test_app/public/javascripts/lib/multiple-autocomplete.js +39 -0
  297. data/spec/test_app/public/javascripts/lib/underscore-min.js +17 -0
  298. data/spec/test_app/public/javascripts/lib/underscore.js +704 -0
  299. data/spec/test_app/public/robots.txt +5 -0
  300. data/spec/test_app/public/stylesheets/lib/PIE.htc +77 -0
  301. data/spec/test_app/public/stylesheets/lib/PIE_uncompressed.htc +3064 -0
  302. data/spec/test_app/public/stylesheets/lib/jquery-ui-timepicker-addon.css +11 -0
  303. data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray.css +62 -0
  304. data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray.png +0 -0
  305. data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray_arrows.png +0 -0
  306. data/spec/test_app/public/stylesheets/lib/poshytip/tip-deepgray/tip-deepgray.css +64 -0
  307. data/spec/test_app/public/stylesheets/lib/poshytip/tip-green/tip-green.css +57 -0
  308. data/spec/test_app/public/stylesheets/lib/poshytip/tip-green/tip-green_arrows.gif +0 -0
  309. data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue.css +58 -0
  310. data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue.png +0 -0
  311. data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue_arrows.png +0 -0
  312. data/spec/test_app/public/stylesheets/lib/poshytip/tip-twitter/tip-twitter.css +59 -0
  313. data/spec/test_app/public/stylesheets/lib/poshytip/tip-twitter/tip-twitter_arrows.gif +0 -0
  314. data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet.css +60 -0
  315. data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet.png +0 -0
  316. data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet_arrows.png +0 -0
  317. data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow.css +60 -0
  318. data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow.png +0 -0
  319. data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow_arrows.png +0 -0
  320. data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellowsimple/tip-yellowsimple.css +60 -0
  321. data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellowsimple/tip-yellowsimple_arrows.gif +0 -0
  322. data/spec/test_app/public/stylesheets/lib/ui-lightness/jquery-ui-1.8.5.custom.css +459 -0
  323. data/spec/test_app/public/stylesheets/sass/_mixins.sass +79 -0
  324. data/spec/test_app/public/stylesheets/sass/_reset.sass +40 -0
  325. data/spec/test_app/public/stylesheets/sass/print.sass +22 -0
  326. data/spec/test_app/public/stylesheets/sass/screen.sass +866 -0
  327. data/spec/test_app/script/about +4 -0
  328. data/spec/test_app/script/autospec +6 -0
  329. data/spec/test_app/script/console +3 -0
  330. data/spec/test_app/script/cucumber +10 -0
  331. data/spec/test_app/script/dbconsole +3 -0
  332. data/spec/test_app/script/destroy +3 -0
  333. data/spec/test_app/script/generate +3 -0
  334. data/spec/test_app/script/performance/benchmarker +3 -0
  335. data/spec/test_app/script/performance/profiler +3 -0
  336. data/spec/test_app/script/plugin +3 -0
  337. data/spec/test_app/script/runner +3 -0
  338. data/spec/test_app/script/server +3 -0
  339. data/spec/test_app/script/spec +10 -0
  340. metadata +748 -0
@@ -0,0 +1,30 @@
1
+ # Allow to use either commas or periods in number fields with decimal values.
2
+ # origin: RM
3
+ ActiveRecord::Base.class_eval do
4
+
5
+ def convert_number_column_value_with_comma_separator(value)
6
+ value = convert_number_column_value_without_comma_separator(value)
7
+ if value.is_a?(String)
8
+ value = value.gsub(',', '.')
9
+ end
10
+ value
11
+ end
12
+
13
+ alias_method_chain :convert_number_column_value, :comma_separator
14
+
15
+ end
16
+
17
+
18
+ ActiveRecord::ConnectionAdapters::Column.class_eval do
19
+
20
+ def type_cast_with_comma_separator(value)
21
+ if type == :decimal && value.is_a?(String)
22
+ value = value.gsub(',', '.')
23
+ end
24
+ type_cast_without_comma_separator(value)
25
+ end
26
+
27
+ alias_method_chain :type_cast, :comma_separator
28
+
29
+ end
30
+
@@ -0,0 +1,7 @@
1
+ # Add new mime types for use in respond_to blocks:
2
+ # Mime::Type.register "text/richtext", :rtf
3
+ # Mime::Type.register_alias "text/html", :iphone
4
+ # Be sure to restart your server when you modify this file.
5
+ # origin: GM
6
+
7
+ Mime::Type.register "text/calendar", :ics
@@ -0,0 +1,21 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # These settings change the behavior of Rails 2 apps and will be defaults
4
+ # for Rails 3. You can remove this initializer when Rails 3 is released.
5
+
6
+ if defined?(ActiveRecord)
7
+ # Include Active Record class name as root for JSON serialized output.
8
+ ActiveRecord::Base.include_root_in_json = true
9
+
10
+ # Store the full class name (including module namespace) in STI type column.
11
+ ActiveRecord::Base.store_full_sti_class = true
12
+ end
13
+
14
+ ActionController::Routing.generate_best_match = false
15
+
16
+ # Use ISO 8601 format for JSON serialized times and dates.
17
+ ActiveSupport.use_standard_json_time_format = true
18
+
19
+ # Don't escape HTML entities in JSON, leave that for the #json_escape helper.
20
+ # if you're including raw json in an HTML page.
21
+ ActiveSupport.escape_html_entities_in_json = false
@@ -0,0 +1,7 @@
1
+ # Allows to reload already loaded records.
2
+ # origin: RM
3
+ ActiveRecord::Base.class_eval do
4
+ class << self
5
+ public :preload_associations
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ # Configure query_diet so it displays the number of database queries during development.
2
+ # origin: RM
3
+ if defined?(QueryDiet)
4
+ QueryDiet::Logger.bad_count = 12
5
+ # QueryDiet::Logger.bad_time = 5000
6
+ end
@@ -0,0 +1,5 @@
1
+ # Configure a nicer display of validation errors in model forms.
2
+ # origin: RM
3
+ ActionView::Base.field_error_proc = proc do |inner_html, instance|
4
+ "<span class='field_with_errors'>#{inner_html}</span>".html_safe
5
+ end
@@ -0,0 +1,18 @@
1
+ # Secret for session cookie signature.
2
+ # origin: GM
3
+
4
+ # Be sure to restart your server when you modify this file.
5
+
6
+ # Your secret key for verifying cookie session data integrity.
7
+ # If you change this key, all old sessions will become invalid!
8
+ # Make sure the secret is at least 30 characters and all random,
9
+ # no regular words or you'll be exposed to dictionary attacks.
10
+ ActionController::Base.session = {
11
+ :key => '_platforms_session',
12
+ :secret => 'UEUO6F-2rGvY~^W#1*8v)4+MV8Y`IYwzJ@ghAkVn?7Z9fz1#-2xwLGni9Pu%Os/Vxm>Nc+{&jU!9\[ARM!W+0owU7q@n$v<hqT1.|-Y,sF.?!AwI~7q[hngM<mLsnVN2'
13
+ }
14
+
15
+ # Use the database for sessions instead of the cookie-based default,
16
+ # which shouldn't be used to store highly confidential information
17
+ # (create the session table with "rake db:sessions:create")
18
+ # ActionController::Base.session_store = :active_record_store
@@ -0,0 +1,231 @@
1
+ # Localization strings for texts generated by the Rails framework.
2
+ # origin: RM
3
+ en:
4
+ date:
5
+ formats:
6
+ # Use the strftime parameters for formats.
7
+ # When no format has been given, it uses default.
8
+ # You can provide other formats here if you like!
9
+ default: "%d.%m.%Y"
10
+ short: "%b %d"
11
+ long: "%B %d, %Y"
12
+
13
+ day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
14
+ abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
15
+
16
+ # Don't forget the nil at the beginning; there's no such thing as a 0th month
17
+ month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
18
+ abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
19
+ # Used in date_select and datime_select.
20
+ order: [ :year, :month, :day ]
21
+
22
+ time:
23
+ formats:
24
+ default: "%a, %d %b %Y %H:%M:%S %z"
25
+ short: "%d %b %H:%M"
26
+ long: "%B %d, %Y %H:%M"
27
+ am: "am"
28
+ pm: "pm"
29
+
30
+ # Used in array.to_sentence.
31
+ support:
32
+ array:
33
+ words_connector: ", "
34
+ two_words_connector: " and "
35
+ last_word_connector: ", and "
36
+
37
+ number:
38
+ # Used in number_with_delimiter()
39
+ # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
40
+ format:
41
+ # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
42
+ separator: "."
43
+ # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
44
+ delimiter: ","
45
+ # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
46
+ precision: 3
47
+
48
+ # Used in number_to_currency()
49
+ currency:
50
+ format:
51
+ # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
52
+ format: "%u%n"
53
+ unit: "$"
54
+ # These three are to override number.format and are optional
55
+ separator: "."
56
+ delimiter: ","
57
+ precision: 2
58
+
59
+ # Used in number_to_percentage()
60
+ percentage:
61
+ format:
62
+ # These three are to override number.format and are optional
63
+ # separator:
64
+ delimiter: ""
65
+ # precision:
66
+
67
+ # Used in number_to_precision()
68
+ precision:
69
+ format:
70
+ # These three are to override number.format and are optional
71
+ # separator:
72
+ delimiter: ""
73
+ # precision:
74
+
75
+ # Used in number_to_human_size()
76
+ human:
77
+ format:
78
+ # These three are to override number.format and are optional
79
+ # separator:
80
+ delimiter: ""
81
+ precision: 1
82
+ storage_units:
83
+ # Storage units output formatting.
84
+ # %u is the storage unit, %n is the number (default: 2 MB)
85
+ format: "%n %u"
86
+ units:
87
+ byte:
88
+ one: "Byte"
89
+ other: "Bytes"
90
+ kb: "KB"
91
+ mb: "MB"
92
+ gb: "GB"
93
+ tb: "TB"
94
+
95
+ # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
96
+ datetime:
97
+ distance_in_words:
98
+ half_a_minute: "half a minute"
99
+ less_than_x_seconds:
100
+ one: "less than 1 second"
101
+ other: "less than %{count} seconds"
102
+ x_seconds:
103
+ one: "1 second"
104
+ other: "%{count} seconds"
105
+ less_than_x_minutes:
106
+ one: "less than a minute"
107
+ other: "less than %{count} minutes"
108
+ x_minutes:
109
+ one: "1 minute"
110
+ other: "%{count} minutes"
111
+ about_x_hours:
112
+ one: "about 1 hour"
113
+ other: "about %{count} hours"
114
+ x_days:
115
+ one: "1 day"
116
+ other: "%{count} days"
117
+ about_x_months:
118
+ one: "about 1 month"
119
+ other: "about %{count} months"
120
+ x_months:
121
+ one: "1 month"
122
+ other: "%{count} months"
123
+ about_x_years:
124
+ one: "about 1 year"
125
+ other: "about %{count} years"
126
+ over_x_years:
127
+ one: "over 1 year"
128
+ other: "over %{count} years"
129
+ almost_x_years:
130
+ one: "almost 1 year"
131
+ other: "almost %{count} years"
132
+ prompts:
133
+ year: "Year"
134
+ month: "Month"
135
+ day: "Day"
136
+ hour: "Hour"
137
+ minute: "Minute"
138
+ second: "Seconds"
139
+
140
+ activerecord:
141
+ errors:
142
+ template:
143
+ header:
144
+ one: "1 error prohibited this %{model} from being saved"
145
+ other: "%{count} errors prohibited this %{model} from being saved"
146
+ # The variable :count is also available
147
+ body: "There were problems with the following fields:"
148
+
149
+ support:
150
+ select:
151
+ # default value for :prompt => true in FormOptionsHelper
152
+ prompt: "Please select"
153
+
154
+ activerecord:
155
+ errors:
156
+ # The values :model, :attribute and :value are always available for interpolation
157
+ # The value :count is available when applicable. Can be used for pluralization.
158
+ messages:
159
+ inclusion: "is not included in the list"
160
+ exclusion: "is reserved"
161
+ invalid: "is invalid"
162
+
163
+ ion: "doesn't match confirmation"
164
+ accepted: "must be accepted"
165
+ empty: "can't be empty"
166
+ blank: "can't be blank"
167
+ too_long: "is too long (maximum is %{count} characters)"
168
+ too_short: "is too short (minimum is %{count} characters)"
169
+ wrong_length: "is the wrong length (should be %{count} characters)"
170
+ taken: "has already been taken"
171
+ not_a_number: "is not a number"
172
+ greater_than: "must be greater than %{count}"
173
+ greater_than_or_equal_to: "must be greater than or equal to %{count}"
174
+ equal_to: "must be equal to %{count}"
175
+ less_than: "must be less than %{count}"
176
+ less_than_or_equal_to: "must be less than or equal to %{count}"
177
+ odd: "must be odd"
178
+ even: "must be even"
179
+ record_invalid: "Validation failed: %{errors}"
180
+ # Append your own errors here or at the model/attributes scope.
181
+
182
+ full_messages:
183
+ format: "%{attribute} %{message}"
184
+
185
+ models:
186
+ user: "User"
187
+ conference: "Conference"
188
+
189
+ attributes:
190
+ user:
191
+ email: "E-mail"
192
+ password: 'Password'
193
+ password_confirmation: "Confirm password"
194
+ role_name: "Role"
195
+ locked: "Account lock"
196
+ full_name: "Name"
197
+ town: "Town"
198
+ country: "Country"
199
+ username: "Username"
200
+ category:
201
+ parent_id: "Parent category"
202
+ conference:
203
+ name: "Name"
204
+ description: "Description"
205
+ address: "Location"
206
+ start_date: "Start date"
207
+ end_date: "End date"
208
+ user_id: "Creator"
209
+ attendees: "Attendees"
210
+ conference_search:
211
+ from: "From"
212
+ till: "Until"
213
+
214
+ clearance:
215
+ models:
216
+ clearance_mailer:
217
+ change_password: "[Conferences and Participants] Reset your password"
218
+ controllers:
219
+ sessions:
220
+ bad_email_or_password: "Unknown user or incorrect password"
221
+ passwords:
222
+ unknown_email: "Unknown e-mail"
223
+ deliver_change_password: "We have sent you instructions to reset your password"
224
+
225
+
226
+ signed_out: "Signed out"
227
+ disabled_account: "Your account has been disabled"
228
+
229
+ roles:
230
+ user: User
231
+ admin: Admin
@@ -0,0 +1,22 @@
1
+ # Integrate bundler with Rails 2.
2
+ # origin: RM
3
+ begin
4
+ require "rubygems"
5
+ require "bundler"
6
+ rescue LoadError
7
+ raise "Could not load the bundler gem. Install it with `gem install bundler`."
8
+ end
9
+
10
+ if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
11
+ raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
12
+ "Run `gem install bundler` to upgrade."
13
+ end
14
+
15
+ begin
16
+ # Set up load paths for all bundled gems
17
+ ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
18
+ Bundler.setup
19
+ rescue Bundler::GemNotFound
20
+ raise RuntimeError, "Bundler couldn't find some gems." +
21
+ "Did you run `bundle install`?"
22
+ end
@@ -0,0 +1,47 @@
1
+ # Maps URLs to controller actions.
2
+ # Origin: RM
3
+ ActionController::Routing::Routes.draw do |map|
4
+
5
+ map.root :controller => :conferences, :action => :index
6
+
7
+ map.resources :invitations, :only => [:index, :new, :create], :member => { :accept => :put, :dismiss => :delete }
8
+
9
+ map.resources :conferences, :collection => { :search => :get }, :member => { :attend => :put, :cancel_attendance => :put }
10
+
11
+ map.resource :session, :only => [:new, :create, :destroy]
12
+
13
+ map.resource :password
14
+
15
+ map.resources :users, :except => [:delete, :index], :member => { :request_friendship => :put }
16
+
17
+ map.resources :friendship_requests, :only => [], :member => { :accept => :put, :deny => :delete }
18
+
19
+ map.resources :members, :only => [ :index ], :collection => { :request_friendships => :post }
20
+
21
+ map.namespace :admin do |admin|
22
+ admin.resources :users, :collection => {:deleted => :get}
23
+ admin.resources :categories, :except => :destroy
24
+ end
25
+
26
+ map.namespace :ws do |ws|
27
+ ws.resources :conferences, :except => :update do |ws_conferences|
28
+ ws_conferences.resources :attendees
29
+ end
30
+ ws.update_conference 'conferences/:conference_id', :controller => 'conferences', :action => 'update', :conditions => { :method => :put }
31
+ ws.resources :members, :except => :update do |ws_members|
32
+ ws_members.resources :contacts
33
+ end
34
+ ws.update_user 'users/:user_id', :controller => 'members', :action => 'update', :conditions => { :method => :put }
35
+ ws.conferences_by_category 'conferencesbycategory/:category_id', :controller => 'conferences', :action => 'by_category', :conditions => { :method => :get }
36
+ ws.conference_search 'search/:query', :controller => 'conferences', :action => 'search', :conditions => { :method => :get }
37
+ ws.resources :categories
38
+ ws.resources :series, :only => %w[ index create show ]
39
+ ws.connect 'reset', :controller => 'factory', :action => 'reset'
40
+ ws.connect 'factorydefaults', :controller => 'factory', :action => 'factorydefaults'
41
+ if Rails.env.test?
42
+ map.connect 'ws/test/:action', :controller => 'ws/tests'
43
+ end
44
+
45
+ end
46
+
47
+ end
@@ -0,0 +1,52 @@
1
+ # Adds tables for the base application we brought to the competition.
2
+ # origin: RM
3
+ class InitialTables < ActiveRecord::Migration
4
+
5
+ def self.up
6
+
7
+ create_table "taggings", :force => true do |t|
8
+ t.integer "tag_id"
9
+ t.integer "taggable_id"
10
+ t.integer "tagger_id"
11
+ t.string "tagger_type"
12
+ t.string "taggable_type"
13
+ t.string "context"
14
+ t.datetime "created_at"
15
+ end
16
+
17
+ add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
18
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
19
+
20
+ create_table "tags", :force => true do |t|
21
+ t.string "name"
22
+ end
23
+
24
+ create_table "users", :force => true do |t|
25
+ t.string "email"
26
+ t.string "encrypted_password"
27
+ t.string "salt"
28
+ t.string "confirmation_token"
29
+ t.string "remember_token"
30
+ t.boolean "email_confirmed"
31
+ t.string "first_name"
32
+ t.string "last_name"
33
+ t.string "full_name"
34
+ t.datetime "created_at"
35
+ t.datetime "updated_at"
36
+ t.string "role_name"
37
+ t.boolean "locked"
38
+ t.boolean "deleted"
39
+ end
40
+
41
+ add_index "users", ["email"], :unique => true
42
+
43
+ end
44
+
45
+ def self.down
46
+
47
+ drop_table 'taggings'
48
+ drop_table 'tags'
49
+ drop_table 'users'
50
+
51
+ end
52
+ end
@@ -0,0 +1,15 @@
1
+ # Adds additional fields to the user model.
2
+ # origin: M
3
+ class AddProfileFieldsToUser < ActiveRecord::Migration
4
+ def self.up
5
+ add_column :users, :town, :string
6
+ add_column :users, :country, :string
7
+ add_column :users, :username, :string
8
+ end
9
+
10
+ def self.down
11
+ remove_column :users, :username
12
+ remove_column :users, :country
13
+ remove_column :users, :town
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ # Creates the table for the conference model.
2
+ # origin: M
3
+ class CreateConference < ActiveRecord::Migration
4
+
5
+ def self.up
6
+ create_table :conferences do |t|
7
+ t.string :name
8
+ t.text :description
9
+ t.text :address
10
+ t.date :start_date
11
+ t.date :end_date
12
+ t.integer :user_id
13
+ end
14
+ end
15
+
16
+ def self.down
17
+ drop_table :conferences
18
+ end
19
+
20
+ end
@@ -0,0 +1,17 @@
1
+ # Creates the table for the category model.
2
+ # origin: M
3
+ class CreateCategory < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :categories do |t|
6
+ t.string :name
7
+ t.string :ancestry
8
+ t.integer :mother_id
9
+ t.timestamps
10
+ end
11
+ add_index :categories, :mother_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :categories
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ # Creates the table for the join model between conferences and categories.
2
+ # origin: M
3
+ class CreateConferenceCategory < ActiveRecord::Migration
4
+
5
+ def self.up
6
+ create_table :conference_categories do |t|
7
+ t.integer :conference_id
8
+ t.integer :category_id
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :conference_categories
14
+ end
15
+
16
+ end
@@ -0,0 +1,17 @@
1
+ # Creates the table for the attendance model.
2
+ # origin: M
3
+ class CreateAttendance < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :attendances do |t|
6
+ t.integer :user_id
7
+ t.integer :conference_id
8
+ t.timestamps
9
+ end
10
+ add_index :attendances, [:conference_id, :user_id], :unique => true
11
+ add_index :attendances, :user_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :attendances
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # Creates the table for the friendship model.
2
+ # origin: M
3
+ class CreateFriendshipRequests < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :friendship_requests do |t|
6
+ t.integer :user_id
7
+ t.integer :requesting_user_id
8
+ t.timestamps
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :friendship_requests
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # Creates the table for the invitation model.
2
+ # origin: M
3
+ class CreateInvitation < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :invitations do |t|
6
+ t.integer :sender_id
7
+ t.integer :recipient_id
8
+ t.integer :conference_id
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :invitations
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ # Creates the table for the friendship model.
2
+ # origin: M
3
+ class CreateFriendships < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :friendships do |t|
6
+ t.integer :user_id
7
+ t.integer :friend_id
8
+ t.timestamps
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :friendships
14
+ end
15
+ end
@@ -0,0 +1,12 @@
1
+ class AddTimestampsToConference < ActiveRecord::Migration
2
+
3
+ def self.up
4
+ add_column :conferences, :created_at, :datetime
5
+ add_column :conferences, :updated_at, :datetime
6
+ end
7
+
8
+ def self.down
9
+ remove_column :conferences, :updated_at
10
+ remove_column :conferences, :created_at
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # Adds an index to prevent duplicate usernames.
2
+ # origin: M
3
+ class SetUniqueIndexOnUsernameForUser < ActiveRecord::Migration
4
+ def self.up
5
+ add_index :users, :username, :unique => true
6
+ end
7
+
8
+ def self.down
9
+ remove_index :users, :username
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ class RemoveFirstAndLastNameFromUser < ActiveRecord::Migration
2
+
3
+ def self.up
4
+ remove_column :users, :first_name
5
+ remove_column :users, :last_name
6
+ end
7
+
8
+ def self.down
9
+ add_column :users, :last_name
10
+ add_column :users, :first_name
11
+ end
12
+ end
@@ -0,0 +1,23 @@
1
+ # Adds indexes to some tables to speed up the application when many records are present.
2
+ # origin: M
3
+ class AddMissingIndexes < ActiveRecord::Migration
4
+ def self.up
5
+ add_index :users, :remember_token
6
+ add_index :users, :deleted
7
+ add_index :friendship_requests, :user_id
8
+ add_index :invitations, :recipient_id
9
+ add_index :friendships, :user_id
10
+ add_index :conference_categories, :category_id
11
+ add_index :conference_categories, :conference_id
12
+ end
13
+
14
+ def self.down
15
+ remove_index :users, :remember_token
16
+ remove_index :users, :deleted
17
+ remove_index :friendship_requests, :user_id
18
+ remove_index :invitations, :recipient_id
19
+ remove_index :friendships, :user_id
20
+ remove_index :conference_categories, :category_id
21
+ remove_index :conference_categories, :conference_id
22
+ end
23
+ end
@@ -0,0 +1,9 @@
1
+ class AddUniquenessOfNameToCategory < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :categories, :name, :unique => true
4
+ end
5
+
6
+ def self.down
7
+ remove_index :categories, :name
8
+ end
9
+ end