no_notifier_needed 2.3.8 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
data/initializers/notifier.rb
CHANGED
@@ -41,6 +41,7 @@ class Notifier < ActionMailer::Base
|
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
|
+
@template.params = args
|
44
45
|
args_to_instance_vars(args)
|
45
46
|
|
46
47
|
send_hash = get_send_hash(@template)
|
@@ -59,9 +60,9 @@ class Notifier < ActionMailer::Base
|
|
59
60
|
instance_eval to_send
|
60
61
|
end
|
61
62
|
|
62
|
-
def email_link_to(title, link)
|
63
|
+
def email_link_to(title, link, opts={})
|
63
64
|
return title if link.blank?
|
64
|
-
if link.match(/http:\/\/[\w*\.]*\//i)
|
65
|
+
if link.match(/http:|https:\/\/[\w*\.]*\//i)
|
65
66
|
root_link = link
|
66
67
|
else
|
67
68
|
splitter = NoNotifierNeeded.send(:host).split('/').last
|
@@ -74,6 +75,15 @@ class Notifier < ActionMailer::Base
|
|
74
75
|
root_link = NoNotifierNeeded.send(:host) + "/" + link_broken
|
75
76
|
end
|
76
77
|
end
|
77
|
-
"<a href='#{root_link}'>#{title}</a>"
|
78
|
+
"<a href='#{root_link}' #{html_opts(opts)}>#{title}</a>"
|
78
79
|
end
|
80
|
+
|
81
|
+
def html_opts(opts)
|
82
|
+
to_ret = []
|
83
|
+
opts.each do |k,v|
|
84
|
+
to_ret << "#{k.to_s}='#{v}'"
|
85
|
+
end
|
86
|
+
to_ret.join(" ")
|
87
|
+
end
|
88
|
+
|
79
89
|
end
|
data/no_notifier_needed.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "no_notifier_needed"
|
8
|
-
s.version = "2.
|
8
|
+
s.version = "2.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Robert R. Meyer"]
|
12
|
-
s.date = "2013-07-
|
12
|
+
s.date = "2013-07-19"
|
13
13
|
s.description = "A work in progress: Replace ActionMailer::Base class redundency. Temlating using haml or erb."
|
14
14
|
s.email = "Blue.Dog.Archolite@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no_notifier_needed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|