muck-users 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. data/README.rdoc +12 -3
  2. data/Rakefile +3 -2
  3. data/VERSION +1 -1
  4. data/muck-users.gemspec +257 -37
  5. data/pkg/muck-users-0.1.4.gem +0 -0
  6. data/rdoc/classes/ActiveRecord/SecureMethods.html +216 -0
  7. data/rdoc/classes/ActiveRecord.html +10 -0
  8. data/rdoc/classes/MuckUsers/Tasks.html +6 -6
  9. data/rdoc/created.rid +1 -1
  10. data/rdoc/files/lib/active_record/secure_methods_rb.html +101 -0
  11. data/rdoc/files/lib/muck_users_rb.html +2 -1
  12. data/rdoc/fr_class_index.html +1 -0
  13. data/rdoc/fr_file_index.html +1 -0
  14. data/rdoc/fr_method_index.html +7 -3
  15. data/test/rails_root/.gitignore +8 -0
  16. data/test/rails_root/.rake_tasks +103 -0
  17. data/test/rails_root/Capfile +3 -0
  18. data/test/rails_root/Rakefile +15 -0
  19. data/test/rails_root/app/controllers/application_controller.rb +6 -0
  20. data/test/rails_root/app/controllers/default_controller.rb +7 -0
  21. data/test/rails_root/app/helpers/application_helper.rb +3 -0
  22. data/test/rails_root/app/models/.keep +0 -0
  23. data/test/rails_root/app/models/user.rb +15 -0
  24. data/test/rails_root/app/models/user_session.rb +2 -0
  25. data/test/rails_root/app/views/default/index.html.erb +0 -0
  26. data/test/rails_root/app/views/layouts/default.html.erb +26 -0
  27. data/test/rails_root/config/amazon_s3.yml +14 -0
  28. data/test/rails_root/config/boot.rb +109 -0
  29. data/test/rails_root/config/database.yml +14 -0
  30. data/test/rails_root/config/environment.rb +22 -0
  31. data/test/rails_root/config/environments/development.rb +19 -0
  32. data/test/rails_root/config/environments/production.rb +1 -0
  33. data/test/rails_root/config/environments/test.rb +33 -0
  34. data/test/rails_root/config/global_config.yml +18 -0
  35. data/test/rails_root/config/initializers/inflections.rb +10 -0
  36. data/test/rails_root/config/initializers/mime_types.rb +5 -0
  37. data/test/rails_root/config/initializers/requires.rb +13 -0
  38. data/test/rails_root/config/initializers/session_store.rb +8 -0
  39. data/test/rails_root/config/routes.rb +9 -0
  40. data/test/rails_root/db/.keep +0 -0
  41. data/test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb +16 -0
  42. data/test/rails_root/db/migrate/20090602041838_create_users.rb +39 -0
  43. data/test/rails_root/db/schema.rb +131 -0
  44. data/test/rails_root/features/step_definitions/webrat_steps.rb +99 -0
  45. data/test/rails_root/features/support/env.rb +14 -0
  46. data/test/rails_root/public/.htaccess +40 -0
  47. data/test/rails_root/public/404.html +30 -0
  48. data/test/rails_root/public/422.html +30 -0
  49. data/test/rails_root/public/500.html +30 -0
  50. data/test/rails_root/public/dispatch.rb +10 -0
  51. data/test/rails_root/public/favicon.ico +0 -0
  52. data/test/rails_root/public/images/arrow_left.gif +0 -0
  53. data/test/rails_root/public/images/arrow_right.gif +0 -0
  54. data/test/rails_root/public/images/blue/preview.gif +0 -0
  55. data/test/rails_root/public/images/icons/accept.png +0 -0
  56. data/test/rails_root/public/images/icons/add.png +0 -0
  57. data/test/rails_root/public/images/icons/delete.png +0 -0
  58. data/test/rails_root/public/images/icons/vote.png +0 -0
  59. data/test/rails_root/public/images/loading.gif +0 -0
  60. data/test/rails_root/public/images/profile_default.jpg +0 -0
  61. data/test/rails_root/public/images/rails.png +0 -0
  62. data/test/rails_root/public/images/red/preview.gif +0 -0
  63. data/test/rails_root/public/images/spinner.gif +0 -0
  64. data/test/rails_root/public/images/sprites.png +0 -0
  65. data/test/rails_root/public/javascripts/application.js +2 -0
  66. data/test/rails_root/public/javascripts/builder.js +136 -0
  67. data/test/rails_root/public/javascripts/controls.js +963 -0
  68. data/test/rails_root/public/javascripts/dragdrop.js +972 -0
  69. data/test/rails_root/public/javascripts/effects.js +1120 -0
  70. data/test/rails_root/public/javascripts/fancyzoom.min.js +1 -0
  71. data/test/rails_root/public/javascripts/jquery/jquery-ui.js +273 -0
  72. data/test/rails_root/public/javascripts/jquery/jquery.form.js +637 -0
  73. data/test/rails_root/public/javascripts/jquery/jquery.jgrowl.js +2 -0
  74. data/test/rails_root/public/javascripts/jquery/jquery.js +19 -0
  75. data/test/rails_root/public/javascripts/jquery/jquery.tips.js +69 -0
  76. data/test/rails_root/public/javascripts/muck.js +76 -0
  77. data/test/rails_root/public/javascripts/muck_activities.js +100 -0
  78. data/test/rails_root/public/javascripts/prototype.js +4225 -0
  79. data/test/rails_root/public/javascripts/scriptaculous.js +58 -0
  80. data/test/rails_root/public/javascripts/slider.js +277 -0
  81. data/test/rails_root/public/javascripts/sound.js +60 -0
  82. data/test/rails_root/public/robots.txt +1 -0
  83. data/test/rails_root/public/stylesheets/.keep +0 -0
  84. data/test/rails_root/public/stylesheets/admin.css +12 -0
  85. data/test/rails_root/public/stylesheets/blueprint/ie.css +26 -0
  86. data/test/rails_root/public/stylesheets/blueprint/liquid_screen.css +203 -0
  87. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
  88. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
  89. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
  90. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/readme.txt +32 -0
  91. data/test/rails_root/public/stylesheets/blueprint/plugins/buttons/screen.css +97 -0
  92. data/test/rails_root/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +14 -0
  93. data/test/rails_root/public/stylesheets/blueprint/plugins/fancy-type/screen.css +71 -0
  94. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
  95. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
  96. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
  97. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
  98. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
  99. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  100. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
  101. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
  102. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/readme.txt +18 -0
  103. data/test/rails_root/public/stylesheets/blueprint/plugins/link-icons/screen.css +40 -0
  104. data/test/rails_root/public/stylesheets/blueprint/plugins/liquid/liquid.css +134 -0
  105. data/test/rails_root/public/stylesheets/blueprint/plugins/liquid/src/liquid.css +197 -0
  106. data/test/rails_root/public/stylesheets/blueprint/plugins/rtl/readme.txt +10 -0
  107. data/test/rails_root/public/stylesheets/blueprint/plugins/rtl/screen.css +109 -0
  108. data/test/rails_root/public/stylesheets/blueprint/print.css +30 -0
  109. data/test/rails_root/public/stylesheets/blueprint/screen.css +251 -0
  110. data/test/rails_root/public/stylesheets/blueprint/sprite.css +1 -0
  111. data/test/rails_root/public/stylesheets/blueprint/src/forms.css +49 -0
  112. data/test/rails_root/public/stylesheets/blueprint/src/grid.css +213 -0
  113. data/test/rails_root/public/stylesheets/blueprint/src/grid.png +0 -0
  114. data/test/rails_root/public/stylesheets/blueprint/src/ie.css +59 -0
  115. data/test/rails_root/public/stylesheets/blueprint/src/print.css +85 -0
  116. data/test/rails_root/public/stylesheets/blueprint/src/reset.css +38 -0
  117. data/test/rails_root/public/stylesheets/blueprint/src/typography.css +105 -0
  118. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
  119. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
  120. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png +0 -0
  121. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_50_99c2ff_1x400.png +0 -0
  122. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
  123. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png +0 -0
  124. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  125. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
  126. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +0 -0
  127. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_222222_256x240.png +0 -0
  128. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
  129. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
  130. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
  131. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_888888_256x240.png +0 -0
  132. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png +0 -0
  133. data/test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
  134. data/test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css +404 -0
  135. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  136. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  137. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  138. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  139. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  140. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  141. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  142. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  143. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_217bc0_256x240.png +0 -0
  144. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
  145. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_469bdd_256x240.png +0 -0
  146. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
  147. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
  148. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
  149. data/test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
  150. data/test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css +404 -0
  151. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  152. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  153. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  154. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  155. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  156. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  157. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  158. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  159. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_222222_256x240.png +0 -0
  160. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  161. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_454545_256x240.png +0 -0
  162. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png +0 -0
  163. data/test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  164. data/test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css +404 -0
  165. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  166. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  167. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  168. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  169. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  170. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  171. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  172. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  173. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  174. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  175. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  176. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  177. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  178. data/test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  179. data/test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css +404 -0
  180. data/test/rails_root/public/stylesheets/reset.css +0 -0
  181. data/test/rails_root/public/stylesheets/styles.css +79 -0
  182. data/test/rails_root/public/stylesheets/themes/blue/styles.css +1 -0
  183. data/test/rails_root/public/stylesheets/themes/red/styles.css +1 -0
  184. data/test/rails_root/script/about +3 -0
  185. data/test/rails_root/script/breakpointer +3 -0
  186. data/test/rails_root/script/console +3 -0
  187. data/test/rails_root/script/create_project.rb +52 -0
  188. data/test/rails_root/script/cucumber +7 -0
  189. data/test/rails_root/script/dbconsole +3 -0
  190. data/test/rails_root/script/destroy +3 -0
  191. data/test/rails_root/script/generate +3 -0
  192. data/test/rails_root/script/performance/benchmarker +3 -0
  193. data/test/rails_root/script/performance/profiler +3 -0
  194. data/test/rails_root/script/performance/request +3 -0
  195. data/test/rails_root/script/plugin +3 -0
  196. data/test/rails_root/script/process/inspector +3 -0
  197. data/test/rails_root/script/process/reaper +3 -0
  198. data/test/rails_root/script/process/spawner +3 -0
  199. data/test/rails_root/script/runner +3 -0
  200. data/test/rails_root/script/server +3 -0
  201. data/test/{factories.rb → rails_root/test/factories.rb} +0 -0
  202. data/test/rails_root/test/functional/.keep +0 -0
  203. data/test/{functional → rails_root/test/functional}/activations_controller_test.rb +0 -0
  204. data/test/{functional → rails_root/test/functional}/admin/roles_controller_test.rb +0 -0
  205. data/test/{functional → rails_root/test/functional}/admin/users_controller_test.rb +0 -0
  206. data/test/{functional → rails_root/test/functional}/password_resets_controller_test.rb +0 -0
  207. data/test/{functional → rails_root/test/functional}/user_sessions_controller_test.rb +0 -0
  208. data/test/{functional → rails_root/test/functional}/users_controller_test.rb +0 -0
  209. data/test/rails_root/test/integration/.keep +0 -0
  210. data/test/rails_root/test/mocks/development/.keep +0 -0
  211. data/test/rails_root/test/mocks/test/.keep +0 -0
  212. data/test/{shoulda_macros → rails_root/test/shoulda_macros}/controller.rb +0 -0
  213. data/test/{shoulda_macros → rails_root/test/shoulda_macros}/forms.rb +0 -0
  214. data/test/{shoulda_macros → rails_root/test/shoulda_macros}/models.rb +0 -0
  215. data/test/{shoulda_macros → rails_root/test/shoulda_macros}/pagination.rb +0 -0
  216. data/test/{shoulda_macros → rails_root/test/shoulda_macros}/plugins.rb +0 -0
  217. data/test/{test_helper.rb → rails_root/test/test_helper.rb} +4 -3
  218. data/test/rails_root/test/unit/.keep +0 -0
  219. data/test/{unit → rails_root/test/unit}/muck_user_mailer_test.rb +0 -0
  220. data/test/{unit → rails_root/test/unit}/permission_test.rb +0 -0
  221. data/test/{unit → rails_root/test/unit}/role_test.rb +0 -0
  222. data/test/rails_root/vendor/plugins/ssl_requirement/README +43 -0
  223. data/test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +62 -0
  224. data/test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb +132 -0
  225. metadata +264 -35
  226. data/pkg/muck-users-0.1.3.gem +0 -0
@@ -0,0 +1,18 @@
1
+ #The account plugin needs to be configured. The following values may be used to customize the account
2
+
3
+ default: &DEFAULT
4
+
5
+ application_url: localhost:3000
6
+
7
+ # session key information
8
+ session_key: _uploader_session
9
+ session_secret: ea55c4d5e105735fdfb1caec46711b3dd14ec976d0ba95b4c0f575cb046cc358bce7a335ee36eb29253fb680ef8b838d871f6baeff48220fee8e9e42ab84774b
10
+
11
+ production:
12
+ <<: *DEFAULT
13
+
14
+ development:
15
+ <<: *DEFAULT
16
+
17
+ test:
18
+ <<: *DEFAULT
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,13 @@
1
+ Dir[File.join(RAILS_ROOT, 'lib', 'extensions', '*.rb')].each do |f|
2
+ require f
3
+ end
4
+
5
+ Dir[File.join(RAILS_ROOT, 'lib', '*.rb')].each do |f|
6
+ require f
7
+ end
8
+
9
+ # Rails 2 doesn't like mocks
10
+
11
+ Dir[File.join(RAILS_ROOT, 'test', 'mocks', RAILS_ENV, '*.rb')].each do |f|
12
+ require f
13
+ end
@@ -0,0 +1,8 @@
1
+ # Your secret key for verifying cookie session data integrity.
2
+ # If you change this key, all old sessions will become invalid!
3
+ # Make sure the secret is at least 30 characters and all random,
4
+ # no regular words or you'll be exposed to dictionary attacks.
5
+ ActionController::Base.session = {
6
+ :key => GlobalConfig.session_key,
7
+ :secret => GlobalConfig.session_secret
8
+ }
@@ -0,0 +1,9 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+
3
+ map.root :controller => 'default', :action => 'index'
4
+
5
+ # Install the default routes as the lowest priority.
6
+ map.connect ':controller/:action/:id'
7
+ map.connect ':controller/:action/:id.:format'
8
+
9
+ end
File without changes
@@ -0,0 +1,16 @@
1
+ class CreateMuckPermissionsAndRoles < ActiveRecord::Migration
2
+
3
+ create_table "permissions", :force => true do |t|
4
+ t.integer "role_id", :null => false
5
+ t.integer "user_id", :null => false
6
+ t.datetime "created_at"
7
+ t.datetime "updated_at"
8
+ end
9
+
10
+ create_table "roles", :force => true do |t|
11
+ t.string "rolename"
12
+ t.datetime "created_at"
13
+ t.datetime "updated_at"
14
+ end
15
+
16
+ end
@@ -0,0 +1,39 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+
3
+ def self.up
4
+ create_table :users, :force => true do |t|
5
+ t.string :login
6
+ t.string :email
7
+ t.string :first_name
8
+ t.string :last_name
9
+ t.string :crypted_password
10
+ t.string :password_salt
11
+ t.string :persistence_token
12
+ t.string :single_access_token
13
+ t.string :perishable_token
14
+ t.integer :login_count, :null => false, :default => 0
15
+ t.integer :failed_login_count, :null => false, :default => 0
16
+ t.datetime :last_request_at
17
+ t.datetime :last_login_at
18
+ t.datetime :current_login_at
19
+ t.string :current_login_ip
20
+ t.string :last_login_ip
21
+ t.boolean :terms_of_service, :default => false, :null => false
22
+ t.string :time_zone, :default => "UTC"
23
+ t.datetime :disabled_at
24
+ t.datetime :activated_at
25
+ t.timestamps
26
+ end
27
+
28
+ add_index :users, :login
29
+ add_index :users, :email
30
+ add_index :users, :persistence_token
31
+ add_index :users, :perishable_token
32
+ add_index :users, :single_access_token
33
+ add_index :users, :last_request_at
34
+ end
35
+
36
+ def self.down
37
+ drop_table :users
38
+ end
39
+ end
@@ -0,0 +1,131 @@
1
+ # This file is auto-generated from the current state of the database. Instead of editing this file,
2
+ # please use the migrations feature of Active Record to incrementally modify your database, and
3
+ # then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
+ # to create the application database on another system, you should be using db:schema:load, not running
7
+ # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
9
+ #
10
+ # It's strongly recommended to check this file into your version control system.
11
+
12
+ ActiveRecord::Schema.define(:version => 20090613173314) do
13
+
14
+ create_table "activities", :force => true do |t|
15
+ t.integer "item_id"
16
+ t.string "item_type"
17
+ t.string "template"
18
+ t.integer "source_id"
19
+ t.string "source_type"
20
+ t.text "content"
21
+ t.string "title"
22
+ t.boolean "is_status_update", :default => false
23
+ t.boolean "is_public", :default => true
24
+ t.datetime "created_at"
25
+ t.datetime "updated_at"
26
+ end
27
+
28
+ add_index "activities", ["item_id", "item_type"], :name => "index_activities_on_item_id_and_item_type"
29
+
30
+ create_table "activity_feeds", :force => true do |t|
31
+ t.integer "activity_id"
32
+ t.integer "ownable_id"
33
+ t.string "ownable_type"
34
+ end
35
+
36
+ add_index "activity_feeds", ["activity_id"], :name => "index_activity_feeds_on_activity_id"
37
+ add_index "activity_feeds", ["ownable_id", "ownable_type"], :name => "index_activity_feeds_on_ownable_id_and_ownable_type"
38
+
39
+ create_table "comments", :force => true do |t|
40
+ t.integer "commentable_id", :default => 0
41
+ t.string "commentable_type", :limit => 15, :default => ""
42
+ t.text "body", :default => ""
43
+ t.integer "user_id", :default => 0, :null => false
44
+ t.integer "parent_id"
45
+ t.integer "lft"
46
+ t.integer "rgt"
47
+ t.integer "is_denied", :default => 0, :null => false
48
+ t.boolean "is_reviewed", :default => false
49
+ t.datetime "created_at"
50
+ t.datetime "updated_at"
51
+ end
52
+
53
+ add_index "comments", ["commentable_id", "commentable_type"], :name => "index_comments_on_commentable_id_and_commentable_type"
54
+ add_index "comments", ["user_id"], :name => "index_comments_on_user_id"
55
+
56
+ create_table "countries", :force => true do |t|
57
+ t.string "name", :limit => 128, :default => "", :null => false
58
+ t.string "abbreviation", :limit => 3, :default => "", :null => false
59
+ t.integer "sort", :default => 1000, :null => false
60
+ end
61
+
62
+ add_index "countries", ["abbreviation"], :name => "index_countries_on_abbreviation"
63
+ add_index "countries", ["name"], :name => "index_countries_on_name"
64
+
65
+ create_table "languages", :force => true do |t|
66
+ t.string "name"
67
+ t.string "english_name"
68
+ t.string "locale"
69
+ t.boolean "supported", :default => true
70
+ t.integer "is_default", :default => 0
71
+ end
72
+
73
+ add_index "languages", ["locale"], :name => "index_languages_on_locale"
74
+ add_index "languages", ["name"], :name => "index_languages_on_name"
75
+
76
+ create_table "permissions", :force => true do |t|
77
+ t.integer "role_id", :null => false
78
+ t.integer "user_id", :null => false
79
+ t.datetime "created_at"
80
+ t.datetime "updated_at"
81
+ end
82
+
83
+ create_table "roles", :force => true do |t|
84
+ t.string "rolename"
85
+ t.datetime "created_at"
86
+ t.datetime "updated_at"
87
+ end
88
+
89
+ create_table "states", :force => true do |t|
90
+ t.string "name", :limit => 128, :default => "", :null => false
91
+ t.string "abbreviation", :limit => 3, :default => "", :null => false
92
+ t.integer "country_id", :limit => 8, :null => false
93
+ end
94
+
95
+ add_index "states", ["abbreviation"], :name => "index_states_on_abbreviation"
96
+ add_index "states", ["country_id"], :name => "index_states_on_country_id"
97
+ add_index "states", ["name"], :name => "index_states_on_name"
98
+
99
+ create_table "users", :force => true do |t|
100
+ t.string "login"
101
+ t.string "email"
102
+ t.string "first_name"
103
+ t.string "last_name"
104
+ t.string "crypted_password"
105
+ t.string "password_salt"
106
+ t.string "persistence_token"
107
+ t.string "single_access_token"
108
+ t.string "perishable_token"
109
+ t.integer "login_count", :default => 0, :null => false
110
+ t.integer "failed_login_count", :default => 0, :null => false
111
+ t.datetime "last_request_at"
112
+ t.datetime "last_login_at"
113
+ t.datetime "current_login_at"
114
+ t.string "current_login_ip"
115
+ t.string "last_login_ip"
116
+ t.boolean "terms_of_service", :default => false, :null => false
117
+ t.string "time_zone", :default => "UTC"
118
+ t.datetime "disabled_at"
119
+ t.datetime "activated_at"
120
+ t.datetime "created_at"
121
+ t.datetime "updated_at"
122
+ end
123
+
124
+ add_index "users", ["email"], :name => "index_users_on_email"
125
+ add_index "users", ["last_request_at"], :name => "index_users_on_last_request_at"
126
+ add_index "users", ["login"], :name => "index_users_on_login"
127
+ add_index "users", ["perishable_token"], :name => "index_users_on_perishable_token"
128
+ add_index "users", ["persistence_token"], :name => "index_users_on_persistence_token"
129
+ add_index "users", ["single_access_token"], :name => "index_users_on_single_access_token"
130
+
131
+ end
@@ -0,0 +1,99 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
2
+
3
+ # Commonly used webrat steps
4
+ # http://github.com/brynary/webrat
5
+
6
+ When /^I go to (.+)$/ do |page_name|
7
+ visit path_to(page_name)
8
+ end
9
+
10
+ When /^I press "(.*)"$/ do |button|
11
+ click_button(button)
12
+ end
13
+
14
+ When /^I follow "(.*)"$/ do |link|
15
+ click_link(link)
16
+ end
17
+
18
+ When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
19
+ fill_in(field, :with => value)
20
+ end
21
+
22
+ When /^I select "(.*)" from "(.*)"$/ do |value, field|
23
+ select(value, :from => field)
24
+ end
25
+
26
+ # Use this step in conjunction with Rail's datetime_select helper. For example:
27
+ # When I select "December 25, 2008 10:00" as the date and time
28
+ When /^I select "(.*)" as the date and time$/ do |time|
29
+ select_datetime(time)
30
+ end
31
+
32
+ # Use this step when using multiple datetime_select helpers on a page or
33
+ # you want to specify which datetime to select. Given the following view:
34
+ # <%= f.label :preferred %><br />
35
+ # <%= f.datetime_select :preferred %>
36
+ # <%= f.label :alternative %><br />
37
+ # <%= f.datetime_select :alternative %>
38
+ # The following steps would fill out the form:
39
+ # When I select "November 23, 2004 11:20" as the "Preferred" data and time
40
+ # And I select "November 25, 2004 10:30" as the "Alternative" data and time
41
+ When /^I select "(.*)" as the "(.*)" date and time$/ do |datetime, datetime_label|
42
+ select_datetime(datetime, :from => datetime_label)
43
+ end
44
+
45
+ # Use this step in conjuction with Rail's time_select helper. For example:
46
+ # When I select "2:20PM" as the time
47
+ # Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
48
+ # will convert the 2:20PM to 14:20 and then select it.
49
+ When /^I select "(.*)" as the time$/ do |time|
50
+ select_time(time)
51
+ end
52
+
53
+ # Use this step when using multiple time_select helpers on a page or you want to
54
+ # specify the name of the time on the form. For example:
55
+ # When I select "7:30AM" as the "Gym" time
56
+ When /^I select "(.*)" as the "(.*)" time$/ do |time, time_label|
57
+ select_time(time, :from => time_label)
58
+ end
59
+
60
+ # Use this step in conjuction with Rail's date_select helper. For example:
61
+ # When I select "February 20, 1981" as the date
62
+ When /^I select "(.*)" as the date$/ do |date|
63
+ select_date(date)
64
+ end
65
+
66
+ # Use this step when using multiple date_select helpers on one page or
67
+ # you want to specify the name of the date on the form. For example:
68
+ # When I select "April 26, 1982" as the "Date of Birth" date
69
+ When /^I select "(.*)" as the "(.*)" date$/ do |date, date_label|
70
+ select_date(date, :from => date_label)
71
+ end
72
+
73
+ When /^I check "(.*)"$/ do |field|
74
+ check(field)
75
+ end
76
+
77
+ When /^I uncheck "(.*)"$/ do |field|
78
+ uncheck(field)
79
+ end
80
+
81
+ When /^I choose "(.*)"$/ do |field|
82
+ choose(field)
83
+ end
84
+
85
+ When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
86
+ attach_file(field, path)
87
+ end
88
+
89
+ Then /^I should see "(.*)"$/ do |text|
90
+ assert_match /#{text}/m, response.body
91
+ end
92
+
93
+ Then /^I should not see "(.*)"$/ do |text|
94
+ assert_match /#{text}/m, response.body
95
+ end
96
+
97
+ Then /^the "(.*)" checkbox should be checked$/ do |label|
98
+ field_labeled(label).should be_checked
99
+ end
@@ -0,0 +1,14 @@
1
+ # Sets up the Rails environment for Cucumber
2
+ ENV["RAILS_ENV"] = "test"
3
+ require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
4
+ require 'factory_girl'
5
+ require 'cucumber/rails/world'
6
+ require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
7
+ Cucumber::Rails.use_transactional_fixtures
8
+ Cucumber::Rails.bypass_rescue
9
+
10
+ require 'webrat'
11
+
12
+ Webrat.configure do |config|
13
+ config.mode = :rails
14
+ end
@@ -0,0 +1,40 @@
1
+ # General Apache options
2
+ AddHandler fastcgi-script .fcgi
3
+ AddHandler cgi-script .cgi
4
+ Options +FollowSymLinks +ExecCGI
5
+
6
+ # If you don't want Rails to look in certain directories,
7
+ # use the following rewrite rules so that Apache won't rewrite certain requests
8
+ #
9
+ # Example:
10
+ # RewriteCond %{REQUEST_URI} ^/notrails.*
11
+ # RewriteRule .* - [L]
12
+
13
+ # Redirect all requests not available on the filesystem to Rails
14
+ # By default the cgi dispatcher is used which is very slow
15
+ #
16
+ # For better performance replace the dispatcher with the fastcgi one
17
+ #
18
+ # Example:
19
+ # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
20
+ RewriteEngine On
21
+
22
+ # If your Rails application is accessed via an Alias directive,
23
+ # then you MUST also set the RewriteBase in this htaccess file.
24
+ #
25
+ # Example:
26
+ # Alias /myrailsapp /path/to/myrailsapp/public
27
+ # RewriteBase /myrailsapp
28
+
29
+ RewriteRule ^$ index.html [QSA]
30
+ RewriteRule ^([^.]+)$ $1.html [QSA]
31
+ RewriteCond %{REQUEST_FILENAME} !-f
32
+ RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
33
+
34
+ # In case Rails experiences terminal errors
35
+ # Instead of displaying this message you can supply a file here which will be rendered instead
36
+ #
37
+ # Example:
38
+ # ErrorDocument 500 /500.html
39
+
40
+ ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
@@ -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</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>
@@ -0,0 +1,10 @@
1
+ #!/opt/local/bin/ruby
2
+
3
+ require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
4
+
5
+ # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
6
+ # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
7
+ require "dispatcher"
8
+
9
+ ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
10
+ Dispatcher.dispatch
File without changes
@@ -0,0 +1,2 @@
1
+ // Place your application-specific JavaScript functions and classes here
2
+ // This file is automatically included by javascript_include_tag :defaults