mail_archivist 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c41da7dd9720441c87182eb52653a7d79951608
4
- data.tar.gz: db68c10c84a5501b1eac80edc1d37be27fd775e7
3
+ metadata.gz: a91dbcd7e672b869c6b6aeb6f553459812d49f6f
4
+ data.tar.gz: ae3eb68e6d12407e5131c61dd2a1fa5a8489b7e0
5
5
  SHA512:
6
- metadata.gz: 4c7484a9dce2f55ccd421ed35d91167077031230b6823a44f129a6dd8e0421bafa551ce689764c328998e88d0fd9794f3b56107462b7877342761e86ce8e53e0
7
- data.tar.gz: 3be278eebe93399635cd82efe6be96ee5d0e42cf943a0b270cbddf271937ebfc305ee8605e1fcde5f80b27042b2ba783bca2a6a9430663e6e3efe9c03533e7dd
6
+ metadata.gz: a415b0a977a2835d0df59b19a1a9172f3cc54bfddc0f72150f27b493c977d7071d6f9d390ca3d77fe5fe29904352055abc8d166733d150965b51629bafa2d6a5
7
+ data.tar.gz: b77a00275557d79fec607117702921d481932c9477514183c2e429e230a3cf77a4e2e119cc192b27e1f18d54ccbacbfdea8f4fc812eaf51a3522125cbb9395f3
@@ -1,9 +1,9 @@
1
1
  module MailArchivist
2
2
  class ActionMailerHook
3
3
  def self.delivered_email(message)
4
- MailArchivist::MailLog.create(to: message.to.join(','),
5
- cc: message.cc.join(','),
6
- from: message.from.join(','),
4
+ MailArchivist::MailLog.create(to: (message.to||[]).join(','),
5
+ cc: (message.to||[]).join(','),
6
+ from: (message.to||[]).join(','),
7
7
  subject: message.subject,
8
8
  body: (message.text_part || message.html_part || message.body).to_s)
9
9
  end
@@ -1,2 +1,5 @@
1
1
  class MailArchivist::MailLog < ActiveRecord::Base
2
+ def self.table_name_prefix
3
+ 'mail_archivist_'
4
+ end
2
5
  end
@@ -1,6 +1,6 @@
1
1
  class CreateMailArchivistMailLogs < ActiveRecord::Migration
2
2
  def change
3
- create_table :mail_archivist_mail_logs do |t|
3
+ create_table :mail_logs do |t|
4
4
  t.text :to
5
5
  t.text :from
6
6
  t.text :body
@@ -1,3 +1,3 @@
1
1
  module MailArchivist
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_archivist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Thelang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-17 00:00:00.000000000 Z
11
+ date: 2016-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -47,15 +47,9 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - MIT-LICENSE
49
49
  - Rakefile
50
- - app/assets/javascripts/mail_archivist/application.js
51
- - app/assets/stylesheets/mail_archivist/application.css
52
- - app/controllers/mail_archivist/application_controller.rb
53
- - app/helpers/mail_archivist/application_helper.rb
54
50
  - app/models/mail_archivist.rb
55
51
  - app/models/mail_archivist/action_mailer_hook.rb
56
52
  - app/models/mail_archivist/mail_log.rb
57
- - app/views/layouts/mail_archivist/application.html.erb
58
- - config/routes.rb
59
53
  - db/migrate/20160317143908_create_mail_archivist_mail_logs.rb
60
54
  - lib/mail_archivist.rb
61
55
  - lib/mail_archivist/engine.rb
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,4 +0,0 @@
1
- module MailArchivist
2
- class ApplicationController < ActionController::Base
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module MailArchivist
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>MailArchivist</title>
5
- <%= stylesheet_link_tag "mail_archivist/application", media: "all" %>
6
- <%= javascript_include_tag "mail_archivist/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,2 +0,0 @@
1
- MailArchivist::Engine.routes.draw do
2
- end