contactology 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ ### 0.1.0 / 2011-08-25
2
+
3
+ [full changelog](http://github.com/nbibler/contactology/compare/v0.0.2...v0.1.0)
4
+
5
+ * Enhancements
6
+ * Add Contactology::Campaigns::Transactional#send_campaign
7
+ * Allow Issues to be created from Hash-derived instances
8
+ * Restrict versions of HTTParty and MultiJson
9
+
10
+ * Bug fixes
11
+ * Fix failure messages for Campaign#create request timeouts
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.require_paths = ['lib']
18
18
 
19
19
  s.add_dependency 'hashie', '~> 1.1'
20
- s.add_dependency 'httparty'
21
- s.add_dependency 'multi_json'
20
+ s.add_dependency 'httparty', '~> 0.7.8'
21
+ s.add_dependency 'multi_json', '~> 1.0'
22
22
 
23
23
  s.add_development_dependency 'vcr', '~> 1.5'
24
24
  s.add_development_dependency 'rspec', '~> 2.0'
@@ -1,5 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require 'contactology/core_ext/array'
3
4
  require 'contactology/version'
4
5
  require 'contactology/errors'
5
6
  require 'contactology/campaigns/standard'
@@ -55,7 +55,7 @@ module Contactology::API
55
55
  case
56
56
  when response.code == 200
57
57
  if response.parsed_response.kind_of?(Hash) &&
58
- (response['result'] == 'error' || response['success'].kind_of?(FalseClass))
58
+ (response['result'] == 'error' || response['success'].kind_of?(FalseClass) || (response['errors'] && !response['errors'].empty?))
59
59
  call_response_handler(handlers[:on_error], response)
60
60
  else
61
61
  call_response_handler(handlers[:on_success], response)
@@ -60,7 +60,7 @@ class Contactology::Campaigns::Standard < Contactology::Campaign
60
60
  self.class.query('Campaign_Send', options.merge({
61
61
  'campaignId' => id,
62
62
  :on_error => Proc.new { |response| process_send_campaign_result response },
63
- :on_timeout => process_send_campaign_result({'success' => false, 'issues' => [{'text' => 'Connection timeout'}]}),
63
+ :on_timeout => process_send_campaign_result({'success' => false, 'issues' => {'issues' => [{'text' => 'Connection timeout'}]}}),
64
64
  :on_success => Proc.new { |response| process_send_campaign_result response }
65
65
  }))
66
66
  end
@@ -45,16 +45,43 @@ class Contactology::Campaigns::Transactional < Contactology::Campaign
45
45
  'viewInBrowser' => view_in_browser
46
46
  },
47
47
  :on_error => Proc.new { |response| process_send_campaign_result response },
48
- :on_timeout => process_send_campaign_result('success' => false, 'issues' => [{'text' => 'Connection error'}]),
48
+ :on_timeout => Proc.new { process_send_campaign_result('success' => false, 'issues' => {'issues' => [{'text' => 'Connection error'}]}) },
49
49
  :on_success => Proc.new { |response| self.id = response; self }
50
50
  }))
51
51
  end
52
52
 
53
53
 
54
+ ##
55
+ # Public: Sends the campaign.
56
+ #
57
+ # Returns an empty collection when successful.
58
+ # Returns a collection of issues when unsuccessful.
59
+ #
60
+ def send_campaign(*contacts)
61
+ options = contacts.extract_options!
62
+ replacements = [options.delete(:replacements)].flatten.compact
63
+
64
+ self.class.query('Campaign_Send_Transactional_Multiple', options.merge({
65
+ 'campaignId' => id,
66
+ 'contacts' => contacts.collect { |c| {'email' => c.email} },
67
+ 'source' => options[:source] || 'Customer',
68
+ 'replacements' => replacements,
69
+ 'optionalParameters' => { 'continueOnError' => true },
70
+ :on_error => Proc.new { |response| process_send_campaign_result response },
71
+ :on_timeout => Proc.new { process_send_campaign_result('success' => false, 'issues' => {'issues' => [{'text' => 'Connection error'}]}) },
72
+ :on_success => Proc.new { process_send_campaign_result({'success' => true}) }
73
+ }))
74
+ end
75
+
76
+
54
77
  private
55
78
 
56
79
 
57
80
  def process_send_campaign_result(data)
58
- Contactology::SendResult.new(data)
81
+ if data['errors'].nil?
82
+ Contactology::SendResult.new(data)
83
+ else
84
+ Contactology::SendResult.new('success' => false, 'issues' => {'issues' => data['errors'].collect { |e| {'type' => "#{e['_msg_']} (##{e['_err_']})", 'text' => "#{e['email']} (from #{e['source']})"}} })
85
+ end
59
86
  end
60
87
  end
@@ -0,0 +1,9 @@
1
+ class Array
2
+ def extract_options!
3
+ if last.is_a?(Hash) && last.instance_of?(Hash)
4
+ pop
5
+ else
6
+ {}
7
+ end
8
+ end unless [].respond_to?(:extract_options!)
9
+ end
@@ -16,7 +16,7 @@ module Contactology
16
16
  @message = details['message']
17
17
  @context = details['context']
18
18
  @col = details['col']
19
- @deduction = details['deduction']
19
+ @deduction = details['deduction'] || 0
20
20
  end
21
21
 
22
22
  def to_s
@@ -7,7 +7,7 @@ module Contactology
7
7
  attr_reader :score
8
8
 
9
9
  def initialize(data = nil)
10
- data = Hash.new unless data.kind_of?(Hash)
10
+ data = Hash.new unless data.is_a?(Hash)
11
11
  @score = data['score'] || 0
12
12
  (data['issues'] || []).each { |i| self << i }
13
13
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Contactology
4
- VERSION = '0.0.2'
4
+ VERSION = '0.1.0'
5
5
  end
@@ -0,0 +1,106 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Transactional&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Test%20Creation&content%5Btext%5D=This%20is%20a%20good%20email.%20%7BCOMPANY_ADDRESS%7D&testContact%5Bemail%5D=test-contact@example.com&testReplacements%5Bfirst_name%5D=John
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ user-agent:
11
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-powered-by:
18
+ - PHP/5.2.10
19
+ set-cookie:
20
+ - PHPSESSID=4578af0339fa5bdaa144207bcf18f0ff; path=/
21
+ expires:
22
+ - Thu, 19 Nov 1981 08:52:00 GMT
23
+ cache-control:
24
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
25
+ pragma:
26
+ - no-cache
27
+ content-type:
28
+ - text/plain;charset=UTF-8
29
+ transfer-encoding:
30
+ - chunked
31
+ date:
32
+ - Thu, 25 Aug 2011 15:58:31 GMT
33
+ server:
34
+ - lighttpd/1.4.28
35
+ body: "54"
36
+ http_version: "1.1"
37
+ - !ruby/struct:VCR::HTTPInteraction
38
+ request: !ruby/struct:VCR::Request
39
+ method: :get
40
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=54&key=%{API_KEY}&method=Campaign_Send_Transactional_Multiple&source=Customer&contacts%5Bemail%5D=bad&optionalParameters%5BcontinueOnError%5D=true
41
+ body:
42
+ headers:
43
+ accept:
44
+ - application/json
45
+ user-agent:
46
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
47
+ response: !ruby/struct:VCR::Response
48
+ status: !ruby/struct:VCR::ResponseStatus
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ x-powered-by:
53
+ - PHP/5.2.10
54
+ set-cookie:
55
+ - PHPSESSID=7ef161bba924ef945f85052cf6c43ff4; path=/
56
+ expires:
57
+ - Thu, 19 Nov 1981 08:52:00 GMT
58
+ cache-control:
59
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
60
+ pragma:
61
+ - no-cache
62
+ content-type:
63
+ - text/plain;charset=UTF-8
64
+ transfer-encoding:
65
+ - chunked
66
+ date:
67
+ - Thu, 25 Aug 2011 15:58:32 GMT
68
+ server:
69
+ - lighttpd/1.4.28
70
+ body: "{\"errors\":[{\"email\":\"bad\",\"source\":\"Customer\",\"_err_\":302,\"_msg_\":\"Invalid e-mail address provided\"}]}"
71
+ http_version: "1.1"
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
+ method: :get
75
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=54&key=%{API_KEY}&method=Campaign_Delete
76
+ body:
77
+ headers:
78
+ accept:
79
+ - application/json
80
+ user-agent:
81
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ x-powered-by:
88
+ - PHP/5.2.10
89
+ set-cookie:
90
+ - PHPSESSID=8fe3cea47a38ea58f7e9c36d3eeb32e6; path=/
91
+ expires:
92
+ - Thu, 19 Nov 1981 08:52:00 GMT
93
+ cache-control:
94
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
95
+ pragma:
96
+ - no-cache
97
+ content-type:
98
+ - text/plain;charset=UTF-8
99
+ transfer-encoding:
100
+ - chunked
101
+ date:
102
+ - Thu, 25 Aug 2011 15:58:32 GMT
103
+ server:
104
+ - lighttpd/1.4.28
105
+ body: "true"
106
+ http_version: "1.1"
@@ -0,0 +1,176 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Transactional&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Test%20Creation&content%5Btext%5D=This%20is%20a%20good%20email.%20%7BCOMPANY_ADDRESS%7D&testContact%5Bemail%5D=test-contact@example.com&testReplacements%5Bfirst_name%5D=John
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ user-agent:
11
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-powered-by:
18
+ - PHP/5.2.10
19
+ set-cookie:
20
+ - PHPSESSID=ea3b263e73dd6f642db5b80c7c201eef; path=/
21
+ expires:
22
+ - Thu, 19 Nov 1981 08:52:00 GMT
23
+ cache-control:
24
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
25
+ pragma:
26
+ - no-cache
27
+ content-type:
28
+ - text/plain;charset=UTF-8
29
+ transfer-encoding:
30
+ - chunked
31
+ date:
32
+ - Thu, 25 Aug 2011 15:52:04 GMT
33
+ server:
34
+ - lighttpd/1.4.28
35
+ body: "53"
36
+ http_version: "1.1"
37
+ - !ruby/struct:VCR::HTTPInteraction
38
+ request: !ruby/struct:VCR::Request
39
+ method: :get
40
+ uri: https://api.emailcampaigns.net:443/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Add&optionalParameters%5BupdateCustomFields%5D=true
41
+ body:
42
+ headers:
43
+ accept:
44
+ - application/json
45
+ user-agent:
46
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
47
+ response: !ruby/struct:VCR::Response
48
+ status: !ruby/struct:VCR::ResponseStatus
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ x-powered-by:
53
+ - PHP/5.2.10
54
+ set-cookie:
55
+ - PHPSESSID=91d37cb1385416c860e6fea9b9902a3a; path=/
56
+ expires:
57
+ - Thu, 19 Nov 1981 08:52:00 GMT
58
+ cache-control:
59
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
60
+ pragma:
61
+ - no-cache
62
+ content-type:
63
+ - text/plain;charset=UTF-8
64
+ transfer-encoding:
65
+ - chunked
66
+ date:
67
+ - Thu, 25 Aug 2011 15:52:06 GMT
68
+ server:
69
+ - lighttpd/1.4.28
70
+ body: "true"
71
+ http_version: "1.1"
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
+ method: :get
75
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=53&key=%{API_KEY}&method=Campaign_Send_Transactional_Multiple&source=Customer&contacts%5Bemail%5D=factory-contact@example.com&optionalParameters%5BcontinueOnError%5D=true
76
+ body:
77
+ headers:
78
+ accept:
79
+ - application/json
80
+ user-agent:
81
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ x-powered-by:
88
+ - PHP/5.2.10
89
+ set-cookie:
90
+ - PHPSESSID=efa7362c6aa9567372b2a6c3a93035cc; path=/
91
+ expires:
92
+ - Thu, 19 Nov 1981 08:52:00 GMT
93
+ cache-control:
94
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
95
+ pragma:
96
+ - no-cache
97
+ content-type:
98
+ - text/plain;charset=UTF-8
99
+ transfer-encoding:
100
+ - chunked
101
+ date:
102
+ - Thu, 25 Aug 2011 15:52:07 GMT
103
+ server:
104
+ - lighttpd/1.4.28
105
+ body: "true"
106
+ http_version: "1.1"
107
+ - !ruby/struct:VCR::HTTPInteraction
108
+ request: !ruby/struct:VCR::Request
109
+ method: :get
110
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=53&key=%{API_KEY}&method=Campaign_Delete
111
+ body:
112
+ headers:
113
+ accept:
114
+ - application/json
115
+ user-agent:
116
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
117
+ response: !ruby/struct:VCR::Response
118
+ status: !ruby/struct:VCR::ResponseStatus
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ x-powered-by:
123
+ - PHP/5.2.10
124
+ set-cookie:
125
+ - PHPSESSID=47cde51d75b18399e630ebbcc05a64ca; path=/
126
+ expires:
127
+ - Thu, 19 Nov 1981 08:52:00 GMT
128
+ cache-control:
129
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
130
+ pragma:
131
+ - no-cache
132
+ content-type:
133
+ - text/plain;charset=UTF-8
134
+ transfer-encoding:
135
+ - chunked
136
+ date:
137
+ - Thu, 25 Aug 2011 15:52:15 GMT
138
+ server:
139
+ - lighttpd/1.4.28
140
+ body: "true"
141
+ http_version: "1.1"
142
+ - !ruby/struct:VCR::HTTPInteraction
143
+ request: !ruby/struct:VCR::Request
144
+ method: :get
145
+ uri: https://api.emailcampaigns.net:443/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Delete
146
+ body:
147
+ headers:
148
+ accept:
149
+ - application/json
150
+ user-agent:
151
+ - contactology/0.0.2 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
152
+ response: !ruby/struct:VCR::Response
153
+ status: !ruby/struct:VCR::ResponseStatus
154
+ code: 200
155
+ message: OK
156
+ headers:
157
+ x-powered-by:
158
+ - PHP/5.2.10
159
+ set-cookie:
160
+ - PHPSESSID=9acedc6330d095394297fa17b0a7708e; path=/
161
+ expires:
162
+ - Thu, 19 Nov 1981 08:52:00 GMT
163
+ cache-control:
164
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
165
+ pragma:
166
+ - no-cache
167
+ content-type:
168
+ - text/plain;charset=UTF-8
169
+ transfer-encoding:
170
+ - chunked
171
+ date:
172
+ - Thu, 25 Aug 2011 15:52:16 GMT
173
+ server:
174
+ - lighttpd/1.4.28
175
+ body: "true"
176
+ http_version: "1.1"
@@ -27,4 +27,36 @@ describe Contactology::Campaigns::Transactional do
27
27
  its(:issues) { should_not be_empty }
28
28
  end
29
29
  end
30
+
31
+
32
+ context '#send_campaign' do
33
+ context 'when successful' do
34
+ use_vcr_cassette 'campaigns/transactional/send_campaign/success'
35
+ let(:contact) { Factory :contact }
36
+ let(:campaign) { Factory :transactional_campaign }
37
+
38
+ after(:each) do
39
+ campaign.destroy
40
+ contact.destroy
41
+ end
42
+
43
+ subject { campaign.send_campaign(contact) }
44
+
45
+ it { should be_instance_of Contactology::SendResult }
46
+ it { should be_successful }
47
+ its(:issues) { should be_empty }
48
+ end
49
+
50
+ context 'when unsuccessful' do
51
+ use_vcr_cassette 'campaigns/transactional/send_campaign/failure'#, record: :new_episodes
52
+ let(:campaign) { Factory :transactional_campaign }
53
+ after(:each) { campaign.destroy }
54
+
55
+ subject { campaign.send_campaign(Struct.new(:email).new('bad')) }
56
+
57
+ it { should be_kind_of Contactology::SendResult }
58
+ it { should_not be_successful }
59
+ its(:issues) { should_not be_empty }
60
+ end
61
+ end
30
62
  end
metadata CHANGED
@@ -1,130 +1,133 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: contactology
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Nathaniel Bibler
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-03 00:00:00.000000000 -04:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2011-08-25 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
16
  name: hashie
17
- requirement: &2157591680 !ruby/object:Gem::Requirement
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
18
19
  none: false
19
- requirements:
20
+ requirements:
20
21
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: '1.1'
22
+ - !ruby/object:Gem::Version
23
+ version: "1.1"
23
24
  type: :runtime
24
- prerelease: false
25
- version_requirements: *2157591680
26
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
27
  name: httparty
28
- requirement: &2151962600 !ruby/object:Gem::Requirement
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
29
30
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: 0.7.8
34
35
  type: :runtime
35
- prerelease: false
36
- version_requirements: *2151962600
37
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
38
  name: multi_json
39
- requirement: &2151962140 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
40
41
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: "1.0"
45
46
  type: :runtime
46
- prerelease: false
47
- version_requirements: *2151962140
48
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
49
  name: vcr
50
- requirement: &2151961640 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
51
52
  none: false
52
- requirements:
53
+ requirements:
53
54
  - - ~>
54
- - !ruby/object:Gem::Version
55
- version: '1.5'
55
+ - !ruby/object:Gem::Version
56
+ version: "1.5"
56
57
  type: :development
57
- prerelease: false
58
- version_requirements: *2151961640
59
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
60
  name: rspec
61
- requirement: &2151961140 !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
62
63
  none: false
63
- requirements:
64
+ requirements:
64
65
  - - ~>
65
- - !ruby/object:Gem::Version
66
- version: '2.0'
66
+ - !ruby/object:Gem::Version
67
+ version: "2.0"
67
68
  type: :development
68
- prerelease: false
69
- version_requirements: *2151961140
70
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
71
  name: infinity_test
72
- requirement: &2151960760 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id006 !ruby/object:Gem::Requirement
73
74
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "0"
78
79
  type: :development
79
- prerelease: false
80
- version_requirements: *2151960760
81
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
82
  name: factory_girl
83
- requirement: &2151960220 !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id007 !ruby/object:Gem::Requirement
84
85
  none: false
85
- requirements:
86
+ requirements:
86
87
  - - ~>
87
- - !ruby/object:Gem::Version
88
- version: '2.0'
88
+ - !ruby/object:Gem::Version
89
+ version: "2.0"
89
90
  type: :development
90
- prerelease: false
91
- version_requirements: *2151960220
92
- - !ruby/object:Gem::Dependency
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
93
  name: rack
94
- requirement: &2151959720 !ruby/object:Gem::Requirement
94
+ prerelease: false
95
+ requirement: &id008 !ruby/object:Gem::Requirement
95
96
  none: false
96
- requirements:
97
+ requirements:
97
98
  - - ~>
98
- - !ruby/object:Gem::Version
99
- version: '1.2'
99
+ - !ruby/object:Gem::Version
100
+ version: "1.2"
100
101
  type: :development
101
- prerelease: false
102
- version_requirements: *2151959720
103
- - !ruby/object:Gem::Dependency
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
104
  name: watchr
105
- requirement: &2151959340 !ruby/object:Gem::Requirement
105
+ prerelease: false
106
+ requirement: &id009 !ruby/object:Gem::Requirement
106
107
  none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: "0"
111
112
  type: :development
112
- prerelease: false
113
- version_requirements: *2151959340
114
- description: This library provides Ruby calls to interact with the Contactology email
115
- marketing API
116
- email:
113
+ version_requirements: *id009
114
+ description: This library provides Ruby calls to interact with the Contactology email marketing API
115
+ email:
117
116
  - git@nathanielbibler.com
118
117
  executables: []
118
+
119
119
  extensions: []
120
+
120
121
  extra_rdoc_files: []
121
- files:
122
+
123
+ files:
122
124
  - .gitignore
123
125
  - .infinity_test
124
126
  - .rspec
125
127
  - .rvmrc
126
128
  - .travis.yml
127
129
  - .watchr
130
+ - Changelog.markdown
128
131
  - Gemfile
129
132
  - README.markdown
130
133
  - Rakefile
@@ -139,6 +142,7 @@ files:
139
142
  - lib/contactology/campaigns/transactional.rb
140
143
  - lib/contactology/configuration.rb
141
144
  - lib/contactology/contact.rb
145
+ - lib/contactology/core_ext/array.rb
142
146
  - lib/contactology/errors.rb
143
147
  - lib/contactology/issue.rb
144
148
  - lib/contactology/issues.rb
@@ -168,6 +172,8 @@ files:
168
172
  - spec/fixtures/net/campaigns/standard/send_campaign/success.yml
169
173
  - spec/fixtures/net/campaigns/transactional/create/failure.yml
170
174
  - spec/fixtures/net/campaigns/transactional/create/success.yml
175
+ - spec/fixtures/net/campaigns/transactional/send_campaign/failure.yml
176
+ - spec/fixtures/net/campaigns/transactional/send_campaign/success.yml
171
177
  - spec/fixtures/net/contact/active.yml
172
178
  - spec/fixtures/net/contact/change_email/success.yml
173
179
  - spec/fixtures/net/contact/change_email/unknown.yml
@@ -207,32 +213,34 @@ files:
207
213
  - spec/support/contactology.rb
208
214
  - spec/support/factory_girl.rb
209
215
  - spec/support/vcr.rb
210
- has_rdoc: true
211
216
  homepage: https://github.com/nbibler/contactology
212
217
  licenses: []
218
+
213
219
  post_install_message:
214
220
  rdoc_options: []
215
- require_paths:
221
+
222
+ require_paths:
216
223
  - lib
217
- required_ruby_version: !ruby/object:Gem::Requirement
224
+ required_ruby_version: !ruby/object:Gem::Requirement
218
225
  none: false
219
- requirements:
220
- - - ! '>='
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
- required_rubygems_version: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: "0"
230
+ required_rubygems_version: !ruby/object:Gem::Requirement
224
231
  none: false
225
- requirements:
226
- - - ! '>='
227
- - !ruby/object:Gem::Version
228
- version: '0'
232
+ requirements:
233
+ - - ">="
234
+ - !ruby/object:Gem::Version
235
+ version: "0"
229
236
  requirements: []
237
+
230
238
  rubyforge_project:
231
- rubygems_version: 1.6.2
239
+ rubygems_version: 1.8.7
232
240
  signing_key:
233
241
  specification_version: 3
234
242
  summary: A Ruby interface to the Contactology email marketing API
235
- test_files:
243
+ test_files:
236
244
  - spec/contactology.example.yml
237
245
  - spec/factories/campaigns.rb
238
246
  - spec/factories/contacts.rb
@@ -252,6 +260,8 @@ test_files:
252
260
  - spec/fixtures/net/campaigns/standard/send_campaign/success.yml
253
261
  - spec/fixtures/net/campaigns/transactional/create/failure.yml
254
262
  - spec/fixtures/net/campaigns/transactional/create/success.yml
263
+ - spec/fixtures/net/campaigns/transactional/send_campaign/failure.yml
264
+ - spec/fixtures/net/campaigns/transactional/send_campaign/success.yml
255
265
  - spec/fixtures/net/contact/active.yml
256
266
  - spec/fixtures/net/contact/change_email/success.yml
257
267
  - spec/fixtures/net/contact/change_email/unknown.yml