Permalink
Browse files

mostly updated to work with mongoid 2.4

  • Loading branch information...
2 parents da8e61c + d8cd056 commit 795daeb65d2b33012ea80fef2382ec01374a92cf @kristianmandrup committed Mar 28, 2012
Showing with 3,109 additions and 157 deletions.
  1. +8 −0 .idea/.generators
  2. +7 −0 .idea/.rakeTasks
  3. +5 −0 .idea/encodings.xml
  4. +11 −0 .idea/misc.xml
  5. +9 −0 .idea/modules.xml
  6. +189 −0 .idea/mongoid-carrierwave-uploadify.iml
  7. +8 −0 .idea/vcs.xml
  8. +653 −0 .idea/workspace.xml
  9. +5 −8 Gemfile
  10. +141 −113 Gemfile.lock
  11. +44 −0 app/controllers/companies_controller.rb
  12. +83 −0 app/controllers/people_controller.rb
  13. +98 −0 app/controllers/pets_controller.rb
  14. +83 −0 app/controllers/petsitters_controller.rb
  15. +37 −11 app/controllers/photos_controller.rb
  16. +43 −0 app/controllers/products_controller.rb
  17. +24 −6 app/helpers/application_helper.rb
  18. +2 −0 app/helpers/companies_helper.rb
  19. +2 −0 app/helpers/people_helper.rb
  20. +2 −0 app/helpers/pets_helper.rb
  21. +2 −0 app/helpers/petsitters_helper.rb
  22. +2 −0 app/helpers/products_helper.rb
  23. +9 −0 app/models/company.rb
  24. +9 −0 app/models/person.rb
  25. +7 −0 app/models/pet.rb
  26. +6 −0 app/models/petsitter.rb
  27. +5 −3 app/models/photo.rb
  28. +9 −0 app/models/product.rb
  29. +4 −1 app/uploaders/image_uploader.rb
  30. +16 −0 app/views/companies/_form.html.haml
  31. +3 −0 app/views/companies/edit.html.haml
  32. +21 −0 app/views/companies/index.html.haml
  33. +5 −0 app/views/companies/new.html.haml
  34. +24 −0 app/views/companies/show.html.haml
  35. +16 −0 app/views/people/_form.html.haml
  36. +7 −0 app/views/people/edit.html.haml
  37. +21 −0 app/views/people/index.html.haml
  38. +5 −0 app/views/people/new.html.haml
  39. +18 −0 app/views/people/show.html.haml
  40. +16 −0 app/views/pets/_form.html.haml
  41. +7 −0 app/views/pets/edit.html.haml
  42. +21 −0 app/views/pets/index.html.haml
  43. +5 −0 app/views/pets/new.html.haml
  44. +12 −0 app/views/pets/show.html.haml
  45. +13 −0 app/views/petsitters/_form.html.haml
  46. +7 −0 app/views/petsitters/edit.html.haml
  47. +19 −0 app/views/petsitters/index.html.haml
  48. +5 −0 app/views/petsitters/new.html.haml
  49. +9 −0 app/views/petsitters/show.html.haml
  50. +4 −2 app/views/photos/_form.html.haml
  51. +22 −0 app/views/photos/_form_fix.html.haml
  52. +6 −3 app/views/photos/_photo.html.haml
  53. +3 −3 app/views/photos/edit.html.haml
  54. +5 −3 app/views/photos/new.html.haml
  55. +2 −2 app/views/photos/show.html.haml
  56. +19 −0 app/views/products/_form.html.haml
  57. +7 −0 app/views/products/edit.html.haml
  58. +23 −0 app/views/products/index.html.haml
  59. +5 −0 app/views/products/new.html.haml
  60. +39 −0 app/views/products/show.html.haml
  61. +2 −2 app/views/stories/show.html.haml
  62. +7 −0 config/initializers/mongoid.rb
  63. +21 −0 config/routes.rb
  64. BIN public/images/logo.jpg
  65. BIN public/images/pic-upload.png
  66. +47 −0 spec/controllers/companies_controller_spec.rb
  67. +127 −0 spec/controllers/people_controller_spec.rb
  68. +127 −0 spec/controllers/pets_controller_spec.rb
  69. +127 −0 spec/controllers/petsitters_controller_spec.rb
  70. +125 −0 spec/controllers/products_controller_spec.rb
  71. +15 −0 spec/helpers/companies_helper_spec.rb
  72. +15 −0 spec/helpers/people_helper_spec.rb
  73. +15 −0 spec/helpers/pets_helper_spec.rb
  74. +15 −0 spec/helpers/petsitters_helper_spec.rb
  75. +15 −0 spec/helpers/products_helper_spec.rb
  76. +5 −0 spec/models/company_spec.rb
  77. +5 −0 spec/models/person_spec.rb
  78. +5 −0 spec/models/pet_spec.rb
  79. +5 −0 spec/models/petsitter_spec.rb
  80. +5 −0 spec/models/product_spec.rb
  81. +35 −0 spec/routing/people_routing_spec.rb
  82. +35 −0 spec/routing/pets_routing_spec.rb
  83. +35 −0 spec/routing/petsitters_routing_spec.rb
  84. +35 −0 spec/routing/products_routing_spec.rb
  85. +2 −0 spec/spec_helper.rb
  86. +5 −0 spec/views/companies/delete.html.haml_spec.rb
  87. +5 −0 spec/views/companies/destroy.html.haml_spec.rb
  88. +5 −0 spec/views/companies/edit.html.haml_spec.rb
  89. +5 −0 spec/views/companies/index.html.haml_spec.rb
  90. +5 −0 spec/views/companies/show.html.haml_spec.rb
  91. +5 −0 spec/views/companies/update.html.haml_spec.rb
  92. +20 −0 spec/views/people/edit.html.haml_spec.rb
  93. +24 −0 spec/views/people/index.html.haml_spec.rb
  94. +20 −0 spec/views/people/new.html.haml_spec.rb
  95. +18 −0 spec/views/people/show.html.haml_spec.rb
  96. +20 −0 spec/views/pets/edit.html.haml_spec.rb
  97. +24 −0 spec/views/pets/index.html.haml_spec.rb
  98. +20 −0 spec/views/pets/new.html.haml_spec.rb
  99. +18 −0 spec/views/pets/show.html.haml_spec.rb
  100. +18 −0 spec/views/petsitters/edit.html.haml_spec.rb
  101. +20 −0 spec/views/petsitters/index.html.haml_spec.rb
  102. +18 −0 spec/views/petsitters/new.html.haml_spec.rb
  103. +15 −0 spec/views/petsitters/show.html.haml_spec.rb
  104. +22 −0 spec/views/products/edit.html.haml_spec.rb
  105. +25 −0 spec/views/products/index.html.haml_spec.rb
  106. +22 −0 spec/views/products/new.html.haml_spec.rb
  107. +18 −0 spec/views/products/show.html.haml_spec.rb
  108. +10 −0 test/integration/person_test.rb
  109. +10 −0 test/integration/pet_test.rb
  110. +10 −0 test/integration/petsitter_test.rb
  111. +10 −0 test/integration/product_test.rb
View
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Settings><!--This file was automatically generated by Ruby plugin.
+You are allowed to:
+1. Reorder generators
+2. Remove generators
+3. Add installed generators
+To add new installed generators automatically delete this file and reload the project.
+--><GeneratorsGroup><Generator name="active_record:devise" /><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="devise" /><Generator name="devise:install" /><Generator name="devise:views" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jquery:install" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="mongoid:config" /><Generator name="mongoid:devise" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="rspec:install" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="uploader" /></GeneratorsGroup></Settings>
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Settings><!--This file was automatically generated by Ruby plugin.
+You are allowed to:
+1. Remove rake task
+2. Add existing rake tasks
+To add existing rake tasks automatically delete this file and reload the project.
+--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="List versions of all Rails frameworks and the environment" fullCmd="about" taksId="about" /><RakeGroup description="" fullCmd="" taksId="db"><RakeTask description="Drops all the collections for the database for the current Rails.env" fullCmd="db:drop" taksId="drop" /><RakeGroup description="" fullCmd="" taksId="mongoid"><RakeTask description="Clean up old collections backed up by objectid_convert" fullCmd="db:mongoid:cleanup_old_collections" taksId="cleanup_old_collections" /><RakeTask description="Create the indexes defined on your mongoid models" fullCmd="db:mongoid:create_indexes" taksId="create_indexes" /><RakeTask description="Convert string objectids in mongo database to ObjectID type" fullCmd="db:mongoid:objectid_convert" taksId="objectid_convert" /></RakeGroup><RakeTask description="Delete data and seed" fullCmd="db:reseed" taksId="reseed" /><RakeTask description="Load the seed data from db/seeds.rb" fullCmd="db:seed" taksId="seed" /><RakeTask description="Create the database, and initialize with the seed data" fullCmd="db:setup" taksId="setup" /><RakeTask description="" fullCmd="db:create" taksId="create" /><RakeTask description="" fullCmd="db:create_indexes" taksId="create_indexes" /><RakeTask description="" fullCmd="db:migrate" taksId="migrate" /><RakeGroup description="" fullCmd="" taksId="schema"><RakeTask description="" fullCmd="db:schema:load" taksId="load" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="" fullCmd="db:test:prepare" taksId="prepare" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="doc"><RakeTask description="Generate docs for the app -- also availble doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE=&quot;Custom Title&quot;)" fullCmd="doc:app" taksId="app" /><RakeTask description="" fullCmd="doc:clobber" taksId="clobber" /><RakeTask description="" fullCmd="doc:clobber_app" taksId="clobber_app" /><RakeTask description="" fullCmd="doc:clobber_plugins" taksId="clobber_plugins" /><RakeTask description="" fullCmd="doc:clobber_rails" taksId="clobber_rails" /><RakeTask description="" fullCmd="doc:guides" taksId="guides" /><RakeTask description="" fullCmd="doc:plugins" taksId="plugins" /><RakeTask description="" fullCmd="doc:rails" taksId="rails" /><RakeTask description="" fullCmd="doc:reapp" taksId="reapp" /><RakeTask description="" fullCmd="doc:rerails" taksId="rerails" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="log"><RakeTask description="Truncates all *.log files in log/ to zero bytes" fullCmd="log:clear" taksId="clear" /></RakeGroup><RakeTask description="Prints out your Rack middleware stack" fullCmd="middleware" taksId="middleware" /><RakeTask description="Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" fullCmd="notes" taksId="notes" /><RakeGroup description="" fullCmd="" taksId="notes"><RakeTask description="Enumerate a custom annotation, specify with ANNOTATION=CUSTOM" fullCmd="notes:custom" taksId="custom" /><RakeTask description="" fullCmd="notes:fixme" taksId="fixme" /><RakeTask description="" fullCmd="notes:optimize" taksId="optimize" /><RakeTask description="" fullCmd="notes:todo" taksId="todo" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="rails"><RakeTask description="Applies the template supplied by LOCATION=/path/to/template" fullCmd="rails:template" taksId="template" /><RakeTask description="Update both configs and public/javascripts from Rails (or use just update:javascripts or update:configs)" fullCmd="rails:update" taksId="update" /><RakeGroup description="" fullCmd="" taksId="freeze"><RakeTask description="" fullCmd="rails:freeze:edge" taksId="edge" /><RakeTask description="" fullCmd="rails:freeze:gems" taksId="gems" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="templates"><RakeTask description="" fullCmd="rails:templates:copy" taksId="copy" /></RakeGroup><RakeTask description="" fullCmd="rails:unfreeze" taksId="unfreeze" /><RakeGroup description="" fullCmd="" taksId="update"><RakeTask description="" fullCmd="rails:update:application_controller" taksId="application_controller" /><RakeTask description="" fullCmd="rails:update:configs" taksId="configs" /><RakeTask description="" fullCmd="rails:update:javascripts" taksId="javascripts" /><RakeTask description="" fullCmd="rails:update:scripts" taksId="scripts" /></RakeGroup></RakeGroup><RakeTask description="Print out all defined routes in match order, with names" fullCmd="routes" taksId="routes" /><RakeTask description="Generate a crytographically secure secret key (this is typically used to generate a secret for cookie sessions)" fullCmd="secret" taksId="secret" /><RakeTask description="Report code statistics (KLOCs, etc) from the application" fullCmd="stats" taksId="stats" /><RakeTask description="Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="Run tests for recenttest:prepare / Test recent changes" fullCmd="test:recent" taksId="recent" /><RakeTask description="Run tests for uncommittedtest:prepare / Test changes since last checkin (only Subversion and Git)" fullCmd="test:uncommitted" taksId="uncommitted" /><RakeTask description="" fullCmd="test:benchmark" taksId="benchmark" /><RakeTask description="" fullCmd="test:functionals" taksId="functionals" /><RakeTask description="" fullCmd="test:integration" taksId="integration" /><RakeTask description="" fullCmd="test:plugins" taksId="plugins" /><RakeTask description="" fullCmd="test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="test:profile" taksId="profile" /><RakeTask description="" fullCmd="test:units" taksId="units" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="time"><RakeGroup description="" fullCmd="" taksId="zones"><RakeTask description="Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6" fullCmd="time:zones:all" taksId="all" /><RakeTask description="" fullCmd="time:zones:local" taksId="local" /><RakeTask description="" fullCmd="time:zones:us" taksId="us" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="tmp"><RakeTask description="Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)" fullCmd="tmp:clear" taksId="clear" /><RakeTask description="Creates tmp directories for sessions, cache, sockets, and pids" fullCmd="tmp:create" taksId="create" /><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="" fullCmd="tmp:cache:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="pids"><RakeTask description="" fullCmd="tmp:pids:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sessions"><RakeTask description="" fullCmd="tmp:sessions:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sockets"><RakeTask description="" fullCmd="tmp:sockets:clear" taksId="clear" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="doc" taksId="doc" /><RakeTask description="" fullCmd="doc/api" taksId="doc/api" /><RakeTask description="" fullCmd="doc/api/index.html" taksId="doc/api/index.html" /><RakeTask description="" fullCmd="doc/app" taksId="doc/app" /><RakeTask description="" fullCmd="doc/app/index.html" taksId="doc/app/index.html" /><RakeTask description="" fullCmd="environment" taksId="environment" /><RakeTask description="" fullCmd="rails_env" taksId="rails_env" /></RakeGroup></Settings>
View
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
View
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="ProjectResources">
+ <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="Ruby SDK 1.8.7-p253" project-jdk-type="RUBY_SDK" />
+</project>
+
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" filepath="$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" />
+ </modules>
+ </component>
+</project>
+
Oops, something went wrong.

0 comments on commit 795daeb

Please sign in to comment.