email_center_api 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
1
+ module FakeWebHelpers
2
+ class Template
3
+ def self.setup
4
+ all_templates = [
5
+ {
6
+ text: "email_template",
7
+ children: [
8
+ {text: "A template", nodeId: "10", nodeClass: "email_template"},
9
+ {text: "Another template", nodeId: "11", nodeClass: "email_template"},
10
+ {text: "More templates", nodeId: "12", nodeClass: "email_template"}]
11
+ }
12
+ ].to_json
13
+ FakeWeb.register_uri(:get, 'https://test:test@maxemail.emailcenteruk.com/api/json/tree?method=fetchRoot&tree=email_template&children[]=root',
14
+ :body => all_templates,
15
+ :content_type => 'application/json')
16
+ end
17
+ end
18
+ end
19
+
20
+ FakeWebHelpers::Template.setup
21
+
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'when a trigger email exists' do
4
+ it 'find the appropriate email and then trigger it to send' do
5
+ emails = EmailCenterApi::Nodes::EmailNode.emails(folder: 123)
6
+
7
+ email = emails.detect { |e| e.name == 'Test Email' }
8
+
9
+ email_address = 'test@reevoo.com'
10
+ options = {
11
+ 'Reviews' => {
12
+ 'retailer_product_name' => 'Test product',
13
+ 'retailer_name' => 'test retailer',
14
+ 'retailer_from' => 'reply@reevoo.com'
15
+ }
16
+ }
17
+ expect(
18
+ email.trigger(email_address, options).response.code
19
+ ).to eq('200')
20
+ end
21
+
22
+ end
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+
3
+ describe EmailCenterApi::HttpClient do
4
+ describe '#get' do
5
+
6
+ before do
7
+ described_class.reset
8
+ described_class::Connection.stub(:get)
9
+ end
10
+
11
+ it 'uses the configured API endpoint' do
12
+ described_class::Connection.should_receive(:base_uri).with(
13
+ EmailCenterApi.config['base_uri']
14
+ )
15
+ described_class.get('/tree')
16
+ end
17
+
18
+ it 'logs the user in' do
19
+ described_class::Connection.should_receive(:basic_auth).with(
20
+ EmailCenterApi.config['username'],
21
+ EmailCenterApi.config['password']
22
+ )
23
+ described_class.get('/tree')
24
+ end
25
+
26
+ context 'when a Timeout error is raised once' do
27
+ before do
28
+ described_class::Connection.stub(:get) do
29
+ @attempt ||= 0
30
+ @attempt += 1
31
+ raise(Timeout::Error) if @attempt <= 1
32
+ 'Valid Result'
33
+ end
34
+ end
35
+
36
+ it 'retries the request' do
37
+ described_class.get('/tree').should == 'Valid Result'
38
+ end
39
+ end
40
+
41
+ context 'when data is never returned before timeout' do
42
+ before { described_class::Connection.stub(:get).and_raise(Timeout::Error, 'did not complete') }
43
+
44
+ it 'when it times out' do
45
+ expect { described_class.get('/tree') }.to raise_error(EmailCenterApi::HttpTimeoutError, 'did not complete')
46
+ end
47
+ end
48
+
49
+ end
50
+ end
@@ -0,0 +1,113 @@
1
+ require 'spec_helper'
2
+
3
+ describe EmailCenterApi::Nodes::EmailNode do
4
+ describe '.emails' do
5
+ context 'when a folder is specified' do
6
+
7
+ it 'returns all emails in the specified folder' do
8
+ json_object = [{ 'text' => 'Reevoo-test', 'nodeId' => '145', 'nodeClass' => 'email_template'}]
9
+
10
+ expect_any_instance_of(
11
+ EmailCenterApi::Query
12
+ ).to receive(:tree).with('folder', 584).and_return(json_object)
13
+
14
+ expect(described_class.emails(folder: 584)).to eq([
15
+ described_class.new('Reevoo-test', 145, 'email_template')
16
+ ])
17
+ end
18
+
19
+ it 'does not return sub-folders in the specified folder' do
20
+ json_object = [{ 'text' => 'Reevoo-test', 'nodeId' => '145', 'nodeClass' => 'folder'}]
21
+
22
+ expect_any_instance_of(
23
+ EmailCenterApi::Query
24
+ ).to receive(:tree).with('folder', 584).and_return(json_object)
25
+
26
+ expect(described_class.emails(folder: 584)).to be_empty
27
+ end
28
+
29
+ it 'returns empty array when folder ID does not exist' do
30
+ expect_any_instance_of(
31
+ EmailCenterApi::Query
32
+ ).to receive(:tree).and_raise(EmailCenterApi::ApiError)
33
+
34
+ expect(described_class.emails(folder: 584)).to be_empty
35
+ end
36
+ end
37
+
38
+ context 'when a folder is not specified' do
39
+ it 'it retrievs elements from teh root node' do
40
+ json_object = [{ 'text' => 'Reevoo-test', 'nodeId' => '145', 'nodeClass' => 'email_template'}]
41
+
42
+ expect_any_instance_of(
43
+ EmailCenterApi::Query
44
+ ).to receive(:tree).with('folder', 0).and_return(json_object)
45
+
46
+ expect(described_class.emails).to eq([
47
+ described_class.new('Reevoo-test', 145, 'email_template')
48
+ ])
49
+
50
+ end
51
+ end
52
+ end
53
+
54
+ describe '.folders' do
55
+ context 'when a parent node id is not passed in' do
56
+ it 'queries the root node' do
57
+ json_object = [{ 'text' => 'Reevoo-test', 'nodeId' => '145', 'nodeClass' => 'folder'}]
58
+
59
+ expect_any_instance_of(
60
+ EmailCenterApi::Query
61
+ ).to receive(:tree).with('folder', 0).and_return(json_object)
62
+
63
+ expect(described_class.folders).to eq([
64
+ described_class.new('Reevoo-test', 145, 'folder')
65
+ ])
66
+ end
67
+ end
68
+
69
+ context 'when a parent node id is passed in' do
70
+ it 'queries within the specified folder' do
71
+ json_object = [{ 'text' => 'Reevoo-test', 'nodeId' => '145', 'nodeClass' => 'folder'}]
72
+
73
+ expect_any_instance_of(
74
+ EmailCenterApi::Query
75
+ ).to receive(:tree).with('folder', 777).and_return(json_object)
76
+
77
+ expect(described_class.folders(folder: 777)).to eq([
78
+ described_class.new('Reevoo-test', 145, 'folder')
79
+ ])
80
+ end
81
+ end
82
+ end
83
+
84
+ describe '.trigger' do
85
+ context 'when an email type node' do
86
+ let(:email_address) { 'test@reevoo.com' }
87
+ let(:options) { {
88
+ 'Reviews' => {
89
+ 'retailer_product_name' => 'Test product',
90
+ 'retailer_name' => 'test retailer',
91
+ 'retailer_from' => 'reply@reevoo.com'
92
+ }
93
+ } }
94
+
95
+ it 'will trigger sending of the email' do
96
+ expect_any_instance_of(
97
+ EmailCenterApi::Actions
98
+ ).to receive(:trigger).with(100, email_address, options)
99
+
100
+ email = described_class.new('Trigger Test', 100, 'email_triggered')
101
+ email.trigger(email_address, options)
102
+ end
103
+
104
+ it 'will raise an arguement invalid error if node is not an email' do
105
+ email = described_class.new('Trigger Test', 100, 'folder')
106
+ expect {
107
+ email.trigger(email_address, options)
108
+ }.to raise_error(NoMethodError)
109
+
110
+ end
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe EmailCenterApi::Nodes::TemplateNode do
4
+ describe '.all' do
5
+ it 'returns 3 items' do
6
+ described_class.all.length.should == 3
7
+ end
8
+
9
+ it 'returns templates with the correct text and node_id' do
10
+ template = described_class.all.first
11
+ template.name.should == 'A template'
12
+ template.node_id.should == 10
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,70 @@
1
+ require 'spec_helper'
2
+
3
+ describe EmailCenterApi::ResponseValidator do
4
+
5
+ describe "#validate_and_return_response" do
6
+ subject { described_class.new(response) }
7
+
8
+ class TestResponse
9
+ def initialize(options)
10
+ @options = options
11
+ end
12
+
13
+ def success?
14
+ @options[:success?]
15
+ end
16
+
17
+ def [](key)
18
+ (@options[:data] || {})[key]
19
+ end
20
+
21
+ def code
22
+ '404'
23
+ end
24
+
25
+ def is_a?(obj)
26
+ obj == Hash
27
+ end
28
+ end
29
+
30
+ context 'when response is valid' do
31
+ let(:response) { TestResponse.new({success?: true}) }
32
+
33
+ it 'return response' do
34
+ expect(subject.validate_and_return_response).to eq(response)
35
+ end
36
+ end
37
+
38
+ context 'when success? is false' do
39
+ context 'and no msg is set' do
40
+ let(:response) { TestResponse.new(success?: false) }
41
+
42
+ it 'return response' do
43
+ expect {
44
+ subject.validate_and_return_response
45
+ }.to raise_error(EmailCenterApi::HttpError)
46
+ end
47
+ end
48
+
49
+ context 'and msg is set' do
50
+ let(:response) { TestResponse.new(success?: false, data: {'msg' => 'error'}) }
51
+
52
+ it 'return response' do
53
+ expect {
54
+ subject.validate_and_return_response
55
+ }.to raise_error(EmailCenterApi::ApiError)
56
+ end
57
+ end
58
+ end
59
+
60
+ context 'when success is true but response is a hash and success key is false' do
61
+ let(:response) { TestResponse.new(success?: true, data: {'success' => false}) }
62
+
63
+ it 'return response' do
64
+ expect {
65
+ subject.validate_and_return_response
66
+ }.to raise_error(EmailCenterApi::HttpError)
67
+ end
68
+ end
69
+ end
70
+ end
@@ -1,48 +1,19 @@
1
+ $LOAD_PATH << './'
1
2
  require 'email_center_api'
2
- require 'email_center_api/list'
3
- require 'email_center_api/recipient'
4
- require 'email_center_api/configuration'
5
3
 
4
+ require 'pry-debugger' unless ENV['RM_INFO']
6
5
  require 'fakeweb'
7
6
  require 'httparty'
8
- FakeWeb.allow_net_connect = false
9
- #Subscribed and Unsubscribed lists
10
- lists_body = "[{\"recipient_id\":\"1234\",\"list_id\":\"25\",\"record_type\":\"campaign\",\"subscribed\":\"0\",\"unsubscribe_method\":\"manual\",\"update_ts\":\"2012-09-11 16:43:10\",\"list_name\":\"testunsub\",\"list_type\":\"suppression\",\"email_address\":\"test@example.co.uk\"},
11
- {\"recipient_id\":\"1234\",\"list_id\":\"26\",\"record_type\":\"campaign\",\"subscribed\":\"1\",\"update_ts\":\"2012-09-11 16:43:10\",\"list_name\":\"testsublist\",\"list_type\":\"something\",\"email_address\":\"test@example.co.uk\"}]"
12
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?recipientId=1234&method=fetchLists", :body => lists_body, :content_type => "application/json" )
13
- #Subscribed list only
14
- sub_list_body = "[{\"recipient_id\":\"1234\",\"list_id\":\"26\",\"record_type\":\"campaign\",\"subscribed\":\"1\",\"update_ts\":\"2012-09-11 16:43:10\",\"list_name\":\"testsublist\",\"list_type\":\"something\",\"email_address\":\"test@example.co.uk\"}]"
15
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?recipientId=2346&method=fetchLists", :body => sub_list_body, :content_type => 'application/json')
16
- #Find Recipient
17
- recipient_body = "{\"recipient_id\":\"1234\",\"email_address\":\"test@example.co.uk\",\"domain_name\":\"example.co.uk\",\"update_ts\":\"2012-01-21 07:15:13\"}"
18
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?method=find&recipientId=1234", :body => recipient_body, :content_type => "application/json")
19
- #Find another
20
- another_recipient_body = "{\"recipient_id\":\"2346\",\"email_address\":\"test2@example.co.uk\",\"domain_name\":\"example.co.uk\",\"update_ts\":\"2012-01-21 07:15:13\"}"
21
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?method=find&recipientId=2345", :body => another_recipient_body, :content_type => "application/json")
7
+ require 'json'
8
+
9
+ RSpec.configure do |config|
22
10
 
23
- #Recipient not found
24
- recipient_not_found_body = "{\"success\":false,\"msg\":\"Unable to find selected recipient\",\"code\":0,\"errors\":[]}"
25
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?method=find&recipientId=5678", :body => recipient_not_found_body, :content_type => "application/json", :status => 400)
26
- #Find List list
27
- list = '{"list_id":"4","folder_id":"9","name":"Master Unsubscribe List","list_total":"1925","status":"available","type":"suppression","created_ts":"2009-02-13 11:18:05","update_ts":"2012-09-11 13:29:25"}'
28
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/list?method=find&listId=4", :body => list, :content_type => "application/json")
29
- #List Not Found
30
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/list?method=find&listId=10", :body => '{"success":false,"msg":"Unable to find requested list","code":0,"errors":[]}', :content_type => "application/json", :status => 400)
31
- #All lists
32
- all_lists = '[{"list_id":"19","folder_id":"9","name":"111116_clicked_bad_link","list_total":"2930","status":"available","type":"include","created_ts":"2011-11-16 17:42:44","update_ts":"2011-11-16 17:43:02"},
33
- {"list_id":"21","folder_id":"9","name":"111116_clicked_good_link","list_total":"3602","status":"available","type":"suppression","created_ts":"2011-11-16 17:43:28","update_ts":"2011-11-16 17:43:46"},
34
- {"list_id":"23","folder_id":"9","name":"111123_clicked_initial_email","list_total":"23632","status":"available","type":"suppression","created_ts":"2011-11-23 10:02:03","update_ts":"2011-11-23 10:02:28"},
35
- {"list_id":"7","folder_id":"9","name":"Contacts","list_total":"0","status":"available","type":"include","created_ts":"2011-08-10 16:23:39","update_ts":"2011-08-10 16:23:39"},
36
- {"list_id":"2","folder_id":"9","name":"Master Bounce List","list_total":"4030","status":"available","type":"bounce","created_ts":"2009-02-13 11:18:05","update_ts":"2012-09-11 10:02:15"},
37
- {"list_id":"9","folder_id":"33","name":"Master List","list_total":"7521","status":"available","type":"include","created_ts":"2011-08-15 14:50:05","update_ts":"2012-09-11 04:00:15"},
38
- {"list_id":"4","folder_id":"9","name":"Master Unsubscribe List","list_total":"1925","status":"available","type":"suppression","created_ts":"2009-02-13 11:18:05","update_ts":"2012-09-11 13:29:25"},
39
- {"list_id":"13","folder_id":"33","name":"Reminder List","list_total":"1642205","status":"available","type":"include","created_ts":"2011-10-03 16:22:09","update_ts":"2012-09-11 04:00:15"},
40
- {"list_id":"5","folder_id":"9","name":"Test Data (EMC)","list_total":"9","status":"available","type":"include","created_ts":"2011-08-10 14:45:03","update_ts":"2011-08-10 14:48:34"},
41
- {"list_id":"11","folder_id":"9","name":"Test Data (SD)","list_total":"3","status":"available","type":"include","created_ts":"2011-08-17 14:14:01","update_ts":"2011-08-17 14:16:48"},
42
- {"list_id":"25","folder_id":"9","name":"testunsub","list_total":"0","status":"available","type":"suppression","created_ts":"2012-09-10 13:39:19","update_ts":"2012-09-10 13:39:19"}]'
43
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/list?method=fetchAll", :body => all_lists, :content_type => "application/json")
11
+ config.before(:all) do
12
+ EmailCenterApi.config_path = File.dirname(__FILE__) + "/support/fake_config.yml"
13
+ end
44
14
 
45
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/list?method=find&listId=25", :body => "{\"list_id\":\"25\",\"folder_id\":\"9\",\"name\":\"testunsub\",\"list_total\":\"2\",\"status\":\"available\",\"type\":\"suppression\",\"created_ts\":\"2012-09-10 13:39:19\",\"update_ts\":\"2012-09-12 10:23:20\"}", :content_type => "application/json")
46
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/list?method=find&listId=26", :body => "{\"list_id\":\"26\",\"folder_id\":\"9\",\"name\":\"tunsublist\",\"list_total\":\"2\",\"status\":\"available\",\"type\":\"something\",\"created_ts\":\"2012-09-10 13:39:19\",\"update_ts\":\"2012-09-12 10:23:20\"}", :content_type => "application/json")
15
+ end
16
+
17
+ FakeWeb.allow_net_connect = false
47
18
 
48
- FakeWeb.register_uri(:get, "https://test:test@maxemail.emailcenteruk.com/api/json/recipient?emailAddress=test%40example.co.uk&method=findByEmailAddress", :body => "1234")
19
+ Dir['spec/fake_web_helpers/*.rb'].each { |f| require f }
@@ -0,0 +1,3 @@
1
+ base_uri: 'https://maxemail.emailcenteruk.com/api/json/'
2
+ username: test
3
+ password: test
metadata CHANGED
@@ -1,161 +1,175 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: email_center_api
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ed Robinson
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-09-12 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-11-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: httparty
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 59
29
- segments:
30
- - 0
31
- - 9
32
- - 0
33
- version: 0.9.0
20
+ - !ruby/object:Gem::Version
21
+ version: 0.11.0
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: json
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.11.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
34
+ requirements:
42
35
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 1
45
- segments:
46
- - 1
47
- - 7
48
- - 5
36
+ - !ruby/object:Gem::Version
49
37
  version: 1.7.5
50
38
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: fakeweb
54
39
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
56
41
  none: false
57
- requirements:
42
+ requirements:
58
43
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 27
61
- segments:
62
- - 1
63
- - 3
64
- - 0
44
+ - !ruby/object:Gem::Version
45
+ version: 1.7.5
46
+ - !ruby/object:Gem::Dependency
47
+ name: fakeweb
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
65
53
  version: 1.3.0
66
54
  type: :development
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: rspec
70
55
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
72
57
  none: false
73
- requirements:
58
+ requirements:
74
59
  - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 35
77
- segments:
78
- - 2
79
- - 11
80
- - 0
81
- version: 2.11.0
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.14.0
82
70
  type: :development
83
- version_requirements: *id004
84
- - !ruby/object:Gem::Dependency
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.14.0
78
+ - !ruby/object:Gem::Dependency
85
79
  name: pry
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
86
87
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: pry-debugger
96
+ requirement: !ruby/object:Gem::Requirement
88
97
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
96
102
  type: :development
97
- version_requirements: *id005
98
- description: " A RubyGem That wraps EmailCenter's maxemail JSON Api "
99
- email: ed.robinson@reevoo.com
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: A RubyGem That wraps EmailCenter's maxemail JSON Api
111
+ email: !binary |-
112
+ ZWQucm9iaW5zb25AcmVldm9vLmNvbQ==
100
113
  executables: []
101
-
102
114
  extensions: []
103
-
104
115
  extra_rdoc_files: []
105
-
106
- files:
116
+ files:
107
117
  - .gitignore
108
118
  - Gemfile
109
119
  - LICENSE.txt
110
120
  - README.md
111
121
  - Rakefile
122
+ - config/email_center_api.example.yml
112
123
  - email_center_api.gemspec
113
124
  - lib/email_center_api.rb
114
- - lib/email_center_api/base.rb
115
- - lib/email_center_api/configuration.rb
116
- - lib/email_center_api/list.rb
117
- - lib/email_center_api/recipient.rb
125
+ - lib/email_center_api/actions.rb
126
+ - lib/email_center_api/http_client.rb
127
+ - lib/email_center_api/nodes/email_node.rb
128
+ - lib/email_center_api/nodes/template_node.rb
129
+ - lib/email_center_api/query.rb
130
+ - lib/email_center_api/response_validator.rb
118
131
  - lib/email_center_api/version.rb
119
- - spec/configuration_spec.rb
120
- - spec/list_spec.rb
121
- - spec/recipient_spec.rb
132
+ - spec/fake_web_helpers/email.rb
133
+ - spec/fake_web_helpers/template.rb
134
+ - spec/features/triggering_an_email_to_send_spec.rb
135
+ - spec/http_client_spec.rb
136
+ - spec/nodes/email_node_spec.rb
137
+ - spec/nodes/template_node_spec.rb
138
+ - spec/response_validator_spec.rb
122
139
  - spec/spec_helper.rb
140
+ - spec/support/fake_config.yml
123
141
  homepage: https://github.com/reevoo/email_center_api
124
142
  licenses: []
125
-
126
143
  post_install_message:
127
144
  rdoc_options: []
128
-
129
- require_paths:
145
+ require_paths:
130
146
  - lib
131
- required_ruby_version: !ruby/object:Gem::Requirement
147
+ required_ruby_version: !ruby/object:Gem::Requirement
132
148
  none: false
133
- requirements:
134
- - - ">="
135
- - !ruby/object:Gem::Version
136
- hash: 3
137
- segments:
138
- - 0
139
- version: "0"
140
- required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
154
  none: false
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 0
148
- version: "0"
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
149
159
  requirements: []
150
-
151
160
  rubyforge_project:
152
- rubygems_version: 1.8.24
161
+ rubygems_version: 1.8.25
153
162
  signing_key:
154
163
  specification_version: 3
155
164
  summary: A RubyGem That wraps EmailCenter's maxemail JSON Api
156
- test_files:
157
- - spec/configuration_spec.rb
158
- - spec/list_spec.rb
159
- - spec/recipient_spec.rb
165
+ test_files:
166
+ - spec/fake_web_helpers/email.rb
167
+ - spec/fake_web_helpers/template.rb
168
+ - spec/features/triggering_an_email_to_send_spec.rb
169
+ - spec/http_client_spec.rb
170
+ - spec/nodes/email_node_spec.rb
171
+ - spec/nodes/template_node_spec.rb
172
+ - spec/response_validator_spec.rb
160
173
  - spec/spec_helper.rb
174
+ - spec/support/fake_config.yml
161
175
  has_rdoc: