streamsend 1.0.0.rc9 → 1.0.0.rc11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjEzNzYzY2I3YjdhZTY5ZmQ0YTg5ZDk2OTY1ZDBlYzk5M2YwYjZkMw==
4
+ MGRjOGY2NGViMTNmZjY0YWJmMmNiMmZhZmUyNWI3ZjBjNWFiNzQ0Mw==
5
5
  data.tar.gz: !binary |-
6
- M2FiNmEwYTljNzM3NjM1YWRjMmRjNDM2ODEzYTFhNzNhOWMwOThhZg==
6
+ M2I4ZDQzMDk2NGU3MmYxYWIxYjk3MzdjYThiOWQxMzUyYjJiM2ZhMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2FlNjdhYTZhOGYxODJjN2E4ODhhNGU3M2RmZTI5NWJiNzU0ZTg3ZTFmYzYz
10
- Njg0NzAzYWFlZTg1NmYwMWRiZGEzYTRlNDY5MWIxZTRkNmVlZDk1Zjg5Njdk
11
- ZTgzYjkyZWI4ZjZhODk3MmEzYTVmNjRjMGEzZWM2ZTUzMTk3ODk=
9
+ MDQ0MzU4Y2VkYmFmNmQ2OWYyMjVmMTVkMTBjZmJhZGU0NDVhOTU4YWJkNDA0
10
+ NjVkNDUwZTE4ZTFmZDU5ZWQ1MDdjOWVmMGEwOTU1NDM1MTc5YjhjMzkwNTZk
11
+ ZTNhYTY3YzVkYTAxMTViYmRhNDJjYmI2YmVkNDNkZTQwNTQ5Njc=
12
12
  data.tar.gz: !binary |-
13
- YzJmOGMwMTZmZTJhMTA1ZDQ5MDE0YTA0NzJjZDhiMGE2N2IwYmViNTU5ZGY5
14
- YzRlMTc5ZTAzNmE4NGI2ZDM5YmIzZjAzNjFlOWFiMmE5MjAzOGM5NjI4OTk3
15
- ZDQwZTdiMmUxMjhiNzYyZDc0MTBmNjVjZGM0MmQzNDIzNTlmOGY=
13
+ Njc5YWE0OTQ5MGY3OWJkNGNiMThlMDgwOTUzOWJjYTg1YmZkMTZhOTNmMTRh
14
+ MTE3ZDM4OTFmZmY2MTY3MmFiYWY5NGQ2ZjFjODk2MzAwNmYxYzc2YTZiNmJi
15
+ NjFkNzkwZmQ3NGMyNGYxZDgwMzk2ZmJhMzFlMGY5MmRlNTVmNjU=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamsend (1.0.0.rc9)
4
+ streamsend (1.0.0.rc11)
5
5
  activesupport (~> 3.2)
6
6
  builder
7
7
  httmultiparty
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- activesupport (3.2.14)
12
+ activesupport (3.2.15)
13
13
  i18n (~> 0.6, >= 0.6.4)
14
14
  multi_json (~> 1.0)
15
15
  addressable (2.3.5)
@@ -32,7 +32,7 @@ GEM
32
32
  json (~> 1.8)
33
33
  multi_xml (>= 0.5.2)
34
34
  i18n (0.6.5)
35
- json (1.8.0)
35
+ json (1.8.1)
36
36
  multi_json (1.8.2)
37
37
  multi_xml (0.5.5)
38
38
  multipart-post (1.2.0)
@@ -16,7 +16,7 @@ module StreamSend
16
16
  end
17
17
 
18
18
  def uri
19
- "#{base_uri}.xml"
19
+ (@options[:page]) ? "#{base_uri}.xml#{paging_query_string}" : "#{base_uri}.xml"
20
20
  end
21
21
 
22
22
  def paging_query_string
@@ -19,6 +19,9 @@ module StreamSend
19
19
  end
20
20
 
21
21
  class Destroy < StreamSend::Api::Call::Destroy
22
+ def id
23
+ URI::encode(@id)
24
+ end
22
25
  end
23
26
 
24
27
  class Create < StreamSend::Api::Call::Create
@@ -1,3 +1,3 @@
1
1
  module StreamSend
2
- VERSION = "1.0.0.rc9"
2
+ VERSION = "1.0.0.rc11"
3
3
  end
@@ -25,11 +25,24 @@ module StreamSend
25
25
  end
26
26
 
27
27
  describe Index do
28
- it "creates, display, then destroy the owner(s)" do
29
- #create an owner
30
- owners = StreamSend::Api::Owner::Index.new(session).execute
31
- expect(owners.count).to be > 0
32
- #destroy the created owner
28
+ context "with pagination" do
29
+ it "creates, display, then destroy the owner(s)" do
30
+ #create an owner
31
+ owners = StreamSend::Api::Owner::Index.new(session).execute
32
+ expect(owners.count).to be > 0
33
+ #destroy the created owner
34
+ end
35
+ end
36
+
37
+ context "without pagination" do
38
+ let(:per_page) { 2 }
39
+
40
+ it "creates, display, then destroy the owner(s)" do
41
+ #create an owner
42
+ owners = StreamSend::Api::Owner::Index.new(session).execute(:page =>1, :per_page => per_page)
43
+ expect(owners.count).to be per_page
44
+ #destroy the created owner
45
+ end
33
46
  end
34
47
  end
35
48
 
@@ -40,6 +53,17 @@ module StreamSend
40
53
  expect(owner.owner_id).to eq(franchise_code)
41
54
  end
42
55
  end
56
+
57
+ describe Destroy do
58
+ it "deletes an owner by owner id" do
59
+ pending
60
+ # create an owner
61
+ StreamSend::Api::Owner::Destroy.new(session).execute(franchise_code)
62
+ expect do
63
+ StreamSend::Api::Owner::Show.new(session).execute(franchise_code)
64
+ end.to raise_error(StreamSend::Api::Exception, "Could not find any owners with the specified id. (404)")
65
+ end
66
+ end
43
67
  end
44
68
  end
45
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamsend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc9
4
+ version: 1.0.0.rc11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Yeo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-23 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httmultiparty