createsend 0.3.1 → 0.3.2

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.
@@ -11,12 +11,11 @@ module CreateSend
11
11
  end
12
12
 
13
13
  # Creates a new email template.
14
- def self.create(client_id, name, html_url, zip_url, screenshot_url)
14
+ def self.create(client_id, name, html_url, zip_url)
15
15
  options = { :body => {
16
16
  :Name => name,
17
17
  :HtmlPageURL => html_url,
18
- :ZipFileURL => zip_url,
19
- :ScreenshotURL => screenshot_url }.to_json }
18
+ :ZipFileURL => zip_url }.to_json }
20
19
  response = CreateSend.post "/templates/#{client_id}.json", options
21
20
  response.parsed_response
22
21
  end
@@ -28,12 +27,11 @@ module CreateSend
28
27
  end
29
28
 
30
29
  # Updates this email template.
31
- def update(name, html_url, zip_url, screenshot_url)
30
+ def update(name, html_url, zip_url)
32
31
  options = { :body => {
33
32
  :Name => name,
34
33
  :HtmlPageURL => html_url,
35
- :ZipFileURL => zip_url,
36
- :ScreenshotURL => screenshot_url }.to_json }
34
+ :ZipFileURL => zip_url }.to_json }
37
35
  response = CreateSend.put "/templates/#{template_id}.json", options
38
36
  end
39
37
 
@@ -1,3 +1,3 @@
1
1
  module CreateSend
2
- VERSION = "0.3.1" unless defined?(CreateSend::VERSION)
2
+ VERSION = "0.3.2" unless defined?(CreateSend::VERSION)
3
3
  end
@@ -76,15 +76,15 @@ class CreateSendTest < Test::Unit::TestCase
76
76
  "(GMT+10:00) Canberra, Melbourne, Sydney", "Australia" }.should raise_error(exception)
77
77
  end
78
78
  end
79
-
79
+
80
80
  context "#{status.first}, a put" do
81
81
  should "raise a #{exception.name} error" do
82
82
  stub_put(@api_key, "templates/#{@template.template_id}.json", (status.first == '400' or status.first == '401') ? 'custom_api_error.json' : nil, status)
83
83
  lambda { @template.update "Template One Updated", "http://templates.org/index.html",
84
- "http://templates.org/files.zip", "http://templates.org/screenshot.jpg" }.should raise_error(exception)
84
+ "http://templates.org/files.zip" }.should raise_error(exception)
85
85
  end
86
86
  end
87
-
87
+
88
88
  context "#{status.first}, a delete" do
89
89
  should "raise a #{exception.name} error" do
90
90
  stub_delete(@api_key, "templates/#{@template.template_id}.json", (status.first == '400' or status.first == '401') ? 'custom_api_error.json' : nil, status)
@@ -12,7 +12,7 @@ class TemplateTest < Test::Unit::TestCase
12
12
  client_id = '87y8d7qyw8d7yq8w7ydwqwd'
13
13
  stub_post(@api_key, "templates/#{client_id}.json", "create_template.json")
14
14
  template_id = CreateSend::Template.create client_id, "Template One", "http://templates.org/index.html",
15
- "http://templates.org/files.zip", "http://templates.org/screenshot.jpg"
15
+ "http://templates.org/files.zip"
16
16
  template_id.should == "98y2e98y289dh89h938389"
17
17
  end
18
18
 
@@ -27,7 +27,7 @@ class TemplateTest < Test::Unit::TestCase
27
27
 
28
28
  should "update a template" do
29
29
  stub_put(@api_key, "templates/#{@template.template_id}.json", nil)
30
- @template.update "Template One Updated", "http://templates.org/index.html", "http://templates.org/files.zip", "http://templates.org/screenshot.jpg"
30
+ @template.update "Template One Updated", "http://templates.org/index.html", "http://templates.org/files.zip"
31
31
  end
32
32
 
33
33
  should "delete a template" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: createsend
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Dennes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-06 00:00:00 +10:00
18
+ date: 2011-07-11 00:00:00 +10:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency