carrier 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +27 -0
  4. data/LICENSE.txt +20 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.textile +111 -0
  7. data/Rakefile +48 -0
  8. data/VERSION +1 -0
  9. data/app/assets/images/.gitkeep +0 -0
  10. data/app/assets/javascripts/autocomplete.js +4 -0
  11. data/app/assets/javascripts/autocomplete/i18n/jquery-ui-i18n.js +1379 -0
  12. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-af.js +23 -0
  13. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
  14. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ar.js +23 -0
  15. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-az.js +23 -0
  16. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-bg.js +24 -0
  17. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-bs.js +23 -0
  18. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ca.js +23 -0
  19. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-cs.js +23 -0
  20. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-da.js +23 -0
  21. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-de.js +23 -0
  22. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-el.js +23 -0
  23. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-en-AU.js +23 -0
  24. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-en-GB.js +23 -0
  25. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-en-NZ.js +23 -0
  26. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-eo.js +23 -0
  27. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-es.js +23 -0
  28. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-et.js +23 -0
  29. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-eu.js +23 -0
  30. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-fa.js +23 -0
  31. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-fi.js +23 -0
  32. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-fo.js +23 -0
  33. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
  34. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-fr.js +25 -0
  35. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-gl.js +23 -0
  36. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-he.js +23 -0
  37. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-hr.js +23 -0
  38. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-hu.js +23 -0
  39. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-hy.js +23 -0
  40. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-id.js +23 -0
  41. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-is.js +23 -0
  42. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-it.js +23 -0
  43. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ja.js +23 -0
  44. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ko.js +23 -0
  45. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-kz.js +23 -0
  46. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-lt.js +23 -0
  47. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-lv.js +23 -0
  48. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ml.js +23 -0
  49. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ms.js +23 -0
  50. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-nl.js +23 -0
  51. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-no.js +23 -0
  52. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-pl.js +23 -0
  53. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-pt-BR.js +23 -0
  54. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-pt.js +22 -0
  55. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-rm.js +21 -0
  56. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ro.js +26 -0
  57. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ru.js +23 -0
  58. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sk.js +23 -0
  59. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sl.js +24 -0
  60. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sq.js +23 -0
  61. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sr-SR.js +23 -0
  62. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sr.js +23 -0
  63. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-sv.js +23 -0
  64. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-ta.js +23 -0
  65. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-th.js +23 -0
  66. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-tj.js +23 -0
  67. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-tr.js +23 -0
  68. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-uk.js +23 -0
  69. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-vi.js +23 -0
  70. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-zh-CN.js +23 -0
  71. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
  72. data/app/assets/javascripts/autocomplete/i18n/jquery.ui.datepicker-zh-TW.js +23 -0
  73. data/app/assets/javascripts/autocomplete/jquery.ui.autocomplete.min.js +32 -0
  74. data/app/assets/javascripts/autocomplete/jquery.ui.core.min.js +17 -0
  75. data/app/assets/javascripts/autocomplete/jquery.ui.position.min.js +16 -0
  76. data/app/assets/javascripts/autocomplete/jquery.ui.widget.min.js +15 -0
  77. data/app/assets/javascripts/carrier.js +8 -0
  78. data/app/assets/javascripts/jquery.min.js +16 -0
  79. data/app/assets/javascripts/rails.js +169 -0
  80. data/app/assets/javascripts/rich-multiselect/jquery-ui.min.js +405 -0
  81. data/app/assets/javascripts/rich-multiselect/locale/ui-multiselect-de.js +11 -0
  82. data/app/assets/javascripts/rich-multiselect/locale/ui-multiselect-en.js +11 -0
  83. data/app/assets/javascripts/rich-multiselect/locale/ui-multiselect-es.js +11 -0
  84. data/app/assets/javascripts/rich-multiselect/locale/ui-multiselect-fr.js +11 -0
  85. data/app/assets/javascripts/rich-multiselect/locale/ui-multiselect-it.js +13 -0
  86. data/app/assets/javascripts/rich-multiselect/plugins/localisation/jquery.localisation-min.js +7 -0
  87. data/app/assets/javascripts/rich-multiselect/plugins/localisation/jquery.localisation-pack.js +7 -0
  88. data/app/assets/javascripts/rich-multiselect/plugins/localisation/jquery.localisation.js +99 -0
  89. data/app/assets/javascripts/rich-multiselect/plugins/scrollTo/README.txt +37 -0
  90. data/app/assets/javascripts/rich-multiselect/plugins/scrollTo/changes.txt +82 -0
  91. data/app/assets/javascripts/rich-multiselect/plugins/scrollTo/jquery.scrollTo-min.js +11 -0
  92. data/app/assets/javascripts/rich-multiselect/plugins/scrollTo/jquery.scrollTo.js +207 -0
  93. data/app/assets/javascripts/rich-multiselect/ui.multiselect.js +339 -0
  94. data/app/assets/stylesheets/carrier.css +227 -0
  95. data/app/assets/stylesheets/carrier_rich.css +48 -0
  96. data/app/assets/stylesheets/carrier_simple.css +15 -0
  97. data/app/assets/stylesheets/rich-multiselect/ui.multiselect.css +30 -0
  98. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  99. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_55_fbf9ee_40x100.png +0 -0
  100. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_65_ffffff_40x100.png +0 -0
  101. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_75_cccccc_40x100.png +0 -0
  102. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_75_dadada_40x100.png +0 -0
  103. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_75_e6e6e6_40x100.png +0 -0
  104. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  105. data/app/assets/stylesheets/ui-lightness/images/ui-bg_flat_95_fef1ec_40x100.png +0 -0
  106. data/app/assets/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  107. data/app/assets/stylesheets/ui-lightness/images/ui-icons_2e83ff_256x240.png +0 -0
  108. data/app/assets/stylesheets/ui-lightness/images/ui-icons_454545_256x240.png +0 -0
  109. data/app/assets/stylesheets/ui-lightness/images/ui-icons_888888_256x240.png +0 -0
  110. data/app/assets/stylesheets/ui-lightness/images/ui-icons_cd0a0a_256x240.png +0 -0
  111. data/app/assets/stylesheets/ui-lightness/jquery-ui-1.8.14.custom.css +342 -0
  112. data/app/controllers/carrier/application_controller.rb +5 -0
  113. data/app/controllers/carrier/chains_controller.rb +16 -0
  114. data/app/controllers/carrier/messages_controller.rb +59 -0
  115. data/app/helpers/carrier/application_helper.rb +26 -0
  116. data/app/helpers/carrier/post_helper.rb +4 -0
  117. data/app/models/carrier/chain.rb +59 -0
  118. data/app/models/carrier/message.rb +118 -0
  119. data/app/models/carrier/message/scopes.rb +51 -0
  120. data/app/models/carrier/message/subject.rb +25 -0
  121. data/app/models/carrier/message/validations.rb +7 -0
  122. data/app/validators/recipients/exclude_self.rb +10 -0
  123. data/app/validators/recipients/recipients_validator.rb +10 -0
  124. data/app/views/carrier/chains/archive.js.erb +1 -0
  125. data/app/views/carrier/chains/unarchive.js.erb +1 -0
  126. data/app/views/carrier/messages/_archive_chain.html.erb +6 -0
  127. data/app/views/carrier/messages/_form.html.erb +30 -0
  128. data/app/views/carrier/messages/_head.html.erb +8 -0
  129. data/app/views/carrier/messages/_index_message.html.erb +13 -0
  130. data/app/views/carrier/messages/_message_collapsed.html.erb +12 -0
  131. data/app/views/carrier/messages/_message_expanded.html.erb +10 -0
  132. data/app/views/carrier/messages/_nav_messages.html.erb +15 -0
  133. data/app/views/carrier/messages/_reply.html.erb +19 -0
  134. data/app/views/carrier/messages/as_sent.html.erb +36 -0
  135. data/app/views/carrier/messages/collapsed.js.erb +1 -0
  136. data/app/views/carrier/messages/create.js.erb +1 -0
  137. data/app/views/carrier/messages/expanded.js.erb +1 -0
  138. data/app/views/carrier/messages/index.html.erb +9 -0
  139. data/app/views/carrier/messages/new.html.erb +7 -0
  140. data/app/views/carrier/messages/new.js.erb +1 -0
  141. data/app/views/carrier/messages/reply.js.erb +6 -0
  142. data/app/views/carrier/messages/rich/_multiselect.html.erb +18 -0
  143. data/app/views/carrier/messages/rich/_recipients.html.erb +6 -0
  144. data/app/views/carrier/messages/show.html.erb +35 -0
  145. data/app/views/carrier/messages/simple/_autocomplete.html.erb +45 -0
  146. data/app/views/carrier/messages/simple/_autocomplete_includes.html.erb +7 -0
  147. data/app/views/carrier/messages/simple/_recipients.html.erb +3 -0
  148. data/app/views/layouts/carrier/application.html.erb +16 -0
  149. data/app/views/partials/_error_messages_for.html.erb +9 -0
  150. data/carrier.gemspec +331 -0
  151. data/config/locales/carrier.en.yml +48 -0
  152. data/config/locales/carrier.ru.yml +48 -0
  153. data/config/routes.rb +24 -0
  154. data/db/migrate/001_create_messages.rb +26 -0
  155. data/db/migrate/002_create_chains.rb +34 -0
  156. data/db/migrate/003_create_read_marks +16 -0
  157. data/lib/carrier.rb +22 -0
  158. data/lib/carrier/configuration.rb +35 -0
  159. data/lib/carrier/configuration/models.rb +31 -0
  160. data/lib/carrier/configuration/ui.rb +28 -0
  161. data/lib/carrier/rails.rb +5 -0
  162. data/lib/carrier/rails/engine.rb +50 -0
  163. data/lib/carrier/rails/helpers.rb +30 -0
  164. data/lib/tasks/carrier_tasks.rake +4 -0
  165. data/script/rails +6 -0
  166. data/spec/carrier/app/controllers/application_controller_spec.rb +1 -0
  167. data/spec/carrier/app/models/message_scopes_spec.rb +25 -0
  168. data/spec/carrier/app/models/message_spec.rb +38 -0
  169. data/spec/dummy/Rakefile +7 -0
  170. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  171. data/spec/dummy/app/assets/javascripts/default.js +2 -0
  172. data/spec/dummy/app/assets/javascripts/jquery.js +16 -0
  173. data/spec/dummy/app/assets/javascripts/jquery_ujs.js +169 -0
  174. data/spec/dummy/app/assets/javascripts/posts.js +2 -0
  175. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  176. data/spec/dummy/app/assets/stylesheets/default.css +4 -0
  177. data/spec/dummy/app/assets/stylesheets/posts.css +4 -0
  178. data/spec/dummy/app/assets/stylesheets/scaffold.css +56 -0
  179. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  180. data/spec/dummy/app/controllers/default_controller.rb +5 -0
  181. data/spec/dummy/app/controllers/posts_controller.rb +83 -0
  182. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  183. data/spec/dummy/app/helpers/default_helper.rb +2 -0
  184. data/spec/dummy/app/helpers/posts_helper.rb +2 -0
  185. data/spec/dummy/app/mailers/.gitkeep +0 -0
  186. data/spec/dummy/app/models/.gitkeep +0 -0
  187. data/spec/dummy/app/models/post.rb +2 -0
  188. data/spec/dummy/app/models/user.rb +15 -0
  189. data/spec/dummy/app/views/default/index.html.erb +4 -0
  190. data/spec/dummy/app/views/devise/confirmations/new.html.erb +12 -0
  191. data/spec/dummy/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  192. data/spec/dummy/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  193. data/spec/dummy/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  194. data/spec/dummy/app/views/devise/passwords/edit.html.erb +16 -0
  195. data/spec/dummy/app/views/devise/passwords/new.html.erb +12 -0
  196. data/spec/dummy/app/views/devise/registrations/edit.html.erb +25 -0
  197. data/spec/dummy/app/views/devise/registrations/new.html.erb +18 -0
  198. data/spec/dummy/app/views/devise/sessions/new.html.erb +17 -0
  199. data/spec/dummy/app/views/devise/shared/_links.erb +25 -0
  200. data/spec/dummy/app/views/devise/unlocks/new.html.erb +12 -0
  201. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  202. data/spec/dummy/app/views/posts/_form.html.erb +17 -0
  203. data/spec/dummy/app/views/posts/edit.html.erb +6 -0
  204. data/spec/dummy/app/views/posts/index.html.erb +21 -0
  205. data/spec/dummy/app/views/posts/new.html.erb +5 -0
  206. data/spec/dummy/app/views/posts/show.html.erb +5 -0
  207. data/spec/dummy/config.ru +4 -0
  208. data/spec/dummy/config/application.rb +51 -0
  209. data/spec/dummy/config/boot.rb +10 -0
  210. data/spec/dummy/config/database.yml +26 -0
  211. data/spec/dummy/config/database_mysql.yml +29 -0
  212. data/spec/dummy/config/database_pgsql.yml +35 -0
  213. data/spec/dummy/config/environment.rb +5 -0
  214. data/spec/dummy/config/environments/development.rb +24 -0
  215. data/spec/dummy/config/environments/production.rb +52 -0
  216. data/spec/dummy/config/environments/test.rb +39 -0
  217. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  218. data/spec/dummy/config/initializers/carrier.rb +3 -0
  219. data/spec/dummy/config/initializers/devise.rb +204 -0
  220. data/spec/dummy/config/initializers/inflections.rb +10 -0
  221. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  222. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  223. data/spec/dummy/config/initializers/session_store.rb +8 -0
  224. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  225. data/spec/dummy/config/locales/devise.en.yml +53 -0
  226. data/spec/dummy/config/locales/en.yml +5 -0
  227. data/spec/dummy/config/routes.rb +15 -0
  228. data/spec/dummy/db/migrate/007_devise_create_users.rb +29 -0
  229. data/spec/dummy/db/migrate/20110130210000_create_read_marks.rb +16 -0
  230. data/spec/dummy/db/migrate/20110814064637_create_posts.rb +8 -0
  231. data/spec/dummy/db/migrate/20110814164228_create_messages.rb +26 -0
  232. data/spec/dummy/db/migrate/20110814164229_create_chains.rb +34 -0
  233. data/spec/dummy/db/schema.rb +79 -0
  234. data/spec/dummy/db/seeds.rb +26 -0
  235. data/spec/dummy/log/.gitkeep +0 -0
  236. data/spec/dummy/public/404.html +26 -0
  237. data/spec/dummy/public/422.html +26 -0
  238. data/spec/dummy/public/500.html +26 -0
  239. data/spec/dummy/public/favicon.ico +0 -0
  240. data/spec/dummy/script/rails +6 -0
  241. data/spec/dummy/test/fixtures/posts.yml +11 -0
  242. data/spec/dummy/test/fixtures/users.yml +11 -0
  243. data/spec/dummy/test/functional/default_controller_test.rb +9 -0
  244. data/spec/dummy/test/functional/posts_controller_test.rb +49 -0
  245. data/spec/dummy/test/unit/helpers/default_helper_test.rb +4 -0
  246. data/spec/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
  247. data/spec/dummy/test/unit/post_test.rb +7 -0
  248. data/spec/dummy/test/unit/user_test.rb +7 -0
  249. data/spec/dummy_spec_helper.rb +70 -0
  250. data/spec/integration/carrier_spec.rb +71 -0
  251. data/spec/requests/main_spec.rb +31 -0
  252. data/spec/support/controller_macros.rb +10 -0
  253. data/spec/support/factories.rb +47 -0
  254. data/spec/support/rspec_helpers.rb +22 -0
  255. data/test/helper.rb +18 -0
  256. data/test/test_carrier.rb +7 -0
  257. metadata +450 -0
@@ -0,0 +1,15 @@
1
+ class User < ActiveRecord::Base
2
+ devise :database_authenticatable, :registerable,
3
+ :recoverable, :rememberable, :trackable, :validatable
4
+
5
+ # Setup accessible (or protected) attributes for your model
6
+ # DEVISE
7
+ attr_accessible :email, :password, :password_confirmation, :remember_me
8
+
9
+ # OTHER
10
+ attr_accessible :name, :username
11
+
12
+ validates :username, :presence => true
13
+
14
+ acts_as_reader
15
+ end
@@ -0,0 +1,4 @@
1
+ <h1>Default#index</h1>
2
+ <p>Find me in app/views/default/index.html.erb</p>
3
+
4
+
@@ -0,0 +1,12 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.submit "Resend confirmation instructions" %></p>
10
+ <% end %>
11
+
12
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,16 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <p><%= f.label :password, "New password" %><br />
8
+ <%= f.password_field :password %></p>
9
+
10
+ <p><%= f.label :password_confirmation, "Confirm new password" %><br />
11
+ <%= f.password_field :password_confirmation %></p>
12
+
13
+ <p><%= f.submit "Change my password" %></p>
14
+ <% end %>
15
+
16
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,12 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.submit "Send me reset password instructions" %></p>
10
+ <% end %>
11
+
12
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,25 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
10
+ <%= f.password_field :password %></p>
11
+
12
+ <p><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></p>
14
+
15
+ <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
16
+ <%= f.password_field :current_password %></p>
17
+
18
+ <p><%= f.submit "Update" %></p>
19
+ <% end %>
20
+
21
+ <h3>Cancel my account</h3>
22
+
23
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
24
+
25
+ <%= link_to "Back", :back %>
@@ -0,0 +1,18 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.label :password %><br />
10
+ <%= f.password_field :password %></p>
11
+
12
+ <p><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></p>
14
+
15
+ <p><%= f.submit "Sign up" %></p>
16
+ <% end %>
17
+
18
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
+ <p><%= f.label :email %><br />
5
+ <%= f.email_field :email %></p>
6
+
7
+ <p><%= f.label :password %><br />
8
+ <%= f.password_field :password %></p>
9
+
10
+ <% if devise_mapping.rememberable? -%>
11
+ <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
12
+ <% end -%>
13
+
14
+ <p><%= f.submit "Sign in" %></p>
15
+ <% end %>
16
+
17
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,12 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.submit "Resend unlock instructions" %></p>
10
+ <% end %>
11
+
12
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ <%= link_to 'Carrier', '/carrier' %>
14
+ <%= link_to 'Sign out', destroy_user_session_path, :method => :delete %>
15
+ </body>
16
+ </html>
@@ -0,0 +1,17 @@
1
+ <%= form_for(@post) do |f| %>
2
+ <% if @post.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @post.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="actions">
15
+ <%= f.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing post</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @post %> |
6
+ <%= link_to 'Back', posts_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing posts</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @posts.each do |post| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', post %></td>
13
+ <td><%= link_to 'Edit', edit_post_path(post) %></td>
14
+ <td><%= link_to 'Destroy', post, confirm: 'Are you sure?', method: :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Post', new_post_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New post</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', posts_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_post_path(@post) %> |
5
+ <%= link_to 'Back', posts_path %>
@@ -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 Dummy::Application
@@ -0,0 +1,51 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+
7
+ require "devise"
8
+ require "carrier"
9
+
10
+ module Dummy
11
+ class Application < Rails::Application
12
+ # Settings in config/environments/* take precedence over those specified here.
13
+ # Application configuration should go into files in config/initializers
14
+ # -- all .rb files in that directory are automatically loaded.
15
+
16
+ # Custom directories with classes and modules you want to be autoloadable.
17
+ # config.autoload_paths += %W(#{config.root}/extras)
18
+
19
+ # Only load the plugins named here, in the order given (default is alphabetical).
20
+ # :all can be used as a placeholder for all plugins not explicitly named.
21
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
22
+
23
+ # Activate observers that should always be running.
24
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
25
+
26
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
27
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
28
+ # config.time_zone = 'Central Time (US & Canada)'
29
+
30
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
31
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
32
+ config.i18n.default_locale = :en
33
+
34
+ # Please note that JavaScript expansions are *ignored altogether* if the asset
35
+ # pipeline is enabled (see config.assets.enabled below). Put your defaults in
36
+ # app/assets/javascripts/application.js in that case.
37
+ #
38
+ # JavaScript files you want as :defaults (application.js is always included).
39
+ # config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs)
40
+
41
+ # Configure the default encoding used in templates for Ruby 1.9.
42
+ config.encoding = "utf-8"
43
+
44
+ # Configure sensitive parameters which will be filtered from the log file.
45
+ config.filter_parameters += [:password]
46
+
47
+ # Enable the asset pipeline
48
+ config.assets.enabled = true
49
+ end
50
+ end
51
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,26 @@
1
+ development:
2
+ adapter: mysql2
3
+ host: localhost
4
+ database: carrier_development
5
+ username: root
6
+ password: root
7
+ encoding: utf8
8
+
9
+ test: &test
10
+ adapter: mysql2
11
+ host: localhost
12
+ database: carrier_test
13
+ username: root
14
+ password: root
15
+ encoding: utf8
16
+
17
+ production:
18
+ adapter: mysql2
19
+ host: localhost
20
+ database: carrier_production
21
+ username: root
22
+ password: root
23
+ encoding: utf8
24
+
25
+ cucumber:
26
+ <<: *test
@@ -0,0 +1,29 @@
1
+ development:
2
+ adapter: mysql2
3
+ host: localhost
4
+ database: carrier
5
+ username: root
6
+ password: root
7
+ encoding: utf8
8
+
9
+ test: &test
10
+ adapter: mysql2
11
+ host: localhost
12
+ database: carrier_test
13
+ username: root
14
+ password: root
15
+ encoding: utf8
16
+
17
+ production:
18
+ adapter: mysql2
19
+ host: localhost
20
+ port: 5432
21
+ database: eidogram_distant
22
+ username: pgsql
23
+ password: pgsql
24
+ schema_search_path: public
25
+ encoding: utf8
26
+ template: template0
27
+
28
+ cucumber:
29
+ <<: *test
@@ -0,0 +1,35 @@
1
+ development:
2
+ adapter: postgresql
3
+ host: localhost
4
+ port: 5432
5
+ database: carrier
6
+ username: postgres
7
+ password: postgres
8
+ schema_search_path: public
9
+ encoding: utf8
10
+ template: template0
11
+
12
+ test: &test
13
+ adapter: postgresql
14
+ host: localhost
15
+ port: 5432
16
+ database: distant_test
17
+ username: postgres
18
+ password: postgres
19
+ schema_search_path: public
20
+ encoding: utf8
21
+ template: template0
22
+
23
+ production:
24
+ adapter: postgresql
25
+ host: localhost
26
+ port: 5432
27
+ database: eidogram_distant
28
+ username: pgsql
29
+ password: pgsql
30
+ schema_search_path: public
31
+ encoding: utf8
32
+ template: template0
33
+
34
+ cucumber:
35
+ <<: *test
@@ -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!