spree_mail_chimp 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/Rakefile +29 -0
- data/Versionfile +3 -0
- data/config/locales/en_spree.yml +21 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20101102200125_add_subscriber_column_to_users.rb +9 -0
- data/db/migrate/20101103020507_add_smc_member_id_to_users.rb +9 -0
- data/spec/spec_helper.rb +31 -0
- data/spree_mail_chimp.gemspec +24 -0
- data/test/functional/mail_chimp_extension_test.rb +18 -0
- data/test/test_helper.rb +14 -0
- metadata +74 -54
data/.gitignore
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/packagetask'
|
4
|
+
require 'rubygems/package_task'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
require 'spree/core/testing_support/common_rake'
|
7
|
+
|
8
|
+
RSpec::Core::RakeTask.new
|
9
|
+
|
10
|
+
task :default => [:spec]
|
11
|
+
|
12
|
+
spec = eval(File.read('spree_mail_chimp.gemspec'))
|
13
|
+
|
14
|
+
Gem::PackageTask.new(spec) do |p|
|
15
|
+
p.gem_spec = spec
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Release to gemcutter"
|
19
|
+
task :release => :package do
|
20
|
+
require 'rake/gemcutter'
|
21
|
+
Rake::Gemcutter::Tasks.new(spec).define
|
22
|
+
Rake::Task['gem:push'].invoke
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Generates a dummy app for testing"
|
26
|
+
task :test_app do
|
27
|
+
ENV['LIB_NAME'] = 'spree_mail_chimp'
|
28
|
+
Rake::Task['common:test_app'].invoke
|
29
|
+
end
|
data/Versionfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
do_subscribe_to_our_mailing_list: Subscribe to our mailing list?
|
4
|
+
enter_your_email: Subscribe to our Newsletter!
|
5
|
+
subscribe: Subscribe
|
6
|
+
that_address_is_already_subscribed: You are already subscribed to our mailing list.
|
7
|
+
something_went_wrong: Something went wrong when trying to add your subscription. Please try again later.
|
8
|
+
invalid_email_address: Please enter your full email address, e.g. some.one@example.com
|
9
|
+
you_have_been_subscribed: You have been subscribed to our mailing list. Please check your email soon for a confirmation. Thank you!
|
10
|
+
missing_email: There was no email address given.
|
11
|
+
mailchimp_settings: Mail Chimp Settings
|
12
|
+
mailchimp_settings_description: API Keys and options for Mail Chimp integration
|
13
|
+
mailchimp_list_id: List ID
|
14
|
+
mailchimp_api_key: API Key
|
15
|
+
mailchimp_send_welcome: Send Welcome email
|
16
|
+
mailchimp_send_notify: Send list owner notification on subscribe
|
17
|
+
mailchimp_double_opt_in: Double opt-in
|
18
|
+
mailchimp_merge_vars: User attributes to send with subscription
|
19
|
+
mailchimp_merge_vars_help: Comma separated list of callable methods on User, corresponding to Merge Vars setup in list admin. e.g. age,interests,location
|
20
|
+
mailchimp_keys: Keys
|
21
|
+
preferences: Preferences
|
data/config/routes.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
2
|
+
# from the project root directory.
|
3
|
+
ENV["RAILS_ENV"] ||= 'test'
|
4
|
+
require File.expand_path("../../../config/environment", __FILE__)
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'fabrication'
|
7
|
+
|
8
|
+
# Requires supporting files with custom matchers and macros, etc,
|
9
|
+
# in ./support/ and its subdirectories.
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
# == Mock Framework
|
14
|
+
#
|
15
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
16
|
+
#
|
17
|
+
# config.mock_with :mocha
|
18
|
+
# config.mock_with :flexmock
|
19
|
+
# config.mock_with :rr
|
20
|
+
config.mock_with :rspec
|
21
|
+
|
22
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
23
|
+
|
24
|
+
#config.include Devise::TestHelpers, :type => :controller
|
25
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
26
|
+
# examples within a transaction, comment the following line or assign false
|
27
|
+
# instead of true.
|
28
|
+
config.use_transactional_fixtures = true
|
29
|
+
end
|
30
|
+
|
31
|
+
@configuration ||= AppConfiguration.find_or_create_by_name("Default configuration")
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.platform = Gem::Platform::RUBY
|
4
|
+
s.name = 'spree_mail_chimp'
|
5
|
+
s.version = '3.0.2'
|
6
|
+
s.summary = 'Mail Chimp subscriptions for your Spree store using hominid'
|
7
|
+
s.required_ruby_version = '>= 1.8.7'
|
8
|
+
|
9
|
+
s.author = 'Sam Beam'
|
10
|
+
s.email = 'sbeam@onsetcorps.net'
|
11
|
+
s.homepage = 'https://github.com/sbeam/spree-mail-chimp'
|
12
|
+
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
|
17
|
+
s.require_path = 'lib'
|
18
|
+
s.requirements << 'none'
|
19
|
+
|
20
|
+
s.has_rdoc = true
|
21
|
+
|
22
|
+
s.add_dependency 'spree_core', '~> 1.0'
|
23
|
+
s.add_dependency 'hominid', '~> 3.0.0'
|
24
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class MailChimpExtensionTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# Replace this with your real tests.
|
6
|
+
def test_subscription
|
7
|
+
|
8
|
+
User.create(:email => 'rand1'+rand(1000)+'@example.com', :password => 'abc123', :password_confirmation => 'abc123');
|
9
|
+
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_initialization
|
14
|
+
assert_equal File.join(File.expand_path(Rails.root), 'spree_mail_chimp'), MailChimp.root
|
15
|
+
#assert_equal 'Mail Chimp', MailChimp.name
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
# Load the environment
|
3
|
+
unless defined? SPREE_ROOT
|
4
|
+
ENV["RAILS_ENV"] = "test"
|
5
|
+
case
|
6
|
+
when ENV["SPREE_ENV_FILE"]
|
7
|
+
require File.dirname(ENV["SPREE_ENV_FILE"]) + "/boot"
|
8
|
+
when File.dirname(__FILE__) =~ %r{spree_mail_chimp}
|
9
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/boot"
|
10
|
+
else
|
11
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/boot"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
require "#{SPREE_ROOT}/test/test_helper"
|
metadata
CHANGED
@@ -1,93 +1,113 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_mail_chimp
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 3.0.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Sam Beam
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-06-19 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: spree_core
|
16
|
-
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
19
|
none: false
|
18
|
-
requirements:
|
20
|
+
requirements:
|
19
21
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "1.0"
|
22
24
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
26
27
|
name: hominid
|
27
|
-
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
30
|
none: false
|
29
|
-
requirements:
|
31
|
+
requirements:
|
30
32
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
33
|
+
- !ruby/object:Gem::Version
|
32
34
|
version: 3.0.0
|
33
35
|
type: :runtime
|
34
|
-
|
35
|
-
version_requirements: *21564300
|
36
|
+
version_requirements: *id002
|
36
37
|
description:
|
37
38
|
email: sbeam@onsetcorps.net
|
38
39
|
executables: []
|
40
|
+
|
39
41
|
extensions: []
|
42
|
+
|
40
43
|
extra_rdoc_files: []
|
41
|
-
|
42
|
-
|
44
|
+
|
45
|
+
files:
|
46
|
+
- .gitignore
|
43
47
|
- LICENSE
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
- app/
|
48
|
+
- README.textile
|
49
|
+
- Rakefile
|
50
|
+
- Versionfile
|
51
|
+
- app/assets/javascripts/store/jquery.simplemodal.1.4.min.js
|
52
|
+
- app/assets/javascripts/store/mailchimp_subscribe.js
|
53
|
+
- app/assets/javascripts/store/spree_mail_chimp.js
|
54
|
+
- app/assets/stylesheets/store/mail_chimp.css
|
55
|
+
- app/assets/stylesheets/store/spree_mail_chimp.css
|
50
56
|
- app/controllers/spree/admin/mail_chimp_settings_controller.rb
|
51
|
-
- app/
|
52
|
-
- app/
|
53
|
-
- app/
|
54
|
-
- app/
|
57
|
+
- app/controllers/spree/subscriptions_controller.rb
|
58
|
+
- app/models/app_configuration_decorator.rb
|
59
|
+
- app/models/user_decorator.rb
|
60
|
+
- app/overrides/add_mail_chimp_admin_menu_link.rb
|
61
|
+
- app/overrides/add_newsletter_checkbox_to_create_account_page.rb
|
62
|
+
- app/overrides/add_newsletter_subscribe_form_to_footer.rb
|
55
63
|
- app/views/spree/admin/configurations/_spree_mail_chimp_configuration_link.html.erb
|
56
64
|
- app/views/spree/admin/mail_chimp_settings/edit.html.erb
|
57
65
|
- app/views/spree/admin/mail_chimp_settings/show.html.erb
|
58
|
-
- app/
|
59
|
-
- app/
|
60
|
-
- app/
|
61
|
-
- app/
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
66
|
+
- app/views/spree/shared/_newsletter_subscribe_form.html.erb
|
67
|
+
- app/views/spree/shared/_newsletter_subscribe_form_wo_butt.html.erb
|
68
|
+
- app/views/spree/subscriptions/create.js.erb
|
69
|
+
- app/views/spree/users/_subscribe_to_newsletter_field.html.erb
|
70
|
+
- config/locales/en_spree.yml
|
71
|
+
- config/routes.rb
|
72
|
+
- db/migrate/20101102200125_add_subscriber_column_to_users.rb
|
73
|
+
- db/migrate/20101103020507_add_smc_member_id_to_users.rb
|
74
|
+
- lib/generators/spree_mail_chimp/install/install_generator.rb
|
75
|
+
- lib/spree/mail-chimp/config.rb
|
76
|
+
- lib/spree_mail_chimp.rb
|
77
|
+
- lib/spree_mail_chimp/engine.rb
|
78
|
+
- lib/tasks/mail_chimp.rake
|
79
|
+
- spec/spec_helper.rb
|
80
|
+
- spree_mail_chimp.gemspec
|
81
|
+
- test/functional/mail_chimp_extension_test.rb
|
82
|
+
- test/test_helper.rb
|
68
83
|
homepage: https://github.com/sbeam/spree-mail-chimp
|
69
84
|
licenses: []
|
85
|
+
|
70
86
|
post_install_message:
|
71
87
|
rdoc_options: []
|
72
|
-
|
88
|
+
|
89
|
+
require_paths:
|
73
90
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
92
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
79
96
|
version: 1.8.7
|
80
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
98
|
none: false
|
82
|
-
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version:
|
86
|
-
requirements:
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: "0"
|
103
|
+
requirements:
|
87
104
|
- none
|
88
105
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.8.
|
106
|
+
rubygems_version: 1.8.24
|
90
107
|
signing_key:
|
91
108
|
specification_version: 3
|
92
109
|
summary: Mail Chimp subscriptions for your Spree store using hominid
|
93
|
-
test_files:
|
110
|
+
test_files:
|
111
|
+
- spec/spec_helper.rb
|
112
|
+
- test/functional/mail_chimp_extension_test.rb
|
113
|
+
- test/test_helper.rb
|