spree_mail 0.40.0.1 → 0.40.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,16 +1,53 @@
1
1
  Spree Mail
2
2
  ----------
3
3
 
4
- Spree Mail extends Spree by adding a mailing list subscriber model, sign up forms and an admin to send messages.
4
+ Spree Mail is a complete email marketing extension for Spree. Visitors can sign up for the mailing list by visiting the new subscriber page and admins can create and send emails to selected subscribers. Subscribers can view emails online and unsubscribe if they wish.
5
5
 
6
+ To customize Spree Mail's html template, copy `email.html.erb` to your local layouts folder.
6
7
 
7
8
 
8
9
  Demo
9
10
  ----
10
11
 
11
- rails new spree_mail_example; cd spree_mail_example; echo "gem 'spree', '0.40.2'" >> Gemfile; echo "gem 'spree_mail', '0.40.0.1'" >> Gemfile; rm public/index.html; bundle install; rake spree:install spree_mail:install db:migrate db:seed; rails s
12
+ To create a spree mail demo app, run the following:
13
+
14
+ rails new spree_mail_example
15
+ cd spree_mail_example
16
+ echo "gem 'spree', '0.40.2'" >> Gemfile
17
+ echo "gem 'spree_mail', '0.40.0.1'" >> Gemfile
18
+ rm public/index.html
19
+ bundle install
20
+ rake spree:install spree_mail:install db:migrate db:seed
12
21
 
13
22
 
23
+ Or all at once:
24
+
25
+ rails new spree_mail_example; cd spree_mail_example; echo "gem 'spree', '0.40.2'" >> Gemfile; echo "gem 'spree_mail', '0.40.0.1'" >> Gemfile; rm public/index.html; bundle install; rake spree:install spree_mail:install db:migrate db:seed
26
+
27
+ `rake db:sample` if you want to...
28
+
29
+ Then start the server with `rails s`
30
+
31
+
32
+ Before sending, you may need to create an action_mailer initializer.
33
+
34
+ # config/initializers/action_mailer.rb
35
+
36
+ ActionMailer::Base.delivery_method = :sendmail
37
+ ActionMailer::Base.sendmail_settings = {
38
+ :arguments => '-r no-reply@spree-mail-example.com'
39
+ }
40
+
41
+
42
+ To Do
43
+ -----
44
+
45
+ * Write real tests
46
+ * Write a rake task that converts current users to subscribers
47
+ * Add checkbox on user signup: 'sign up for our mailing list'
48
+ * Add user help to email form
49
+ * Add email tracking functionality
50
+ * Add a selection of products to emails
14
51
 
15
52
 
16
53
  License
data/Rakefile CHANGED
@@ -1,30 +1,30 @@
1
1
  require 'bundler'
2
- #require 'rake/testtask'
2
+ require 'rake/testtask'
3
3
  Bundler::GemHelper.install_tasks
4
4
 
5
- #Rake::TestTask.new do |t|
6
- # t.libs << "lib"
7
- # t.pattern = 'test/**/*_test.rb'
8
- # t.verbose = true
9
- #end
10
-
11
-
12
- task :test do
13
-
14
- root = ENV["RAILS_ROOT"] || File.expand_path('../spec/test_app', __FILE__)
15
- env = File.join(root, 'config', 'environment.rb')
16
- puts "(Rails Root: #{root})"
17
-
18
- require env
19
- require File.expand_path('../test/test_helper', __FILE__)
20
- Dir["test/**/*.rb"].reject{|file| file.match(/test_helper/) != nil }.each do |file|
21
- puts "Loading #{file}"
22
- load file
23
- end
24
-
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "lib"
7
+ t.pattern = 'test/**/*_test.rb'
8
+ t.verbose = true
25
9
  end
26
10
 
27
11
 
12
+ #task :test do
13
+ #
14
+ # root = ENV["RAILS_ROOT"] || File.expand_path('../spec/test_app', __FILE__)
15
+ # env = File.join(root, 'config', 'environment.rb')
16
+ # puts "(Rails Root: #{root})"
17
+ #
18
+ # require env
19
+ # require File.expand_path('../test/test_helper', __FILE__)
20
+ # Dir["test/**/*.rb"].reject{|file| file.match(/test_helper/) != nil }.each do |file|
21
+ # puts "Loading #{file}"
22
+ # load file
23
+ # end
24
+ #
25
+ #end
26
+ #
27
+
28
28
 
29
29
 
30
30
  desc "Default Task"
@@ -3,14 +3,14 @@ class EmailMailer < ActionMailer::Base
3
3
  include ActionView::Helpers::TagHelper
4
4
  include ActionView::Helpers::TextHelper
5
5
 
6
- default_url_options[:host] = "10.0.1.10:3000"
6
+ default_url_options[:host] = Spree::Config[:site_url]
7
7
 
8
8
  def with_layout(email, subscriber)
9
9
  @email = email
10
10
  @subscriber = subscriber
11
11
  @email_subject = @email.render(:subject, @subscriber)
12
12
  @text = @email.render(:body, @subscriber)
13
- @base_url = "http://10.0.1.10:3000" ##{Spree::Config[:site_url]}
13
+ @base_url = "http://#{Spree::Config[:site_url]}"
14
14
  @link_to_browser = read_email_url(@subscriber.token, @email.token)
15
15
 
16
16
  unless @email.nil? || @email_subject.empty? || @text.empty?
@@ -1,3 +1,3 @@
1
1
  module SpreeMail
2
- VERSION = "0.40.0.1"
2
+ VERSION = "0.40.0.2"
3
3
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 40
8
8
  - 0
9
- - 1
10
- version: 0.40.0.1
9
+ - 2
10
+ version: 0.40.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Spencer Steffen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-26 00:00:00 -08:00
18
+ date: 2011-01-27 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency