mailcannon 0.0.8 → 0.1.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -2
- data/Rakefile +1 -1
- data/Readme.md +39 -4
- data/env.sample.sh +5 -4
- data/lib/mailcannon/adapters/sendgrid_web.rb +48 -12
- data/lib/mailcannon/envelope.rb +12 -3
- data/lib/mailcannon/envelope_bag.rb +9 -0
- data/lib/mailcannon/envelope_bag_map_reduce.rb +106 -0
- data/lib/mailcannon/envelope_bag_statistic.rb +5 -0
- data/lib/mailcannon/reduces/envelope_bag_map.js +3 -0
- data/lib/mailcannon/reduces/envelope_bag_reduce.js +116 -0
- data/lib/mailcannon/sendgrid_event.rb +18 -0
- data/lib/mailcannon/version.rb +4 -3
- data/lib/mailcannon/workers/barrel.rb +2 -16
- data/lib/mailcannon/workers/envelope_bag_reduce_job.rb +11 -0
- data/lib/mailcannon.rb +5 -5
- data/mailcannon.gemspec +0 -2
- data/spec/integration/1k_spec.rb +16 -2
- data/spec/integration/full_stack_stats_spec.rb +118 -0
- data/spec/integration/xsmtpapi_spec.rb +4 -1
- data/spec/mailcannon/adapters/sendgrid_spec.rb +17 -4
- data/spec/mailcannon/envelope_bag_map_reduce_spec.rb +211 -0
- data/spec/mailcannon/envelope_bag_statistic_spec.rb +41 -0
- data/spec/mailcannon/envelope_spec.rb +5 -0
- data/spec/mailcannon/workers/envelope_bag_reduce_job_spec.rb +17 -0
- data/templates/config/mailcannon.yml +10 -1
- metadata +18 -38
- data/lib/mailcannon/airbrake.rb +0 -18
- data/lib/mailcannon/librato.rb +0 -15
- data/spec/mailcannon/airbrake_spec.rb +0 -23
- data/spec/mailcannon/librato_spec.rb +0 -24
@@ -1,23 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe MailCannon::Airbrake do
|
4
|
-
before(:each) do
|
5
|
-
ENV['AIRBRAKE_TOKEN']=nil
|
6
|
-
end
|
7
|
-
after(:each) do
|
8
|
-
ENV['AIRBRAKE_TOKEN']=nil
|
9
|
-
end
|
10
|
-
describe "#available?" do
|
11
|
-
context 'when Airbrake token is NOT in the ENV' do
|
12
|
-
it "returns false" do
|
13
|
-
expect(MailCannon::Airbrake.available?).to be_false
|
14
|
-
end
|
15
|
-
end
|
16
|
-
context 'when Airbrake token IS in the ENV' do
|
17
|
-
it "returns false" do
|
18
|
-
ENV['AIRBRAKE_TOKEN']='a.token'
|
19
|
-
expect(MailCannon::Airbrake.available?).to be_true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe MailCannon::Librato do
|
4
|
-
after(:each) do
|
5
|
-
ENV['LIBRATO_USER']=nil
|
6
|
-
ENV['LIBRATO_TOKEN']=nil
|
7
|
-
end
|
8
|
-
describe "#available?" do
|
9
|
-
context 'when Librato info is NOT in the ENV' do
|
10
|
-
it "returns false" do
|
11
|
-
ENV['LIBRATO_USER']=nil
|
12
|
-
ENV['LIBRATO_TOKEN']=''
|
13
|
-
expect(MailCannon::Librato.available?).to be_false
|
14
|
-
end
|
15
|
-
end
|
16
|
-
context 'when Librato info IS in the ENV' do
|
17
|
-
it "returns false" do
|
18
|
-
ENV['LIBRATO_USER']='tha.user'
|
19
|
-
ENV['LIBRATO_TOKEN']='tha.password'
|
20
|
-
expect(MailCannon::Librato.available?).to be_true
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|