campaign_monitor_subscriber 1.0.2 → 1.0.3

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.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "campaign_monitor_subscriber"
6
- s.version = '1.0.2'
6
+ s.version = '1.0.3'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Gary Greyling"]
9
9
  s.email = ["gary@mpowered.co.za"]
@@ -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::load_file(File.join("config/campaign_monitor_subscriber.yml"))[::Rails.env]
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
- logger.debug "\n* Adding '#{record.cms_email}' to CM"
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
- logger.debug "\n* Removing '#{record.cms_email}' from CM"
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.2
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-04 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: createsend