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
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MjQxNGE4Y2QyM2M2M2NmZDJhZDYzOGZiZTcxYTFhYWI3MGIzNDgxMw==
5
+ data.tar.gz: !binary |-
6
+ OTdiOGRkMjUyMzE3YzU5NTU4MjczYjIwYjM0ZTk0OGE3OTQyYmU2Zg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ N2YzMGQ3MGNhOWQ4ZDhiOTA5OTJiNDRmMDgzZTgxMjNmOWYwNGU4YWYzOGZl
10
+ OGQ1NWVlMDUyMTI2MmVkODRkYjVlODAyMzNkYWRiZjFhYjA1Yjc4OWE3YTQy
11
+ YTVkZWU3YWVjYWRjNGU1MjFkM2VmNWU3YjMwNzdmMGM0NTQzMTA=
12
+ data.tar.gz: !binary |-
13
+ YWM0YjllYjAyMzljYTY0MjRmNDJjNjBlNDJlOWQ0OWNhYzUzYmVkNzhiYjI1
14
+ MDdkNzFiNGU5NTJlMzgwMWRiZmM3MjZiMmNjYTA3MzU3YjcyMjgwNzcyNzY4
15
+ OTFjZWMwMDRjMzdiNDhmMDViZDBiZDJlYjc2MDE2ZGNhMWRhY2Q=
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ doc
2
+ pkg
3
+ tags
4
+ *.gem
5
+ .idea
6
+ tmp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --warnings
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,42 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ serum-rails (0.1.0)
5
+ activesupport (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (4.0.5)
11
+ i18n (~> 0.6, >= 0.6.9)
12
+ minitest (~> 4.2)
13
+ multi_json (~> 1.3)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 0.3.37)
16
+ diff-lcs (1.2.5)
17
+ i18n (0.6.9)
18
+ minitest (4.7.5)
19
+ multi_json (1.10.0)
20
+ rake (10.3.1)
21
+ rspec (3.0.0)
22
+ rspec-core (~> 3.0.0)
23
+ rspec-expectations (~> 3.0.0)
24
+ rspec-mocks (~> 3.0.0)
25
+ rspec-core (3.0.4)
26
+ rspec-support (~> 3.0.0)
27
+ rspec-expectations (3.0.4)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.0.0)
30
+ rspec-mocks (3.0.4)
31
+ rspec-support (~> 3.0.0)
32
+ rspec-support (3.0.4)
33
+ thread_safe (0.3.3)
34
+ tzinfo (0.3.39)
35
+
36
+ PLATFORMS
37
+ ruby
38
+
39
+ DEPENDENCIES
40
+ rake
41
+ rspec (>= 3)
42
+ serum-rails!
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 makandra GmbH
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ serum-rails
2
+ ===========
3
+
4
+ Code scanner to prepare security audits
5
+ ---------------------------------------
6
+
7
+ When you inquire about the cost of a security audit at [makandra](http://www.makandra.com)
8
+ we will ask you to provide some metrics about your application, like the number of controller actions
9
+ and many others.
10
+
11
+ This gem provides a `serum-rails` command you can use to scan your project and
12
+ provide these metrics automatically. By sending us the output of the `serum-rails` command
13
+ we can give you an recommendation for the time you should invest for a security audit.
14
+
15
+ Since all you send us are a few numbers, we don't need to look at your code for a first
16
+ estimate. This saves us signing an NDA and giving us access to your repository before
17
+ we even work together.
18
+
19
+
20
+ ### Installation
21
+
22
+ You can install `serum-rails` as a Ruby gem:
23
+
24
+ ```
25
+ gem install serum-rails
26
+ ```
27
+
28
+ Once you have installed the gem you should have a `serum-rails` command in your path.
29
+
30
+ ### Usage
31
+
32
+ Start serum-rails like this:
33
+
34
+ ```
35
+ serum-rails PATH_TO_YOUR_RAILS_APPLICATION
36
+ ```
37
+
38
+ `serum-rails` will scan the code of your application and output some code metric to the console.
39
+
40
+ Please e-mail the output to your security audit contact at makandra to continue the process.
data/bin/serum-rails ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'serum-rails'
4
+
5
+ root = ARGV[0].presence || '.'
6
+
7
+ metrics = Serum::Rails::Metrics.new(root)
8
+
9
+ puts "time = #{Time.now.utc.to_s(:db)}"
10
+
11
+ metrics.to_hash.each do |metric, value|
12
+ puts "#{metric} = #{value}"
13
+ end
@@ -0,0 +1,50 @@
1
+ module Serum
2
+ module Rails
3
+ class App
4
+
5
+ attr_reader :root
6
+
7
+ def initialize(root)
8
+ @root = File.expand_path(root)
9
+ ensure_root_exists
10
+ ensure_is_rails_app
11
+ end
12
+
13
+ #def gems
14
+ # cd
15
+ # bundle list | wc -l
16
+ #end
17
+
18
+ def lines_of_code
19
+ count_lines # matches anything in all folders
20
+ end
21
+
22
+ delegate :count_lines, :to => :code_scanner
23
+
24
+ private
25
+
26
+ def ensure_root_exists
27
+ File.directory?(@root) or raise "Not a directory: #{@root}"
28
+ end
29
+
30
+ def ensure_is_rails_app
31
+ expected_folders = %w[
32
+ app/models
33
+ app/controllers
34
+ app/views
35
+ config
36
+ db
37
+ ]
38
+ expected_folders.each do |expected_folder|
39
+ path = File.join(@root, expected_folder)
40
+ File.directory?(path) or raise "Not a Rails application: #{@root} (expected folder #{expected_folder}"
41
+ end
42
+ end
43
+
44
+ def code_scanner
45
+ @code_scanner ||= CodeScanner.new(@root)
46
+ end
47
+
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,49 @@
1
+ module Serum
2
+ module Rails
3
+ class CodeScanner
4
+
5
+ DEFAULT_FOLDERS = %w[app lib config public].freeze
6
+ ANYTHING = /.*/.freeze
7
+ DEBUG = false
8
+
9
+ def initialize(root)
10
+ @root = root
11
+ end
12
+
13
+ def count_lines(options = {})
14
+ pattern = options.fetch(:pattern, ANYTHING)
15
+ folders = Array.wrap(options.fetch(:folders, DEFAULT_FOLDERS))
16
+ type_selection = TypeSelection.new(options[:types])
17
+ paths(folders, type_selection).sort.sum do |path|
18
+ count_occurrences(path, pattern)
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def paths(folders, type_selection)
25
+ patterns = []
26
+ folders.each do |folder|
27
+ type_selection.extensions.each do |extension|
28
+ patterns << "#{@root}/#{folder}/**/*.#{extension}"
29
+ end
30
+ end
31
+ # puts "Calling patterns: #{patterns}"
32
+ Dir[*patterns]
33
+ end
34
+
35
+ def count_occurrences(path, pattern)
36
+ content = File.read(path) or raise "Could not read file: #{path}"
37
+ #if path =~ /session_store/
38
+ # puts "-----"
39
+ # puts content
40
+ # puts "-----"
41
+ #end
42
+ matches = content.scan(pattern)
43
+ matches.each { |match| puts "#{path}: #{match}" } if DEBUG
44
+ matches.size
45
+ end
46
+
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,118 @@
1
+ module Serum
2
+ module Rails
3
+ class Metrics
4
+
5
+ FRACTION_PRIVATE_CONTROLLER_METHODS = 0.2
6
+
7
+ class << self
8
+
9
+ attr_reader :metrics
10
+
11
+ private
12
+
13
+ def metric(name, &block)
14
+ @metrics ||= []
15
+ @metrics << name
16
+ define_method name, &block
17
+ end
18
+
19
+ end
20
+
21
+ def initialize(root)
22
+ @app = App.new(root)
23
+ end
24
+
25
+ metric :unescaped_strings do
26
+ @app.count_lines(
27
+ :pattern => /\b(raw|html_safe)\b/,
28
+ :types => [:ruby, :views]
29
+ )
30
+ end
31
+
32
+ metric :controller_actions do
33
+ count = @app.count_lines(
34
+ :pattern => /\bdef\b/,
35
+ :types => [:ruby],
36
+ :folders => 'app/controllers'
37
+ )
38
+ count *= (1 - FRACTION_PRIVATE_CONTROLLER_METHODS)
39
+ count.round
40
+ end
41
+
42
+ #metric :gem_count do
43
+ # @app.gems.size
44
+ #end
45
+
46
+ metric :uploaders do
47
+ @app.count_lines(
48
+ :pattern => /\b(has_attached_file|mount_uploader|has_attachment|dragonfly_accessor|has_attached)\b/,
49
+ :types => :ruby
50
+ )
51
+ end
52
+
53
+ metric :crypto_terms do
54
+ @app.count_lines(
55
+ :pattern => /SHA1|MD5|Digest|Crypt|Token|Secret|Signature/i,
56
+ :types => :ruby
57
+ )
58
+ end
59
+
60
+ metric :cookie_accesses do
61
+ @app.count_lines(
62
+ :pattern => /cookies/,
63
+ :types => [:ruby, :javascript]
64
+ )
65
+ end
66
+
67
+ metric :file_accesses do
68
+ @app.count_lines(
69
+ :pattern => /\b(File|Pathname|FileUtils|Dir|render|send_file)\b/,
70
+ :types => :ruby
71
+ )
72
+ end
73
+
74
+ metric :mailer_invocations do
75
+ @app.count_lines(
76
+ :pattern => /Mailer/,
77
+ :types => :ruby
78
+ )
79
+ end
80
+
81
+ metric :redirects do
82
+ @app.count_lines(
83
+ :pattern => /\bredirect_to\b/,
84
+ :types => :ruby
85
+ )
86
+ end
87
+
88
+ metric :json_outputs do
89
+ @app.count_lines(
90
+ :pattern => /\b(to_json|JSON\.generate|JSON\.dump)\b/,
91
+ :types => [:ruby, :views],
92
+ :folders => 'app/views'
93
+ )
94
+ end
95
+
96
+ metric :yaml_inputs do
97
+ @app.count_lines(
98
+ :pattern => /\bYAML\.load\b/,
99
+ :types => [:ruby, :views]
100
+ )
101
+ end
102
+
103
+ metric :lines_of_code do
104
+ @app.lines_of_code
105
+ end
106
+
107
+ def to_hash
108
+ hash = {}
109
+ self.class.metrics.sort.each do |metric|
110
+ hash[metric] = send(metric)
111
+ end
112
+ hash
113
+ end
114
+
115
+ end
116
+ end
117
+ end
118
+
@@ -0,0 +1,31 @@
1
+ module Serum
2
+ module Rails
3
+ class TypeSelection
4
+
5
+ EXTENSIONS_BY_TYPE = {
6
+ :ruby => %w[ rb ],
7
+ :javascript => %w[ js coffee coffeescript ],
8
+ :views => %w[ erb haml mab ]
9
+ }.freeze
10
+
11
+ DEFAULT_TYPES = EXTENSIONS_BY_TYPE.keys.freeze
12
+
13
+ def initialize(types = nil)
14
+ @types = types ? Array.wrap(types) : DEFAULT_TYPES
15
+ end
16
+
17
+ #def matches_path?(path)
18
+ # extensions.any? { |extension|
19
+ # path.ends_with?("\.#{extension}")
20
+ # }
21
+ #end
22
+
23
+ def extensions
24
+ @types.collect { |type|
25
+ EXTENSIONS_BY_TYPE[type] or raise "No such type: #{type}"
26
+ }.flatten
27
+ end
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,7 @@
1
+ module Serum
2
+ module Rails
3
+
4
+ VERSION = '0.1.0'
5
+
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ require 'active_support/all'
2
+ require 'serum/rails/app'
3
+ require 'serum/rails/code_scanner'
4
+ require 'serum/rails/metrics'
5
+ require 'serum/rails/type_selection'
@@ -0,0 +1,23 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "serum/rails/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'serum-rails'
6
+ s.version = Serum::Rails::VERSION
7
+ s.authors = ["Henning Koch"]
8
+ s.email = 'henning.koch@makandra.de'
9
+ s.homepage = 'https://github.com/makandra/serum-rails'
10
+ s.summary = 'Scans a Rails application for metrics relevant to security audits'
11
+ s.description = s.summary
12
+ s.license = 'MIT'
13
+
14
+ s.files = `git ls-files -z`.split("\x0")
15
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_development_dependency "rake"
20
+ s.add_development_dependency "rspec", '>= 3'
21
+ s.add_runtime_dependency('activesupport', '>= 3.2')
22
+
23
+ end
@@ -0,0 +1,87 @@
1
+ # Expected values were determined by manually grepping
2
+ # through the example application in spec/test_app
3
+ describe Serum::Rails::Metrics do
4
+
5
+ let(:root) { 'spec/test_app' }
6
+
7
+ subject { Serum::Rails::Metrics.new(root) }
8
+
9
+ describe '#unescaped_strings' do
10
+ it 'should count the occurrences' do
11
+ expect(subject.unescaped_strings).to eq(17)
12
+ end
13
+ end
14
+
15
+ describe '#controller_actions' do
16
+ it 'should count the occurrences' do
17
+ expect(subject.controller_actions).to eq((94 * 0.8).round) # we ignore some fraction for private methods
18
+ end
19
+ end
20
+
21
+ describe '#uploaders' do
22
+ it 'should count the occurrences' do
23
+ expect(subject.uploaders).to eq(2)
24
+ end
25
+ end
26
+
27
+ describe '#crypto_terms' do
28
+ it 'should count the occurrences' do
29
+ expect(subject.crypto_terms).to eq(17)
30
+ end
31
+ end
32
+
33
+ describe '#cookie_accesses' do
34
+ it 'should count the occurrences' do
35
+ expect(subject.cookie_accesses).to eq(5)
36
+ end
37
+ end
38
+
39
+ describe '#file_accesses' do
40
+ it 'should count the occurrences' do
41
+ expect(subject.file_accesses).to eq(33)
42
+ end
43
+ end
44
+
45
+ describe '#mailer_invocations' do
46
+ it 'should count the occurrences' do
47
+ expect(subject.mailer_invocations).to eq(4)
48
+ end
49
+ end
50
+
51
+ describe '#redirects' do
52
+ it 'should count the occurrences' do
53
+ expect(subject.redirects).to eq(15)
54
+ end
55
+ end
56
+
57
+ describe '#json_outputs' do
58
+ it 'should count the occurrences' do
59
+ expect(subject.json_outputs).to eq(2)
60
+ end
61
+ end
62
+
63
+ describe '#yaml_inputs' do
64
+ it 'should count the occurrences' do
65
+ expect(subject.yaml_inputs).to eq(3)
66
+ end
67
+ end
68
+
69
+ describe '#lines_of_code' do
70
+ it 'should count the occurrences' do
71
+ expect(subject.lines_of_code).to eq(12627)
72
+ end
73
+ end
74
+
75
+ #describe '#lines_of_ruby_code' do
76
+ # expect(subject.lines_of_ruby_code).to eq(123)
77
+ #end
78
+ #
79
+ #describe '#lines_of_view_code' do
80
+ # expect(subject.lines_of_view_code).to eq(123)
81
+ #end
82
+ #
83
+ #describe '#lines_of_javascript_code' do
84
+ # expect(subject.lines_of_javascript_code).to eq(123)
85
+ #end
86
+
87
+ end
@@ -0,0 +1,80 @@
1
+ require 'serum-rails'
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
6
+ # file to always be loaded, without a need to explicitly require it in any files.
7
+ #
8
+ # Given that it is always loaded, you are encouraged to keep this file as
9
+ # light-weight as possible. Requiring heavyweight dependencies from this file
10
+ # will add to the boot time of your test suite on EVERY test run, even for an
11
+ # individual file that may not need all of that loaded. Instead, make a
12
+ # separate helper file that requires this one and then use it only in the specs
13
+ # that actually need it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # The settings below are suggested to provide a good initial experience
21
+ # with RSpec, but feel free to customize to your heart's content.
22
+ =begin
23
+ # These two settings work together to allow you to limit a spec run
24
+ # to individual examples or groups you care about by tagging them with
25
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
26
+ # get run.
27
+ config.filter_run :focus
28
+ config.run_all_when_everything_filtered = true
29
+
30
+ # Many RSpec users commonly either run the entire suite or an individual
31
+ # file, and it's useful to allow more verbose output when running an
32
+ # individual spec file.
33
+ if config.files_to_run.one?
34
+ # Use the documentation formatter for detailed output,
35
+ # unless a formatter has already been configured
36
+ # (e.g. via a command-line flag).
37
+ config.default_formatter = 'doc'
38
+ end
39
+
40
+ # Print the 10 slowest examples and example groups at the
41
+ # end of the spec run, to help surface which specs are running
42
+ # particularly slow.
43
+ config.profile_examples = 10
44
+
45
+ # Run specs in random order to surface order dependencies. If you find an
46
+ # order dependency and want to debug it, you can fix the order by providing
47
+ # the seed, which is printed after each run.
48
+ # --seed 1234
49
+ config.order = :random
50
+
51
+ # Seed global randomization in this process using the `--seed` CLI option.
52
+ # Setting this allows you to use `--seed` to deterministically reproduce
53
+ # test failures related to randomization by passing the same `--seed` value
54
+ # as the one that triggered the failure.
55
+ Kernel.srand config.seed
56
+
57
+ # rspec-expectations config goes here. You can use an alternate
58
+ # assertion/expectation library such as wrong or the stdlib/minitest
59
+ # assertions if you prefer.
60
+ config.expect_with :rspec do |expectations|
61
+ # Enable only the newer, non-monkey-patching expect syntax.
62
+ # For more details, see:
63
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
64
+ expectations.syntax = :expect
65
+ end
66
+
67
+ # rspec-mocks config goes here. You can use an alternate test double
68
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
69
+ config.mock_with :rspec do |mocks|
70
+ # Enable only the newer, non-monkey-patching expect syntax.
71
+ # For more details, see:
72
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
73
+ mocks.syntax = :expect
74
+
75
+ # Prevents you from mocking or stubbing a method that does not exist on
76
+ # a real object. This is generally recommended.
77
+ mocks.verify_partial_doubles = true
78
+ end
79
+ =end
80
+ end
@@ -0,0 +1,4 @@
1
+ load 'deploy' if respond_to?(:namespace) # cap2 differentiator
2
+ Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
3
+
4
+ load 'config/deploy' # remove this line to skip loading any of the default tasks
@@ -0,0 +1,54 @@
1
+ # Describes library dependencies of the application.
2
+ # origin: RM
3
+
4
+ source 'http://rubygems.org'
5
+ gem 'aegis'
6
+ gem 'rails', '=2.3.11'
7
+ gem 'mysql'
8
+ gem 'andand', '=1.3.1'
9
+ gem 'haml'
10
+ gem 'sass'
11
+ gem 'will_paginate', '=2.3.15'
12
+ gem 'clearance', '=0.8.8'
13
+ gem 'modularity', '=0.6.0'
14
+ gem 'resource_controller', '=0.6.6'
15
+ gem 'erubis', '=2.6.6'
16
+ gem 'jrails', '=0.6.0'
17
+ gem 'acts-as-taggable-on', '=2.0.6'
18
+ gem 'ruby-debug'
19
+ gem 'paperclip', '=2.3.4'
20
+ gem 'spreadsheet', '=0.6.5.2'
21
+ gem 'ancestry'
22
+ gem 'vpim'
23
+
24
+ group :development do
25
+ gem 'query_diet', '=0.2.0'
26
+ gem "inaction_mailer"
27
+ end
28
+
29
+ group :test do
30
+ gem "machinist", "=1.0.6"
31
+ gem "faker", "=0.3.1"
32
+ gem "timecop", "=0.3.5"
33
+ gem "shoulda", "=2.11.1"
34
+ gem 'rspec', '=1.3.2'
35
+ gem 'rspec-rails'
36
+ gem 'machinist_callbacks', '=0.1.3'
37
+ gem 'rspec_spinner', "=1.1.3"
38
+ end
39
+
40
+ group :cucumber do
41
+ gem 'cucumber'
42
+ gem 'cucumber-rails', :path => File.join(File.dirname(__FILE__), '/vendor/gems/cucumber-rails-0.4.1')
43
+ gem "cucumber_factory"
44
+ gem 'cucumber_spinner'
45
+ gem 'database_cleaner'
46
+ gem 'capybara'
47
+ gem 'rspec', '=1.3.2'
48
+ gem 'rspec-rails'
49
+ gem "faker", "=0.3.1"
50
+ gem "machinist", "=1.0.6"
51
+ gem "timecop", "=0.3.5"
52
+ gem 'machinist_callbacks', '=0.1.3'
53
+ gem 'launchy'
54
+ end