streamsend 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +1 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile.lock +17 -16
  6. data/Rakefile +8 -1
  7. data/config/.keep +0 -0
  8. data/lib/streamsend/api/base/create.rb +2 -0
  9. data/lib/streamsend/api/base/index.rb +2 -0
  10. data/lib/streamsend/api/exception.rb +3 -0
  11. data/lib/streamsend/api/person.rb +31 -8
  12. data/lib/streamsend/version.rb +1 -1
  13. data/spec/lib/streamsend/api/integration/email_spec.rb +1 -1
  14. data/spec/lib/streamsend/api/integration/from_email_address_spec.rb +2 -1
  15. data/spec/lib/streamsend/api/integration/import_spec.rb +1 -1
  16. data/spec/lib/streamsend/api/integration/person_spec.rb +75 -14
  17. data/spec/lib/streamsend/api/integration/upload_spec.rb +1 -0
  18. data/spec/lib/streamsend/api/unit/base/create_spec.rb +7 -4
  19. data/spec/lib/streamsend/api/unit/base/index_spec.rb +10 -5
  20. data/spec/lib/streamsend/api/unit/base/show_spec.rb +10 -5
  21. data/spec/lib/streamsend/api/unit/base/update_spec.rb +0 -5
  22. data/spec/lib/streamsend/api/unit/blast_spec.rb +3 -4
  23. data/spec/lib/streamsend/api/unit/bounce_spec.rb +3 -3
  24. data/spec/lib/streamsend/api/unit/click_spec.rb +2 -2
  25. data/spec/lib/streamsend/api/unit/field_option_spec.rb +3 -5
  26. data/spec/lib/streamsend/api/unit/link_spec.rb +3 -2
  27. data/spec/lib/streamsend/api/unit/list_spec.rb +4 -2
  28. data/spec/lib/streamsend/api/unit/membership_spec.rb +3 -3
  29. data/spec/lib/streamsend/api/unit/person_spec.rb +14 -19
  30. data/spec/lib/streamsend/api/unit/session_spec.rb +1 -0
  31. data/spec/lib/streamsend/api/unit/unsubscribe_spec.rb +2 -2
  32. data/spec/lib/streamsend/api/unit/user_spec.rb +4 -4
  33. data/streamsend.gemspec +3 -2
  34. metadata +135 -144
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZWU3MmE4MDU0OGZiMTE3NjUzMWNmZDU0NDI1YzA5NjlmOGJlNjFjYQ==
5
+ data.tar.gz: !binary |-
6
+ NTE5MTQ4OTNmOGUwNzVlN2RhOGY1MWZmNzVmYjM0NDNhZTczOTg5ZA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZTFiODlkNDVkN2RkZjhjZjJjYjk5MzY1ZTQ1ZWQzZTg4MzQzODdlYWMxNmM2
10
+ NDBlZDY3OTljZTkzOTI3OGRkM2I4ZWMxYzAyMWE1ZGI5YzAxMjZmM2M0MjBh
11
+ OTc3ZjkyMGRhMTA4ZjA1ZDI5YThjOGRkYjY1YTA2ZDZjMjVmMmQ=
12
+ data.tar.gz: !binary |-
13
+ ZTVmMGZiOTMwYjM5NDU2MWFjYzU1ODFhNmQ1OThmN2M1ZmQ2NDIxYTAyMzgx
14
+ ZmQ5YjhjYzFmZmJjY2MyZmFmYjM3MmI3NjhhMGMyYjFhZjQzMjk3MjVkMTQ5
15
+ NTc4MTUwZmU3MmQ0YTUxOTdhYzNjMThiMzNkNTBiOTljM2IwMzE=
data/.gitignore CHANGED
@@ -11,6 +11,7 @@ spec/reports
11
11
  test/tmp
12
12
  test/version_tmp
13
13
  tmp
14
+ config/streamsend-ruby.yml
14
15
 
15
16
  # YARD artifacts
16
17
  .yardoc
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ streamsend-ruby
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3-p448
data/Gemfile.lock CHANGED
@@ -15,24 +15,29 @@ GEM
15
15
  addressable (2.3.5)
16
16
  builder (3.2.2)
17
17
  columnize (0.3.6)
18
- crack (0.4.0)
18
+ crack (0.4.1)
19
19
  safe_yaml (~> 0.9.0)
20
+ debugger (1.6.2)
21
+ columnize (>= 0.3.1)
22
+ debugger-linecache (~> 1.2.0)
23
+ debugger-ruby_core_source (~> 1.2.3)
24
+ debugger-linecache (1.2.0)
25
+ debugger-ruby_core_source (1.2.3)
20
26
  diff-lcs (1.2.4)
21
27
  git-commit-story (0.1.5)
22
28
  httmultiparty (0.3.10)
23
29
  httparty (>= 0.7.3)
24
30
  multipart-post
25
- httparty (0.11.0)
26
- multi_json (~> 1.0)
31
+ httparty (0.12.0)
32
+ json (~> 1.8)
27
33
  multi_xml (>= 0.5.2)
28
34
  i18n (0.6.5)
29
- linecache (0.46)
30
- rbx-require-relative (> 0.0.4)
31
- multi_json (1.8.1)
35
+ json (1.8.0)
36
+ multi_json (1.8.2)
32
37
  multi_xml (0.5.5)
33
38
  multipart-post (1.2.0)
34
39
  pair-salad (0.1.1)
35
- rbx-require-relative (0.0.9)
40
+ rake (10.1.0)
36
41
  rspec (2.14.1)
37
42
  rspec-core (~> 2.14.0)
38
43
  rspec-expectations (~> 2.14.0)
@@ -41,13 +46,8 @@ GEM
41
46
  rspec-expectations (2.14.3)
42
47
  diff-lcs (>= 1.1.3, < 2.0)
43
48
  rspec-mocks (2.14.3)
44
- ruby-debug (0.10.4)
45
- columnize (>= 0.1)
46
- ruby-debug-base (~> 0.10.4.0)
47
- ruby-debug-base (0.10.4)
48
- linecache (>= 0.3)
49
- safe_yaml (0.9.3)
50
- webmock (1.12.3)
49
+ safe_yaml (0.9.7)
50
+ webmock (1.15.0)
51
51
  addressable (>= 2.2.7)
52
52
  crack (>= 0.3.2)
53
53
 
@@ -55,9 +55,10 @@ PLATFORMS
55
55
  ruby
56
56
 
57
57
  DEPENDENCIES
58
+ debugger
58
59
  git-commit-story
59
60
  pair-salad
61
+ rake
60
62
  rspec
61
- ruby-debug
62
63
  streamsend!
63
- webmock (~> 1.6)
64
+ webmock
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
- require 'bundler/gem_tasks'
1
+ require "bundler/gem_tasks"
2
+ require "bundler/setup"
3
+ require "rspec"
4
+ require "rspec/core/rake_task"
5
+
6
+ task :default => ["spec"]
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
data/config/.keep ADDED
File without changes
@@ -8,6 +8,8 @@ module StreamSend
8
8
  case response.code
9
9
  when 201
10
10
  response.headers["location"].split("/").last.to_i
11
+ when 401
12
+ raise StreamSend::Api::UnauthorizedException
11
13
  when 422
12
14
  raise StreamSend::Api::SemanticException.new(response["errors"]["error"])
13
15
  else
@@ -8,6 +8,8 @@ module StreamSend
8
8
  case response.code
9
9
  when 200
10
10
  response.parsed_response[namespace].collect { |data| StreamSend::Api::Result.new(data) }
11
+ when 401
12
+ raise StreamSend::Api::UnauthorizedException.new("Please check your credentials and host: " + session.base_uri)
11
13
  else
12
14
  raise StreamSend::Api::Exception.new("Could not find any #{namespace}. (#{response.code})")
13
15
  end
@@ -25,5 +25,8 @@ module StreamSend
25
25
 
26
26
  class UnexpectedResponse < ApiException
27
27
  end
28
+
29
+ class UnauthorizedException < ApiException
30
+ end
28
31
  end
29
32
  end
@@ -14,17 +14,40 @@ module StreamSend
14
14
  end
15
15
 
16
16
  class Index < StreamSend::Api::Call::AudienceIndex
17
- def execute(email_address = nil, tracking_hash = nil, options = {})
18
- @email_address = email_address
19
- @tracking_hash = tracking_hash
20
- super(options)
17
+ def execute(list_id = nil, index_options = {})
18
+ @list_id = list_id
19
+ super(index_options)
21
20
  end
22
21
 
23
22
  def uri
24
- full_uri = super << paging_query_string
25
- full_uri << "&email_address=#{@email_address}" if @email_address
26
- full_uri << "&tracking_hash=#{@tracking_hash}" if @tracking_hash
27
- full_uri
23
+ return "#{base_audience_only}/lists/#{@list_id}/people.xml" if @list_id
24
+ "#{super}#{paging_query_string}"
25
+ end
26
+ end
27
+
28
+ class EmailAddress < StreamSend::Api::Call::AudienceIndex
29
+ def execute(email_address, owner_id = nil, index_options = {})
30
+ index_options.merge!(:query => { :email_address => email_address })
31
+ index_options[:query][:owner_id] = owner_id if owner_id
32
+ super(index_options)
33
+ end
34
+ end
35
+
36
+ class TrackingHash < StreamSend::Api::Call::AudienceIndex
37
+ def execute(tracking_hash, index_options = {})
38
+ index_options.merge!(:query => { :tracking_hash => tracking_hash })
39
+ super(index_options)
40
+ end
41
+ end
42
+
43
+ class Owner < StreamSend::Api::Call::AudienceIndex
44
+ def execute(owner_id, index_options = {})
45
+ index_options.merge!(:query => { :owner_id => owner_id })
46
+ super(index_options)
47
+ end
48
+
49
+ def uri
50
+ "#{super}#{paging_query_string}"
28
51
  end
29
52
  end
30
53
 
@@ -1,3 +1,3 @@
1
1
  module StreamSend
2
- VERSION = "1.0.0.rc1"
2
+ VERSION = "1.0.0.rc2"
3
3
  end
@@ -17,7 +17,7 @@ module StreamSend
17
17
 
18
18
  describe Index do
19
19
  it "returns an array of emails" do
20
- pending "This is a resource hog right now -- returns everything"
20
+ # pending "This is a resource hog right now -- returns everything"
21
21
  indexer = Index.new(session)
22
22
  emails = indexer.execute
23
23
  expect(emails.count).to be > 0
@@ -5,7 +5,8 @@ module StreamSend
5
5
  module FromEmailAddress
6
6
  describe "FromEmailAddress calls" do
7
7
  let(:session){ StreamSend::Api::Session.new() }
8
- let(:email_hash){ { :from_email_address => { :email_address => "testing+#{DateTime.now.to_i.to_s}@badd.address" } } }
8
+ let(:randomish){ DateTime.now.to_i.to_s }
9
+ let(:email_hash){ { :from_email_address => { :email_address => "testing+#{randomish}@badd.address" } } }
9
10
 
10
11
  before do
11
12
  WebMock.disable!
@@ -1,5 +1,5 @@
1
1
  require "spec_helper"
2
- require "spec/lib/streamsend/api/integration/helpers"
2
+ require "lib/streamsend/api/integration/helpers"
3
3
 
4
4
  module StreamSend
5
5
  module Api
@@ -5,6 +5,9 @@ module StreamSend
5
5
  module Person
6
6
  describe "Person calls" do
7
7
  let(:session){ StreamSend::Api::Session.new() }
8
+ let(:creator){ Create.new(session) }
9
+ let(:indexer){ Index.new(session) }
10
+ let(:shower){ Show.new(session) }
8
11
  let(:randomish){ DateTime.now.to_i.to_s }
9
12
  let(:person_hash){ { :person => { :email_address => "joe+#{randomish}@some.place" } } }
10
13
 
@@ -16,17 +19,71 @@ module StreamSend
16
19
  WebMock.enable!
17
20
  end
18
21
 
22
+ describe Create do
23
+ context "with valid email address" do
24
+ it "returns the created person's id" do
25
+ id = creator.execute(person_hash)
26
+ expect(id).to be > 0
27
+ end
28
+ end
29
+
30
+ context "with invalid email address" do
31
+ let(:bogus_email){ { :person => { :email_address => "bogus" } } }
32
+
33
+ it "receives a SemanticException" do
34
+ expect do
35
+ creator.execute(bogus_email)
36
+ end.to raise_error ::StreamSend::Api::SemanticException
37
+ end
38
+ end
39
+ end
40
+
19
41
  describe Index do
20
42
  it "returns an array of people" do
21
- creator = Create.new(session)
22
43
  id = creator.execute(person_hash)
23
44
 
24
- indexer = Index.new(session)
25
45
  people = indexer.execute
26
46
  expect(people.count).to be > 0
27
47
 
28
- # destroyer = Destroy.new(session)
29
- # destroyer.execute(id)
48
+ destroyer = Destroy.new(session)
49
+ destroyer.execute(id)
50
+ end
51
+
52
+ it "returns an index by email address" do
53
+ id = creator.execute(person_hash)
54
+ emailer = EmailAddress.new(session)
55
+ results = emailer.execute(person_hash[:person][:email_address])
56
+ expect(results.count).to be > 0
57
+ end
58
+
59
+ it "returns an index by email address and owner id" do
60
+ # pending "Owner is not accessible via API -- relies on owner fixture in account"
61
+ owner_id = "ID 1373999841"
62
+ person_hash[:person][:owner_id] = owner_id
63
+ id = creator.execute(person_hash)
64
+ person = shower.execute(id)
65
+ emailer = EmailAddress.new(session)
66
+ results = emailer.execute(person_hash[:person][:email_address], owner_id)
67
+ expect(results.count).to be > 0
68
+ end
69
+
70
+ it "returns an index by tracking hash" do
71
+ id = creator.execute(person_hash)
72
+ person = shower.execute(id)
73
+ tracker = TrackingHash.new(session)
74
+ results = tracker.execute(person.tracking_hash)
75
+ expect(results.count).to be > 0
76
+ end
77
+
78
+ it "returns an index by owner id" do
79
+ # pending "Owner is not accessible via API -- relies on owner fixture in account"
80
+ owner_id = "ID 1373999841"
81
+ person_hash[:person][:owner_id] = owner_id
82
+ id = creator.execute(person_hash)
83
+ person = shower.execute(id)
84
+ owner_index = Owner.new(session)
85
+ people = owner_index.execute(owner_id)
86
+ expect(people.count).to be > 0
30
87
  end
31
88
  end
32
89
 
@@ -56,7 +113,6 @@ module StreamSend
56
113
 
57
114
  describe Activate do
58
115
  it "activates a new user" do
59
- creator = Create.new(session)
60
116
  id = creator.execute(person_hash)
61
117
  activator = Activate.new(session)
62
118
  expect(activator.execute(id).code).to eq(200)
@@ -76,16 +132,13 @@ module StreamSend
76
132
 
77
133
  describe Show do
78
134
  it "returns a person by id" do
79
- creator = Create.new(session)
80
135
  id = creator.execute(person_hash)
81
-
82
- shower = Show.new(session)
83
136
  person = shower.execute(id)
84
137
  expect(person.email_address).to eq(person_hash[:person][:email_address])
85
138
  expect(person.id).to eq(id)
86
139
 
87
- # destroyer = Destroy.new(session)
88
- # destroyer.execute(id)
140
+ destroyer = Destroy.new(session)
141
+ destroyer.execute(id)
89
142
  end
90
143
  end
91
144
 
@@ -94,7 +147,6 @@ module StreamSend
94
147
  creator = Create.new(session)
95
148
  id = creator.execute(person_hash)
96
149
 
97
- shower = Show.new(session)
98
150
  person = shower.execute(id)
99
151
  person.email_address = "me+#{randomish}@you.too"
100
152
  updater = Update.new(session)
@@ -103,14 +155,23 @@ module StreamSend
103
155
  expect(person_updated.email_address).to eq(person_hash[:person][:email_address])
104
156
  expect(person_updated.id).to eq(id)
105
157
 
106
- # destroyer = Destroy.new(session)
107
- # destroyer.execute(id)
158
+ destroyer = Destroy.new(session)
159
+ destroyer.execute(id)
108
160
  end
109
161
  end
110
162
 
111
163
  describe Destroy do
112
164
  it "removes the specified person" do
113
- pending "Destory not enabled for this account."
165
+ creator = Create.new(session)
166
+ id = creator.execute(person_hash)
167
+
168
+ destroyer = Destroy.new(session)
169
+ destroyer.execute(id)
170
+
171
+ expect do
172
+ shower = Show.new(session)
173
+ person = shower.execute(id)
174
+ end.to raise_exception(StreamSend::Api::Exception, "Could not find any people with the specified id. (404)")
114
175
  end
115
176
  end
116
177
  end
@@ -1,4 +1,5 @@
1
1
  require "spec_helper"
2
+ require "lib/streamsend/api/integration/helpers"
2
3
 
3
4
  module StreamSend
4
5
  module Api
@@ -8,16 +8,21 @@ module StreamSend
8
8
  let(:session){ StreamSend::Api::Session.new("test", "password", "http://default.base") }
9
9
  let(:creator){ Create.new(session) }
10
10
 
11
+ it "Recognized unauthorized exceptions" do
12
+ stub_request(:post, "http://test:password@default.base/calls.xml").to_return(:status => 401, :body => "" )
13
+ expect do
14
+ creator.execute({})
15
+ end.to raise_error(UnauthorizedException)
16
+ end
17
+
11
18
  it "parses the header to return the id of the object" do
12
19
  stub_request(:post, "http://test:password@default.base/calls.xml").
13
- with(:body => "name=testing&id=123").
14
20
  to_return(:status => 201, :body => "", :headers => {'Location' => 'something/something/101'})
15
21
  expect(creator.execute(obj_hash)).to eq(101)
16
22
  end
17
23
 
18
24
  it "builds an error message with the namespace name if the status is not a 200" do
19
25
  stub_request(:post, "http://test:password@default.base/calls.xml").
20
- with(:body => "name=testing&id=123").
21
26
  to_return(:status => 404, :body => "")
22
27
  expect do
23
28
  creator.execute(obj_hash)
@@ -41,7 +46,6 @@ module StreamSend
41
46
  XML
42
47
  stub_request(:get, "http://test:password@default.base/audiences.xml").to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
43
48
  stub_request(:post, "http://test:password@default.base/audiences/1/calls.xml").
44
- with(:body => "name=testing&id=123").
45
49
  to_return(:status => 201, :body => "", :headers => {'Location' => 'something/something/101'})
46
50
  creator.execute(obj_hash)
47
51
  expect(creator.uri).to eq("http://default.base/audiences/1/calls.xml")
@@ -56,7 +60,6 @@ module StreamSend
56
60
 
57
61
  it "overrides uri and provides a blast uri" do
58
62
  stub_request(:post, "http://test:password@default.base/blasts/1234/calls.xml").
59
- with(:body => "name=testing&id=123").
60
63
  to_return(:status => 201, :body => "", :headers => {'Location' => 'something/something/101'})
61
64
  creator.execute(blast_id, obj_hash)
62
65
  expect(creator.uri).to eq("http://default.base/blasts/1234/calls.xml")
@@ -11,7 +11,8 @@ module StreamSend
11
11
 
12
12
  describe "Uris" do
13
13
  before do
14
- stub_request(:get, "http://test:password@default.base/calls.xml").to_return(:status => 200, :body => xml, :headers => {})
14
+ stub_request(:get, "http://test:password@default.base/calls.xml").
15
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
15
16
  end
16
17
 
17
18
  it "builds a index uri" do
@@ -34,7 +35,8 @@ module StreamSend
34
35
 
35
36
  describe "#execute" do
36
37
  it "creates an array of Result objects" do
37
- stub_request(:get, "http://test:password@default.base/calls.xml").to_return(:status => 200, :body => xml, :headers => {'Content-type' => 'application/xml'})
38
+ stub_request(:get, "http://test:password@default.base/calls.xml").
39
+ to_return(:status => 200, :body => xml, :headers => {'Content-type' => 'application/xml'})
38
40
  expect(indexer.execute[0].test).to eq(1)
39
41
  end
40
42
 
@@ -61,8 +63,10 @@ module StreamSend
61
63
  </audience>
62
64
  </audiences>
63
65
  XML
64
- stub_request(:get, "http://test:password@default.base/audiences.xml").to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
65
- stub_request(:get, "http://test:password@default.base/audiences/1/calls.xml").to_return(:status => 200, :body => call_xml, :headers => {})
66
+ stub_request(:get, "http://test:password@default.base/audiences.xml").
67
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
68
+ stub_request(:get, "http://test:password@default.base/audiences/1/calls.xml").
69
+ to_return(:status => 200, :body => call_xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
66
70
  indexer.execute
67
71
  expect(indexer.uri).to eq("http://default.base/audiences/1/calls.xml")
68
72
  end
@@ -75,7 +79,8 @@ module StreamSend
75
79
  let(:blast_id){ 1432 }
76
80
 
77
81
  it "overrides uri and returns a uri based on the provided blast_id and appends paging" do
78
- stub_request(:get, "http://test:password@default.base/blasts/1432/calls.xml?page=1&per_page=100").to_return(:status => 200, :body => xml, :headers => {})
82
+ stub_request(:get, "http://test:password@default.base/blasts/1432/calls.xml?page=1&per_page=100").
83
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
79
84
  indexer.execute(blast_id)
80
85
  expect(indexer.uri).to eq("http://default.base/blasts/1432/calls.xml?page=1&per_page=100")
81
86
  end
@@ -10,19 +10,22 @@ module StreamSend
10
10
  let(:xml){ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><call><test type=\"integer\">1</test></call>" }
11
11
 
12
12
  it "returns a Result object if the object is found" do
13
- stub_request(:get, "http://test:password@default.base/calls/1.xml").to_return(:status => 200, :body => xml, :headers => {"Content-type" => "text/xml"})
13
+ stub_request(:get, "http://test:password@default.base/calls/1.xml").
14
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
14
15
  expect(shower.execute(id).test).to eq(1)
15
16
  end
16
17
 
17
18
  it "throws an exception if the object is not found" do
18
- stub_request(:get, "http://test:password@default.base/calls/1.xml").to_return(:status => 404, :body => xml, :headers => {})
19
+ stub_request(:get, "http://test:password@default.base/calls/1.xml").
20
+ to_return(:status => 404, :body => xml, :headers => {})
19
21
  expect do
20
22
  shower.execute(id)
21
23
  end.to raise_error(StreamSend::Api::Exception, "Could not find any calls with the specified id. (404)")
22
24
  end
23
25
 
24
26
  it "creates a uri including the specified id" do
25
- stub_request(:get, "http://test:password@default.base/calls/1.xml").to_return(:status => 200, :body => xml, :headers => {})
27
+ stub_request(:get, "http://test:password@default.base/calls/1.xml").
28
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
26
29
  shower.execute(id)
27
30
  expect(shower.uri).to eq("http://default.base/calls/1.xml")
28
31
  end
@@ -44,7 +47,8 @@ module StreamSend
44
47
  </audiences>
45
48
  XML
46
49
  stub_request(:get, "http://test:password@default.base/audiences.xml").to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
47
- stub_request(:get, "http://test:password@default.base/audiences/1/calls/1.xml").to_return(:status => 200, :body => call_xml, :headers => {})
50
+ stub_request(:get, "http://test:password@default.base/audiences/1/calls/1.xml").
51
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
48
52
  shower.execute(id)
49
53
  expect(shower.uri).to eq("http://default.base/audiences/1/calls/1.xml")
50
54
  end
@@ -58,7 +62,8 @@ module StreamSend
58
62
  let(:blast_id){ 55 }
59
63
 
60
64
  it "creates a uri using the blast id provided" do
61
- stub_request(:get, "http://test:password@default.base/blasts/55/calls/4321.xml").to_return(:status => 200, :body => xml, :headers => {})
65
+ stub_request(:get, "http://test:password@default.base/blasts/55/calls/4321.xml").
66
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
62
67
  shower.execute(blast_id, id)
63
68
  expect(shower.uri).to eq("http://default.base/blasts/55/calls/4321.xml")
64
69
  end
@@ -11,21 +11,18 @@ module StreamSend
11
11
 
12
12
  it "returns true when the object is updated successfully" do
13
13
  stub_request(:put, "http://test:password@default.base/calls/123.xml").
14
- with(:body => "name=testing&id=123").
15
14
  to_return(:status => 200, :body => "", :headers => {})
16
15
  expect(updater.execute(id, obj_hash)).to eq(true)
17
16
  end
18
17
 
19
18
  it "returns true when the object is updated successfully" do
20
19
  stub_request(:put, "http://test:password@default.base/calls/123.xml").
21
- with(:body => "name=testing&id=123").
22
20
  to_return(:status => 404, :body => "", :headers => {})
23
21
  expect(updater.execute(id, obj_hash)).to eq(false)
24
22
  end
25
23
 
26
24
  it "creates a uri for updating using the id" do
27
25
  stub_request(:put, "http://test:password@default.base/calls/123.xml").
28
- with(:body => "name=testing&id=123").
29
26
  to_return(:status => 200, :body => "", :headers => {})
30
27
  updater.execute(id, obj_hash)
31
28
  expect(updater.uri).to eq("http://default.base/calls/123.xml")
@@ -49,7 +46,6 @@ module StreamSend
49
46
  XML
50
47
  stub_request(:get, "http://test:password@default.base/audiences.xml").to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
51
48
  stub_request(:put, "http://test:password@default.base/audiences/1/calls/123.xml").
52
- with(:body => "name=testing&id=123").
53
49
  to_return(:status => 200, :body => "", :headers => {})
54
50
  updater.execute(id, obj_hash)
55
51
  expect(updater.uri).to eq("http://default.base/audiences/1/calls/123.xml")
@@ -65,7 +61,6 @@ module StreamSend
65
61
 
66
62
  it "overrides uri and provides a blast uri" do
67
63
  stub_request(:put, "http://test:password@default.base/blasts/1234/calls/123.xml").
68
- with(:body => "name=testing&id=123").
69
64
  to_return(:status => 200, :body => "", :headers => {})
70
65
  updater.execute(blast_id, id, obj_hash)
71
66
  expect(updater.uri).to eq("http://default.base/blasts/1234/calls/123.xml")
@@ -13,7 +13,7 @@ module StreamSend
13
13
  it "returns the scheduled blast uri" do
14
14
  session.stub(:audience_id).and_return(1)
15
15
  stub_request(:get, "http://test:password@default.base/audiences/1/blasts.xml?page=1&per_page=100").
16
- to_return(:status => 200, :body => xml, :headers => {})
16
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
17
17
  indexer.execute
18
18
  expect(indexer.uri).to eq("http://default.base/audiences/1/blasts.xml?page=1&per_page=100")
19
19
  end
@@ -25,7 +25,7 @@ module StreamSend
25
25
  before do
26
26
  session.stub(:audience_id).and_return(1)
27
27
  stub_request(:get, "http://test:password@default.base/audiences/1/blasts/scheduled.xml?page=1&per_page=100").
28
- to_return(:status => 200, :body => xml, :headers => {})
28
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
29
29
  scheduler.execute
30
30
  end
31
31
 
@@ -40,7 +40,7 @@ module StreamSend
40
40
  before do
41
41
  session.stub(:audience_id).and_return(1)
42
42
  stub_request(:get, "http://test:password@default.base/audiences/1/blasts/sent.xml?page=1&per_page=100").
43
- to_return(:status => 200, :body => xml, :headers => {})
43
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
44
44
  scheduler.execute
45
45
  end
46
46
 
@@ -56,7 +56,6 @@ module StreamSend
56
56
  before do
57
57
  session.stub(:audience_id).and_return(1)
58
58
  stub_request(:post, "http://test:password@default.base/audiences/1/blasts/test.xml").
59
- with(:body => "name=testing&id=123").
60
59
  to_return(:status => 200, :body => "", :headers => {'Location' => 'something/something/101'})
61
60
  end
62
61
 
@@ -8,13 +8,13 @@ module StreamSend
8
8
  let(:blast_id){ 15 }
9
9
  let(:soft_bounce){ Soft.new(session) }
10
10
  let(:hard_bounce){ Hard.new(session) }
11
- let(:xml){ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bounces type=\"array\"><bounce><test type=\"integer\">1<bounce></bounces>" }
11
+ let(:xml){ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bounces type=\"array\"><bounce><test type=\"integer\">1</test></bounce></bounces>" }
12
12
 
13
13
  before do
14
14
  stub_request(:get, "http://test:password@default.base/blasts/15/bounces/soft.xml?page=1&per_page=100").
15
- to_return(:status => 200, :body => xml, :headers => {})
15
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
16
16
  stub_request(:get, "http://test:password@default.base/blasts/15/bounces/hard.xml?page=1&per_page=100").
17
- to_return(:status => 200, :body => xml, :headers => {})
17
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
18
18
  soft_bounce.execute(blast_id)
19
19
  hard_bounce.execute(blast_id)
20
20
  end
@@ -12,9 +12,9 @@ module StreamSend
12
12
 
13
13
  before do
14
14
  stub_request(:get, "https://test:pass@default.base/blasts/1/links/1/clicks.xml?page=1&per_page=100").
15
- to_return(:status => 200, :body => xml, :headers => {})
15
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
16
16
  stub_request(:get, "https://test:pass@default.base/blasts/1/clicks.xml?page=1&per_page=100").
17
- to_return(:status => 200, :body => xml, :headers => {})
17
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
18
18
  end
19
19
 
20
20
  describe Index do
@@ -17,7 +17,7 @@ module StreamSend
17
17
 
18
18
  before do
19
19
  stub_request(:get, "https://test:pass@default.base/audiences/1/fields/221/options.xml").
20
- to_return(:status => 200, :body => xml, :headers => {})
20
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
21
21
  session.stub(:audience_id).and_return(1)
22
22
  end
23
23
 
@@ -31,7 +31,7 @@ module StreamSend
31
31
  describe Show do
32
32
  it "returns a uri for field option show" do
33
33
  stub_request(:get, "https://test:pass@default.base/audiences/1/fields/221/options/1.xml").
34
- to_return(:status => 200, :body => xml, :headers => {})
34
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
35
35
  shower.execute(field_id, option_id)
36
36
  expect(shower.uri).to eq("https://default.base/audiences/1/fields/221/options/1.xml")
37
37
  end
@@ -40,8 +40,7 @@ module StreamSend
40
40
  describe Update do
41
41
  it "returns a uri for field option update" do
42
42
  stub_request(:put, "https://test:pass@default.base/audiences/1/fields/221/options/1.xml").
43
- with(:body => "name=testing&id=123").
44
- to_return(:status => 200, :body => xml, :headers => {})
43
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
45
44
  updater.execute(field_id, option_id, obj_hash)
46
45
  expect(updater.uri).to eq("https://default.base/audiences/1/fields/221/options/1.xml")
47
46
  end
@@ -50,7 +49,6 @@ module StreamSend
50
49
  describe Create do
51
50
  it "returns a uri for field option create" do
52
51
  stub_request(:post, "https://test:pass@default.base/audiences/1/fields/221/options.xml").
53
- with(:body => "name=testing&id=123").
54
52
  to_return(:status => 201, :body => "", :headers => {'Location' => 'something/something/101'})
55
53
  creator.execute(field_id, obj_hash)
56
54
  expect(creator.uri).to eq("https://default.base/audiences/1/fields/221/options.xml")
@@ -14,7 +14,7 @@ module StreamSend
14
14
  describe Index do
15
15
  it "creates a uri for blast links" do
16
16
  stub_request(:get, "https://test:password@default.base/blasts/1/links.xml?page=1&per_page=100").
17
- to_return(:status => 200, :body => xml, :headers => {})
17
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
18
18
  indexer.execute(blast_id)
19
19
  expect(indexer.uri).to eq("https://default.base/blasts/#{blast_id}/links.xml?page=1&per_page=100")
20
20
  end
@@ -22,7 +22,8 @@ module StreamSend
22
22
 
23
23
  describe Show do
24
24
  it "creates a uri for a specific blast link" do
25
- stub_request(:get, "https://test:password@default.base/blasts/1/links/1.xml").to_return(:status => 200, :body => xml, :headers => {})
25
+ stub_request(:get, "https://test:password@default.base/blasts/1/links/1.xml").
26
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
26
27
  shower.execute(blast_id, link_id)
27
28
  expect(shower.uri).to eq("https://default.base/blasts/#{blast_id}/links/#{link_id}.xml")
28
29
  end
@@ -16,13 +16,15 @@ module StreamSend
16
16
 
17
17
  describe Index do
18
18
  it "creates a uri for lists" do
19
- stub_request(:get, "https://test:password@default.base/audiences/1/lists.xml").to_return(:status => 200, :body => xml, :headers => {})
19
+ stub_request(:get, "https://test:password@default.base/audiences/1/lists.xml").
20
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
20
21
  indexer.execute
21
22
  expect(indexer.uri).to eq("https://default.base/audiences/#{audience_id}/lists.xml")
22
23
  end
23
24
 
24
25
  it "creates a uri for a persons lists" do
25
- stub_request(:get, "https://test:password@default.base/audiences/1/people/543/lists.xml").to_return(:status => 200, :body => xml, :headers => {})
26
+ stub_request(:get, "https://test:password@default.base/audiences/1/people/543/lists.xml").
27
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
26
28
  indexer.execute(person_id)
27
29
  expect(indexer.uri).to eq("https://default.base/audiences/#{audience_id}/people/#{person_id}/lists.xml")
28
30
  end
@@ -18,7 +18,7 @@ module StreamSend
18
18
  describe Index do
19
19
  it "returns a uri for an index of memberships" do
20
20
  stub_request(:get, "https://test:password@default.base/audiences/1/people/123/memberships.xml?page=1&per_page=100").
21
- to_return(:status => 200, :body => xml, :headers => {})
21
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
22
22
  indexer = Index.new(session)
23
23
  indexer.execute(person_id)
24
24
  expect(indexer.uri).to eq("https://default.base/audiences/#{audience_id}/people/#{person_id}/memberships.xml?page=1&per_page=100")
@@ -26,7 +26,7 @@ module StreamSend
26
26
 
27
27
  it "returns a uri for an index of memberships with custom paging" do
28
28
  stub_request(:get, "https://test:password@default.base/audiences/1/people/123/memberships.xml?page=12&per_page=200").
29
- to_return(:status => 200, :body => xml, :headers => {})
29
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
30
30
  indexer = Index.new(session)
31
31
  indexer.execute(person_id, nil, options)
32
32
  expect(indexer.uri).to eq("https://default.base/audiences/#{audience_id}/people/#{person_id}/memberships.xml?page=12&per_page=200")
@@ -34,7 +34,7 @@ module StreamSend
34
34
 
35
35
  it "returns a uri for an index of memberships by list id" do
36
36
  stub_request(:get, "https://test:password@default.base/audiences/1/people/123/lists/456/memberships.xml?page=1&per_page=100").
37
- to_return(:status => 200, :body => xml, :headers => {})
37
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
38
38
  indexer = Index.new(session)
39
39
  indexer.execute(person_id, list_id)
40
40
  expect(indexer.uri).to eq("https://default.base/audiences/#{audience_id}/people/#{person_id}/lists/#{list_id}/memberships.xml?page=1&per_page=100")
@@ -14,45 +14,40 @@ module StreamSend
14
14
  let(:person_id){ 421 }
15
15
  let(:blast_id){ 1 }
16
16
  let(:link_id){ 1 }
17
+ let(:list_id){ 213 }
17
18
 
18
19
  before do
19
20
  session.stub(:audience_id).and_return(audience_id)
20
21
  end
22
+
21
23
  describe Index do
22
24
  it "returns a uri for a person index" do
23
25
  stub_request(:get, "https://test:password@default.base/audiences/1/people.xml?page=1&per_page=100").
24
- to_return(:status => 200, :body => xml, :headers => {})
26
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
25
27
  indexer.execute
26
28
  expect(indexer.uri).to eq("https://default.base/audiences/1/people.xml?page=1&per_page=100")
27
29
  end
28
30
 
29
- it "returns a uri for a person index by email address" do
30
- stub_request(:get, "https://test:password@default.base/audiences/1/people.xml?email_address=myemail@address.none&page=1&per_page=100").
31
- to_return(:status => 200, :body => xml, :headers => {})
32
- indexer.execute("myemail@address.none", nil, {})
33
- expect(indexer.uri).to eq("https://default.base/audiences/1/people.xml?page=1&per_page=100&email_address=myemail@address.none")
34
- end
35
-
36
- it "returns a uri for a person index by tracking hash" do
37
- stub_request(:get, "https://test:password@default.base/audiences/1/people.xml?page=1&per_page=100&tracking_hash=xyz").
38
- to_return(:status => 200, :body => xml, :headers => {})
39
- indexer.execute(nil, "xyz", {})
40
- expect(indexer.uri).to eq("https://default.base/audiences/1/people.xml?page=1&per_page=100&tracking_hash=xyz")
41
- end
42
-
43
31
  it "returns a uri with custom paging" do
44
32
  stub_request(:get, "https://test:password@default.base/audiences/1/people.xml?page=12&per_page=222").
45
- to_return(:status => 200, :body => xml, :headers => {})
46
- indexer.execute(nil, nil, options)
33
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
34
+ indexer.execute(nil, options)
47
35
  expect(indexer.uri).to eq("https://default.base/audiences/1/people.xml?page=12&per_page=222")
48
36
  end
37
+
38
+ it "returns a uri with a scoping by list" do
39
+ stub_request(:get, "https://test:password@default.base/audiences/1/lists/213/people.xml").
40
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
41
+ indexer.execute(list_id, {})
42
+ expect(indexer.uri).to eq("https://default.base/audiences/1/lists/#{list_id}/people.xml")
43
+ end
49
44
  end
50
45
 
51
46
  describe Click do
52
47
  let(:clicker){ StreamSend::Api::Person::Click.new(session) }
53
48
  it "creates a uri for blast click people" do
54
49
  stub_request(:get, "https://test:password@default.base/blasts/1/clicks/people.xml?page=1&per_page=100").
55
- to_return(:status => 200, :body => xml, :headers => {})
50
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
56
51
  clicker.execute(blast_id)
57
52
  expect(clicker.uri).to eq("https://default.base/blasts/#{blast_id}/clicks/people.xml?page=1&per_page=100")
58
53
  end
@@ -73,7 +68,7 @@ module StreamSend
73
68
 
74
69
  it "creates a uri for blast view people" do
75
70
  stub_request(:get, "https://test:password@default.base/blasts/1/views/people.xml?page=1&per_page=100").
76
- to_return(:status => 200, :body => xml, :headers => {})
71
+ to_return(:status => 200, :body => xml, :headers => {"Content-type" => "text/xml"})
77
72
  peopler.execute(blast_id)
78
73
  expect(peopler.uri).to eq("https://default.base/blasts/#{blast_id}/views/people.xml?page=1&per_page=100")
79
74
  end
@@ -6,6 +6,7 @@ module StreamSend
6
6
  let(:session){ Session.new("test", "password", "http://default.base") }
7
7
 
8
8
  it "uses the default base_uri if none is provided" do
9
+ StreamSend::Api::Configuration.stub(:base_uri).and_return nil
9
10
  no_base_session = Session.new("test", "password")
10
11
  expect(no_base_session.base_uri).to eq("http://app.streamsend.com")
11
12
  end
@@ -13,7 +13,7 @@ module StreamSend
13
13
  describe Manual do
14
14
  it "creates a uri for manual blast unsubscribes" do
15
15
  stub_request(:get, "https://test:password@default.base/blasts/231/unsubscribes/manual.xml?page=1&per_page=100").
16
- to_return(:status => 200, :body => xml, :headers => {})
16
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
17
17
  manual.execute(blast_id)
18
18
  expect(manual.uri).to eq("https://default.base/blasts/#{blast_id}/unsubscribes/manual.xml?page=1&per_page=100")
19
19
  end
@@ -22,7 +22,7 @@ module StreamSend
22
22
  describe Complaint do
23
23
  it "creates a uri for complaint blast unsubscribes" do
24
24
  stub_request(:get, "https://test:password@default.base/blasts/231/unsubscribes/complaint.xml?page=1&per_page=100").
25
- to_return(:status => 200, :body => xml, :headers => {})
25
+ to_return(:status => 200, :body => xml, :headers => {'Content-Type' => 'text/xml'})
26
26
  complainer.execute(blast_id)
27
27
  expect(complainer.uri).to eq("https://default.base/blasts/#{blast_id}/unsubscribes/complaint.xml?page=1&per_page=100")
28
28
  end
@@ -20,14 +20,14 @@ module StreamSend
20
20
  describe Index do
21
21
  it "returns a user index uri with account id" do
22
22
  stub_request(:get, "https://test:password@default.base/accounts/543/users.xml").
23
- to_return(:status => 200, :body => xml, :headers => {})
23
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
24
24
  indexer.execute(account_id)
25
25
  expect(indexer.uri).to eq("https://default.base/accounts/543/users.xml")
26
26
  end
27
27
 
28
28
  it "returns a index uri wihtout account id" do
29
29
  stub_request(:get, "https://test:password@default.base/users.xml").
30
- to_return(:status => 200, :body => xml, :headers => {})
30
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
31
31
  indexer.execute()
32
32
  expect(indexer.uri).to eq("https://default.base/users.xml")
33
33
  end
@@ -36,14 +36,14 @@ module StreamSend
36
36
  describe Show do
37
37
  it "returns a user show uri with account id" do
38
38
  stub_request(:get, "https://test:password@default.base/accounts/543/users/12.xml").
39
- to_return(:status => 200, :body => xml, :headers => {})
39
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
40
40
  shower.execute(user_id, account_id)
41
41
  expect(shower.uri).to eq("https://default.base/accounts/543/users/12.xml")
42
42
  end
43
43
 
44
44
  it "returns a show uri wihtout account id" do
45
45
  stub_request(:get, "https://test:password@default.base/users/12.xml").
46
- to_return(:status => 200, :body => xml, :headers => {})
46
+ to_return(:status => 200, :body => xml, headers: { 'Accept' => 'text/xml', 'Content-type' => 'text/xml' })
47
47
  shower.execute(user_id)
48
48
  expect(shower.uri).to eq("https://default.base/users/12.xml")
49
49
  end
data/streamsend.gemspec CHANGED
@@ -14,11 +14,12 @@ Gem::Specification.new do |s|
14
14
  s.add_dependency "httmultiparty"
15
15
  s.add_dependency "activesupport", "~>3.2"
16
16
  s.add_dependency "builder"
17
+ s.add_development_dependency "rake"
17
18
  s.add_development_dependency "rspec"
18
19
  s.add_development_dependency "git-commit-story"
19
- s.add_development_dependency "webmock", "~> 1.6"
20
+ s.add_development_dependency "webmock"
20
21
  s.add_development_dependency "pair-salad"
21
- s.add_development_dependency "ruby-debug"
22
+ s.add_development_dependency "debugger"
22
23
 
23
24
  s.files = `git ls-files`.split("\n")
24
25
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,154 +1,157 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: streamsend
3
- version: !ruby/object:Gem::Version
4
- hash: 2732165157
5
- prerelease: 6
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- - rc
11
- - 1
12
- version: 1.0.0.rc1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc2
13
5
  platform: ruby
14
- authors:
6
+ authors:
15
7
  - Bob Yeo
16
8
  autorequire:
17
9
  bindir: bin
18
10
  cert_chain: []
19
-
20
- date: 2013-10-11 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
11
+ date: 2013-10-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
23
14
  name: httmultiparty
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
34
20
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: activesupport
38
21
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
42
31
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 3
47
- - 2
48
- version: "3.2"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.2'
49
34
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: builder
53
35
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '3.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: builder
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
63
48
  type: :runtime
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: rspec
67
49
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
77
76
  type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: git-commit-story
81
77
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: git-commit-story
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
91
90
  type: :development
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: webmock
95
91
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 1
104
- - 6
105
- version: "1.6"
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: webmock
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
106
104
  type: :development
107
- version_requirements: *id006
108
- - !ruby/object:Gem::Dependency
109
- name: pair-salad
110
105
  prerelease: false
111
- requirement: &id007 !ruby/object:Gem::Requirement
112
- none: false
113
- requirements:
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- hash: 3
117
- segments:
118
- - 0
119
- version: "0"
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pair-salad
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
120
118
  type: :development
121
- version_requirements: *id007
122
- - !ruby/object:Gem::Dependency
123
- name: ruby-debug
124
119
  prerelease: false
125
- requirement: &id008 !ruby/object:Gem::Requirement
126
- none: false
127
- requirements:
128
- - - ">="
129
- - !ruby/object:Gem::Version
130
- hash: 3
131
- segments:
132
- - 0
133
- version: "0"
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: debugger
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
134
132
  type: :development
135
- version_requirements: *id008
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
136
139
  description: Ruby wrapper for the StreamSend API.
137
- email:
140
+ email:
138
141
  - ryeo@ezpublishing.com
139
142
  executables: []
140
-
141
143
  extensions: []
142
-
143
144
  extra_rdoc_files: []
144
-
145
- files:
145
+ files:
146
146
  - .gitignore
147
147
  - .rspec
148
+ - .ruby-gemset
149
+ - .ruby-version
148
150
  - Gemfile
149
151
  - Gemfile.lock
150
152
  - README.md
151
153
  - Rakefile
154
+ - config/.keep
152
155
  - lib/streamsend.rb
153
156
  - lib/streamsend/api/account.rb
154
157
  - lib/streamsend/api/audience.rb
@@ -221,42 +224,30 @@ files:
221
224
  - spec/lib/streamsend/api/unit/user_spec.rb
222
225
  - spec/spec_helper.rb
223
226
  - streamsend.gemspec
224
- homepage: ""
227
+ homepage: ''
225
228
  licenses: []
226
-
229
+ metadata: {}
227
230
  post_install_message:
228
231
  rdoc_options: []
229
-
230
- require_paths:
232
+ require_paths:
231
233
  - lib
232
- required_ruby_version: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - ">="
236
- - !ruby/object:Gem::Version
237
- hash: 3
238
- segments:
239
- - 0
240
- version: "0"
241
- required_rubygems_version: !ruby/object:Gem::Requirement
242
- none: false
243
- requirements:
244
- - - ">"
245
- - !ruby/object:Gem::Version
246
- hash: 25
247
- segments:
248
- - 1
249
- - 3
250
- - 1
234
+ required_ruby_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ! '>='
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ required_rubygems_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ! '>'
242
+ - !ruby/object:Gem::Version
251
243
  version: 1.3.1
252
244
  requirements: []
253
-
254
245
  rubyforge_project:
255
- rubygems_version: 1.8.25
246
+ rubygems_version: 2.1.9
256
247
  signing_key:
257
- specification_version: 3
248
+ specification_version: 4
258
249
  summary: Ruby wrapper for the StreamSend API.
259
- test_files:
250
+ test_files:
260
251
  - spec/lib/streamsend/api/integration/account_spec.rb
261
252
  - spec/lib/streamsend/api/integration/audience_spec.rb
262
253
  - spec/lib/streamsend/api/integration/blast_spec.rb