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,5 @@
1
+ # This file contains all the record creation needed to seed the database with its default values.
2
+ # The data can be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ # origin: M
4
+
5
+ User.create_admin!
@@ -0,0 +1,14 @@
1
+ # Script to generate a million users so we can test scalability.
2
+ # origin: M
3
+ (0..1000000).each do |i|
4
+ new_batch = (i % 1000 == 0)
5
+ if new_batch
6
+ puts ";"
7
+ puts "-- record ##{i}"
8
+ puts 'INSERT INTO users (email, encrypted_password, username, first_name, last_name, town, country, deleted) VALUES '
9
+ end
10
+ puts ", " unless new_atch
11
+ puts "('email.address#{i}@domain.tld', '2b15f280d3cbfaecc5091bde27ca824c1628dd0c', 'username#{i}', 'Anna', 'Smith', 'Foohausen', 'Fooland', 0) "
12
+ end
13
+ puts ";"
14
+
@@ -0,0 +1,53 @@
1
+ # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
+ # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
+ # files.
6
+
7
+
8
+ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
9
+
10
+ vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
11
+ $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
12
+
13
+ begin
14
+ require 'cucumber/rake/task'
15
+
16
+ namespace :cucumber do
17
+ Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
18
+ t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
19
+ t.fork = true # You may get faster startup if you set this to false
20
+ t.profile = 'default'
21
+ end
22
+
23
+ Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
24
+ t.binary = vendored_cucumber_bin
25
+ t.fork = true # You may get faster startup if you set this to false
26
+ t.profile = 'wip'
27
+ end
28
+
29
+ Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
30
+ t.binary = vendored_cucumber_bin
31
+ t.fork = true # You may get faster startup if you set this to false
32
+ t.profile = 'rerun'
33
+ end
34
+
35
+ desc 'Run all features'
36
+ task :all => [:ok, :wip]
37
+ end
38
+ desc 'Alias for cucumber:ok'
39
+ task :cucumber => 'cucumber:ok'
40
+
41
+ task :default => :cucumber
42
+
43
+ task :features => :cucumber do
44
+ STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
45
+ end
46
+ rescue LoadError
47
+ desc 'cucumber rake task not available (cucumber not installed)'
48
+ task :cucumber do
49
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,24 @@
1
+ # Rake task to warn over the shell when there are pending migrations.
2
+ # origin: RM
3
+ namespace :db do
4
+
5
+ desc "Warns if there are pending migrations"
6
+ task :warn_if_pending_migrations => :environment do
7
+ if defined? ActiveRecord
8
+ pending_migrations = ActiveRecord::Migrator.new(:up, 'db/migrate').pending_migrations
9
+
10
+ if pending_migrations.any?
11
+ puts ""
12
+ puts "======================================================="
13
+ puts "You have #{pending_migrations.size} pending migrations:"
14
+ pending_migrations.each do |pending_migration|
15
+ puts ' %4d %s' % [pending_migration.version, pending_migration.name]
16
+ end
17
+ puts "======================================================="
18
+ puts ""
19
+ end
20
+
21
+ end
22
+ end
23
+
24
+ end
@@ -0,0 +1,42 @@
1
+ # Rake task to check test coverage of RSpec and Cucumber.
2
+ # Lives in lib/tasks/rcov.rake.
3
+ # Running `rake rcov:all` will put results to RAILS_ROOT/coverage.
4
+ # origin: RM
5
+
6
+ begin
7
+ require 'cucumber/rake/task'
8
+ require 'spec/rake/spectask'
9
+
10
+ namespace :rcov do
11
+
12
+ Cucumber::Rake::Task.new(:cucumber) do |t|
13
+ t.rcov = true
14
+ t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data}
15
+ t.rcov_opts << %[-o "coverage"]
16
+ end
17
+
18
+ Spec::Rake::SpecTask.new(:rspec) do |t|
19
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
20
+ t.spec_files = FileList['spec/**/*_spec.rb']
21
+ t.rcov = true
22
+ t.rcov_opts = lambda do
23
+ IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
24
+ end
25
+ end
26
+
27
+ desc "Run both specs and features to generate aggregated coverage"
28
+ task :all do |t|
29
+ rm "coverage.data" if File.exist?("coverage.data")
30
+ Rake::Task['rcov:rspec'].invoke
31
+ Rake::Task["rcov:cucumber"].invoke
32
+ end
33
+
34
+ end
35
+ rescue LoadError
36
+ namespace :rcov do
37
+ desc 'Cucumber or RSpec rake tasks unavailable'
38
+ task :all do
39
+ abort 'Cucumber or RSpec rake tasks are unavailable.'
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,144 @@
1
+ gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
2
+ rspec_gem_dir = nil
3
+ Dir["#{RAILS_ROOT}/vendor/gems/*"].each do |subdir|
4
+ rspec_gem_dir = subdir if subdir.gsub("#{RAILS_ROOT}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb")
5
+ end
6
+ rspec_plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec')
7
+
8
+ if rspec_gem_dir && (test ?d, rspec_plugin_dir)
9
+ raise "\n#{'*'*50}\nYou have rspec installed in both vendor/gems and vendor/plugins\nPlease pick one and dispose of the other.\n#{'*'*50}\n\n"
10
+ end
11
+
12
+ if rspec_gem_dir
13
+ $LOAD_PATH.unshift("#{rspec_gem_dir}/lib")
14
+ elsif File.exist?(rspec_plugin_dir)
15
+ $LOAD_PATH.unshift("#{rspec_plugin_dir}/lib")
16
+ end
17
+
18
+ # Don't load rspec if running "rake gems:*"
19
+ unless ARGV.any? {|a| a =~ /^gems/}
20
+
21
+ begin
22
+ require 'spec/rake/spectask'
23
+ rescue MissingSourceFile
24
+ module Spec
25
+ module Rake
26
+ class SpecTask
27
+ def initialize(name)
28
+ task name do
29
+ # if rspec-rails is a configured gem, this will output helpful material and exit ...
30
+ require File.expand_path(File.join(File.dirname(__FILE__),"..","..","config","environment"))
31
+
32
+ # ... otherwise, do this:
33
+ raise <<-MSG
34
+
35
+ #{"*" * 80}
36
+ * You are trying to run an rspec rake task defined in
37
+ * #{__FILE__},
38
+ * but rspec can not be found in vendor/gems, vendor/plugins or system gems.
39
+ #{"*" * 80}
40
+ MSG
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ Rake.application.instance_variable_get('@tasks').delete('default')
49
+
50
+ spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop
51
+ task :noop do
52
+ end
53
+
54
+ task :default => :spec
55
+ task :stats => "spec:statsetup"
56
+
57
+ desc "Run all specs in spec directory (excluding plugin specs)"
58
+ Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t|
59
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
60
+ t.spec_files = FileList['spec/**/*_spec.rb']
61
+ end
62
+
63
+ namespace :spec do
64
+ desc "Run all specs in spec directory with RCov (excluding plugin specs)"
65
+ Spec::Rake::SpecTask.new(:rcov) do |t|
66
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
67
+ t.spec_files = FileList['spec/**/*_spec.rb']
68
+ t.rcov = true
69
+ t.rcov_opts = lambda do
70
+ IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
71
+ end
72
+ end
73
+
74
+ desc "Print Specdoc for all specs (excluding plugin specs)"
75
+ Spec::Rake::SpecTask.new(:doc) do |t|
76
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
77
+ t.spec_files = FileList['spec/**/*_spec.rb']
78
+ end
79
+
80
+ desc "Print Specdoc for all plugin examples"
81
+ Spec::Rake::SpecTask.new(:plugin_doc) do |t|
82
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
83
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')
84
+ end
85
+
86
+ [:models, :controllers, :views, :helpers, :lib, :integration].each do |sub|
87
+ desc "Run the code examples in spec/#{sub}"
88
+ Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
89
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
90
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
91
+ end
92
+ end
93
+
94
+ desc "Run the code examples in vendor/plugins (except RSpec's own)"
95
+ Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
96
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
97
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*")
98
+ end
99
+
100
+ namespace :plugins do
101
+ desc "Runs the examples for rspec_on_rails"
102
+ Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
103
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
104
+ t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb']
105
+ end
106
+ end
107
+
108
+ # Setup specs for stats
109
+ task :statsetup do
110
+ require 'code_statistics'
111
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models')
112
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views')
113
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers')
114
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers')
115
+ ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib')
116
+ ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing')
117
+ ::STATS_DIRECTORIES << %w(Integration\ specs spec/integration) if File.exist?('spec/integration')
118
+ ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models')
119
+ ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views')
120
+ ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers')
121
+ ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers')
122
+ ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib')
123
+ ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
124
+ ::CodeStatistics::TEST_TYPES << "Integration specs" if File.exist?('spec/integration')
125
+ end
126
+
127
+ namespace :db do
128
+ namespace :fixtures do
129
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z."
130
+ task :load => :environment do
131
+ ActiveRecord::Base.establish_connection(Rails.env)
132
+ base_dir = File.join(Rails.root, 'spec', 'fixtures')
133
+ fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir
134
+
135
+ require 'active_record/fixtures'
136
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir.glob(File.join(fixtures_dir, '*.{yml,csv}'))).each do |fixture_file|
137
+ Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*'))
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
143
+
144
+ end
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The page you were looking for doesn't exist (404)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/404.html -->
25
+ <div class="dialog">
26
+ <h1>The page you were looking for doesn't exist.</h1>
27
+ <p>You may have mistyped the address or the page may have moved.</p>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The change you wanted was rejected (422)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/422.html -->
25
+ <div class="dialog">
26
+ <h1>The change you wanted was rejected.</h1>
27
+ <p>Maybe you tried to change something you didn't have access to.</p>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>We're sorry, but something went wrong (500)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/500.html -->
25
+ <div class="dialog">
26
+ <h1>We're sorry, but something went wrong.</h1>
27
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
28
+ </div>
29
+ </body>
30
+ </html>
Binary file