campaign_monitor_subscriber 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ module CampaignMonitorSubscriber
|
|
10
10
|
# All yaml config is namespaced under the environment name (the same way
|
11
11
|
# database.yml does it)
|
12
12
|
def raw_cms_config
|
13
|
-
@raw_cms_config ||= YAML
|
13
|
+
@raw_cms_config ||= YAML.load(ERB.new(File.read("config/campaign_monitor_subscriber.yml")).result)[Rails.env]
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -6,8 +6,11 @@ module CampaignMonitorSubscriber
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
included do
|
9
|
+
require 'logger'
|
10
|
+
@@log = Logger.new('log/cm_subscriber.log')
|
11
|
+
|
9
12
|
after_create do |record|
|
10
|
-
|
13
|
+
@@log.debug "\n* Adding '#{record.cms_email}' to CM"
|
11
14
|
|
12
15
|
begin
|
13
16
|
CreateSend::Subscriber.add(
|
@@ -24,7 +27,7 @@ module CampaignMonitorSubscriber
|
|
24
27
|
|
25
28
|
|
26
29
|
after_destroy do |record|
|
27
|
-
|
30
|
+
@@log.debug "\n* Removing '#{record.cms_email}' from CM"
|
28
31
|
|
29
32
|
begin
|
30
33
|
s = CreateSend::Subscriber.new(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: campaign_monitor_subscriber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
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: 2012-10-
|
12
|
+
date: 2012-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: createsend
|