family_gallery 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +41 -0
  4. data/Rakefile +22 -0
  5. data/app/assets/javascripts/family_gallery/application.js.coffee +5 -0
  6. data/app/assets/javascripts/family_gallery/locales.js.coffee +7 -0
  7. data/app/assets/javascripts/family_gallery/pictures.js.coffee +16 -0
  8. data/app/assets/javascripts/family_gallery/user_taggings.js.coffee +30 -0
  9. data/app/assets/stylesheets/family_gallery/application.css.scss +6 -0
  10. data/app/assets/stylesheets/family_gallery/groups.css.scss +0 -0
  11. data/app/assets/stylesheets/family_gallery/layout.css.scss +116 -0
  12. data/app/assets/stylesheets/family_gallery/pictures.css.scss +32 -0
  13. data/app/assets/stylesheets/family_gallery/user_taggings.css.scss +19 -0
  14. data/app/controllers/family_gallery/base_controller.rb +14 -0
  15. data/app/controllers/family_gallery/groups_controller.rb +17 -0
  16. data/app/controllers/family_gallery/locales_controller.rb +8 -0
  17. data/app/controllers/family_gallery/pictures_controller.rb +29 -0
  18. data/app/controllers/family_gallery/resources_controller.rb +87 -0
  19. data/app/controllers/family_gallery/sessions_controller.rb +4 -0
  20. data/app/controllers/family_gallery/user_taggings_controller.rb +41 -0
  21. data/app/controllers/family_gallery/users_controller.rb +4 -0
  22. data/app/controllers/family_gallery/welcome_controller.rb +5 -0
  23. data/app/helpers/family_gallery/groups_helper.rb +8 -0
  24. data/app/helpers/family_gallery/layout_helper.rb +5 -0
  25. data/app/helpers/family_gallery/pictures_helper.rb +13 -0
  26. data/app/helpers/family_gallery/users_helper.rb +5 -0
  27. data/app/models/family_gallery/ability.rb +22 -0
  28. data/app/models/family_gallery/group.rb +8 -0
  29. data/app/models/family_gallery/group_picture_link.rb +8 -0
  30. data/app/models/family_gallery/picture.rb +76 -0
  31. data/app/models/family_gallery/user.rb +24 -0
  32. data/app/models/family_gallery/user_role.rb +7 -0
  33. data/app/models/family_gallery/user_tagging.rb +18 -0
  34. data/app/views/family_gallery/devise/shared/_links.html.haml +0 -0
  35. data/app/views/family_gallery/groups/_form.html.haml +4 -0
  36. data/app/views/family_gallery/groups/edit.html.haml +3 -0
  37. data/app/views/family_gallery/groups/index.html.haml +15 -0
  38. data/app/views/family_gallery/groups/new.html.haml +3 -0
  39. data/app/views/family_gallery/groups/show.html.haml +25 -0
  40. data/app/views/family_gallery/pictures/_form.html.haml +8 -0
  41. data/app/views/family_gallery/pictures/edit.html.haml +3 -0
  42. data/app/views/family_gallery/pictures/new.html.haml +3 -0
  43. data/app/views/family_gallery/pictures/show.html.haml +47 -0
  44. data/app/views/family_gallery/sessions/new.html.erb +26 -0
  45. data/app/views/family_gallery/user_taggings/_form.html.haml +9 -0
  46. data/app/views/family_gallery/user_taggings/new.html.haml +3 -0
  47. data/app/views/family_gallery/users/show.html.haml +12 -0
  48. data/app/views/family_gallery/welcome/index.html.haml +10 -0
  49. data/app/views/layouts/family_gallery/application.html.haml +41 -0
  50. data/config/initializers/devise.rb +259 -0
  51. data/config/initializers/omniauth.rb +7 -0
  52. data/config/locales/awesome_translations/app/views/family_gallery/groups/da.yml +10 -0
  53. data/config/locales/awesome_translations/app/views/family_gallery/groups/en.yml +10 -0
  54. data/config/locales/awesome_translations/app/views/family_gallery/pictures/da.yml +12 -0
  55. data/config/locales/awesome_translations/app/views/family_gallery/pictures/en.yml +12 -0
  56. data/config/locales/awesome_translations/app/views/family_gallery/user_taggings/da.yml +6 -0
  57. data/config/locales/awesome_translations/app/views/family_gallery/user_taggings/en.yml +6 -0
  58. data/config/locales/awesome_translations/app/views/family_gallery/users/da.yml +10 -0
  59. data/config/locales/awesome_translations/app/views/family_gallery/users/en.yml +10 -0
  60. data/config/locales/awesome_translations/app/views/family_gallery/welcome/da.yml +7 -0
  61. data/config/locales/awesome_translations/app/views/family_gallery/welcome/en.yml +7 -0
  62. data/config/locales/awesome_translations/controllers/family_gallery/da.yml +9 -0
  63. data/config/locales/awesome_translations/controllers/family_gallery/en.yml +9 -0
  64. data/config/locales/awesome_translations/da.yml +9 -0
  65. data/config/locales/awesome_translations/en.yml +9 -0
  66. data/config/locales/awesome_translations/models/family_gallery__group/da.yml +26 -0
  67. data/config/locales/awesome_translations/models/family_gallery__group/en.yml +26 -0
  68. data/config/locales/awesome_translations/models/family_gallery__picture/da.yml +13 -0
  69. data/config/locales/awesome_translations/models/family_gallery__picture/en.yml +13 -0
  70. data/config/locales/awesome_translations/models/family_gallery__user_tagging/da.yml +14 -0
  71. data/config/locales/awesome_translations/models/family_gallery__user_tagging/en.yml +14 -0
  72. data/config/locales/awesome_translations/views/family_gallery/groups/da.yml +12 -0
  73. data/config/locales/awesome_translations/views/family_gallery/groups/en.yml +9 -0
  74. data/config/locales/awesome_translations/views/family_gallery/pictures/da.yml +13 -0
  75. data/config/locales/awesome_translations/views/family_gallery/pictures/en.yml +13 -0
  76. data/config/locales/awesome_translations/views/layouts/family_gallery/da.yml +9 -0
  77. data/config/locales/awesome_translations/views/layouts/family_gallery/en.yml +9 -0
  78. data/config/locales/devise.en.yml +60 -0
  79. data/config/routes.rb +19 -0
  80. data/db/plugin_migrate/20150224155212_create_family_gallery_users.rb +46 -0
  81. data/db/plugin_migrate/20150224155422_create_family_gallery_groups.rb +14 -0
  82. data/db/plugin_migrate/20150224155704_create_family_gallery_pictures.rb +29 -0
  83. data/db/plugin_migrate/20150224180931_create_family_gallery_user_roles.rb +12 -0
  84. data/db/plugin_migrate/20150224184005_create_family_gallery_group_picture_links.rb +13 -0
  85. data/db/plugin_migrate/20150301144620_create_family_gallery_user_taggings.rb +16 -0
  86. data/db/plugin_migrate/20150301144620_create_user_taggings.rb +16 -0
  87. data/lib/family_gallery/base_family_gallery_controller.rb +9 -0
  88. data/lib/family_gallery/engine.rb +5 -0
  89. data/lib/family_gallery/version.rb +3 -0
  90. data/lib/family_gallery.rb +20 -0
  91. data/lib/tasks/family_gallery/db.rake +3 -0
  92. data/lib/tasks/family_gallery/seed.rake +14 -0
  93. data/lib/tasks/family_gallery_tasks.rake +4 -0
  94. data/spec/controllers/family_gallery/pictures_controller_spec.rb +20 -0
  95. data/spec/dummy/README.md +28 -0
  96. data/spec/dummy/Rakefile +6 -0
  97. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  98. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  99. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  100. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  101. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  102. data/spec/dummy/bin/bundle +3 -0
  103. data/spec/dummy/bin/rails +4 -0
  104. data/spec/dummy/bin/rake +4 -0
  105. data/spec/dummy/config/application.rb +26 -0
  106. data/spec/dummy/config/boot.rb +5 -0
  107. data/spec/dummy/config/database.example.yml +39 -0
  108. data/spec/dummy/config/database.shippable.yml +5 -0
  109. data/spec/dummy/config/database.yml +13 -0
  110. data/spec/dummy/config/environment.rb +5 -0
  111. data/spec/dummy/config/environments/development.rb +32 -0
  112. data/spec/dummy/config/environments/production.rb +80 -0
  113. data/spec/dummy/config/environments/test.rb +41 -0
  114. data/spec/dummy/config/family_gallery.yml +3 -0
  115. data/spec/dummy/config/initializers/awesome_translations.rb +3 -0
  116. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  117. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  118. data/spec/dummy/config/initializers/inflections.rb +16 -0
  119. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  120. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  121. data/spec/dummy/config/initializers/session_store.rb +3 -0
  122. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  123. data/spec/dummy/config/routes.rb +58 -0
  124. data/spec/dummy/config.ru +4 -0
  125. data/spec/dummy/db/schema.rb +131 -0
  126. data/spec/dummy/log/test.log +3457 -0
  127. data/spec/dummy/public/404.html +58 -0
  128. data/spec/dummy/public/422.html +58 -0
  129. data/spec/dummy/public/500.html +57 -0
  130. data/spec/dummy/public/favicon.ico +0 -0
  131. data/spec/dummy/public/system/family_gallery/pictures/images/000/000/016/original/Profile.jpeg +0 -0
  132. data/spec/dummy/tmp/cache/assets/development/sass/79bc6a1530be4e47bb2bf0dda4943bc0e439789f/application.css.scssc +0 -0
  133. data/spec/dummy/tmp/cache/assets/development/sass/79bc6a1530be4e47bb2bf0dda4943bc0e439789f/groups.css.scssc +0 -0
  134. data/spec/dummy/tmp/cache/assets/development/sass/79bc6a1530be4e47bb2bf0dda4943bc0e439789f/layout.css.scssc +0 -0
  135. data/spec/dummy/tmp/cache/assets/development/sass/bc24de95c506de07c6571950d49f3258660a5d78/application.css.scssc +0 -0
  136. data/spec/dummy/tmp/cache/assets/development/sass/bc24de95c506de07c6571950d49f3258660a5d78/groups.css.scssc +0 -0
  137. data/spec/dummy/tmp/cache/assets/development/sass/bc24de95c506de07c6571950d49f3258660a5d78/layout.css.scssc +0 -0
  138. data/spec/dummy/tmp/cache/assets/development/sass/bc24de95c506de07c6571950d49f3258660a5d78/pictures.css.scssc +0 -0
  139. data/spec/dummy/tmp/cache/assets/development/sass/bc24de95c506de07c6571950d49f3258660a5d78/user_taggings.css.scssc +0 -0
  140. data/spec/dummy/tmp/cache/assets/development/sprockets/0cc5658eb161251c8bd64e1cf25e2191 +0 -0
  141. data/spec/dummy/tmp/cache/assets/development/sprockets/119923dc816dfafda90919183ba1581d +0 -0
  142. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  143. data/spec/dummy/tmp/cache/assets/development/sprockets/1442902bef094cd5f3d9fa021ab30bad +0 -0
  144. data/spec/dummy/tmp/cache/assets/development/sprockets/1575b3a4a178623381cdd55596cd8bc7 +0 -0
  145. data/spec/dummy/tmp/cache/assets/development/sprockets/1aab57c1924cdaa9ba148c9e3d5bbb85 +0 -0
  146. data/spec/dummy/tmp/cache/assets/development/sprockets/1dfc909a73e53e47b341f67cfd8a3fc3 +0 -0
  147. data/spec/dummy/tmp/cache/assets/development/sprockets/20d23fa5ea743ace10d6a5494fce8ddb +0 -0
  148. data/spec/dummy/tmp/cache/assets/development/sprockets/2128d293dc8ef13115c1f5d64b5acfc9 +0 -0
  149. data/spec/dummy/tmp/cache/assets/development/sprockets/21ce280aacf67faf44041900539d5470 +0 -0
  150. data/spec/dummy/tmp/cache/assets/development/sprockets/235a5e7d077adf3448617346dc10129f +0 -0
  151. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  152. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  153. data/spec/dummy/tmp/cache/assets/development/sprockets/3bd5629974bb1919d009bcb1da7a7e49 +0 -0
  154. data/spec/dummy/tmp/cache/assets/development/sprockets/41e4d54853d3193e68b50b72db515857 +0 -0
  155. data/spec/dummy/tmp/cache/assets/development/sprockets/44b768d3351f06e343edc95634297681 +0 -0
  156. data/spec/dummy/tmp/cache/assets/development/sprockets/50b9bcf05a8718d9cb5b99276f154ea9 +0 -0
  157. data/spec/dummy/tmp/cache/assets/development/sprockets/5270ab363f9384ff7f43ff83bdaf3f82 +0 -0
  158. data/spec/dummy/tmp/cache/assets/development/sprockets/5316fc0620afefc2ba81b690c8e2c34d +0 -0
  159. data/spec/dummy/tmp/cache/assets/development/sprockets/538966109f3bbd58bfb717ad57a37096 +0 -0
  160. data/spec/dummy/tmp/cache/assets/development/sprockets/58b9ed99ad62ba462ca6a9272b96bef3 +0 -0
  161. data/spec/dummy/tmp/cache/assets/development/sprockets/5fdd6c2e7777e739bd4e3400982c1bbf +0 -0
  162. data/spec/dummy/tmp/cache/assets/development/sprockets/673ce11f5cb7033b29ccc99310e62b93 +0 -0
  163. data/spec/dummy/tmp/cache/assets/development/sprockets/697d977cf9fc7e54534f5e29b0832836 +0 -0
  164. data/spec/dummy/tmp/cache/assets/development/sprockets/69944efcc9ea99d47389db34b0e05add +0 -0
  165. data/spec/dummy/tmp/cache/assets/development/sprockets/6aab60b365535cc305f37a738e75868b +0 -0
  166. data/spec/dummy/tmp/cache/assets/development/sprockets/6db8498274efddac6691248cc9afe855 +0 -0
  167. data/spec/dummy/tmp/cache/assets/development/sprockets/6e266734185d58588bcfaf0e33aa4162 +0 -0
  168. data/spec/dummy/tmp/cache/assets/development/sprockets/81ab882fef1228d654a7c697f2324309 +0 -0
  169. data/spec/dummy/tmp/cache/assets/development/sprockets/908bf508cc68079cab720d6b9c36cb95 +0 -0
  170. data/spec/dummy/tmp/cache/assets/development/sprockets/91090eda0f104056144ac17a4fcae91c +0 -0
  171. data/spec/dummy/tmp/cache/assets/development/sprockets/a316bc0d459b308530ee6b622235d103 +0 -0
  172. data/spec/dummy/tmp/cache/assets/development/sprockets/a3c8104e5830cd7047c6a3a1c1e2ba32 +0 -0
  173. data/spec/dummy/tmp/cache/assets/development/sprockets/adaf29eda594015193030af46474be58 +0 -0
  174. data/spec/dummy/tmp/cache/assets/development/sprockets/b349b574327b896b7a321351b14fe1d8 +0 -0
  175. data/spec/dummy/tmp/cache/assets/development/sprockets/b34e86a2845f7901154358882afdeaa4 +0 -0
  176. data/spec/dummy/tmp/cache/assets/development/sprockets/b446ef62b37b9bf3a8e24608d9f95634 +0 -0
  177. data/spec/dummy/tmp/cache/assets/development/sprockets/b512f2b016bd3aef8c28fa661e01308c +0 -0
  178. data/spec/dummy/tmp/cache/assets/development/sprockets/bd49bb0a6f5dfd284a750fb9cab40d85 +0 -0
  179. data/spec/dummy/tmp/cache/assets/development/sprockets/c39fce5fa19b758734af29527d4185ca +0 -0
  180. data/spec/dummy/tmp/cache/assets/development/sprockets/c8ecba0dbc7774cd6db79cb7fbe1ef3e +0 -0
  181. data/spec/dummy/tmp/cache/assets/development/sprockets/c9b79d7ebc7ef5550a14749b52427cef +0 -0
  182. data/spec/dummy/tmp/cache/assets/development/sprockets/c9c612c8259a6af5c4c02201dd2df161 +0 -0
  183. data/spec/dummy/tmp/cache/assets/development/sprockets/cb595904fcf7acdedf2b95571442fc59 +0 -0
  184. data/spec/dummy/tmp/cache/assets/development/sprockets/cfb60287b7af861000187e7ba72e39c1 +0 -0
  185. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  186. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  187. data/spec/dummy/tmp/cache/assets/development/sprockets/d8de240bbb697f46b26a6ef75d522aa5 +0 -0
  188. data/spec/dummy/tmp/cache/assets/development/sprockets/e4ec6c7c682836f272efa386cc68223d +0 -0
  189. data/spec/dummy/tmp/cache/assets/development/sprockets/eb9ed717a7ef467bf260b11dfc8451eb +0 -0
  190. data/spec/dummy/tmp/cache/assets/development/sprockets/ebdbddd03e404d3fa30adfae674cb9ea +0 -0
  191. data/spec/dummy/tmp/cache/assets/development/sprockets/efd7a36b3d6d057aa5229aa6d21cbebb +0 -0
  192. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  193. data/spec/dummy/tmp/cache/assets/development/sprockets/fe3c3cb0cdabd1bbcc88520fc768a6e9 +0 -0
  194. data/spec/dummy/views/family_gallery/groups/da.yml +9 -0
  195. data/spec/dummy/views/family_gallery/groups/en.yml +8 -0
  196. data/spec/dummy/views/family_gallery/pictures/da.yml +9 -0
  197. data/spec/dummy/views/family_gallery/pictures/en.yml +9 -0
  198. data/spec/dummy/views/layouts/family_gallery/da.yml +6 -0
  199. data/spec/dummy/views/layouts/family_gallery/en.yml +6 -0
  200. data/spec/factories/family_gallery/group.rb +6 -0
  201. data/spec/factories/family_gallery/picture.rb +10 -0
  202. data/spec/factories/family_gallery/user.rb +12 -0
  203. data/spec/models/family_gallery/picture_spec.rb +14 -0
  204. data/spec/spec_helper.rb +28 -0
  205. data/spec/test_files/0/family_gallery/pictures/000/000/039/original.jpg +0 -0
  206. data/spec/test_files/0/family_gallery/pictures/000/000/040/original.jpg +0 -0
  207. data/spec/test_files/0/family_gallery/pictures/000/000/041/original.jpg +0 -0
  208. data/spec/test_files/0/family_gallery/pictures/000/000/042/original.jpg +0 -0
  209. data/spec/test_files/0/family_gallery/pictures/000/000/043/original.jpg +0 -0
  210. data/spec/test_files/0/family_gallery/pictures/000/000/044/original.jpg +0 -0
  211. data/spec/test_files/0/family_gallery/pictures/000/000/045/original.jpg +0 -0
  212. data/spec/test_files/0/family_gallery/pictures/000/000/046/original.jpg +0 -0
  213. data/spec/test_pictures/christina.jpg +0 -0
  214. data/spec/test_pictures/sigrid.jpg +0 -0
  215. metadata +741 -0
@@ -0,0 +1,28 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,26 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "family_gallery"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ config.i18n.load_path += Dir[Rails.root.join('locales', '*.{rb,yml}').to_s]
20
+ config.i18n.load_path += Dir["#{File.realpath("#{Rails.root}/../../config/locales")}/**/*.yml"]
21
+
22
+ config.i18n.default_locale = :en
23
+ config.i18n.available_locales = [:da, :en]
24
+ end
25
+ end
26
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,39 @@
1
+ # MySQL. Versions 4.1 and 5.0 are recommended.
2
+ #
3
+ # Install the MYSQL driver
4
+ # gem install mysql2
5
+ #
6
+ # Ensure the MySQL gem is defined in your Gemfile
7
+ # gem 'mysql2'
8
+ #
9
+ # And be sure to use new-style password hashing:
10
+ # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
11
+ development:
12
+ adapter: mysql2
13
+ encoding: utf8
14
+ database: dummy_development
15
+ pool: 5
16
+ username: root
17
+ password:
18
+ socket: /var/run/mysqld/mysqld.sock
19
+
20
+ # Warning: The database defined as "test" will be erased and
21
+ # re-generated from your development database when you run "rake".
22
+ # Do not set this db to the same as development or production.
23
+ test:
24
+ adapter: mysql2
25
+ encoding: utf8
26
+ database: dummy_test
27
+ pool: 5
28
+ username: root
29
+ password:
30
+ socket: /var/run/mysqld/mysqld.sock
31
+
32
+ production:
33
+ adapter: mysql2
34
+ encoding: utf8
35
+ database: dummy_production
36
+ pool: 5
37
+ username: root
38
+ password:
39
+ socket: /var/run/mysqld/mysqld.sock
@@ -0,0 +1,5 @@
1
+ test:
2
+ adapter: mysql2
3
+ encoding: utf8
4
+ database: family_gallery_test
5
+ username: shippa
@@ -0,0 +1,13 @@
1
+ development:
2
+ adapter: mysql2
3
+ encoding: utf8
4
+ database: family-gallery-dev
5
+ username: family-gallery
6
+ password: Ud72VNZNXsbnF8FP
7
+
8
+ test:
9
+ adapter: mysql2
10
+ encoding: utf8
11
+ database: family-gallery-test
12
+ username: family-gallery
13
+ password: Ud72VNZNXsbnF8FP
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!
@@ -0,0 +1,32 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Raises error for missing translations
31
+ # config.action_view.raise_on_missing_translations = true
32
+ end
@@ -0,0 +1,80 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,41 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.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
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+
37
+ # Raises error for missing translations
38
+ # config.action_view.raise_on_missing_translations = true
39
+
40
+ Paperclip::Attachment.default_options[:path] = "#{File.realpath("#{Rails.root}/../test_files")}/#{ENV['TEST_ENV_NUMBER'].to_i}/:class/:id_partition/:style.:extension"
41
+ end
@@ -0,0 +1,3 @@
1
+ facebook:
2
+ app_id: 123
3
+ app_secret: 321
@@ -0,0 +1,3 @@
1
+ if Rails.env.development?
2
+ AwesomeTranslations.config.paths_to_translate = [File.realpath("#{Rails.root}/../..")]
3
+ 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,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # 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,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'a98f4923cbd29b4b23f75df5e5bbddfba30f847d28c0ccad0993237f986e49baad81121b8a29d3b02721a9dbe3b91d213fa141b1ca00607aae40d9bde961827e'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ mount FamilyGallery::Engine, at: "/"
3
+
4
+ # The priority is based upon order of creation: first created -> highest priority.
5
+ # See how all your routes lay out with "rake routes".
6
+
7
+ # You can have the root of your site routed with "root"
8
+ # root 'welcome#index'
9
+
10
+ # Example of regular route:
11
+ # get 'products/:id' => 'catalog#view'
12
+
13
+ # Example of named route that can be invoked with purchase_url(id: product.id)
14
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
15
+
16
+ # Example resource route (maps HTTP verbs to controller actions automatically):
17
+ # resources :products
18
+
19
+ # Example resource route with options:
20
+ # resources :products do
21
+ # member do
22
+ # get 'short'
23
+ # post 'toggle'
24
+ # end
25
+ #
26
+ # collection do
27
+ # get 'sold'
28
+ # end
29
+ # end
30
+
31
+ # Example resource route with sub-resources:
32
+ # resources :products do
33
+ # resources :comments, :sales
34
+ # resource :seller
35
+ # end
36
+
37
+ # Example resource route with more complex sub-resources:
38
+ # resources :products do
39
+ # resources :comments
40
+ # resources :sales do
41
+ # get 'recent', on: :collection
42
+ # end
43
+ # end
44
+
45
+ # Example resource route with concerns:
46
+ # concern :toggleable do
47
+ # post 'toggle'
48
+ # end
49
+ # resources :posts, concerns: :toggleable
50
+ # resources :photos, concerns: :toggleable
51
+
52
+ # Example resource route within a namespace:
53
+ # namespace :admin do
54
+ # # Directs /admin/products/* to Admin::ProductsController
55
+ # # (app/controllers/admin/products_controller.rb)
56
+ # resources :products
57
+ # end
58
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,131 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20150301144620) do
15
+
16
+ create_table "family_gallery_group_picture_links", force: true do |t|
17
+ t.integer "group_id"
18
+ t.integer "picture_id"
19
+ t.datetime "created_at"
20
+ t.datetime "updated_at"
21
+ end
22
+
23
+ add_index "family_gallery_group_picture_links", ["group_id", "picture_id"], name: "unique_group_and_picture", unique: true, using: :btree
24
+ add_index "family_gallery_group_picture_links", ["group_id"], name: "index_family_gallery_group_picture_links_on_group_id", using: :btree
25
+ add_index "family_gallery_group_picture_links", ["picture_id"], name: "index_family_gallery_group_picture_links_on_picture_id", using: :btree
26
+
27
+ create_table "family_gallery_group_translations", force: true do |t|
28
+ t.integer "family_gallery_group_id", null: false
29
+ t.string "locale", null: false
30
+ t.datetime "created_at"
31
+ t.datetime "updated_at"
32
+ t.string "name"
33
+ t.text "description"
34
+ end
35
+
36
+ add_index "family_gallery_group_translations", ["family_gallery_group_id"], name: "index_c7c2d0e178c1bd38d1d9010438b10c5b4240a1db", using: :btree
37
+ add_index "family_gallery_group_translations", ["locale"], name: "index_family_gallery_group_translations_on_locale", using: :btree
38
+
39
+ create_table "family_gallery_groups", force: true do |t|
40
+ t.datetime "created_at"
41
+ t.datetime "updated_at"
42
+ end
43
+
44
+ create_table "family_gallery_picture_translations", force: true do |t|
45
+ t.integer "family_gallery_picture_id", null: false
46
+ t.string "locale", null: false
47
+ t.datetime "created_at"
48
+ t.datetime "updated_at"
49
+ t.string "title"
50
+ t.text "description"
51
+ end
52
+
53
+ add_index "family_gallery_picture_translations", ["family_gallery_picture_id"], name: "index_832f502cff7d47b4d637c290646c30a7e18d7e2f", using: :btree
54
+ add_index "family_gallery_picture_translations", ["locale"], name: "index_family_gallery_picture_translations_on_locale", using: :btree
55
+
56
+ create_table "family_gallery_pictures", force: true do |t|
57
+ t.integer "user_owner_id"
58
+ t.integer "user_uploaded_id"
59
+ t.datetime "taken_at"
60
+ t.integer "width"
61
+ t.integer "height"
62
+ t.decimal "latitude", precision: 12, scale: 3
63
+ t.decimal "longitude", precision: 12, scale: 3
64
+ t.datetime "created_at"
65
+ t.datetime "updated_at"
66
+ t.string "image_file_name"
67
+ t.string "image_content_type"
68
+ t.integer "image_file_size"
69
+ t.datetime "image_updated_at"
70
+ end
71
+
72
+ add_index "family_gallery_pictures", ["latitude"], name: "index_family_gallery_pictures_on_latitude", using: :btree
73
+ add_index "family_gallery_pictures", ["longitude"], name: "index_family_gallery_pictures_on_longitude", using: :btree
74
+ add_index "family_gallery_pictures", ["taken_at"], name: "index_family_gallery_pictures_on_taken_at", using: :btree
75
+ add_index "family_gallery_pictures", ["user_owner_id"], name: "index_family_gallery_pictures_on_user_owner_id", using: :btree
76
+ add_index "family_gallery_pictures", ["user_uploaded_id"], name: "index_family_gallery_pictures_on_user_uploaded_id", using: :btree
77
+
78
+ create_table "family_gallery_user_roles", force: true do |t|
79
+ t.integer "user_id"
80
+ t.string "role"
81
+ t.datetime "created_at"
82
+ t.datetime "updated_at"
83
+ end
84
+
85
+ add_index "family_gallery_user_roles", ["user_id", "role"], name: "index_family_gallery_user_roles_on_user_id_and_role", unique: true, using: :btree
86
+ add_index "family_gallery_user_roles", ["user_id"], name: "index_family_gallery_user_roles_on_user_id", using: :btree
87
+
88
+ create_table "family_gallery_user_taggings", force: true do |t|
89
+ t.integer "picture_id"
90
+ t.integer "user_id"
91
+ t.integer "tagged_by_id"
92
+ t.decimal "position_top", precision: 10, scale: 2
93
+ t.decimal "position_left", precision: 10, scale: 2
94
+ t.datetime "created_at"
95
+ t.datetime "updated_at"
96
+ end
97
+
98
+ add_index "family_gallery_user_taggings", ["picture_id"], name: "index_family_gallery_user_taggings_on_picture_id", using: :btree
99
+ add_index "family_gallery_user_taggings", ["tagged_by_id"], name: "index_family_gallery_user_taggings_on_tagged_by_id", using: :btree
100
+ add_index "family_gallery_user_taggings", ["user_id"], name: "index_family_gallery_user_taggings_on_user_id", using: :btree
101
+
102
+ create_table "family_gallery_users", force: true do |t|
103
+ t.string "first_name"
104
+ t.string "last_name"
105
+ t.string "email", default: "", null: false
106
+ t.string "encrypted_password", default: "", null: false
107
+ t.string "reset_password_token"
108
+ t.datetime "reset_password_sent_at"
109
+ t.datetime "remember_created_at"
110
+ t.integer "sign_in_count", default: 0, null: false
111
+ t.datetime "current_sign_in_at"
112
+ t.datetime "last_sign_in_at"
113
+ t.string "current_sign_in_ip"
114
+ t.string "last_sign_in_ip"
115
+ t.string "confirmation_token"
116
+ t.datetime "confirmed_at"
117
+ t.datetime "confirmation_sent_at"
118
+ t.string "unconfirmed_email"
119
+ t.integer "failed_attempts", default: 0, null: false
120
+ t.string "unlock_token"
121
+ t.datetime "locked_at"
122
+ t.datetime "created_at"
123
+ t.datetime "updated_at"
124
+ end
125
+
126
+ add_index "family_gallery_users", ["confirmation_token"], name: "index_family_gallery_users_on_confirmation_token", unique: true, using: :btree
127
+ add_index "family_gallery_users", ["email"], name: "index_family_gallery_users_on_email", unique: true, using: :btree
128
+ add_index "family_gallery_users", ["reset_password_token"], name: "index_family_gallery_users_on_reset_password_token", unique: true, using: :btree
129
+ add_index "family_gallery_users", ["unlock_token"], name: "index_family_gallery_users_on_unlock_token", unique: true, using: :btree
130
+
131
+ end