send_with_us 1.2.0 → 1.2.1

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzhjOWQ4MWU0N2I0ZDJhY2Q4MWQ3YTIyN2Q2YjAwN2Q3NThhMThlMQ==
5
+ data.tar.gz: !binary |-
6
+ MjA4NGZlZjM1Njg2MmNkM2FhNGI4YzYzMDRiZDNkNDI5MjRkMTdlMg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YjUwODIxOWM2NTkzNzFmNTE5NjU4MDFlZGVkMTczZTllYjZiMTk0ZTMzZDg1
10
+ M2RjM2E4ZDUyN2MyY2YzNTFhYmMwNjdiZmVlMjI0YmJkMjQ0NzMxNzVjYjEx
11
+ MTBhNDBiMzU5ZDExNDY4MDNkNGNiMzAxNGM0NjVhMTQyM2FmMjc=
12
+ data.tar.gz: !binary |-
13
+ NTlmY2RkNzcwN2ZmODM4N2MxZDg5YWUwM2IwZThlNjMyNjViMGI3OTlmNjZl
14
+ YWYyYjYzODY0ZmFkMjI4Y2E2Mzc3ZWFmZmVlOTZjNTdmMGEzYmI4MjA4YmI0
15
+ MDMxYzQwYWQ3MDA0ZjkxZWIyOGY3ZjAwOGU5OWMwMDM1ZjU4OTE=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- send_with_us (1.1.4)
4
+ send_with_us (1.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -44,7 +44,9 @@ begin
44
44
  { company_name: 'TestCo' },
45
45
  { name: 'Company',
46
46
  address: 'company@example.com',
47
- reply_to: 'info@example.com' })
47
+ reply_to: 'info@example.com' },
48
+ 'esp_MYESPACCOUNT',
49
+ 'v2') # version name
48
50
  puts result
49
51
 
50
52
  # full cc/bcc support
@@ -23,7 +23,7 @@ module SendWithUs
23
23
  @configuration = SendWithUs::Config.new(settings)
24
24
  end
25
25
 
26
- def send_with(email_id, to, data = {}, from = {}, cc={}, bcc={}, files=[], esp_account='')
26
+ def send_with(email_id, to, data = {}, from = {}, cc={}, bcc={}, files=[], esp_account='', version_name='')
27
27
 
28
28
  if email_id.nil?
29
29
  raise SendWithUs::ApiNilEmailId, 'email_id cannot be nil'
@@ -44,6 +44,9 @@ module SendWithUs
44
44
  if esp_account
45
45
  payload[:esp_account] = esp_account
46
46
  end
47
+ if version_name
48
+ payload[:version_name] = version_name
49
+ end
47
50
 
48
51
  files.each do |path|
49
52
  file = open(path).read
@@ -1,3 +1,3 @@
1
1
  module SendWithUs
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
data/send_with_us.gemspec CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.description = %q{SendWithUs.com Ruby Client}
13
13
  gem.summary = %q{SendWithUs.com Ruby Client}
14
14
  gem.homepage = "https://github.com/sendwithus/sendwithus_ruby"
15
+ gem.license = "Apache-2.0"
15
16
 
16
17
  gem.files = `git ls-files`.split($/)
17
18
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -66,6 +66,23 @@ class TestApiRequest < MiniTest::Unit::TestCase
66
66
  assert_raises( SendWithUs::ApiConnectionRefused ) { @request.post(:send, @payload) }
67
67
  end
68
68
 
69
+ def test_send_with_version
70
+ build_objects
71
+ email_id = 'tem_9YvYsaLW2Mw4tmPiLcVvpC'
72
+ result = @api.send_with(
73
+ email_id,
74
+ {name: 'Ruby Unit Test', address: 'matt@example.com'},
75
+ {name: 'sendwithus', address: 'matt@example.com'},
76
+ {},
77
+ [],
78
+ [],
79
+ [],
80
+ '',
81
+ 'v2'
82
+ )
83
+ assert_instance_of( Net::HTTPOK, result )
84
+ end
85
+
69
86
  def test_emails
70
87
  build_objects
71
88
  Net::HTTP.any_instance.stubs(:request).returns(Net::HTTPSuccess.new(1.0, 200, "OK"))
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: send_with_us
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
5
- prerelease:
4
+ version: 1.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matt Harris
@@ -11,12 +10,11 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2014-09-27 00:00:00.000000000 Z
13
+ date: 2014-10-09 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rake
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
19
  - - ! '>='
22
20
  - !ruby/object:Gem::Version
@@ -24,7 +22,6 @@ dependencies:
24
22
  type: :development
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
26
  - - ! '>='
30
27
  - !ruby/object:Gem::Version
@@ -32,7 +29,6 @@ dependencies:
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: shoulda
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
33
  - - ! '>='
38
34
  - !ruby/object:Gem::Version
@@ -40,7 +36,6 @@ dependencies:
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ! '>='
46
41
  - !ruby/object:Gem::Version
@@ -48,7 +43,6 @@ dependencies:
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: mocha
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
47
  - - ! '>='
54
48
  - !ruby/object:Gem::Version
@@ -56,7 +50,6 @@ dependencies:
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
54
  - - ! '>='
62
55
  - !ruby/object:Gem::Version
@@ -89,28 +82,28 @@ files:
89
82
  - test/lib/send_with_us/version_test.rb
90
83
  - test/test_helper.rb
91
84
  homepage: https://github.com/sendwithus/sendwithus_ruby
92
- licenses: []
85
+ licenses:
86
+ - Apache-2.0
87
+ metadata: {}
93
88
  post_install_message:
94
89
  rdoc_options: []
95
90
  require_paths:
96
91
  - lib
97
92
  required_ruby_version: !ruby/object:Gem::Requirement
98
- none: false
99
93
  requirements:
100
94
  - - ! '>='
101
95
  - !ruby/object:Gem::Version
102
96
  version: '0'
103
97
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
98
  requirements:
106
99
  - - ! '>='
107
100
  - !ruby/object:Gem::Version
108
101
  version: '0'
109
102
  requirements: []
110
103
  rubyforge_project:
111
- rubygems_version: 1.8.23
104
+ rubygems_version: 2.2.2
112
105
  signing_key:
113
- specification_version: 3
106
+ specification_version: 4
114
107
  summary: SendWithUs.com Ruby Client
115
108
  test_files:
116
109
  - test/lib/send_with_us/api_request_test.rb