messaging_4 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/javascripts/messaging/adapt.js +135 -0
  5. data/app/assets/javascripts/messaging/application.js +10 -0
  6. data/app/assets/javascripts/messaging/messages.coffee +33 -0
  7. data/app/assets/stylesheets/messaging/1200.css +357 -0
  8. data/app/assets/stylesheets/messaging/1560.css +357 -0
  9. data/app/assets/stylesheets/messaging/1920.css +358 -0
  10. data/app/assets/stylesheets/messaging/2520.css +359 -0
  11. data/app/assets/stylesheets/messaging/720.css +357 -0
  12. data/app/assets/stylesheets/messaging/960.css +357 -0
  13. data/app/assets/stylesheets/messaging/application.css +8 -0
  14. data/app/assets/stylesheets/messaging/messages.sass +225 -0
  15. data/app/assets/stylesheets/messaging/mobile.css +26 -0
  16. data/app/assets/stylesheets/messaging/reset.css +48 -0
  17. data/app/controllers/messaging/application_controller.rb +9 -0
  18. data/app/controllers/messaging/messages_controller.rb +71 -0
  19. data/app/helpers/messaging/application_helper.rb +4 -0
  20. data/app/models/messaging/message.rb +35 -0
  21. data/app/views/layouts/messaging/application.html.haml +62 -0
  22. data/app/views/messaging/messages/index.html.haml +28 -0
  23. data/app/views/messaging/messages/new.html.haml +11 -0
  24. data/app/views/messaging/messages/show.html.haml +23 -0
  25. data/config/routes.rb +13 -0
  26. data/lib/generators/messaging/devise/devise_generator.rb +34 -0
  27. data/lib/generators/messaging/devise/templates/messaging_user.rb.erb +23 -0
  28. data/lib/generators/messaging/install/install_generator.rb +12 -0
  29. data/lib/messaging.rb +9 -0
  30. data/lib/messaging/engine.rb +5 -0
  31. data/lib/messaging/version.rb +3 -0
  32. data/lib/tasks/messaging_tasks.rake +4 -0
  33. data/test/dummy/Rakefile +7 -0
  34. data/test/dummy/app/assets/javascripts/application.js +9 -0
  35. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  36. data/test/dummy/app/controllers/application_controller.rb +3 -0
  37. data/test/dummy/app/controllers/home_controller.rb +9 -0
  38. data/test/dummy/app/helpers/application_helper.rb +2 -0
  39. data/test/dummy/app/models/messaging_user.rb +23 -0
  40. data/test/dummy/app/models/user.rb +23 -0
  41. data/test/dummy/app/views/layouts/application.html.haml +11 -0
  42. data/test/dummy/config.ru +4 -0
  43. data/test/dummy/config/application.rb +45 -0
  44. data/test/dummy/config/boot.rb +10 -0
  45. data/test/dummy/config/database.yml +25 -0
  46. data/test/dummy/config/environment.rb +5 -0
  47. data/test/dummy/config/environments/development.rb +32 -0
  48. data/test/dummy/config/environments/production.rb +60 -0
  49. data/test/dummy/config/environments/test.rb +39 -0
  50. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  51. data/test/dummy/config/initializers/devise.rb +209 -0
  52. data/test/dummy/config/initializers/inflections.rb +10 -0
  53. data/test/dummy/config/initializers/mailboxer.rb +12 -0
  54. data/test/dummy/config/initializers/mime_types.rb +5 -0
  55. data/test/dummy/config/initializers/secret_token.rb +7 -0
  56. data/test/dummy/config/initializers/session_store.rb +8 -0
  57. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  58. data/test/dummy/config/locales/devise.en.yml +58 -0
  59. data/test/dummy/config/locales/en.yml +5 -0
  60. data/test/dummy/config/routes.rb +10 -0
  61. data/test/dummy/db/migrate/20111204041734_devise_create_users.rb +25 -0
  62. data/test/dummy/db/migrate/20111204042609_create_mailboxer.rb +61 -0
  63. data/test/dummy/db/migrate/20111204042610_add_notified_object.rb +17 -0
  64. data/test/dummy/db/migrate/20111204042611_add_notification_code.rb +13 -0
  65. data/test/dummy/db/migrate/20111205020919_add_attachments.rb +5 -0
  66. data/test/dummy/db/migrate/20111213052240_devise_create_messaging_users.rb +25 -0
  67. data/test/dummy/db/schema.rb +99 -0
  68. data/test/dummy/public/404.html +26 -0
  69. data/test/dummy/public/422.html +26 -0
  70. data/test/dummy/public/500.html +26 -0
  71. data/test/dummy/public/favicon.ico +0 -0
  72. data/test/dummy/script/rails +6 -0
  73. data/test/dummy/test/fixtures/messaging_users.yml +11 -0
  74. data/test/dummy/test/fixtures/users.yml +11 -0
  75. data/test/dummy/test/unit/messaging_user_test.rb +7 -0
  76. data/test/dummy/test/unit/user_test.rb +7 -0
  77. data/test/integration/navigation_test.rb +10 -0
  78. data/test/messaging_test.rb +7 -0
  79. data/test/test_helper.rb +10 -0
  80. metadata +281 -0
@@ -0,0 +1,357 @@
1
+ /*
2
+ 960 Grid System ~ Core CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+ */
7
+
8
+ /*
9
+ Forces backgrounds to span full width,
10
+ even if there is horizontal scrolling.
11
+ Increase this if your layout is wider.
12
+
13
+ Note: IE6 works fine without this fix.
14
+ */
15
+
16
+ body {
17
+ min-width: 960px;
18
+ }
19
+
20
+ /* `Containers
21
+ ----------------------------------------------------------------------------------------------------*/
22
+
23
+ .container_12 {
24
+ margin-left: auto;
25
+ margin-right: auto;
26
+ width: 960px;
27
+ }
28
+
29
+ /* `Grid >> Global
30
+ ----------------------------------------------------------------------------------------------------*/
31
+
32
+ .grid_1,
33
+ .grid_2,
34
+ .grid_3,
35
+ .grid_4,
36
+ .grid_5,
37
+ .grid_6,
38
+ .grid_7,
39
+ .grid_8,
40
+ .grid_9,
41
+ .grid_10,
42
+ .grid_11,
43
+ .grid_12 {
44
+ display: inline;
45
+ float: left;
46
+ margin-left: 10px;
47
+ margin-right: 10px;
48
+ }
49
+
50
+ .push_1, .pull_1,
51
+ .push_2, .pull_2,
52
+ .push_3, .pull_3,
53
+ .push_4, .pull_4,
54
+ .push_5, .pull_5,
55
+ .push_6, .pull_6,
56
+ .push_7, .pull_7,
57
+ .push_8, .pull_8,
58
+ .push_9, .pull_9,
59
+ .push_10, .pull_10,
60
+ .push_11, .pull_11 {
61
+ position: relative;
62
+ }
63
+
64
+ /* `Grid >> Children (Alpha ~ First, Omega ~ Last)
65
+ ----------------------------------------------------------------------------------------------------*/
66
+
67
+ .alpha {
68
+ margin-left: 0;
69
+ }
70
+
71
+ .omega {
72
+ margin-right: 0;
73
+ }
74
+
75
+ /* `Grid >> 12 Columns
76
+ ----------------------------------------------------------------------------------------------------*/
77
+
78
+ .container_12 .grid_1 {
79
+ width: 60px;
80
+ }
81
+
82
+ .container_12 .grid_2 {
83
+ width: 140px;
84
+ }
85
+
86
+ .container_12 .grid_3 {
87
+ width: 220px;
88
+ }
89
+
90
+ .container_12 .grid_4 {
91
+ width: 300px;
92
+ }
93
+
94
+ .container_12 .grid_5 {
95
+ width: 380px;
96
+ }
97
+
98
+ .container_12 .grid_6 {
99
+ width: 460px;
100
+ }
101
+
102
+ .container_12 .grid_7 {
103
+ width: 540px;
104
+ }
105
+
106
+ .container_12 .grid_8 {
107
+ width: 620px;
108
+ }
109
+
110
+ .container_12 .grid_9 {
111
+ width: 700px;
112
+ }
113
+
114
+ .container_12 .grid_10 {
115
+ width: 780px;
116
+ }
117
+
118
+ .container_12 .grid_11 {
119
+ width: 860px;
120
+ }
121
+
122
+ .container_12 .grid_12 {
123
+ width: 940px;
124
+ }
125
+
126
+ /* `Prefix Extra Space >> 12 Columns
127
+ ----------------------------------------------------------------------------------------------------*/
128
+
129
+ .container_12 .prefix_1 {
130
+ padding-left: 80px;
131
+ }
132
+
133
+ .container_12 .prefix_2 {
134
+ padding-left: 160px;
135
+ }
136
+
137
+ .container_12 .prefix_3 {
138
+ padding-left: 240px;
139
+ }
140
+
141
+ .container_12 .prefix_4 {
142
+ padding-left: 320px;
143
+ }
144
+
145
+ .container_12 .prefix_5 {
146
+ padding-left: 400px;
147
+ }
148
+
149
+ .container_12 .prefix_6 {
150
+ padding-left: 480px;
151
+ }
152
+
153
+ .container_12 .prefix_7 {
154
+ padding-left: 560px;
155
+ }
156
+
157
+ .container_12 .prefix_8 {
158
+ padding-left: 640px;
159
+ }
160
+
161
+ .container_12 .prefix_9 {
162
+ padding-left: 720px;
163
+ }
164
+
165
+ .container_12 .prefix_10 {
166
+ padding-left: 800px;
167
+ }
168
+
169
+ .container_12 .prefix_11 {
170
+ padding-left: 880px;
171
+ }
172
+
173
+ /* `Suffix Extra Space >> 12 Columns
174
+ ----------------------------------------------------------------------------------------------------*/
175
+
176
+ .container_12 .suffix_1 {
177
+ padding-right: 80px;
178
+ }
179
+
180
+ .container_12 .suffix_2 {
181
+ padding-right: 160px;
182
+ }
183
+
184
+ .container_12 .suffix_3 {
185
+ padding-right: 240px;
186
+ }
187
+
188
+ .container_12 .suffix_4 {
189
+ padding-right: 320px;
190
+ }
191
+
192
+ .container_12 .suffix_5 {
193
+ padding-right: 400px;
194
+ }
195
+
196
+ .container_12 .suffix_6 {
197
+ padding-right: 480px;
198
+ }
199
+
200
+ .container_12 .suffix_7 {
201
+ padding-right: 560px;
202
+ }
203
+
204
+ .container_12 .suffix_8 {
205
+ padding-right: 640px;
206
+ }
207
+
208
+ .container_12 .suffix_9 {
209
+ padding-right: 720px;
210
+ }
211
+
212
+ .container_12 .suffix_10 {
213
+ padding-right: 800px;
214
+ }
215
+
216
+ .container_12 .suffix_11 {
217
+ padding-right: 880px;
218
+ }
219
+
220
+ /* `Push Space >> 12 Columns
221
+ ----------------------------------------------------------------------------------------------------*/
222
+
223
+ .container_12 .push_1 {
224
+ left: 80px;
225
+ }
226
+
227
+ .container_12 .push_2 {
228
+ left: 160px;
229
+ }
230
+
231
+ .container_12 .push_3 {
232
+ left: 240px;
233
+ }
234
+
235
+ .container_12 .push_4 {
236
+ left: 320px;
237
+ }
238
+
239
+ .container_12 .push_5 {
240
+ left: 400px;
241
+ }
242
+
243
+ .container_12 .push_6 {
244
+ left: 480px;
245
+ }
246
+
247
+ .container_12 .push_7 {
248
+ left: 560px;
249
+ }
250
+
251
+ .container_12 .push_8 {
252
+ left: 640px;
253
+ }
254
+
255
+ .container_12 .push_9 {
256
+ left: 720px;
257
+ }
258
+
259
+ .container_12 .push_10 {
260
+ left: 800px;
261
+ }
262
+
263
+ .container_12 .push_11 {
264
+ left: 880px;
265
+ }
266
+
267
+ /* `Pull Space >> 12 Columns
268
+ ----------------------------------------------------------------------------------------------------*/
269
+
270
+ .container_12 .pull_1 {
271
+ left: -80px;
272
+ }
273
+
274
+ .container_12 .pull_2 {
275
+ left: -160px;
276
+ }
277
+
278
+ .container_12 .pull_3 {
279
+ left: -240px;
280
+ }
281
+
282
+ .container_12 .pull_4 {
283
+ left: -320px;
284
+ }
285
+
286
+ .container_12 .pull_5 {
287
+ left: -400px;
288
+ }
289
+
290
+ .container_12 .pull_6 {
291
+ left: -480px;
292
+ }
293
+
294
+ .container_12 .pull_7 {
295
+ left: -560px;
296
+ }
297
+
298
+ .container_12 .pull_8 {
299
+ left: -640px;
300
+ }
301
+
302
+ .container_12 .pull_9 {
303
+ left: -720px;
304
+ }
305
+
306
+ .container_12 .pull_10 {
307
+ left: -800px;
308
+ }
309
+
310
+ .container_12 .pull_11 {
311
+ left: -880px;
312
+ }
313
+
314
+ /* `Clear Floated Elements
315
+ ----------------------------------------------------------------------------------------------------*/
316
+
317
+ /* http://sonspring.com/journal/clearing-floats */
318
+
319
+ .clear {
320
+ clear: both;
321
+ display: block;
322
+ overflow: hidden;
323
+ visibility: hidden;
324
+ width: 0;
325
+ height: 0;
326
+ }
327
+
328
+ /* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */
329
+
330
+ .clearfix:before,
331
+ .clearfix:after,
332
+ .container_12:before,
333
+ .container_12:after {
334
+ content: '.';
335
+ display: block;
336
+ overflow: hidden;
337
+ visibility: hidden;
338
+ font-size: 0;
339
+ line-height: 0;
340
+ width: 0;
341
+ height: 0;
342
+ }
343
+
344
+ .clearfix:after,
345
+ .container_12:after {
346
+ clear: both;
347
+ }
348
+
349
+ /*
350
+ The following zoom:1 rule is specifically for IE6 + IE7.
351
+ Move to separate stylesheet if invalid CSS is a problem.
352
+ */
353
+
354
+ .clearfix,
355
+ .container_12 {
356
+ zoom: 1;
357
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require ./reset
7
+ *= require ./messages
8
+ */
@@ -0,0 +1,225 @@
1
+ $font_a: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif
2
+ $font_b: Georgia, serif
3
+
4
+ $color_a: #450003
5
+ $color_b: #5C0002
6
+ $color_c: #94090D
7
+ $color_d: #D40D12
8
+ $color_e: #FFED75
9
+
10
+ html, body
11
+ font-family: $font_a
12
+
13
+ a
14
+ text-decoration: none
15
+ color: $color_d
16
+
17
+ a:hover
18
+ color: $color_c
19
+
20
+ header
21
+ .sign-out
22
+ float: right
23
+ font-size: 16px
24
+ padding: 7px
25
+ background-color: rgba(255,255,255,0.2)
26
+ border-radius: 5px
27
+ margin-top: 20px
28
+ color: #ccc
29
+ border: 1px solid #999
30
+ .sign-out:hover
31
+ color: #ccc
32
+ border: 1px solid #ccc
33
+ background-color: rgba(255,255,255,0.3)
34
+ h1
35
+ color: $color_e
36
+ font-size: 40px
37
+ float: left
38
+ text-shadow: 0 1px 0 black
39
+ margin-top: 15px
40
+ margin-left: 10px
41
+ height: 75px
42
+ background-color: $color_a
43
+ background-image: -webkit-linear-gradient(top, $color_c, $color_b)
44
+ border-bottom: 1px solid black
45
+ box-shadow: 0 0 7px black
46
+
47
+ nav
48
+ margin: 9px 0
49
+ > a
50
+ display: block
51
+ margin: 1px 0
52
+ text-align: left
53
+ padding: 10px
54
+ vertical-align: middle
55
+ display: block
56
+ font-weight: bold
57
+ &:hover
58
+ background-color: #eee
59
+ &.selected
60
+ background-color: $color_e
61
+ &.compose
62
+ background-color: $color_d
63
+ text-shadow: 0 1px 0 black
64
+ color: white
65
+ text-align: center
66
+ margin-bottom: 40px
67
+ form
68
+ margin: 10px 0
69
+
70
+ ul.ui-autocomplete
71
+ position: absolute
72
+ list-style: none
73
+ margin: 0
74
+ padding: 0
75
+ border: solid 1px #999
76
+ cursor: default
77
+ > li
78
+ background-color: #FFF
79
+ border-top: solid 1px #DDD
80
+ margin: 0
81
+ padding: 0
82
+ > a
83
+ color: #000
84
+ display: block
85
+ padding: 3px
86
+ font-size: 18px
87
+ > a.ui-state-hover, > a.ui-state-active
88
+ background-color: #FFFCB2
89
+
90
+ .unread
91
+ font-weight: bold
92
+
93
+ .body
94
+ font-family: $font_b
95
+
96
+ html, body, #wrapper
97
+ height: 100%
98
+
99
+ body > #wrapper
100
+ height: auto
101
+ min-height: 100%
102
+
103
+ #content
104
+ margin-top: 30px
105
+ padding-bottom: 150px
106
+
107
+ #footer
108
+ position: relative
109
+ margin-top: -150px
110
+ height: 149px
111
+ clear: both
112
+ background-color: #ccc
113
+ border-top: 1px solid $color_d
114
+ a
115
+ display: block
116
+ color: black
117
+ margin: 20px 0
118
+ font-weight: bold
119
+ text-shadow: 0 1px 0 white
120
+
121
+ h2
122
+ margin: 10px 0
123
+ font-size: 30px
124
+
125
+ #box
126
+ margin: 45px 0
127
+ width: 100%
128
+ background-color: #eee
129
+ overflow: hidden
130
+ a
131
+ color: black
132
+ text-overflow: ellipsis
133
+ padding: 0 10px
134
+ td, th
135
+ vertical-align: middle
136
+ white-space: nowrap
137
+ overflow: hidden
138
+ padding: 10px 5px
139
+ tr
140
+ border-bottom: 1px solid #bbb
141
+ .unread
142
+ font-weight: bold
143
+
144
+ #reply
145
+ margin-top: 10px
146
+ padding-top: 10px
147
+ label
148
+ font-size: 20px
149
+ font-weight: bold
150
+ margin: 20px 0
151
+ display: block
152
+
153
+ textarea, input[type='text']
154
+ border: 1px solid black
155
+ font-size: 16px
156
+ font-family: $font_a
157
+
158
+ textarea
159
+ width: 100%
160
+ display: block
161
+ font-family: $font_b
162
+
163
+ .button, input[type='submit']
164
+ background-color: $color_d
165
+ border: 0
166
+ color: white
167
+ padding: 7px 20px
168
+ font-size: 18px
169
+ cursor: pointer
170
+ margin: 20px 0
171
+ text-shadow: 0 1px 0 black
172
+ font-weight: bold
173
+
174
+ #conversation
175
+ margin-top: 27px
176
+ li
177
+ border-bottom: 1px dotted black
178
+ margin: 10px 0
179
+ padding: 10px 0
180
+ .head
181
+ .from
182
+ float: left
183
+ margin: 20px 0
184
+ font-size: 14px
185
+ font-weight: bold
186
+ .date
187
+ float: right
188
+ margin: 20px 0
189
+ font-size: 14px
190
+ font-weight: bold
191
+ .body
192
+ clear: both
193
+ padding: 20px 0
194
+ line-height: 1.4
195
+ .attachment
196
+ margin: 10px 0
197
+ .attachment:before
198
+ content: 'Attachment: '
199
+
200
+ #compose
201
+ margin: 55px 0
202
+ label
203
+ font-size: 20px
204
+ font-weight: bold
205
+ margin: 20px 0 5px
206
+ display: block
207
+
208
+ #alert, #notice
209
+ box-shadow: 0 0 7px black
210
+ border-bottom: 1px solid black
211
+ font-weight: bold
212
+ text-align: center
213
+ padding: 10px
214
+ #alert
215
+ background-color: $color_d
216
+ color: white
217
+ #notice
218
+ background-color: $color_e
219
+
220
+ #actions
221
+ a
222
+ display: block
223
+ float: right
224
+ a:hover
225
+ color: white