mailercity 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module Mailercity
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/mailercity.rb CHANGED
@@ -44,7 +44,7 @@ module Mailercity
44
44
  response = Faraday.post(api_url(path)) do |req|
45
45
  req.headers['Content-Type'] = 'application/json'
46
46
  req.headers['X-Api-Key'] = Mailercity.api_key
47
- req.body = ::JSON.dump(payload)
47
+ req.body = payload.to_json
48
48
  end
49
49
  end
50
50
 
@@ -7,7 +7,7 @@ Mailercity.api_key = "testkey"
7
7
  describe Mailercity do
8
8
  def stub_post(url, status, *args)
9
9
  payload = {:args => args}
10
- body = JSON.dump(payload)
10
+ body = payload.to_json
11
11
  api_key = Mailercity.api_key
12
12
  stub_request(:post, url).
13
13
  with(:body => body, :headers => {'X-Api-Key' => api_key, 'Content-Type' => 'application/json'}).
@@ -17,6 +17,10 @@ describe Mailercity do
17
17
  let(:user) { {"id"=>1, "email"=>"rob@robforman.com", "first_name"=>"Rob", "last_name"=>"Forman"} }
18
18
  let(:account) { {"id"=>1, "name"=>"Awesometown"} }
19
19
 
20
+ before(:each) do
21
+ Mailercity.perform_deliveries = true
22
+ end
23
+
20
24
  it "can create dynamic mailer classes and template methods while passing appropriate parameters" do
21
25
  mail = Mailercity::MyTestMailer.my_test_template(user)
22
26
  mail.should be_kind_of Mailercity::Message
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailercity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: