msg 0.2.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,40 +0,0 @@
1
- module Msg
2
- module MsgHelper
3
- def shorten(text, length=64)
4
- length = length[:length] if length.is_a?(Hash)
5
- truncate(strip_tags(text), {:length => length, :separator => " "})
6
- end
7
-
8
- def action_menulink(thing, html_options={})
9
- classname = thing.class.to_s.downcase.underscore.split('/').last
10
- html_options.reverse_merge!({
11
- :class => "",
12
- :data => {:menu => "#{classname}_#{thing.id}"}
13
- })
14
- html_options[:class] << " menu"
15
- link_to t(:edit), "#", html_options if editable?(thing)
16
- end
17
-
18
- def action_menu(thing, locals={})
19
- if editable?(thing)
20
- type = thing.class.to_s.downcase.underscore
21
- classname = type.split('/').last
22
- locals[classname.to_sym] = thing
23
- render :partial => "#{type.pluralize}/action_menu", :locals => locals
24
- end
25
- end
26
-
27
- def visible?(thing)
28
- admin? || privileged? || current_user.can_see?(thing)
29
- end
30
-
31
- def editable?(thing)
32
- admin? || current_user == thing.created_by
33
- end
34
-
35
- def deletable?(thing)
36
- admin? || current_user == thing.created_by
37
- end
38
-
39
- end
40
- end
@@ -1,21 +0,0 @@
1
- module Msg
2
- class DeviseMailer < Devise::Mailer
3
- default from: Msg.default_from_address, :bcc => Msg.email_bcc, :return_path => Msg.email_return_path, :errors_to => Msg.email_return_path
4
- layout Msg.email_layout
5
-
6
- def confirmation_instructions(receiver, opts={})
7
- @message = Msg::Message.find_by_function('confirmation_instructions')
8
- @contents = @message.render_for(receiver)
9
- opts[:subject] = @message.subject
10
- super
11
- end
12
-
13
- def reset_password_instructions(receiver, opts={})
14
- @message = Msg::Message.find_by_function('reset_password_instructions')
15
- @contents = @message.render_for(receiver)
16
- opts[:subject] = @message.subject
17
- super
18
- end
19
-
20
- end
21
- end
@@ -1,285 +0,0 @@
1
- # Use this hook to configure devise mailer, warden hooks and so forth.
2
- # Many of these configuration options can be set straight in your model.
3
- Devise.setup do |config|
4
- # ==> Mailer Configuration
5
- # Configure the e-mail address which will be shown in Devise::Mailer,
6
- # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
- config.mailer_sender = "testing@spanner.org"
8
-
9
- # Configure the class responsible to send e-mails.
10
- config.mailer = "Msg::DeviseMailer"
11
-
12
- # ==> ORM configuration
13
- # Load and configure the ORM. Supports :active_record (default) and
14
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
15
- # available as additional gems.
16
- require 'devise/orm/active_record'
17
-
18
- # ==> Configuration for any authentication mechanism
19
- # Configure which keys are used when authenticating a user. The default is
20
- # just :email. You can configure it to use [:username, :subdomain], so for
21
- # authenticating a user, both parameters are required. Remember that those
22
- # parameters are used only when authenticating and not when retrieving from
23
- # session. If you need permissions, you should implement that in a before filter.
24
- # You can also supply a hash where the value is a boolean determining whether
25
- # or not authentication should be aborted when the value is not present.
26
- # config.authentication_keys = [ :email ]
27
-
28
- # Configure parameters from the request object used for authentication. Each entry
29
- # given should be a request method and it will automatically be passed to the
30
- # find_for_authentication method and considered in your model lookup. For instance,
31
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
32
- # The same considerations mentioned for authentication_keys also apply to request_keys.
33
- # config.request_keys = []
34
-
35
- # Configure which authentication keys should be case-insensitive.
36
- # These keys will be downcased upon creating or modifying a user and when used
37
- # to authenticate or find a user. Default is :email.
38
- config.case_insensitive_keys = [ :email ]
39
-
40
- # Configure which authentication keys should have whitespace stripped.
41
- # These keys will have whitespace before and after removed upon creating or
42
- # modifying a user and when used to authenticate or find a user. Default is :email.
43
- config.strip_whitespace_keys = [ :email ]
44
-
45
- # Tell if authentication through request.params is enabled. True by default.
46
- # It can be set to an array that will enable params authentication only for the
47
- # given strategies, for example, `config.params_authenticatable = [:database]` will
48
- # enable it only for database (email + password) authentication.
49
- # config.params_authenticatable = true
50
-
51
- # Tell if authentication through HTTP Basic Auth is enabled. False by default.
52
- # It can be set to an array that will enable http authentication only for the
53
- # given strategies, for example, `config.http_authenticatable = [:token]` will
54
- # enable it only for token authentication.
55
- # config.http_authenticatable = false
56
-
57
- # If http headers should be returned for AJAX requests. True by default.
58
- # config.http_authenticatable_on_xhr = true
59
-
60
- # The realm used in Http Basic Authentication. "Application" by default.
61
- # config.http_authentication_realm = "Application"
62
-
63
- # It will change confirmation, password recovery and other workflows
64
- # to behave the same regardless if the e-mail provided was right or wrong.
65
- # Does not affect registerable.
66
- # config.paranoid = true
67
-
68
- # By default Devise will store the user in session. You can skip storage for
69
- # :http_auth and :token_auth by adding those symbols to the array below.
70
- # Notice that if you are skipping storage for all authentication paths, you
71
- # may want to disable generating routes to Devise's sessions controller by
72
- # passing :skip => :sessions to `devise_for` in your config/routes.rb
73
- config.skip_session_storage = [:http_auth]
74
-
75
- # ==> Configuration for :database_authenticatable
76
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
77
- # using other encryptors, it sets how many times you want the password re-encrypted.
78
- #
79
- # Limiting the stretches to just one in testing will increase the performance of
80
- # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
81
- # a value less than 10 in other environments.
82
- config.stretches = Rails.env.test? ? 1 : 10
83
-
84
- # Setup a pepper to generate the encrypted password.
85
- # config.pepper = "c1961aef64bde0eaefc013cf6138496721f09e4acfb8b30456c39f8a2cf435e8373a0882d5e4ff9c97baccb7f9b0a41595fbb1936f72bbe1173d997932356a58"
86
-
87
- # ==> Configuration for :confirmable
88
- # A period that the user is allowed to access the website even without
89
- # confirming his account. For instance, if set to 2.days, the user will be
90
- # able to access the website for two days without confirming his account,
91
- # access will be blocked just in the third day. Default is 0.days, meaning
92
- # the user cannot access the website without confirming his account.
93
- # config.allow_unconfirmed_access_for = 2.days
94
-
95
- # If true, requires any email changes to be confirmed (exctly the same way as
96
- # initial account confirmation) to be applied. Requires additional unconfirmed_email
97
- # db field (see migrations). Until confirmed new email is stored in
98
- # unconfirmed email column, and copied to email column on successful confirmation.
99
- config.reconfirmable = true
100
-
101
- # Defines which key will be used when confirming an account
102
- # config.confirmation_keys = [ :email ]
103
-
104
- # ==> Configuration for :rememberable
105
- # The time the user will be remembered without asking for credentials again.
106
- # config.remember_for = 2.weeks
107
-
108
- # If true, extends the user's remember period when remembered via cookie.
109
- # config.extend_remember_period = false
110
-
111
- # Options to be passed to the created cookie. For instance, you can set
112
- # :secure => true in order to force SSL only cookies.
113
- # config.cookie_options = {}
114
-
115
- # ==> Configuration for :validatable
116
- # Range for password length. Default is 6..128.
117
- # config.password_length = 6..128
118
-
119
- # Email regex used to validate email formats. It simply asserts that
120
- # an one (and only one) @ exists in the given string. This is mainly
121
- # to give user feedback and not to assert the e-mail validity.
122
- # config.email_regexp = /\A[^@]+@[^@]+\z/
123
-
124
- # ==> Configuration for :timeoutable
125
- # The time you want to timeout the user session without activity. After this
126
- # time the user will be asked for credentials again. Default is 30 minutes.
127
- # config.timeout_in = 10.minutes
128
-
129
- # ==> Configuration for :lockable
130
- # Defines which strategy will be used to lock an account.
131
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
132
- # :none = No lock strategy. You should handle locking by yourself.
133
- # config.lock_strategy = :failed_attempts
134
-
135
- # Defines which key will be used when locking and unlocking an account
136
- # config.unlock_keys = [ :email ]
137
-
138
- # Defines which strategy will be used to unlock an account.
139
- # :email = Sends an unlock link to the user email
140
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
141
- # :both = Enables both strategies
142
- # :none = No unlock strategy. You should handle unlocking by yourself.
143
- # config.unlock_strategy = :both
144
-
145
- # Number of authentication tries before locking an account if lock_strategy
146
- # is failed attempts.
147
- # config.maximum_attempts = 20
148
-
149
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
150
- # config.unlock_in = 1.hour
151
-
152
- # ==> Configuration for :recoverable
153
- #
154
- # Defines which key will be used when recovering the password for an account
155
- # config.reset_password_keys = [ :email ]
156
-
157
- # Time interval you can reset your password with a reset password key.
158
- # Don't put a too small interval or your users won't have the time to
159
- # change their passwords.
160
- config.reset_password_within = 6.hours
161
-
162
- # ==> Configuration for :encryptable
163
- # Allow you to use another encryption algorithm besides bcrypt (default). You can use
164
- # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
165
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
166
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
167
- # REST_AUTH_SITE_KEY to pepper)
168
- # config.encryptor = :sha512
169
-
170
- # ==> Configuration for :token_authenticatable
171
- # Defines name of the authentication token params key
172
- # config.token_authentication_key = :auth_token
173
-
174
- # ==> Scopes configuration
175
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
176
- # "users/sessions/new". It's turned off by default because it's slower if you
177
- # are using only default views.
178
- # config.scoped_views = false
179
-
180
- # Configure the default scope given to Warden. By default it's the first
181
- # devise role declared in your routes (usually :user).
182
- # config.default_scope = :user
183
-
184
- # Configure sign_out behavior.
185
- # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
186
- # The default is true, which means any logout action will sign out all active scopes.
187
- # config.sign_out_all_scopes = true
188
-
189
- # ==> Navigation configuration
190
- # Lists the formats that should be treated as navigational. Formats like
191
- # :html, should redirect to the sign in page when the user does not have
192
- # access, but formats like :xml or :json, should return 401.
193
- #
194
- # If you have any extra navigational formats, like :iphone or :mobile, you
195
- # should add them to the navigational formats lists.
196
- #
197
- # The "*/*" below is required to match Internet Explorer requests.
198
- # config.navigational_formats = ["*/*", :html]
199
-
200
- # The default HTTP method used to sign out a resource. Default is :delete.
201
- config.sign_out_via = :delete
202
-
203
- # ==> OmniAuth
204
- # Add a new OmniAuth provider. Check the wiki for more information on setting
205
- # up on your models and hooks.
206
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
207
-
208
- # ==> Warden configuration
209
- # If you want to use other strategies, that are not supported by Devise, or
210
- # change the failure app, you can configure them inside the config.warden block.
211
- #
212
- # config.warden do |manager|
213
- # manager.intercept_401 = false
214
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
215
- # end
216
-
217
- # ==> Security Extension
218
- # Configure security extension for devise
219
-
220
- # Should the password expire (e.g 3.months)
221
- # config.expire_password_after = false
222
-
223
- # Need 1 char of A-Z, a-z and 0-9
224
- # config.password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
225
-
226
- # How many passwords to keep in archive
227
- # config.password_archiving_count = 5
228
-
229
- # Deny old password (true, false, count)
230
- # config.deny_old_passwords = true
231
-
232
- # enable email validation for :secure_validatable. (true, false, validation_options)
233
- # dependency: need an email validator like rails_email_validator
234
- # config.email_validation = true
235
-
236
- # captcha integration for recover form
237
- # config.captcha_for_recover = true
238
-
239
- # captcha integration for sign up form
240
- # config.captcha_for_sign_up = true
241
-
242
- # captcha integration for sign in form
243
- # config.captcha_for_sign_in = true
244
-
245
- # captcha integration for unlock form
246
- # config.captcha_for_unlock = true
247
-
248
- # captcha integration for confirmation form
249
- # config.captcha_for_confirmation = true
250
-
251
- # Time period for account expiry from last_activity_at
252
- # config.expire_after = 90.days
253
-
254
- # Additional configuration for devise_security_extension
255
- # https://github.com/phatworx/devise_security_extension
256
-
257
- # Should the password expire (e.g 3.months)
258
- # config.expire_password_after = 30.days
259
-
260
- # Need 1 char of A-Z, a-z and 0-9
261
- # config.password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
262
-
263
- # How often save old passwords in archive
264
- # config.password_archiving_count = 5
265
-
266
- # Deny old password (true, false, count)
267
- # config.deny_old_passwords = true
268
-
269
- # captcha integration for recover form
270
- # config.captcha_for_recover = true
271
-
272
- # captcha integration for sign up form
273
- # config.captcha_for_sign_up = true
274
-
275
- # captcha integration for sign in form
276
- # config.captcha_for_sign_in = true
277
-
278
- # captcha integration for unlock form
279
- # config.captcha_for_unlock = true
280
-
281
- # ==> Configuration for :expirable
282
- # Time period for account expiry from last_activity_at
283
- # config.expire_after = 90.days
284
-
285
- end
Binary file
@@ -1,146 +0,0 @@
1
- Connecting to database specified by database.yml
2
-  (0.1ms) select sqlite_version(*)
3
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
6
- Connecting to database specified by database.yml
7
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
8
- Connecting to database specified by database.yml
9
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
10
- Migrating to Users (2013032210540)
11
-  (0.1ms) select sqlite_version(*)
12
-  (0.0ms) begin transaction
13
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
14
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('2013032210540')
15
-  (1.0ms) commit transaction
16
- Migrating to MsgData (20130325160526)
17
-  (0.0ms) begin transaction
18
-  (0.5ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
19
-  (0.1ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
20
-  (0.1ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
21
-  (0.1ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
22
-  (0.1ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
23
-  (0.1ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
24
-  (0.1ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
25
-  (0.1ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
26
-  (0.1ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
27
-  (0.1ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
28
-  (0.1ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
29
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130325160526')
30
-  (0.9ms) commit transaction
31
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
32
- Connecting to database specified by database.yml
33
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
34
-  (0.2ms) select sqlite_version(*)
35
-  (2.1ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
36
-  (1.5ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
37
-  (1.2ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
38
-  (1.3ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
39
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
40
-  (0.8ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
41
-  (1.1ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
42
-  (1.3ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
43
-  (0.8ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
44
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
45
-  (0.6ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
46
-  (1.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
47
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
48
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
49
-  (0.1ms) SELECT version FROM "schema_migrations"
50
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20130325160526')
51
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('2013032210540')
52
- Connecting to database specified by database.yml
53
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
54
-  (0.7ms) select sqlite_version(*)
55
-  (1.7ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
56
-  (1.2ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
57
-  (1.2ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
58
-  (1.4ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
59
-  (0.8ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
60
-  (1.1ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
61
-  (0.8ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
62
-  (1.1ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
63
-  (0.8ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
64
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
65
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
66
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
67
-  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
68
-  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
69
-  (0.1ms) SELECT version FROM "schema_migrations"
70
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20130325160526')
71
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('2013032210540')
72
- Connecting to database specified by database.yml
73
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
74
-  (0.2ms) select sqlite_version(*)
75
-  (1.6ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
76
-  (1.1ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
77
-  (0.8ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
78
-  (1.1ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
79
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
80
-  (1.0ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
81
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
82
-  (1.0ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
83
-  (1.0ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
84
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
85
-  (0.8ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
86
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
87
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
88
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
89
-  (0.1ms) SELECT version FROM "schema_migrations"
90
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20130325160526')
91
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('2013032210540')
92
- Connecting to database specified by database.yml
93
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
94
-  (0.2ms) select sqlite_version(*)
95
-  (1.4ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
96
-  (0.9ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
97
-  (0.7ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
98
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
99
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
100
-  (0.7ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
101
-  (0.9ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
102
-  (1.0ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
103
-  (0.8ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
104
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
105
-  (1.0ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
106
-  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
107
-  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
108
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
109
-  (0.1ms) SELECT version FROM "schema_migrations"
110
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130325160526')
111
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2013032210540')
112
- Connecting to database specified by database.yml
113
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
114
-  (0.3ms) select sqlite_version(*)
115
-  (1.6ms) CREATE TABLE "msg_bounces" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "envelope_id" integer, "bounce_type" varchar(255), "bounce_subtype" varchar(255), "reporter" varchar(255), "raw_message" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
116
-  (0.9ms) CREATE INDEX "index_msg_bounces_on_envelope_id" ON "msg_bounces" ("envelope_id")
117
-  (0.9ms) CREATE TABLE "msg_envelopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sending_id" integer, "receiver_id" integer, "email_id" integer, "receiver_type" varchar(255), "to_address" varchar(255), "from_address" varchar(255), "subject" varchar(255), "contents" text, "sent_at" datetime, "opened_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
118
-  (1.1ms) CREATE INDEX "index_msg_envelopes_on_email_id" ON "msg_envelopes" ("email_id")
119
-  (0.9ms) CREATE INDEX "index_msg_envelopes_on_receiver_id_and_receiver_type" ON "msg_envelopes" ("receiver_id", "receiver_type")
120
-  (0.8ms) CREATE INDEX "index_msg_envelopes_on_receiver_id" ON "msg_envelopes" ("receiver_id")
121
-  (0.8ms) CREATE INDEX "index_msg_envelopes_on_sending_id" ON "msg_envelopes" ("sending_id")
122
-  (0.9ms) CREATE TABLE "msg_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "from_address" varchar(255), "from_name" varchar(255), "body" text, "function" varchar(255), "description" text, "transactional" boolean DEFAULT 'f', "saved" boolean DEFAULT 'f', "created_by_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
123
-  (1.2ms) CREATE TABLE "msg_sendings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message_id" integer, "created_by_id" integer, "sent_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
124
-  (1.1ms) CREATE INDEX "index_msg_sendings_on_created_by_id" ON "msg_sendings" ("created_by_id")
125
-  (0.7ms) CREATE INDEX "index_msg_sendings_on_message_id" ON "msg_sendings" ("message_id")
126
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255))
127
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
128
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
129
-  (0.1ms) SELECT version FROM "schema_migrations"
130
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20130325160526')
131
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('2013032210540')
132
- Connecting to database specified by database.yml
133
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
134
- Connecting to database specified by database.yml
135
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
136
- Connecting to database specified by database.yml
137
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
138
- Connecting to database specified by database.yml
139
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
140
- Connecting to database specified by database.yml
141
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
142
- Connecting to database specified by database.yml
143
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
144
- Connecting to database specified by database.yml
145
- >>> Msg.add_receiving_class User
146
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"