mailcannon 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d633fe39d924cee3797b5e2f133dbaa8abe23f2
4
- data.tar.gz: b61dd21b5ad3d561e40cd15bc96e328e2cc76403
3
+ metadata.gz: ed02553bd2e0e9c8c7c850434866577507e91522
4
+ data.tar.gz: 57f9e9c70919325eb209b62141b0b78a4049e678
5
5
  SHA512:
6
- metadata.gz: 8c25da71c5a0387fd8d62b65cffb4d881b2d93917d80240e28fb7a23626fc17c355ca3dd634d7247c4ff5136c056b2a76f6dbd52329818662c16595fc8e37ede
7
- data.tar.gz: cd55772c0f1a9eb64a67a1bea3501f56300409208dbc135cc18eb8aabe83715fc4c22dd592355f9b35f46911de4548a3381dff0abe984c14c5a758800e5bab33
6
+ metadata.gz: b66a1b90da2197b74aa310ee9cd56385b265e13f7c2f36047e138a60870936a6d902f19aa4ab723fec68cd501fdfd6ef8a4ab7f0f615bc17735d928c3d2d253a
7
+ data.tar.gz: e4cfd2f83a992363d32b260d273d123711f2c2ead1470f47c10d9adc051291dd30ded78a2d925f2bf18460b1f03485a455bd3d2832e94e39fcc419863f4e122f
data/Gemfile CHANGED
@@ -9,6 +9,12 @@ gem 'rubysl', platform: :rbx
9
9
  gem 'jruby-openssl', platform: :jruby
10
10
 
11
11
  group :development do
12
+ gem 'rake'
13
+ gem 'pry'
14
+ gem 'pry-nav'
15
+ end
16
+
17
+ group :test do
12
18
  gem 'rspec'
13
19
  gem 'rspec-mocks'
14
20
  gem 'rspec-expectations'
@@ -16,7 +22,4 @@ group :development do
16
22
  gem 'factory_girl'
17
23
  gem 'vcr'
18
24
  gem 'webmock', '>= 1.8.0', '< 1.16'
19
- gem 'rake'
20
- gem 'pry'
21
- gem 'pry-nav'
22
- end
25
+ end
data/Readme.md CHANGED
@@ -25,6 +25,15 @@ Or just add it to your Gemfile
25
25
  Use
26
26
  ===
27
27
 
28
+ Create a `MailCannon::Envelope`:
29
+ ```ruby
30
+ envelope = MailCannon::Envelope.create(
31
+ from: 'test@mailcannon.com',
32
+ to: 'lucasmartins@railsnapraia.com',
33
+ subject: 'Test',
34
+ mail: MailCannon::Mail.create(text: 'you will see this when no HTML reader is available', html: 'this should be an HTML'))
35
+ envelope.send!
36
+ ```
28
37
  ### Configuration file
29
38
  If you are on Rails, run the following command to generate a config file:
30
39
 
data/env.sample.sh CHANGED
@@ -4,4 +4,4 @@ export SENDGRID_USERNAME=''
4
4
  export LIBRATO_SOURCE='staging'
5
5
  export LIBRATO_USER=''
6
6
  export LIBRATO_TOKEN=''
7
-
7
+ export MONGODB_URL=mongodb://localhost:27017:mailcannon_development
@@ -1,5 +1,3 @@
1
- load 'lib/mailcannon/adapters/sendgrid.rb'
2
-
3
1
  class MailCannon::Envelope
4
2
  include Mongoid::Document
5
3
  include Mongoid::Timestamps
@@ -2,7 +2,7 @@ module MailCannon
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
data/lib/mailcannon.rb CHANGED
@@ -22,15 +22,14 @@ class Module
22
22
  end
23
23
 
24
24
  module MailCannon
25
-
26
- load 'mailcannon/envelope.rb'
27
- load 'mailcannon/mail.rb'
28
- load 'mailcannon/stamp.rb'
29
- load 'mailcannon/event.rb'
30
- load 'mailcannon/adapter.rb'
31
- load 'mailcannon/adapters/sendgrid.rb'
32
- load 'mailcannon/workers/single_barrel.rb'
33
- load 'mailcannon/version.rb'
25
+ require_relative 'mailcannon/adapter'
26
+ require_relative 'mailcannon/adapters/sendgrid'
27
+ require_relative 'mailcannon/envelope'
28
+ require_relative 'mailcannon/mail'
29
+ require_relative 'mailcannon/stamp'
30
+ require_relative 'mailcannon/event'
31
+ require_relative 'mailcannon/workers/single_barrel'
32
+ require_relative 'mailcannon/version'
34
33
 
35
34
  self.warmode if ENV['MAILCANNON_MODE']=='war'
36
35
 
data/mailcannon.gemspec CHANGED
@@ -19,14 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency 'redis'
23
- s.add_dependency 'mongoid'
24
- s.add_dependency 'sidekiq'
25
- s.add_dependency 'sendgrid_webapi'
26
- s.add_dependency 'librato-metrics'
27
- s.add_dependency 'rubysl'
28
- #s.add_dependency 'jruby-openssl'
29
-
30
22
  s.add_development_dependency "vcr"
31
23
  s.add_development_dependency "rspec"
32
24
  s.add_development_dependency "rspec-mocks"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailcannon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Martins
@@ -10,90 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2013-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: redis
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: mongoid
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: sidekiq
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: sendgrid_webapi
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: librato-metrics
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubysl
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
13
  - !ruby/object:Gem::Dependency
98
14
  name: vcr
99
15
  requirement: !ruby/object:Gem::Requirement