mail_spy 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -12,57 +12,63 @@ Add gem "mailspy" to your Gemfile
12
12
  gem "mailspy"
13
13
 
14
14
 
15
+ If you haven't already create a mongoid.yml file for the mongodb connection
16
+ rails generate mongoid:config
17
+
15
18
  Create the mongoid configuration for the mongo db
16
19
 
17
- rails g mailspy:initialize
20
+ rails g mail_spy:initializer
18
21
 
19
- Fill out the generated mailspy_mongoid.yml with the mongodb configuration settings
22
+ Fill out the generated mailspy.rb with your esp settings (file has example)
20
23
 
21
24
  Then mount the engine in the routes.rb file
22
25
  Rails.application.routes.draw do
23
- mount MailSpy::Engine => "/mailspy"
26
+ mount MailSpy::Engine => "/mail_spy"
24
27
  end
25
28
 
26
29
  == Usage
27
30
 
28
- To start using the viral tool simply enable it by
31
+ Mailspy is centered around email templates and instances of those templates
32
+ (aka emails).
29
33
 
30
- Adding the Virality module to Application Controller
31
- class ApplicationController < ActionController::Base
32
- include Virality
33
- before_filter :track_virality
34
+ To create a template:
34
35
 
35
- end
36
+ MailSpy.add_template(template_name, html_erb, text_erb, template_values_definition)
36
37
 
37
- This will give you access to the following methods in lib/virality.rb these
38
- methods are the complete client interface for the tool.
38
+ * Template name must be unique to all templates
39
+ * html, and text are the contents for a multipart email
40
+ * template_values_definition is a array of keys that should be present in the
41
+ template values of each hash
39
42
 
40
- You will want to get started by instrumenting you code with the record_* methods
41
- and using the message_for_conceit to populate your channel messages
42
43
 
44
+ To create a instance:
43
45
 
46
+ MailSpy.add_instance(options)
44
47
 
45
- == packaging into a application
48
+ required options include:
49
+
50
+ * :template_name
51
+ * :campaign :top level grouping
52
+ * :stream : mid level grouping
53
+ * :component : bottom level grouping
54
+ * :schedule_at
55
+ * :subject
56
+ * :template_values
57
+ * :from
58
+ * :reply_to
59
+ * one of [:to, :cc, :bcc]
46
60
 
47
- If you don't have a private gem server you can package the gem into your
48
- application since its not open source...
49
61
 
50
- 1) gem build viral.gemspec
51
- 2) rvm 1.9.2@global gem install viral-0.7.3.gem
52
- 3) gem unpack viral -v '0.7.3' --target vendor/gems/
53
- 4) Add the gemspec file to the vendored unpacked gem.
54
- 5) bundle install
55
62
 
56
63
  == Testing
57
64
 
58
- You will need to add your own database.yml to the dummy app, rake db:create, and
65
+ You will need to add your own mongoid.yml to the dummy app, rake db:create, and
59
66
  rake db:migrate and rake db:test:prepare to get the dummy app setup.
60
67
 
61
68
  Then you can simply run rake from the plugins test directory
62
69
 
70
+ TODO explain the test_email_credentials.yml file in /test
63
71
 
64
72
 
65
73
  == License
66
- This project is property of Ooga Labs and not open source software
67
-
68
74
  This project rocks and uses MIT-LICENSE.
@@ -1,3 +1,3 @@
1
1
  module MailSpy
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mail_spy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Timothy Cardenas
@@ -193,7 +193,7 @@ files:
193
193
  - app/models/mail_spy/stream_report.rb
194
194
  - app/views/layouts/mail_spy/application.html.erb
195
195
  - config/routes.rb
196
- - lib/generators/mail_spy/initialize_generator.rb
196
+ - lib/generators/mail_spy/initializer_generator.rb
197
197
  - lib/generators/mail_spy/templates/mail_spy.rb
198
198
  - lib/mail_spy/engine.rb
199
199
  - lib/mail_spy/manager.rb