refinerycms-mailchimp 0.0.1 → 0.0.2
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.
|
@@ -7,6 +7,7 @@ class Admin::CampaignsController < Admin::BaseController
|
|
|
7
7
|
|
|
8
8
|
before_filter :get_mailchimp_assets, :except => :index
|
|
9
9
|
before_filter :find_campaign, :except => [:index, :new, :create]
|
|
10
|
+
before_filter :fully_qualify_links, :only => [:create, :update]
|
|
10
11
|
|
|
11
12
|
def new
|
|
12
13
|
@campaign = Campaign.new :to_name => RefinerySetting.get_or_set(Refinery::Mailchimp::API::DefaultToNameSetting[:name], Refinery::Mailchimp::API::DefaultToNameSetting[:default]),
|
|
@@ -69,6 +70,10 @@ protected
|
|
|
69
70
|
redirect_to admin_campaigns_path
|
|
70
71
|
end
|
|
71
72
|
|
|
73
|
+
def fully_qualify_links
|
|
74
|
+
params[:campaign][:body].gsub!(/(href|src)="\//i, %|\\1="#{root_url}|)
|
|
75
|
+
end
|
|
76
|
+
|
|
72
77
|
def get_mailchimp_assets
|
|
73
78
|
@lists = client.lists['data']
|
|
74
79
|
@templates = client.templates['user']
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: refinerycms-mailchimp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.0.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Ian Terrell
|
|
@@ -15,8 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-04-04 00:00:00
|
|
19
|
-
default_executable:
|
|
18
|
+
date: 2011-04-04 00:00:00 Z
|
|
20
19
|
dependencies:
|
|
21
20
|
- !ruby/object:Gem::Dependency
|
|
22
21
|
name: hominid
|
|
@@ -67,7 +66,6 @@ files:
|
|
|
67
66
|
- features/support/paths.rb
|
|
68
67
|
- db/migrate/1_create_campaigns.rb
|
|
69
68
|
- db/seeds/campaigns.rb
|
|
70
|
-
has_rdoc: true
|
|
71
69
|
homepage: https://github.com/ianterrell/refinerycms-mailchimp
|
|
72
70
|
licenses: []
|
|
73
71
|
|
|
@@ -97,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
95
|
requirements: []
|
|
98
96
|
|
|
99
97
|
rubyforge_project:
|
|
100
|
-
rubygems_version: 1.
|
|
98
|
+
rubygems_version: 1.7.1
|
|
101
99
|
signing_key:
|
|
102
100
|
specification_version: 3
|
|
103
101
|
summary: Ruby on Rails Mailchimp engine for Refinery CMS
|