createsend 1.0.2 → 1.0.3
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.
- data/Gemfile.lock +1 -1
- data/Rakefile +2 -2
- data/lib/createsend.rb +1 -1
- data/lib/createsend/version.rb +1 -1
- data/test/createsend_test.rb +9 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
2
|
require "bundler/version"
|
3
3
|
require "shoulda/tasks"
|
4
|
-
require 'lib/createsend'
|
5
|
-
|
6
4
|
require "rake/testtask"
|
5
|
+
require "./lib/createsend"
|
6
|
+
|
7
7
|
Rake::TestTask.new(:test) do |test|
|
8
8
|
test.ruby_opts = ["-rubygems"] if defined? Gem
|
9
9
|
test.libs << "lib" << "test"
|
data/lib/createsend.rb
CHANGED
@@ -65,7 +65,7 @@ module CreateSend
|
|
65
65
|
@@base_uri = "https://api.createsend.com/api/v3"
|
66
66
|
@@api_key = ""
|
67
67
|
headers({
|
68
|
-
'User-Agent' => "createsend-ruby-#{
|
68
|
+
'User-Agent' => "createsend-ruby-#{VERSION}",
|
69
69
|
'Content-Type' => 'application/json; charset=utf-8',
|
70
70
|
'Accept-Encoding' => 'gzip, deflate' })
|
71
71
|
base_uri @@base_uri
|
data/lib/createsend/version.rb
CHANGED
data/test/createsend_test.rb
CHANGED
@@ -9,6 +9,14 @@ class CreateSendTest < Test::Unit::TestCase
|
|
9
9
|
@cs = CreateSend::CreateSend.new
|
10
10
|
end
|
11
11
|
|
12
|
+
should "include the CreateSend module VERSION constant as part of the user agent when making a call" do
|
13
|
+
# This test is done to ensure that the version from HTTParty isn't included instead
|
14
|
+
assert CreateSend::CreateSend.headers["User-Agent"] == "createsend-ruby-#{CreateSend::VERSION}"
|
15
|
+
stub_get(@api_key, "clients.json", "clients.json")
|
16
|
+
clients = @cs.clients
|
17
|
+
clients.size.should == 2
|
18
|
+
end
|
19
|
+
|
12
20
|
should "get api key" do
|
13
21
|
uri = URI.parse(@base_uri)
|
14
22
|
site_url = "http://iamadesigner.createsend.com/"
|
@@ -54,7 +62,7 @@ class CreateSendTest < Test::Unit::TestCase
|
|
54
62
|
@base_uri = 'https://api.createsend.com/api/v3'
|
55
63
|
CreateSend.api_key @api_key
|
56
64
|
@cs = CreateSend::CreateSend.new
|
57
|
-
@template = CreateSend::Template.new(
|
65
|
+
@template = CreateSend::Template.new('98y2e98y289dh89h938389')
|
58
66
|
end
|
59
67
|
|
60
68
|
{ ["400", "Bad Request"] => CreateSend::BadRequest,
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
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-
|
18
|
+
date: 2011-12-03 00:00:00 +07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|