forked from korki/mandrill_integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a23f64
commit 2e1ef25
Showing
6 changed files
with
120 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,9 @@ group :production do | |
gem 'unicorn' | ||
end | ||
|
||
gem 'sinatra' | ||
gem 'tilt', '~> 1.4.1' | ||
gem 'tilt-jbuilder', require: 'sinatra/jbuilder' | ||
|
||
gem 'endpoint_base', :git => '[email protected]:spree/endpoint_base.git' | ||
# :path => '../endpoint_base' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
GIT | ||
remote: [email protected]:spree/endpoint_base.git | ||
revision: 885403ef1a336cf152e056f9a1803bde9d4c2167 | ||
revision: 3e237c59812ef0c4a169cb2ed96f874f3a3f64bf | ||
specs: | ||
endpoint_base (2.0) | ||
active_support | ||
endpoint_base (0.1.1) | ||
activesupport | ||
jbuilder | ||
json | ||
sinatra (= 1.3.4) | ||
sinatra-contrib | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
active_support (3.0.0) | ||
activesupport (= 3.0.0) | ||
activesupport (3.0.0) | ||
activesupport (4.0.2) | ||
i18n (~> 0.6, >= 0.6.4) | ||
minitest (~> 4.2) | ||
multi_json (~> 1.3) | ||
thread_safe (~> 0.1) | ||
tzinfo (~> 0.3.37) | ||
addressable (2.3.4) | ||
backports (3.3.1) | ||
atomic (1.1.14) | ||
capistrano (2.15.4) | ||
highline | ||
net-scp (>= 1.0.0) | ||
|
@@ -26,7 +28,6 @@ GEM | |
crack (0.3.2) | ||
diff-lcs (1.2.4) | ||
dotenv (0.7.0) | ||
eventmachine (1.0.3) | ||
ffi (1.8.1) | ||
foreman (0.63.0) | ||
dotenv (>= 0.7) | ||
|
@@ -45,14 +46,19 @@ GEM | |
httparty (0.11.0) | ||
multi_json (~> 1.0) | ||
multi_xml (>= 0.5.2) | ||
json (1.8.0) | ||
i18n (0.6.9) | ||
jbuilder (2.0.2) | ||
activesupport (>= 3.0.0) | ||
multi_json (>= 1.2.0) | ||
json (1.8.1) | ||
kgio (2.8.0) | ||
listen (1.0.3) | ||
rb-fsevent (>= 0.9.3) | ||
rb-inotify (>= 0.9) | ||
rb-kqueue (>= 0.2) | ||
lumberjack (1.0.3) | ||
method_source (0.8.1) | ||
minitest (4.7.5) | ||
multi_json (1.7.2) | ||
multi_xml (0.5.3) | ||
net-scp (1.1.0) | ||
|
@@ -67,7 +73,7 @@ GEM | |
method_source (~> 0.8) | ||
slop (~> 3.4) | ||
rack (1.5.2) | ||
rack-protection (1.5.0) | ||
rack-protection (1.5.1) | ||
rack | ||
rack-test (0.6.2) | ||
rack (>= 1.0) | ||
|
@@ -85,21 +91,20 @@ GEM | |
rspec-expectations (2.13.0) | ||
diff-lcs (>= 1.1.3, < 2.0) | ||
rspec-mocks (2.13.1) | ||
sinatra (1.3.4) | ||
sinatra (1.4.3) | ||
rack (~> 1.4) | ||
rack-protection (~> 1.3) | ||
tilt (~> 1.3, >= 1.3.3) | ||
sinatra-contrib (1.3.2) | ||
backports (>= 2.0) | ||
eventmachine | ||
rack-protection | ||
rack-test | ||
sinatra (~> 1.3.0) | ||
tilt (~> 1.3) | ||
rack-protection (~> 1.4) | ||
tilt (~> 1.3, >= 1.3.4) | ||
slop (3.4.4) | ||
terminal-notifier-guard (1.5.3) | ||
thor (0.18.1) | ||
thread_safe (0.1.3) | ||
atomic | ||
tilt (1.4.1) | ||
tilt-jbuilder (0.5.3) | ||
jbuilder | ||
tilt (<= 1.4.1) | ||
tzinfo (0.3.38) | ||
unicorn (4.6.2) | ||
kgio (~> 2.6) | ||
rack | ||
|
@@ -121,7 +126,10 @@ DEPENDENCIES | |
rack-test | ||
rb-fsevent (~> 0.9.1) | ||
rspec | ||
sinatra | ||
terminal-notifier-guard | ||
tilt (~> 1.4.1) | ||
tilt-jbuilder | ||
unicorn | ||
vcr | ||
webmock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,31 @@ def app | |
described_class | ||
end | ||
|
||
let(:payload) { {} } | ||
let(:payload) { | ||
'{"request_id": "12e12341523e449c3000001", | ||
"parameters": { | ||
"mandrill.api_key":"abc123"}, | ||
"email": { | ||
"to": "[email protected]", | ||
"from": "[email protected]", | ||
"subject": "Order R123456 was shipped!", | ||
"template": "order_confirmation", | ||
"variables": { | ||
"customer.name": "John Smith", | ||
"order.total": "100.00", | ||
"order.tracking": "XYZ123" | ||
} | ||
} | ||
}' | ||
} | ||
|
||
it "should respond to POST send_email" do | ||
VCR.use_cassette('mail_chimp_send') do | ||
post '/send_email', payload, auth | ||
last_response.status.should == 200 | ||
last_response.body.should match /Sent 'Order R123456 was shipped!' email/ | ||
end | ||
end | ||
|
||
end | ||
|
Oops, something went wrong.