muck-shares 0.1.8 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. data/.gitignore +2 -1
  2. data/README.rdoc +7 -6
  3. data/Rakefile +5 -13
  4. data/VERSION +1 -1
  5. data/app/controllers/muck/shares_controller.rb +0 -1
  6. data/app/models/country.rb +13 -0
  7. data/app/models/language.rb +15 -0
  8. data/app/models/state.rb +13 -0
  9. data/{locales → config/locales}/ar.yml +2 -2
  10. data/{locales → config/locales}/bg.yml +2 -2
  11. data/{locales → config/locales}/ca.yml +2 -2
  12. data/{locales → config/locales}/cs.yml +2 -2
  13. data/{locales → config/locales}/da.yml +2 -2
  14. data/{locales → config/locales}/de.yml +2 -2
  15. data/{locales → config/locales}/el.yml +2 -2
  16. data/{locales → config/locales}/en.yml +2 -2
  17. data/{locales → config/locales}/es.yml +2 -2
  18. data/{locales → config/locales}/et.yml +2 -2
  19. data/{locales → config/locales}/fa.yml +2 -2
  20. data/{locales → config/locales}/fi.yml +2 -2
  21. data/{locales → config/locales}/fr.yml +2 -2
  22. data/{locales → config/locales}/gl.yml +2 -2
  23. data/{locales → config/locales}/hi.yml +2 -2
  24. data/{locales → config/locales}/hr.yml +2 -2
  25. data/{locales → config/locales}/hu.yml +2 -2
  26. data/{locales → config/locales}/id.yml +2 -2
  27. data/{locales → config/locales}/it.yml +2 -2
  28. data/{locales → config/locales}/iw.yml +2 -2
  29. data/{locales → config/locales}/ja.yml +2 -2
  30. data/{locales → config/locales}/ko.yml +2 -2
  31. data/{locales → config/locales}/lt.yml +2 -2
  32. data/{locales → config/locales}/lv.yml +2 -2
  33. data/{locales → config/locales}/mt.yml +2 -2
  34. data/{locales → config/locales}/nl.yml +2 -2
  35. data/{locales → config/locales}/no.yml +2 -2
  36. data/{locales → config/locales}/pl.yml +2 -2
  37. data/{locales → config/locales}/pt-PT.yml +2 -2
  38. data/{locales → config/locales}/ro.yml +2 -2
  39. data/{locales → config/locales}/ru.yml +2 -2
  40. data/{locales → config/locales}/sk.yml +2 -2
  41. data/{locales → config/locales}/sl.yml +2 -2
  42. data/{locales → config/locales}/sq.yml +2 -2
  43. data/{locales → config/locales}/sr.yml +2 -2
  44. data/{locales → config/locales}/sv.yml +2 -2
  45. data/config/locales/th.yml +22 -0
  46. data/{locales → config/locales}/tl.yml +2 -2
  47. data/{locales → config/locales}/tr.yml +2 -2
  48. data/{locales → config/locales}/uk.yml +2 -2
  49. data/{locales → config/locales}/vi.yml +2 -2
  50. data/{locales → config/locales}/zh-CN.yml +2 -2
  51. data/{locales → config/locales}/zh-TW.yml +3 -3
  52. data/{locales → config/locales}/zh.yml +2 -2
  53. data/config/routes.rb +9 -0
  54. data/lib/muck_shares.rb +3 -4
  55. data/lib/muck_shares/engine.rb +18 -0
  56. data/lib/muck_shares/models/share.rb +37 -0
  57. data/lib/muck_shares/models/sharer.rb +11 -0
  58. data/lib/tasks/tasks.rb +12 -0
  59. data/test/rails_test/.gitignore +8 -0
  60. data/test/rails_test/.rake_tasks +103 -0
  61. data/test/rails_test/Gemfile +45 -0
  62. data/test/rails_test/Rakefile +10 -0
  63. data/test/{rails_root → rails_test}/app/controllers/application_controller.rb +1 -1
  64. data/test/{rails_root → rails_test}/app/controllers/default_controller.rb +0 -0
  65. data/test/{rails_root → rails_test}/app/helpers/application_helper.rb +0 -0
  66. data/test/{rails_root → rails_test}/app/models/.keep +0 -0
  67. data/test/{rails_root → rails_test}/app/models/activity.rb +0 -0
  68. data/test/{rails_root → rails_test}/app/models/comment.rb +1 -1
  69. data/test/rails_test/app/models/profile.rb +3 -0
  70. data/test/{rails_root → rails_test}/app/models/share.rb +0 -0
  71. data/test/{rails_root → rails_test}/app/models/user.rb +5 -4
  72. data/test/{rails_root → rails_test}/app/models/user_session.rb +0 -0
  73. data/test/{rails_root → rails_test}/app/views/default/index.html.erb +0 -0
  74. data/test/{rails_root → rails_test}/app/views/layouts/default.html.erb +0 -0
  75. data/test/rails_test/config.ru +4 -0
  76. data/test/rails_test/config/application.rb +42 -0
  77. data/test/rails_test/config/boot.rb +13 -0
  78. data/test/rails_test/config/database.yml +16 -0
  79. data/test/rails_test/config/environment.rb +5 -0
  80. data/test/rails_test/config/environments/development.rb +26 -0
  81. data/test/rails_test/config/environments/production.rb +49 -0
  82. data/test/rails_test/config/environments/test.rb +35 -0
  83. data/test/rails_test/config/initializers/backtrace_silencers.rb +7 -0
  84. data/test/rails_test/config/initializers/geokit_config.rb +63 -0
  85. data/test/{rails_root → rails_test}/config/initializers/inflections.rb +2 -2
  86. data/test/{rails_root → rails_test}/config/initializers/mime_types.rb +0 -0
  87. data/test/rails_test/config/initializers/muck.rb +60 -0
  88. data/test/rails_test/config/initializers/secret_token.rb +7 -0
  89. data/test/rails_test/config/initializers/session_store.rb +8 -0
  90. data/test/rails_test/config/routes.rb +4 -0
  91. data/test/{rails_root → rails_test}/features/shares.feature +0 -0
  92. data/test/{rails_root → rails_test}/features/step_definitions/common_steps.rb +0 -0
  93. data/test/{rails_root → rails_test}/features/step_definitions/share_steps.rb +0 -0
  94. data/test/rails_test/features/step_definitions/web_steps.rb +219 -0
  95. data/test/rails_test/features/support/custom_env.rb +19 -0
  96. data/test/rails_test/features/support/env.rb +58 -0
  97. data/test/rails_test/features/support/paths.rb +33 -0
  98. data/test/rails_test/lib/tasks/cucumber.rake +53 -0
  99. data/test/rails_test/spec/controllers/shares_controller_spec.rb +113 -0
  100. data/test/rails_test/spec/models/share_spec.rb +55 -0
  101. data/test/rails_test/spec/models/user_spec.rb +25 -0
  102. data/test/rails_test/spec/spec_helper.rb +29 -0
  103. data/test/rails_test/vendor/plugins/geokit-rails/.gitignore +2 -0
  104. data/test/rails_test/vendor/plugins/geokit-rails/CHANGELOG.rdoc +46 -0
  105. data/test/rails_test/vendor/plugins/geokit-rails/MIT-LICENSE +20 -0
  106. data/test/rails_test/vendor/plugins/geokit-rails/README.markdown +561 -0
  107. data/test/rails_test/vendor/plugins/geokit-rails/Rakefile +18 -0
  108. data/test/rails_test/vendor/plugins/geokit-rails/about.yml +9 -0
  109. data/test/rails_test/vendor/plugins/geokit-rails/assets/api_keys_template +61 -0
  110. data/test/rails_test/vendor/plugins/geokit-rails/init.rb +1 -0
  111. data/test/rails_test/vendor/plugins/geokit-rails/install.rb +14 -0
  112. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails.rb +26 -0
  113. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb +456 -0
  114. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/abstract.rb +31 -0
  115. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/mysql.rb +22 -0
  116. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/postgresql.rb +22 -0
  117. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/sqlserver.rb +43 -0
  118. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb +22 -0
  119. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/geocoder_control.rb +16 -0
  120. data/test/rails_test/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb +46 -0
  121. data/test/rails_test/vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb +474 -0
  122. data/test/rails_test/vendor/plugins/geokit-rails/test/boot.rb +25 -0
  123. data/test/rails_test/vendor/plugins/geokit-rails/test/database.yml +20 -0
  124. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/companies.yml +7 -0
  125. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/custom_locations.yml +54 -0
  126. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/locations.yml +54 -0
  127. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/mock_addresses.yml +17 -0
  128. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/mock_families.yml +2 -0
  129. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/mock_houses.yml +9 -0
  130. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/mock_organizations.yml +5 -0
  131. data/test/rails_test/vendor/plugins/geokit-rails/test/fixtures/mock_people.yml +5 -0
  132. data/test/{rails_root/db/.keep → rails_test/vendor/plugins/geokit-rails/test/fixtures/stores.yml} +0 -0
  133. data/test/rails_test/vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb +77 -0
  134. data/test/rails_test/vendor/plugins/geokit-rails/test/models/company.rb +3 -0
  135. data/test/rails_test/vendor/plugins/geokit-rails/test/models/custom_location.rb +12 -0
  136. data/test/rails_test/vendor/plugins/geokit-rails/test/models/location.rb +4 -0
  137. data/test/rails_test/vendor/plugins/geokit-rails/test/models/mock_address.rb +4 -0
  138. data/test/rails_test/vendor/plugins/geokit-rails/test/models/mock_family.rb +3 -0
  139. data/test/rails_test/vendor/plugins/geokit-rails/test/models/mock_house.rb +3 -0
  140. data/test/rails_test/vendor/plugins/geokit-rails/test/models/mock_organization.rb +4 -0
  141. data/test/rails_test/vendor/plugins/geokit-rails/test/models/mock_person.rb +4 -0
  142. data/test/rails_test/vendor/plugins/geokit-rails/test/models/store.rb +3 -0
  143. data/test/rails_test/vendor/plugins/geokit-rails/test/schema.rb +60 -0
  144. data/test/rails_test/vendor/plugins/geokit-rails/test/tasks.rake +31 -0
  145. data/test/rails_test/vendor/plugins/geokit-rails/test/test_helper.rb +23 -0
  146. metadata +246 -352
  147. data/config/muck_shares_routes.rb +0 -8
  148. data/install.rb +0 -1
  149. data/lib/active_record/acts/muck_share.rb +0 -59
  150. data/lib/active_record/acts/muck_sharer.rb +0 -28
  151. data/lib/muck_shares/initialize_routes.rb +0 -8
  152. data/lib/muck_shares/tasks.rb +0 -28
  153. data/locales/th.yml +0 -22
  154. data/muck-shares.gemspec +0 -401
  155. data/rails/init.rb +0 -4
  156. data/test/rails_root/Rakefile +0 -17
  157. data/test/rails_root/app/models/profile.rb +0 -3
  158. data/test/rails_root/config/amazon_s3.yml +0 -14
  159. data/test/rails_root/config/boot.rb +0 -109
  160. data/test/rails_root/config/database.yml +0 -23
  161. data/test/rails_root/config/environment.rb +0 -33
  162. data/test/rails_root/config/environments/cucumber.rb +0 -38
  163. data/test/rails_root/config/environments/development.rb +0 -19
  164. data/test/rails_root/config/environments/production.rb +0 -1
  165. data/test/rails_root/config/environments/test.rb +0 -28
  166. data/test/rails_root/config/initializers/requires.rb +0 -13
  167. data/test/rails_root/config/initializers/session_store.rb +0 -8
  168. data/test/rails_root/config/routes.rb +0 -3
  169. data/test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb +0 -16
  170. data/test/rails_root/db/migrate/20090402033319_add_muck_activities.rb +0 -36
  171. data/test/rails_root/db/migrate/20090402234137_create_languages.rb +0 -18
  172. data/test/rails_root/db/migrate/20090426041056_create_countries.rb +0 -15
  173. data/test/rails_root/db/migrate/20090426041103_create_states.rb +0 -18
  174. data/test/rails_root/db/migrate/20090512013727_create_profiles.rb +0 -21
  175. data/test/rails_root/db/migrate/20090602041838_create_users.rb +0 -39
  176. data/test/rails_root/db/migrate/20090608073052_create_friends.rb +0 -16
  177. data/test/rails_root/db/migrate/20090613173314_create_comments.rb +0 -24
  178. data/test/rails_root/db/migrate/20090704220055_create_slugs.rb +0 -18
  179. data/test/rails_root/db/migrate/20090704220120_acts_as_taggable_on_migration.rb +0 -29
  180. data/test/rails_root/db/migrate/20090730154102_allow_null_user.rb +0 -9
  181. data/test/rails_root/db/migrate/20090803185323_create_shares.rb +0 -16
  182. data/test/rails_root/db/migrate/20090804184247_add_comment_count_to_shares.rb +0 -9
  183. data/test/rails_root/db/migrate/20090804231857_add_shares_uri_index.rb +0 -9
  184. data/test/rails_root/features/step_definitions/webrat_steps.rb +0 -128
  185. data/test/rails_root/features/support/env.rb +0 -49
  186. data/test/rails_root/features/support/paths.rb +0 -33
  187. data/test/rails_root/lib/tasks/cucumber.rake +0 -20
  188. data/test/rails_root/public/.htaccess +0 -40
  189. data/test/rails_root/public/404.html +0 -30
  190. data/test/rails_root/public/422.html +0 -30
  191. data/test/rails_root/public/500.html +0 -30
  192. data/test/rails_root/public/dispatch.rb +0 -10
  193. data/test/rails_root/public/favicon.ico +0 -0
  194. data/test/rails_root/public/images/arrow_left.gif +0 -0
  195. data/test/rails_root/public/images/arrow_right.gif +0 -0
  196. data/test/rails_root/public/images/fancybox/fancy_closebox.png +0 -0
  197. data/test/rails_root/public/images/fancybox/fancy_left.png +0 -0
  198. data/test/rails_root/public/images/fancybox/fancy_progress.png +0 -0
  199. data/test/rails_root/public/images/fancybox/fancy_right.png +0 -0
  200. data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
  201. data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
  202. data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
  203. data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
  204. data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
  205. data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
  206. data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
  207. data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
  208. data/test/rails_root/public/images/fancybox/fancy_title_left.png +0 -0
  209. data/test/rails_root/public/images/fancybox/fancy_title_main.png +0 -0
  210. data/test/rails_root/public/images/fancybox/fancy_title_right.png +0 -0
  211. data/test/rails_root/public/images/icons/accept.png +0 -0
  212. data/test/rails_root/public/images/icons/add.png +0 -0
  213. data/test/rails_root/public/images/icons/delete.png +0 -0
  214. data/test/rails_root/public/images/icons/vote.png +0 -0
  215. data/test/rails_root/public/images/loading.gif +0 -0
  216. data/test/rails_root/public/images/nothing.png +0 -0
  217. data/test/rails_root/public/images/profile_default.jpg +0 -0
  218. data/test/rails_root/public/images/rails.png +0 -0
  219. data/test/rails_root/public/images/spinner.gif +0 -0
  220. data/test/rails_root/public/images/sprites.png +0 -0
  221. data/test/rails_root/public/javascripts/application.js +0 -2
  222. data/test/rails_root/public/javascripts/builder.js +0 -136
  223. data/test/rails_root/public/javascripts/controls.js +0 -963
  224. data/test/rails_root/public/javascripts/dragdrop.js +0 -972
  225. data/test/rails_root/public/javascripts/effects.js +0 -1120
  226. data/test/rails_root/public/javascripts/fancyzoom.min.js +0 -1
  227. data/test/rails_root/public/javascripts/jquery/jquery-ui.js +0 -273
  228. data/test/rails_root/public/javascripts/jquery/jquery.easing.js +0 -1
  229. data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +0 -9
  230. data/test/rails_root/public/javascripts/jquery/jquery.form.js +0 -637
  231. data/test/rails_root/public/javascripts/jquery/jquery.jgrowl.js +0 -2
  232. data/test/rails_root/public/javascripts/jquery/jquery.js +0 -19
  233. data/test/rails_root/public/javascripts/jquery/jquery.tips.js +0 -69
  234. data/test/rails_root/public/javascripts/muck.js +0 -80
  235. data/test/rails_root/public/javascripts/muck_activities.js +0 -108
  236. data/test/rails_root/public/javascripts/prototype.js +0 -4225
  237. data/test/rails_root/public/javascripts/scriptaculous.js +0 -58
  238. data/test/rails_root/public/javascripts/slider.js +0 -277
  239. data/test/rails_root/public/javascripts/sound.js +0 -60
  240. data/test/rails_root/public/robots.txt +0 -1
  241. data/test/rails_root/public/stylesheets/.keep +0 -0
  242. data/test/rails_root/public/stylesheets/admin.css +0 -12
  243. data/test/rails_root/public/stylesheets/blueprint/ie.css +0 -26
  244. data/test/rails_root/public/stylesheets/blueprint/liquid_screen.css +0 -203
  245. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
  246. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
  247. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
  248. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/readme.txt +0 -32
  249. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/screen.css +0 -97
  250. data/test/rails_root/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +0 -14
  251. data/test/rails_root/public/stylesheets/blueprint/plugins/fancy-type/screen.css +0 -71
  252. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
  253. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
  254. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
  255. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
  256. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
  257. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  258. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
  259. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
  260. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/readme.txt +0 -18
  261. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/screen.css +0 -40
  262. data/test/rails_root/public/stylesheets/blueprint/plugins/liquid/liquid.css +0 -134
  263. data/test/rails_root/public/stylesheets/blueprint/plugins/liquid/src/liquid.css +0 -197
  264. data/test/rails_root/public/stylesheets/blueprint/plugins/rtl/readme.txt +0 -10
  265. data/test/rails_root/public/stylesheets/blueprint/plugins/rtl/screen.css +0 -109
  266. data/test/rails_root/public/stylesheets/blueprint/print.css +0 -30
  267. data/test/rails_root/public/stylesheets/blueprint/screen.css +0 -251
  268. data/test/rails_root/public/stylesheets/blueprint/sprite.css +0 -1
  269. data/test/rails_root/public/stylesheets/blueprint/src/forms.css +0 -49
  270. data/test/rails_root/public/stylesheets/blueprint/src/grid.css +0 -213
  271. data/test/rails_root/public/stylesheets/blueprint/src/grid.png +0 -0
  272. data/test/rails_root/public/stylesheets/blueprint/src/ie.css +0 -59
  273. data/test/rails_root/public/stylesheets/blueprint/src/print.css +0 -85
  274. data/test/rails_root/public/stylesheets/blueprint/src/reset.css +0 -38
  275. data/test/rails_root/public/stylesheets/blueprint/src/typography.css +0 -105
  276. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
  277. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
  278. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png +0 -0
  279. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_50_99c2ff_1x400.png +0 -0
  280. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
  281. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png +0 -0
  282. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  283. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
  284. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +0 -0
  285. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_222222_256x240.png +0 -0
  286. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
  287. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
  288. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
  289. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_888888_256x240.png +0 -0
  290. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png +0 -0
  291. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
  292. data/test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css +0 -404
  293. data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +0 -44
  294. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  295. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  296. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  297. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  298. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  299. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  300. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  301. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  302. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_217bc0_256x240.png +0 -0
  303. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
  304. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_469bdd_256x240.png +0 -0
  305. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
  306. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
  307. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
  308. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
  309. data/test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css +0 -404
  310. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  311. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  312. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  313. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  314. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  315. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  316. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  317. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  318. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_222222_256x240.png +0 -0
  319. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  320. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_454545_256x240.png +0 -0
  321. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png +0 -0
  322. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  323. data/test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css +0 -404
  324. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  325. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  326. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  327. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  328. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  329. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  330. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  331. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  332. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  333. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  334. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  335. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  336. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  337. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  338. data/test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css +0 -404
  339. data/test/rails_root/public/stylesheets/reset.css +0 -0
  340. data/test/rails_root/public/stylesheets/styles.css +0 -89
  341. data/test/rails_root/public/stylesheets/themes/blue/styles.css +0 -1
  342. data/test/rails_root/public/stylesheets/themes/red/styles.css +0 -1
  343. data/test/rails_root/script/about +0 -3
  344. data/test/rails_root/script/breakpointer +0 -3
  345. data/test/rails_root/script/console +0 -3
  346. data/test/rails_root/script/create_project.rb +0 -52
  347. data/test/rails_root/script/cucumber +0 -8
  348. data/test/rails_root/script/dbconsole +0 -3
  349. data/test/rails_root/script/destroy +0 -3
  350. data/test/rails_root/script/generate +0 -3
  351. data/test/rails_root/script/performance/benchmarker +0 -3
  352. data/test/rails_root/script/performance/profiler +0 -3
  353. data/test/rails_root/script/performance/request +0 -3
  354. data/test/rails_root/script/plugin +0 -3
  355. data/test/rails_root/script/process/inspector +0 -3
  356. data/test/rails_root/script/process/reaper +0 -3
  357. data/test/rails_root/script/process/spawner +0 -3
  358. data/test/rails_root/script/runner +0 -3
  359. data/test/rails_root/script/server +0 -3
  360. data/test/rails_root/test/functional/.keep +0 -0
  361. data/test/rails_root/test/functional/shares_controller_test.rb +0 -119
  362. data/test/rails_root/test/test_helper.rb +0 -11
  363. data/test/rails_root/test/unit/.keep +0 -0
  364. data/test/rails_root/test/unit/share_test.rb +0 -59
  365. data/test/rails_root/test/unit/user_test.rb +0 -26
  366. data/test/rails_root/vendor/plugins/ssl_requirement/README +0 -43
  367. data/test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +0 -62
  368. data/test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb +0 -132
  369. data/uninstall.rb +0 -1
@@ -0,0 +1,35 @@
1
+ RailsTest::Application.configure do
2
+ # Settings specified here will take precedence over those in config/environment.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,63 @@
1
+ require 'geokit'
2
+
3
+ if defined? Geokit
4
+
5
+ # These defaults are used in Geokit::Mappable.distance_to and in acts_as_mappable
6
+ Geokit::default_units = :miles
7
+ Geokit::default_formula = :sphere
8
+
9
+ # This is the timeout value in seconds to be used for calls to the geocoder web
10
+ # services. For no timeout at all, comment out the setting. The timeout unit
11
+ # is in seconds.
12
+ Geokit::Geocoders::request_timeout = 3
13
+
14
+ # These settings are used if web service calls must be routed through a proxy.
15
+ # These setting can be nil if not needed, otherwise, addr and port must be
16
+ # filled in at a minimum. If the proxy requires authentication, the username
17
+ # and password can be provided as well.
18
+ Geokit::Geocoders::proxy_addr = nil
19
+ Geokit::Geocoders::proxy_port = nil
20
+ Geokit::Geocoders::proxy_user = nil
21
+ Geokit::Geocoders::proxy_pass = nil
22
+
23
+ # This is your yahoo application key for the Yahoo Geocoder.
24
+ # See http://developer.yahoo.com/faq/index.html#appid
25
+ # and http://developer.yahoo.com/maps/rest/V1/geocode.html
26
+ Geokit::Geocoders::yahoo = Secrets.yahoo_geo_key
27
+
28
+ # This is your Google Maps geocoder key.
29
+ # See http://www.google.com/apis/maps/signup.html
30
+ # and http://www.google.com/apis/maps/documentation/#Geocoding_Examples
31
+ Geokit::Geocoders::google = Secrets.google_geo_key
32
+
33
+ # This is your username and password for geocoder.us.
34
+ # To use the free service, the value can be set to nil or false. For
35
+ # usage tied to an account, the value should be set to username:password.
36
+ # See http://geocoder.us
37
+ # and http://geocoder.us/user/signup
38
+ Geokit::Geocoders::geocoder_us = false
39
+
40
+ # This is your authorization key for geocoder.ca.
41
+ # To use the free service, the value can be set to nil or false. For
42
+ # usage tied to an account, set the value to the key obtained from
43
+ # Geocoder.ca.
44
+ # See http://geocoder.ca
45
+ # and http://geocoder.ca/?register=1
46
+ Geokit::Geocoders::geocoder_ca = false
47
+
48
+ # Uncomment to use a username with the Geonames geocoder
49
+ #Geokit::Geocoders::geonames="REPLACE_WITH_YOUR_GEONAMES_USERNAME"
50
+
51
+ # This is the order in which the geocoders are called in a failover scenario
52
+ # If you only want to use a single geocoder, put a single symbol in the array.
53
+ # Valid symbols are :google, :yahoo, :us, and :ca.
54
+ # Be aware that there are Terms of Use restrictions on how you can use the
55
+ # various geocoders. Make sure you read up on relevant Terms of Use for each
56
+ # geocoder you are going to use.
57
+ Geokit::Geocoders::provider_order = [:google,:us]
58
+
59
+ # The IP provider order. Valid symbols are :ip,:geo_plugin.
60
+ # As before, make sure you read up on relevant Terms of Use for each
61
+ # Geokit::Geocoders::ip_provider_order = [:geo_plugin,:ip]
62
+
63
+ end
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
3
+ # Add new inflection rules using the following format
4
4
  # (all these examples are active by default):
5
- # Inflector.inflections do |inflect|
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
6
  # inflect.plural /^(ox)$/i, '\1en'
7
7
  # inflect.singular /^(ox)en/i, '\1'
8
8
  # inflect.irregular 'person', 'people'
@@ -0,0 +1,60 @@
1
+ MuckEngine.configure do |config|
2
+
3
+ # Global application values. These are used to display the app name, send emails, and configure where system emails go.
4
+ if Rails.env.production?
5
+ config.application_url = 'www.#{domain_name}' # Url of the application in production
6
+ elsif Rails.env.staging?
7
+ config.application_url = 'www.#{domain_name}' # Url of the application on staging
8
+ else
9
+ config.application_url = 'localhost:3000' # Url of the application for test or development
10
+ end
11
+
12
+ config.application_name = 'Example App' # Common name for your application. i.e. My App, Billy Bob, etc
13
+ config.from_email = 'support@example.com' # Emails will come from this address i.e. noreply@example.com, support@example.com, system@example.com, etc
14
+ config.from_email_name = 'Example App' # This will show up as the name on emails. i.e. support@example.com <Example>
15
+ config.support_email = 'support@example.com' # Support email for your application. This is used for contact us etc.
16
+ config.admin_email = 'admin@example.com' # Admin email for your application
17
+ config.customer_service_number = '1-800-' # Phone number if you have one (optional)
18
+
19
+ # Email charset. No need to change this unless you have a good reason to change the encoding.
20
+ config.mail_charset = 'utf-8'
21
+
22
+ # Email server configuration
23
+ # Sendgrid is easy: https://sendgrid.com/user/signup
24
+ config.email_server_address = "smtp.sendgrid.net" # Email server address. 'smtp.sendgrid.net' works for sendgrid
25
+ config.email_user_name = 'username' # Email server username
26
+ config.email_password = 'password' # Email server password
27
+ config.base_domain = 'example.com' # Basedomain that emails will come from
28
+
29
+ # ssl
30
+ config.enable_ssl = false # Enable ssl if you have an ssl certificate installed. This will provide security between the client and server.
31
+
32
+ # Google Analtyics Configuration. This will enable Google Analytics on your site and will be used if your template includes:
33
+ # <%= render :partial => 'layouts/global/google_analytics' %>
34
+ config.google_tracking_code = "" # Get a tracking code here: http://www.google.com/analytics/. The codes look like this: 'UA-9685000-0'
35
+ config.google_tracking_set_domain = "example.com" # Base domain provided to Google Analytics. Useful if you are using subdomains but want all traffic
36
+ # recorded into one account.
37
+ end
38
+
39
+ MuckUsers.configure do |config|
40
+ config.automatically_activate = true # Automatically active a users account during registration. If true the user won't get a
41
+ # 'confirm account' email. If false then the user will need to confirm their account via an email.
42
+ config.automatically_login_after_account_create = true # Automatically log the user in after they have setup their account. This should be false if you
43
+ # require them to activate their account.
44
+ config.send_welcome = true # Send out a welcome email after the user has signed up.
45
+
46
+ # if you use recaptcha you will need to also provide a public and private key available from http://recaptcha.net.
47
+ config.use_recaptcha = false # This will turn on recaptcha during registration. This is an alternative to sending the
48
+ # user a confirm email and can help reduce spam registrations.
49
+
50
+ config.require_access_code = false # Only let a user sign up if they have an access code
51
+ config.validate_terms_of_service = true # Require that the accept terms of service before signing up.
52
+ config.let_users_delete_their_account = false # Turn on/off ability for users to delete their own account. It is not recommended that you let
53
+ # users delete their own accounts since the delete can cascade through the system with unknown results.
54
+ end
55
+
56
+
57
+ if defined?(ActiveRecord)
58
+ # Don't Include Active Record class name as root for JSON serialized output.
59
+ ActiveRecord::Base.include_root_in_json = false
60
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ RailsTest::Application.config.secret_token = '9dokr4d5e1od335fdfb1caec46711pdodkiec976d0ba95b4c0f575cb046cc358bce7a335ee36eb29253fb680d8u3838d871f6baeff48220fee8e9e42ab88diub'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ RailsTest::Application.config.session_store :cookie_store, :key => '_muck_users_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rake db:sessions:create")
8
+ # RailsTest::Application.config.session_store :active_record_store
@@ -0,0 +1,4 @@
1
+ RailsTest::Application.routes.draw do
2
+ root :to => "default#index"
3
+ match ':controller(/:action(/:id(.:format)))'
4
+ end
@@ -0,0 +1,219 @@
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
+ require 'uri'
9
+ require 'cgi'
10
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
11
+
12
+ module WithinHelpers
13
+ def with_scope(locator)
14
+ locator ? within(locator) { yield } : yield
15
+ end
16
+ end
17
+ World(WithinHelpers)
18
+
19
+ Given /^(?:|I )am on (.+)$/ do |page_name|
20
+ visit path_to(page_name)
21
+ end
22
+
23
+ When /^(?:|I )go to (.+)$/ do |page_name|
24
+ visit path_to(page_name)
25
+ end
26
+
27
+ When /^(?:|I )press "([^"]*)"(?: within "([^"]*)")?$/ do |button, selector|
28
+ with_scope(selector) do
29
+ click_button(button)
30
+ end
31
+ end
32
+
33
+ When /^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector|
34
+ with_scope(selector) do
35
+ click_link(link)
36
+ end
37
+ end
38
+
39
+ When /^(?:|I )fill in "([^"]*)" with "([^"]*)"(?: within "([^"]*)")?$/ do |field, value, selector|
40
+ with_scope(selector) do
41
+ fill_in(field, :with => value)
42
+ end
43
+ end
44
+
45
+ When /^(?:|I )fill in "([^"]*)" for "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector|
46
+ with_scope(selector) do
47
+ fill_in(field, :with => value)
48
+ end
49
+ end
50
+
51
+ # Use this to fill in an entire form with data from a table. Example:
52
+ #
53
+ # When I fill in the following:
54
+ # | Account Number | 5002 |
55
+ # | Expiry date | 2009-11-01 |
56
+ # | Note | Nice guy |
57
+ # | Wants Email? | |
58
+ #
59
+ # TODO: Add support for checkbox, select og option
60
+ # based on naming conventions.
61
+ #
62
+ When /^(?:|I )fill in the following(?: within "([^"]*)")?:$/ do |selector, fields|
63
+ with_scope(selector) do
64
+ fields.rows_hash.each do |name, value|
65
+ When %{I fill in "#{name}" with "#{value}"}
66
+ end
67
+ end
68
+ end
69
+
70
+ When /^(?:|I )select "([^"]*)" from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector|
71
+ with_scope(selector) do
72
+ select(value, :from => field)
73
+ end
74
+ end
75
+
76
+ When /^(?:|I )check "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
77
+ with_scope(selector) do
78
+ check(field)
79
+ end
80
+ end
81
+
82
+ When /^(?:|I )uncheck "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
83
+ with_scope(selector) do
84
+ uncheck(field)
85
+ end
86
+ end
87
+
88
+ When /^(?:|I )choose "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
89
+ with_scope(selector) do
90
+ choose(field)
91
+ end
92
+ end
93
+
94
+ When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"(?: within "([^"]*)")?$/ do |path, field, selector|
95
+ with_scope(selector) do
96
+ attach_file(field, path)
97
+ end
98
+ end
99
+
100
+ Then /^(?:|I )should see JSON:$/ do |expected_json|
101
+ require 'json'
102
+ expected = JSON.pretty_generate(JSON.parse(expected_json))
103
+ actual = JSON.pretty_generate(JSON.parse(response.body))
104
+ expected.should == actual
105
+ end
106
+
107
+ Then /^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector|
108
+ with_scope(selector) do
109
+ if page.respond_to? :should
110
+ page.should have_content(text)
111
+ else
112
+ assert page.has_content?(text)
113
+ end
114
+ end
115
+ end
116
+
117
+ Then /^(?:|I )should see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector|
118
+ regexp = Regexp.new(regexp)
119
+ with_scope(selector) do
120
+ if page.respond_to? :should
121
+ page.should have_xpath('//*', :text => regexp)
122
+ else
123
+ assert page.has_xpath?('//*', :text => regexp)
124
+ end
125
+ end
126
+ end
127
+
128
+ Then /^(?:|I )should not see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector|
129
+ with_scope(selector) do
130
+ if page.respond_to? :should
131
+ page.should have_no_content(text)
132
+ else
133
+ assert page.has_no_content?(text)
134
+ end
135
+ end
136
+ end
137
+
138
+ Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector|
139
+ regexp = Regexp.new(regexp)
140
+ with_scope(selector) do
141
+ if page.respond_to? :should
142
+ page.should have_no_xpath('//*', :text => regexp)
143
+ else
144
+ assert page.has_no_xpath?('//*', :text => regexp)
145
+ end
146
+ end
147
+ end
148
+
149
+ Then /^the "([^"]*)" field(?: within "([^"]*)")? should contain "([^"]*)"$/ do |field, selector, value|
150
+ with_scope(selector) do
151
+ field = find_field(field)
152
+ field_value = (field.tag_name == 'textarea') ? field.text : field.value
153
+ if field_value.respond_to? :should
154
+ field_value.should =~ /#{value}/
155
+ else
156
+ assert_match(/#{value}/, field_value)
157
+ end
158
+ end
159
+ end
160
+
161
+ Then /^the "([^"]*)" field(?: within "([^"]*)")? should not contain "([^"]*)"$/ do |field, selector, value|
162
+ with_scope(selector) do
163
+ field = find_field(field)
164
+ field_value = (field.tag_name == 'textarea') ? field.text : field.value
165
+ if field_value.respond_to? :should_not
166
+ field_value.should_not =~ /#{value}/
167
+ else
168
+ assert_no_match(/#{value}/, field_value)
169
+ end
170
+ end
171
+ end
172
+
173
+ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |label, selector|
174
+ with_scope(selector) do
175
+ field_checked = find_field(label)['checked']
176
+ if field_checked.respond_to? :should
177
+ field_checked.should be_true
178
+ else
179
+ assert field_checked
180
+ end
181
+ end
182
+ end
183
+
184
+ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
185
+ with_scope(selector) do
186
+ field_checked = find_field(label)['checked']
187
+ if field_checked.respond_to? :should
188
+ field_checked.should be_false
189
+ else
190
+ assert !field_checked
191
+ end
192
+ end
193
+ end
194
+
195
+ Then /^(?:|I )should be on (.+)$/ do |page_name|
196
+ current_path = URI.parse(current_url).path
197
+ if current_path.respond_to? :should
198
+ current_path.should == path_to(page_name)
199
+ else
200
+ assert_equal path_to(page_name), current_path
201
+ end
202
+ end
203
+
204
+ Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
205
+ query = URI.parse(current_url).query
206
+ actual_params = query ? CGI.parse(query) : {}
207
+ expected_params = {}
208
+ expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
209
+
210
+ if actual_params.respond_to? :should
211
+ actual_params.should == expected_params
212
+ else
213
+ assert_equal expected_params, actual_params
214
+ end
215
+ end
216
+
217
+ Then /^show me the page$/ do
218
+ save_and_open_page
219
+ end
@@ -0,0 +1,19 @@
1
+ require 'capybara/rails'
2
+ require 'capybara/cucumber'
3
+
4
+ Capybara.default_driver = :selenium
5
+ Capybara.app_host = "http://localhost:8888"
6
+ Capybara.default_wait_time = 10
7
+
8
+ require "selenium-webdriver"
9
+ Selenium::WebDriver::Firefox::Binary.path = '/Applications/Firefox.app/Contents/MacOS/firefox-bin'
10
+
11
+ require 'factory_girl'
12
+ require 'muck_test_helper'
13
+
14
+ Before do
15
+ # Create admin user:
16
+ Rake::Task[ 'muck:users:create_admin' ].execute
17
+
18
+ visit "/logout"
19
+ end