streamsend 1.0.0.rc11 → 1.0.0.rc13

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamsend (1.0.0.rc11)
4
+ streamsend (1.0.0.rc13)
5
5
  activesupport (~> 3.2)
6
6
  builder
7
7
  httmultiparty
@@ -1,3 +1,5 @@
1
+ require "open-uri"
2
+
1
3
  module StreamSend
2
4
  module Api
3
5
  module Call
@@ -1,3 +1,5 @@
1
+ require "open-uri"
2
+
1
3
  module StreamSend
2
4
  module Api
3
5
  module Call
@@ -1,27 +1,17 @@
1
- require "open-uri"
2
1
 
3
2
  module StreamSend
4
3
  module Api
5
4
  module Owner
6
5
  class Index < StreamSend::Api::Call::Index
7
- def id
8
- URI::encode(@id)
9
- end
10
6
  end
11
7
 
12
8
  class Show < StreamSend::Api::Call::Show
13
- def id
14
- URI::encode(@id)
15
- end
16
9
  end
17
10
 
18
11
  class Update < StreamSend::Api::Call::Update
19
12
  end
20
13
 
21
14
  class Destroy < StreamSend::Api::Call::Destroy
22
- def id
23
- URI::encode(@id)
24
- end
25
15
  end
26
16
 
27
17
  class Create < StreamSend::Api::Call::Create
@@ -1,3 +1,3 @@
1
1
  module StreamSend
2
- VERSION = "1.0.0.rc11"
2
+ VERSION = "1.0.0.rc13"
3
3
  end
@@ -4,17 +4,21 @@ module StreamSend
4
4
  module Api
5
5
  module Owner
6
6
  describe "Owner calls" do
7
+ let(:random_num) { "#{Time.now.to_i}" }
7
8
  let(:session){ StreamSend::Api::Session.new() }
8
- let(:franchise_code) { "IHOP 5" }
9
- let(:owner_hash) { {:owner => {
10
- :name => "Inter House of Pancakes",
11
- :franchise_code => franchise_code,
12
- :street_address_1 => "123 Sesame St",
13
- :city => "Birmingham",
14
- :state => "NC",
15
- :zip => "27613",
16
- :country => "Somalia",
17
- :from_email_address => "donkey@kong.com"} }}
9
+
10
+ let(:franchise_code) { "IHOP 1_#{random_num}" }
11
+ let(:franchise_code2) { "IHOP 2_#{random_num}" }
12
+ let(:franchise_code3) { "IHOP 3_#{random_num}" }
13
+ let(:owner_hash) { {
14
+ :from_name => "Inter House of Pancakes",
15
+ :owner_name => franchise_code,
16
+ :owner_id => franchise_code,
17
+ :from_street_address_1 => "123 Sesame St",
18
+ :from_city => "Birmingham",
19
+ :from_zip => "27613",
20
+ :from_country => "Somalia",
21
+ :from_email_address => "donkey@kong.com"} }
18
22
 
19
23
  before do
20
24
  WebMock.disable!
@@ -24,40 +28,62 @@ module StreamSend
24
28
  WebMock.enable!
25
29
  end
26
30
 
31
+ def create_owners
32
+ creator = StreamSend::Api::Owner::Create.new(session)
33
+ owner_hash2 = owner_hash.clone
34
+ owner_hash2[:owner_name] = franchise_code2
35
+ owner_hash2[:owner_id] = franchise_code2
36
+
37
+ owner_hash3 = owner_hash.clone
38
+ owner_hash3[:owner_name] = franchise_code3
39
+ owner_hash3[:owner_id] = franchise_code3
40
+
41
+ creator.execute({:owner => owner_hash})
42
+ creator.execute({:owner => owner_hash2})
43
+ creator.execute({:owner => owner_hash3})
44
+ end
45
+
46
+ def delete_owners
47
+ destroyer = StreamSend::Api::Owner::Destroy.new(session)
48
+ destroyer.execute(franchise_code)
49
+ destroyer.execute(franchise_code2)
50
+ destroyer.execute(franchise_code3)
51
+ end
52
+
27
53
  describe Index do
28
- context "with pagination" do
54
+ context "without pagination" do
29
55
  it "creates, display, then destroy the owner(s)" do
30
- #create an owner
56
+ create_owners
31
57
  owners = StreamSend::Api::Owner::Index.new(session).execute
32
58
  expect(owners.count).to be > 0
33
- #destroy the created owner
59
+ delete_owners
34
60
  end
35
61
  end
36
62
 
37
- context "without pagination" do
63
+ context "with pagination" do
38
64
  let(:per_page) { 2 }
39
65
 
40
66
  it "creates, display, then destroy the owner(s)" do
41
- #create an owner
67
+ create_owners
42
68
  owners = StreamSend::Api::Owner::Index.new(session).execute(:page =>1, :per_page => per_page)
43
69
  expect(owners.count).to be per_page
44
- #destroy the created owner
70
+ delete_owners
45
71
  end
46
72
  end
47
73
  end
48
74
 
49
75
  describe Show do
50
76
  it "shows a owner by id" do
51
- shower = StreamSend::Api::Owner::Show.new(session)
52
- owner = shower.execute(franchise_code)
77
+ create_owners
78
+ owner = StreamSend::Api::Owner::Show.new(session).execute(franchise_code)
53
79
  expect(owner.owner_id).to eq(franchise_code)
80
+ delete_owners
54
81
  end
55
82
  end
56
83
 
57
84
  describe Destroy do
58
85
  it "deletes an owner by owner id" do
59
- pending
60
- # create an owner
86
+ StreamSend::Api::Owner::Create.new(session).execute({:owner => owner_hash})
61
87
  StreamSend::Api::Owner::Destroy.new(session).execute(franchise_code)
62
88
  expect do
63
89
  StreamSend::Api::Owner::Show.new(session).execute(franchise_code)
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamsend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc11
4
+ version: 1.0.0.rc13
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Bob Yeo
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-01-27 00:00:00.000000000 Z
12
+ date: 2014-02-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: httmultiparty
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: activesupport
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: builder
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rake
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rspec
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: git-commit-story
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: webmock
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ! '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: pair-salad
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ! '>='
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ! '>='
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: debugger
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -230,26 +249,30 @@ files:
230
249
  - streamsend.gemspec
231
250
  homepage: ''
232
251
  licenses: []
233
- metadata: {}
234
252
  post_install_message:
235
253
  rdoc_options: []
236
254
  require_paths:
237
255
  - lib
238
256
  required_ruby_version: !ruby/object:Gem::Requirement
257
+ none: false
239
258
  requirements:
240
259
  - - ! '>='
241
260
  - !ruby/object:Gem::Version
242
261
  version: '0'
262
+ segments:
263
+ - 0
264
+ hash: -40723753296174530
243
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
+ none: false
244
267
  requirements:
245
268
  - - ! '>'
246
269
  - !ruby/object:Gem::Version
247
270
  version: 1.3.1
248
271
  requirements: []
249
272
  rubyforge_project:
250
- rubygems_version: 2.2.1
273
+ rubygems_version: 1.8.23
251
274
  signing_key:
252
- specification_version: 4
275
+ specification_version: 3
253
276
  summary: Ruby wrapper for the StreamSend API.
254
277
  test_files:
255
278
  - spec/lib/streamsend/api/integration/account_spec.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MGRjOGY2NGViMTNmZjY0YWJmMmNiMmZhZmUyNWI3ZjBjNWFiNzQ0Mw==
5
- data.tar.gz: !binary |-
6
- M2I4ZDQzMDk2NGU3MmYxYWIxYjk3MzdjYThiOWQxMzUyYjJiM2ZhMA==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MDQ0MzU4Y2VkYmFmNmQ2OWYyMjVmMTVkMTBjZmJhZGU0NDVhOTU4YWJkNDA0
10
- NjVkNDUwZTE4ZTFmZDU5ZWQ1MDdjOWVmMGEwOTU1NDM1MTc5YjhjMzkwNTZk
11
- ZTNhYTY3YzVkYTAxMTViYmRhNDJjYmI2YmVkNDNkZTQwNTQ5Njc=
12
- data.tar.gz: !binary |-
13
- Njc5YWE0OTQ5MGY3OWJkNGNiMThlMDgwOTUzOWJjYTg1YmZkMTZhOTNmMTRh
14
- MTE3ZDM4OTFmZmY2MTY3MmFiYWY5NGQ2ZjFjODk2MzAwNmYxYzc2YTZiNmJi
15
- NjFkNzkwZmQ3NGMyNGYxZDgwMzk2ZmJhMzFlMGY5MmRlNTVmNjU=