createsend 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- createsend (1.0.0)
4
+ createsend (1.0.3)
5
5
  hashie (~> 1.0)
6
6
  httparty (~> 0.8)
7
7
  json
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"
@@ -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-#{CreateSend::VERSION}",
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
@@ -1,3 +1,3 @@
1
1
  module CreateSend
2
- VERSION = "1.0.2" unless defined?(CreateSend::VERSION)
2
+ VERSION = "1.0.3" unless defined?(CreateSend::VERSION)
3
3
  end
@@ -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(:template_id => '98y2e98y289dh89h938389')
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
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-10-31 00:00:00 +11:00
18
+ date: 2011-12-03 00:00:00 +07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency