mailtime 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +6 -4
- data/lib/mailtime.rb +4 -3
- data/lib/mailtime/active_record/models/concerns/mail_log_concern.rb +2 -0
- data/lib/mailtime/active_record/models/concerns/mail_template_concern.rb +1 -1
- data/lib/mailtime/active_record/models/concerns/renderer_concern.rb +1 -1
- data/lib/mailtime/active_record/models/mail_layout.rb +1 -1
- data/lib/mailtime/active_record/models/mail_template.rb +1 -1
- data/lib/mailtime/acts_as_mailtime_loggable.rb +1 -1
- data/lib/mailtime/configuration.rb +7 -5
- data/lib/mailtime/processor/processor.rb +1 -0
- data/lib/mailtime/railtie.rb +1 -1
- data/lib/mailtime/renderers/base_renderer.rb +0 -2
- data/lib/mailtime/renderers/erb_renderer.rb +0 -2
- data/lib/mailtime/renderers/null.rb +4 -0
- data/lib/mailtime/version.rb +1 -1
- data/mailtime.gemspec +6 -2
- metadata +76 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4164639a2246ede181bb3431c3e79d8762d65a26
|
4
|
+
data.tar.gz: 3fc802e69ac88adeeaeb4e47e00a3b090405ee92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4338930085c6a3f4ba5fab74fd05f2d74d06c8a8e0faa73eda55fc241de424282a4696b70c887e093941e66cb5814fd6f8d0730272ec87386ea886e48fea7a35
|
7
|
+
data.tar.gz: 23df378aabf1e7f46023aede7697df32534211ab022b400ef1fccad15a62909c82add99afe9f9147380c2d02bbcc4eeb47eb1028ea55b80479141e66d626f08d
|
data/Rakefile
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
task :default => :spec
|
3
2
|
|
4
3
|
require 'rake/testtask'
|
5
4
|
|
6
|
-
Rake::TestTask.new do |t|
|
7
|
-
t.libs <<
|
8
|
-
t.
|
5
|
+
Rake::TestTask.new(:test) do |t|
|
6
|
+
t.libs << "test"
|
7
|
+
t.libs << "lib"
|
8
|
+
t.test_files = FileList["test/**/test_*.rb"]
|
9
9
|
end
|
10
|
+
|
11
|
+
task :default => :test
|
data/lib/mailtime.rb
CHANGED
@@ -18,9 +18,9 @@ module Mailtime
|
|
18
18
|
yield(configuration)
|
19
19
|
end
|
20
20
|
|
21
|
-
if defined?(ActiveRecord::Base)
|
21
|
+
if defined?(::ActiveRecord::Base)
|
22
22
|
require 'mailtime/acts_as_mailtime_loggable'
|
23
|
-
ActiveRecord::Base.extend Mailtime::ActsAsMailtimeLoggable
|
23
|
+
::ActiveRecord::Base.extend Mailtime::ActsAsMailtimeLoggable
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
@@ -31,4 +31,5 @@ require 'mailtime/renderers/null'
|
|
31
31
|
require 'mailtime/processor/processor'
|
32
32
|
require 'mailtime/railtie'
|
33
33
|
require 'mailtime/active_record/models/concerns/mail_log_concern'
|
34
|
-
require 'mailtime/active_record/models/concerns/mail_template_concern'
|
34
|
+
require 'mailtime/active_record/models/concerns/mail_template_concern'
|
35
|
+
require 'mailtime/active_record/models/concerns/renderer_concern'
|
@@ -4,7 +4,7 @@ module Mailtime
|
|
4
4
|
def acts_as_mailtime_loggable(attr = 'email', opts = {})
|
5
5
|
include Mailtime::Loggable
|
6
6
|
opts[:fields] ||= [:to]
|
7
|
-
Mailtime.
|
7
|
+
Mailtime.loggable_lookups << { self.to_s => {:attribute => attr, :fields => opts[:fields]} }
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,5 +1,11 @@
|
|
1
1
|
module Mailtime
|
2
2
|
|
3
|
+
@@loggable_lookups = []
|
4
|
+
|
5
|
+
def self.loggable_lookups
|
6
|
+
@@loggable_lookups
|
7
|
+
end
|
8
|
+
|
3
9
|
class Configuration
|
4
10
|
attr_accessor :mailers,
|
5
11
|
:render,
|
@@ -18,7 +24,7 @@ module Mailtime
|
|
18
24
|
@log_fields = [:to]
|
19
25
|
@fallback = true
|
20
26
|
@reject_scope_keys = ['devise_mapping', 'scope_name']
|
21
|
-
@loggable_lookups =
|
27
|
+
@loggable_lookups = Mailtime.loggable_lookups
|
22
28
|
@yield_keyword = '{{ mailtime_yield }}'
|
23
29
|
@valid_formats = %w{html text}
|
24
30
|
end
|
@@ -27,10 +33,6 @@ module Mailtime
|
|
27
33
|
@mailers << klass
|
28
34
|
end
|
29
35
|
|
30
|
-
def mailers
|
31
|
-
@mailers
|
32
|
-
end
|
33
|
-
|
34
36
|
def loggables
|
35
37
|
@loggable_lookups.each_with_object({}) do |k,h|
|
36
38
|
key = k.keys.first
|
data/lib/mailtime/railtie.rb
CHANGED
data/lib/mailtime/version.rb
CHANGED
data/mailtime.gemspec
CHANGED
@@ -29,8 +29,12 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_development_dependency
|
33
|
-
|
32
|
+
spec.add_development_dependency "rails", "4.2"
|
33
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
34
|
+
spec.add_development_dependency "minitest"
|
35
|
+
spec.add_development_dependency "minitest-reporters"
|
36
|
+
spec.add_development_dependency "mocha"
|
37
|
+
spec.add_development_dependency "rubocop", ">= 0.37.0"
|
34
38
|
spec.requirements << 'Rails <= 3.2'
|
35
39
|
|
36
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
@@ -10,20 +10,90 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: minitest
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
16
44
|
requirements:
|
17
|
-
- - "
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest-reporters
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mocha
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
18
88
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
89
|
+
version: 0.37.0
|
20
90
|
type: :development
|
21
91
|
prerelease: false
|
22
92
|
version_requirements: !ruby/object:Gem::Requirement
|
23
93
|
requirements:
|
24
|
-
- - "
|
94
|
+
- - ">="
|
25
95
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
96
|
+
version: 0.37.0
|
27
97
|
description:
|
28
98
|
email:
|
29
99
|
- josh@josh.mn
|
@@ -87,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
157
|
requirements:
|
88
158
|
- Rails <= 3.2
|
89
159
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.4.
|
160
|
+
rubygems_version: 2.4.8
|
91
161
|
signing_key:
|
92
162
|
specification_version: 4
|
93
163
|
summary: Manage the mails you send from Rails.
|