inbox 0.2.0 → 0.3.0
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.
- checksums.yaml +7 -0
- data/Gemfile +18 -0
- data/LICENSE.txt +22 -0
- data/README.md +162 -74
- data/Rakefile +35 -30
- data/VERSION +1 -0
- data/example/.gitignore +16 -0
- data/example/Gemfile +39 -0
- data/example/README.rdoc +28 -0
- data/{test/dummy → example}/Rakefile +1 -2
- data/{app/views/inbox/emails/index.html.erb → example/app/assets/images/.keep} +0 -0
- data/example/app/assets/javascripts/application.js +16 -0
- data/example/app/assets/javascripts/welcome.js.coffee +3 -0
- data/example/app/assets/stylesheets/application.css +15 -0
- data/example/app/assets/stylesheets/welcome.css.scss +3 -0
- data/example/app/controllers/application_controller.rb +61 -0
- data/{test/dummy/db/development.sqlite3 → example/app/controllers/concerns/.keep} +0 -0
- data/{test/dummy → example}/app/helpers/application_helper.rb +0 -0
- data/example/app/helpers/welcome_helper.rb +2 -0
- data/{test/dummy/db/production.sqlite3 → example/app/mailers/.keep} +0 -0
- data/{test/dummy/db/test.sqlite3 → example/app/models/.keep} +0 -0
- data/{test/dummy/log/test.log → example/app/models/concerns/.keep} +0 -0
- data/example/app/views/layouts/application.html.erb +14 -0
- data/example/app/views/welcome/index.html.erb +2 -0
- data/example/bin/bundle +3 -0
- data/example/bin/rails +8 -0
- data/example/bin/rake +8 -0
- data/example/bin/spring +18 -0
- data/{test/dummy → example}/config.ru +1 -1
- data/example/config/application.rb +23 -0
- data/example/config/boot.rb +4 -0
- data/{test/dummy → example}/config/database.yml +8 -8
- data/example/config/environment.rb +5 -0
- data/example/config/environments/development.rb +39 -0
- data/example/config/environments/production.rb +82 -0
- data/example/config/environments/test.rb +41 -0
- data/example/config/initializers/assets.rb +8 -0
- data/{test/dummy → example}/config/initializers/backtrace_silencers.rb +1 -1
- data/example/config/initializers/cookies_serializer.rb +3 -0
- data/example/config/initializers/filter_parameter_logging.rb +4 -0
- data/example/config/initializers/inflections.rb +16 -0
- data/{test/dummy → example}/config/initializers/mime_types.rb +0 -1
- data/example/config/initializers/session_store.rb +3 -0
- data/{test/dummy → example}/config/initializers/wrap_parameters.rb +6 -6
- data/example/config/locales/en.yml +23 -0
- data/example/config/routes.rb +59 -0
- data/example/config/secrets.yml +22 -0
- data/example/db/seeds.rb +7 -0
- data/{test/dummy/public/favicon.ico → example/lib/assets/.keep} +0 -0
- data/example/lib/tasks/.keep +0 -0
- data/example/log/.keep +0 -0
- data/example/public/404.html +67 -0
- data/example/public/422.html +67 -0
- data/example/public/500.html +66 -0
- data/example/public/favicon.ico +0 -0
- data/example/public/robots.txt +5 -0
- data/example/test/controllers/.keep +0 -0
- data/example/test/controllers/welcome_controller_test.rb +9 -0
- data/example/test/fixtures/.keep +0 -0
- data/example/test/fixtures/users.yml +11 -0
- data/example/test/helpers/.keep +0 -0
- data/example/test/helpers/welcome_helper_test.rb +4 -0
- data/example/test/integration/.keep +0 -0
- data/example/test/mailers/.keep +0 -0
- data/example/test/models/.keep +0 -0
- data/{test/integration/navigation_test.rb → example/test/models/user_test.rb} +1 -4
- data/example/test/test_helper.rb +10 -0
- data/example/vendor/assets/javascripts/.keep +0 -0
- data/example/vendor/assets/stylesheets/.keep +0 -0
- data/inbox.gemspec +327 -0
- data/lib/contact.rb +10 -0
- data/lib/draft.rb +28 -0
- data/lib/file.rb +31 -0
- data/lib/inbox.rb +81 -20
- data/lib/message.rb +37 -0
- data/lib/namespace.rb +51 -0
- data/lib/restful_model.rb +76 -0
- data/lib/restful_model_collection.rb +131 -0
- data/lib/tag.rb +9 -0
- data/lib/thread.rb +60 -0
- data/lib/version.rb +3 -0
- data/spec/inbox_spec.rb +79 -0
- data/spec/restful_model_spec.rb +18 -0
- data/spec/spec_helper.rb +1 -0
- data/tasks/rspec.rake +3 -0
- metadata +1038 -181
- data/MIT-LICENSE +0 -20
- data/app/assets/images/inbox/results_bg.png +0 -0
- data/app/assets/images/inbox/tree_bg.png +0 -0
- data/app/assets/javascripts/inbox/application.js +0 -8
- data/app/assets/javascripts/inbox/emails.js +0 -2
- data/app/assets/stylesheets/inbox/application.css +0 -7
- data/app/assets/stylesheets/inbox/emails.css +0 -59
- data/app/assets/stylesheets/inbox/panel.css.erb +0 -229
- data/app/assets/stylesheets/inbox/reset.css +0 -53
- data/app/controllers/inbox/application_controller.rb +0 -4
- data/app/controllers/inbox/emails_controller.rb +0 -52
- data/app/helpers/inbox/application_helper.rb +0 -4
- data/app/helpers/inbox/emails_helper.rb +0 -4
- data/app/mailers/inbox/email_mailer.rb +0 -11
- data/app/models/inbox/email.rb +0 -51
- data/app/views/inbox/emails/new.html.erb +0 -9
- data/app/views/inbox/emails/show.html.erb +0 -48
- data/app/views/layouts/inbox/application.html.erb +0 -15
- data/app/views/layouts/inbox/inbox.html.erb +0 -25
- data/config/routes.rb +0 -6
- data/lib/inbox/engine.rb +0 -9
- data/lib/inbox/version.rb +0 -3
- data/lib/tasks/inbox_tasks.rake +0 -4
- data/test/dummy/app/assets/javascripts/application.js +0 -9
- data/test/dummy/app/assets/stylesheets/application.css +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config/application.rb +0 -45
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -32
- data/test/dummy/config/environments/production.rb +0 -60
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/log/development.log +0 -3641
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/script/rails +0 -6
- data/test/dummy/tmp/cache/assets/C4D/8B0/sprockets%2F5e1b589842222e2ea0043890c2c84539 +0 -0
- data/test/dummy/tmp/cache/assets/C6F/5C0/sprockets%2F259fb59d511a70d46436201b6770a04a +0 -0
- data/test/dummy/tmp/cache/assets/CF2/F90/sprockets%2F5378bb2470df984ccf2643991a6e476d +0 -0
- data/test/dummy/tmp/cache/assets/D0B/330/sprockets%2F582a2b19d6be92a0393afa63894d721a +0 -0
- data/test/dummy/tmp/cache/assets/D1B/CE0/sprockets%2F09c9c18794df089e62443d3debb117e5 +0 -0
- data/test/dummy/tmp/cache/assets/D1D/BA0/sprockets%2F29888f599d35bb11e4a8183d6dc5e23a +0 -0
- data/test/dummy/tmp/cache/assets/D1F/600/sprockets%2Fdd3578c9bd0719efe092c59655a25c55 +0 -0
- data/test/dummy/tmp/cache/assets/D21/920/sprockets%2F85fd59fe11746a33f5f917a923d84be3 +0 -0
- data/test/dummy/tmp/cache/assets/D4D/FB0/sprockets%2Fd5743837e8babdab4825364c4ee86f73 +0 -0
- data/test/dummy/tmp/cache/assets/D4F/520/sprockets%2F88ecb483df9e177ee775202ba0691ec7 +0 -0
- data/test/dummy/tmp/cache/assets/D6E/300/sprockets%2Fcc54b61039f74d6b8a2a7d04ad9d77f0 +0 -0
- data/test/dummy/tmp/cache/assets/D74/390/sprockets%2F5eda33e637dd54ff6a27bb76c482a473 +0 -0
- data/test/dummy/tmp/cache/assets/D76/170/sprockets%2Ffa5e461b362e11c80d5fd9e877fb63e2 +0 -0
- data/test/dummy/tmp/cache/assets/D7F/2D0/sprockets%2F141c2c9cb5235c8d21a00fbc8d7a2ab1 +0 -0
- data/test/dummy/tmp/cache/assets/D84/AA0/sprockets%2F5e841fe9d79e3ebf4333be8842b77bc5 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/520/sprockets%2Fb8e93a54478c1f1a0e750ef2cbf74f3c +0 -0
- data/test/dummy/tmp/cache/assets/DC1/520/sprockets%2Feb8cea402f0bf04560adcd0cb8807b88 +0 -0
- data/test/dummy/tmp/mails/1345541756.4616725 +0 -11
- data/test/functional/inbox/email_test.rb +0 -9
- data/test/functional/inbox/emails_controller_test.rb +0 -16
- data/test/inbox_test.rb +0 -7
- data/test/test_helper.rb +0 -10
- data/test/unit/helpers/inbox/emails_helper_test.rb +0 -6
data/MIT-LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Copyright 2011 YOURNAME
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
a copy of this software and associated documentation files (the
|
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// This is a manifest file that'll be compiled into including all the files listed below.
|
|
2
|
-
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
|
3
|
-
// be included in the compiled file accessible from http://example.com/assets/application.js
|
|
4
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
5
|
-
// the compiled file.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
//= require_tree .
|
|
@@ -1,7 +0,0 @@
|
|
|
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_tree .
|
|
7
|
-
*/
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Place all the styles related to the matching controller here.
|
|
3
|
-
They will automatically be included in application.css.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
#message_headers {
|
|
7
|
-
width: 75%;
|
|
8
|
-
padding: 20px 0 20px 0;
|
|
9
|
-
margin: 0;
|
|
10
|
-
background: #fff;
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
font-family: "Lucida Grande";
|
|
13
|
-
border-bottom: 1px solid #dedede;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
float: left;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
#message_headers dl {
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
#message_headers dt {
|
|
24
|
-
width: 60px;
|
|
25
|
-
padding: 1px;
|
|
26
|
-
float: left;
|
|
27
|
-
text-align: right;
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
color: #7f7f7f;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
#message_headers dd {
|
|
33
|
-
margin-left: 70px;
|
|
34
|
-
padding: 1px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
#message_headers p.alternate {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 0;
|
|
40
|
-
right: 15px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
#message_headers p.alternate a {
|
|
44
|
-
color: #09c;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
pre#message_body {
|
|
48
|
-
padding: 10px;
|
|
49
|
-
white-space: pre-wrap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.clear {
|
|
53
|
-
clear: both;
|
|
54
|
-
display: block;
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
visibility: hidden;
|
|
57
|
-
width: 0;
|
|
58
|
-
height: 0;
|
|
59
|
-
}
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
/* Panel (begin) */
|
|
2
|
-
.panel
|
|
3
|
-
{
|
|
4
|
-
float: left;
|
|
5
|
-
width: 25%;
|
|
6
|
-
height: 1000px;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
background: #FFF;
|
|
10
|
-
font-family: "Helvetica Neue", "Arial", sans-serif;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* Header with search box (begin) */
|
|
14
|
-
.panel .header
|
|
15
|
-
{
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 29px;
|
|
18
|
-
border-bottom: 1px solid #666;
|
|
19
|
-
position: relative;
|
|
20
|
-
left: 0; top: 0;
|
|
21
|
-
background: #e8e8e8;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.panel .header div
|
|
25
|
-
{
|
|
26
|
-
margin: 0 7px;
|
|
27
|
-
}
|
|
28
|
-
.panel .header table
|
|
29
|
-
{
|
|
30
|
-
height: 29px;
|
|
31
|
-
width: 100%;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.panel .header table td
|
|
35
|
-
{
|
|
36
|
-
vertical-align: middle;
|
|
37
|
-
text-align: middle;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.panel .header label
|
|
41
|
-
{
|
|
42
|
-
position: absolute;
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
line-height: 29px;
|
|
45
|
-
margin-left: 3px;
|
|
46
|
-
color: #777;
|
|
47
|
-
cursor: text;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.panel .header table input
|
|
51
|
-
{
|
|
52
|
-
width: 100%;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
-moz-box-sizing: border-box;
|
|
55
|
-
-webkit-box-sizing: border-box;
|
|
56
|
-
display: inline-block;
|
|
57
|
-
-webkit-appearance: searchfield;
|
|
58
|
-
height: 22px;
|
|
59
|
-
//height: auto;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Header with search box (end) */
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/* Results (begin) */
|
|
66
|
-
.panel .result
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
height: 1000px;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
left: 0;
|
|
72
|
-
width: 100%;
|
|
73
|
-
|
|
74
|
-
overflow-y: scroll;
|
|
75
|
-
overflow-x: hidden;
|
|
76
|
-
-overflow-y: hidden;
|
|
77
|
-
background: #EEE url(<%= image_path("inbox/results_bg.png") %>);
|
|
78
|
-
z-index: 2;
|
|
79
|
-
//zoom:1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.panel .result ul
|
|
83
|
-
{
|
|
84
|
-
font-size: 0.8em;
|
|
85
|
-
width: 100%;
|
|
86
|
-
background: #EEE url(<%= image_path("inbox/results_bg.png") %>);
|
|
87
|
-
//zoom:1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.panel .result ul li
|
|
91
|
-
{
|
|
92
|
-
height: 46px;
|
|
93
|
-
overflow: hidden;
|
|
94
|
-
padding: 4px 10px 0 10px;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.panel .result ul li h1
|
|
99
|
-
{
|
|
100
|
-
font-size: 13px;
|
|
101
|
-
font-weight: normal;
|
|
102
|
-
color: #333;
|
|
103
|
-
margin-bottom: 2px;
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.panel .result ul li p
|
|
108
|
-
{
|
|
109
|
-
font-size: 11px;
|
|
110
|
-
color: #333;
|
|
111
|
-
margin-bottom: 2px;
|
|
112
|
-
white-space: nowrap;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.panel .result ul li h1 i,
|
|
116
|
-
.panel .result ul li p.snippet
|
|
117
|
-
{
|
|
118
|
-
color: #777;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.panel .result ul li b
|
|
122
|
-
{
|
|
123
|
-
color: #000;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.panel .result ul li.current
|
|
127
|
-
{
|
|
128
|
-
background: #C52F24;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.panel .result ul li.current h1,
|
|
132
|
-
.panel .result ul li.current p
|
|
133
|
-
{
|
|
134
|
-
color: #D9D9D9;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.panel .result ul li.current h1 i,
|
|
138
|
-
.panel .result ul li.current p.snippet
|
|
139
|
-
{
|
|
140
|
-
color: #ACACAC;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.panel .result ul li.current b
|
|
144
|
-
{
|
|
145
|
-
color: #FFF;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
.panel .result ul li:hover,
|
|
150
|
-
.panel .result ul li.selected
|
|
151
|
-
{
|
|
152
|
-
background: #d0d0d0;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.panel .result ul li.current:hover
|
|
156
|
-
{
|
|
157
|
-
background: #C52F24;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.panel .result ul li .badge
|
|
161
|
-
{
|
|
162
|
-
margin-right: 0.4em;
|
|
163
|
-
margin-left: -0.2em;
|
|
164
|
-
padding: 0 0.2em;
|
|
165
|
-
color: #000;
|
|
166
|
-
border-radius: 3px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.panel .result ul li .badge_1
|
|
170
|
-
{
|
|
171
|
-
background: #ACDBF4;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.panel .result ul li.current .badge_1
|
|
175
|
-
{
|
|
176
|
-
background: #97BFD7;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.panel .result ul li .badge_2
|
|
180
|
-
{
|
|
181
|
-
background: #ACF3C3;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.panel .result ul li.current .badge_2
|
|
185
|
-
{
|
|
186
|
-
background: #98D7AC;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.panel .result ul li .badge_3
|
|
190
|
-
{
|
|
191
|
-
background: #E0F3AC;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.panel .result ul li.current .badge_3
|
|
195
|
-
{
|
|
196
|
-
background: #C4D798;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.panel .result ul li .badge_4
|
|
200
|
-
{
|
|
201
|
-
background: #D7CA98;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.panel .result ul li.current .badge_4
|
|
205
|
-
{
|
|
206
|
-
background: #A6B0AC;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.panel .result ul li .badge_5
|
|
210
|
-
{
|
|
211
|
-
background: #F3C8AC;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.panel .result ul li.current .badge_5
|
|
215
|
-
{
|
|
216
|
-
background: #D7B198;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.panel .result ul li .badge_6
|
|
220
|
-
{
|
|
221
|
-
background: #F3ACC3;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.panel .result ul li.current .badge_6
|
|
225
|
-
{
|
|
226
|
-
background: #D798AB;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/* Panel (end) */
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/* http://meyerweb.com/eric/tools/css/reset/ */
|
|
2
|
-
/* v1.0 | 20080212 */
|
|
3
|
-
|
|
4
|
-
html, body, div, span, applet, object, iframe,
|
|
5
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
6
|
-
a, abbr, acronym, address, big, cite, code,
|
|
7
|
-
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
|
8
|
-
small, strike, strong, sub, sup, tt, var,
|
|
9
|
-
b, u, i, center,
|
|
10
|
-
dl, dt, dd, ol, ul, li,
|
|
11
|
-
fieldset, form, label, legend,
|
|
12
|
-
table, caption, tbody, tfoot, thead, tr, th, td {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
border: 0;
|
|
16
|
-
outline: 0;
|
|
17
|
-
font-size: 100%;
|
|
18
|
-
vertical-align: baseline;
|
|
19
|
-
background: transparent;
|
|
20
|
-
}
|
|
21
|
-
body {
|
|
22
|
-
line-height: 1;
|
|
23
|
-
}
|
|
24
|
-
ol, ul {
|
|
25
|
-
list-style: none;
|
|
26
|
-
}
|
|
27
|
-
blockquote, q {
|
|
28
|
-
quotes: none;
|
|
29
|
-
}
|
|
30
|
-
blockquote:before, blockquote:after,
|
|
31
|
-
q:before, q:after {
|
|
32
|
-
content: '';
|
|
33
|
-
content: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* remember to define focus styles! */
|
|
37
|
-
:focus {
|
|
38
|
-
outline: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* remember to highlight inserts somehow! */
|
|
42
|
-
ins {
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
}
|
|
45
|
-
del {
|
|
46
|
-
text-decoration: line-through;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* tables still need 'cellspacing="0"' in the markup */
|
|
50
|
-
table {
|
|
51
|
-
border-collapse: collapse;
|
|
52
|
-
border-spacing: 0;
|
|
53
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
require 'mail'
|
|
2
|
-
require 'pathname'
|
|
3
|
-
|
|
4
|
-
module Inbox
|
|
5
|
-
class EmailsController < ApplicationController
|
|
6
|
-
|
|
7
|
-
layout 'inbox/inbox'
|
|
8
|
-
before_filter do
|
|
9
|
-
@mail = params[:mail]
|
|
10
|
-
mailer = case ActionMailer::Base.delivery_method
|
|
11
|
-
when :test
|
|
12
|
-
Mail::TestMailer
|
|
13
|
-
when :inbox
|
|
14
|
-
Inbox::FileDelivery.new ActionMailer::Base.inbox_settings
|
|
15
|
-
else
|
|
16
|
-
raise "ArgumentError"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
@emails = mailer.deliveries.select{|e| Array.wrap(e.to).any?{|m| m.include?(@mail) } }.reverse
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def index
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def show
|
|
27
|
-
@email = @emails.find{|e| e.message_id == params[:id] }
|
|
28
|
-
@body_part = @email
|
|
29
|
-
|
|
30
|
-
if @email.multipart?
|
|
31
|
-
format = "." + (params[:format] || :html).to_s
|
|
32
|
-
content_type = Rack::Mime.mime_type(format)
|
|
33
|
-
@body_part = @email.parts.find { |part| part.content_type.match(content_type) } || @email.parts.first
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def new
|
|
38
|
-
@email = Email.new()
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def create
|
|
42
|
-
@email = Email.new(params[:email])
|
|
43
|
-
if @email.valid?
|
|
44
|
-
@email.deliver
|
|
45
|
-
redirect_to :action => :index
|
|
46
|
-
else
|
|
47
|
-
render :new
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
end
|
|
52
|
-
end
|