banana_peels 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/banana_peels/campaign.rb +10 -4
- data/lib/banana_peels/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfec30f7711bbbe46112847f564156766b08f91e
|
4
|
+
data.tar.gz: b481dd4bdaff1931a9facc1a8202bda8f6e727ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33261e9df50f7d9b4410a096cc2a0234c18967b7e98bbad86ba57e7f27300abcc939b47ab343a8d5067481700f9c43b530efd455f882c1d56518368e7dded016
|
7
|
+
data.tar.gz: 5053899176347238be777ac26c8eb9e8b3b06561f2ee996cf52a2182d19cd36f2493bc1a53b0d042baeb979dc2a8a17635cb0a175eb10472d5e3e769890625de
|
data/README.md
CHANGED
@@ -65,14 +65,20 @@ class BananaPeels::Campaign
|
|
65
65
|
replace_merge_tags(mailchimp_meta['to_name'])
|
66
66
|
end
|
67
67
|
|
68
|
-
def merge_tags_in_content
|
68
|
+
def merge_tags_in_content(options=nil)
|
69
|
+
options ||= {}
|
70
|
+
excludes = options[:exclude] || []
|
69
71
|
merge_tags = Hash.new{|h,k| h[k] = [] }
|
70
|
-
{
|
71
|
-
|
72
|
+
contents = {
|
73
|
+
to_name: mailchimp_meta['to_name'],
|
72
74
|
subject: mailchimp_meta['subject'],
|
73
75
|
html: html_content_unmerged,
|
74
76
|
text: text_content_unmerged,
|
75
|
-
}
|
77
|
+
}
|
78
|
+
excludes.each do |ex|
|
79
|
+
contents.delete(ex)
|
80
|
+
end
|
81
|
+
contents.each do |location, content|
|
76
82
|
find_merge_tags_in(content).each do |tag|
|
77
83
|
merge_tags[tag].push(location)
|
78
84
|
end
|
data/lib/banana_peels/version.rb
CHANGED