sipwizard 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +9 -3
- data/Guardfile +6 -5
- data/lib/sipwizard.rb +3 -0
- data/lib/sipwizard/account.rb +101 -0
- data/lib/sipwizard/binding.rb +40 -0
- data/lib/sipwizard/cdr.rb +59 -0
- data/lib/sipwizard/connection.rb +31 -7
- data/lib/sipwizard/customer.rb +81 -0
- data/lib/sipwizard/dial_plan.rb +91 -0
- data/lib/sipwizard/provider.rb +99 -0
- data/lib/sipwizard/provider_binding.rb +53 -0
- data/lib/sipwizard/rate.rb +81 -0
- data/lib/sipwizard/relation.rb +27 -0
- data/lib/sipwizard/version.rb +1 -1
- data/sipwizard.gemspec +6 -4
- data/spec/lib/sipwizard/account_spec.rb +80 -0
- data/spec/lib/sipwizard/binding_spec.rb +22 -0
- data/spec/lib/sipwizard/cdr_spec.rb +21 -0
- data/spec/lib/sipwizard/configuration_spec.rb +1 -1
- data/spec/lib/sipwizard/connection_spec.rb +19 -25
- data/spec/lib/sipwizard/customer_spec.rb +80 -0
- data/spec/lib/sipwizard/dial_plan_spec.rb +95 -0
- data/spec/lib/sipwizard/provider_binding_spec.rb +22 -0
- data/spec/lib/sipwizard/provider_spec.rb +107 -0
- data/spec/lib/sipwizard/rate_spec.rb +83 -0
- data/spec/lib/sipwizard_spec.rb +1 -1
- data/spec/spec.yml.sample +7 -0
- data/spec/spec_helper.rb +32 -9
- data/spec/vcr/sipsorcery/cdr/count.yml +70 -0
- data/spec/vcr/sipsorcery/cdr/get.yml +38 -0
- data/spec/vcr/sipsorcery/customeraccount/add.yml +73 -0
- data/spec/vcr/sipsorcery/customeraccount/count.yml +36 -0
- data/spec/vcr/sipsorcery/customeraccount/delete.yml +36 -0
- data/spec/vcr/sipsorcery/customeraccount/get.yml +36 -0
- data/spec/vcr/sipsorcery/customeraccount/update.yml +38 -0
- data/spec/vcr/sipsorcery/dialplan/add.yml +75 -0
- data/spec/vcr/sipsorcery/dialplan/copy.yml +36 -0
- data/spec/vcr/sipsorcery/dialplan/count.yml +36 -0
- data/spec/vcr/sipsorcery/dialplan/delete.yml +36 -0
- data/spec/vcr/sipsorcery/dialplan/get.yml +37 -0
- data/spec/vcr/sipsorcery/dialplan/update.yml +39 -0
- data/spec/vcr/sipsorcery/rate/add.yml +73 -0
- data/spec/vcr/sipsorcery/rate/count.yml +36 -0
- data/spec/vcr/sipsorcery/rate/delete.yml +36 -0
- data/spec/vcr/sipsorcery/rate/get.yml +36 -0
- data/spec/vcr/sipsorcery/rate/update.yml +38 -0
- data/spec/vcr/sipsorcery/sipaccount/add.yml +74 -0
- data/spec/vcr/sipsorcery/sipaccount/count.yml +36 -0
- data/spec/vcr/sipsorcery/sipaccount/delete.yml +69 -0
- data/spec/vcr/sipsorcery/sipaccount/get.yml +36 -0
- data/spec/vcr/sipsorcery/sipaccount/update.yml +37 -0
- data/spec/vcr/sipsorcery/sipaccountbinding/count.yml +36 -0
- data/spec/vcr/sipsorcery/sipaccountbinding/get.yml +36 -0
- data/spec/vcr/sipsorcery/sipprovider/add.yml +74 -0
- data/spec/vcr/sipsorcery/sipprovider/count.yml +36 -0
- data/spec/vcr/sipsorcery/sipprovider/delete.yml +36 -0
- data/spec/vcr/sipsorcery/sipprovider/get.yml +36 -0
- data/spec/vcr/sipsorcery/sipprovider/update.yml +38 -0
- data/spec/vcr/sipsorcery/sipproviderbinding/count.yml +36 -0
- data/spec/vcr/sipsorcery/sipproviderbinding/get.yml +69 -0
- metadata +129 -6
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.sipsorcery.com/rest/v0.1/provisioning.svc/sipproviderbinding/count
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.9
|
12
|
+
apikey:
|
13
|
+
- <SIPSORCERY_API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
content-length:
|
20
|
+
- '40'
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
server:
|
24
|
+
- Microsoft-IIS/7.0
|
25
|
+
x-powered-by:
|
26
|
+
- ASP.NET
|
27
|
+
date:
|
28
|
+
- Sun, 23 Feb 2014 22:22:03 GMT
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! '{"Error":null,"Result":1234,"Success":true}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Sun, 23 Feb 2014 22:21:58 GMT
|
36
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.sipsorcery.com/rest/v0.1/provisioning.svc/sipproviderbinding/get?where=ID%3D%22<PROVIDER_BINDING_ID>%22&count=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.9
|
12
|
+
apikey:
|
13
|
+
- <SIPSORCERY_API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
content-length:
|
20
|
+
- '529'
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
server:
|
24
|
+
- Microsoft-IIS/7.0
|
25
|
+
x-powered-by:
|
26
|
+
- ASP.NET
|
27
|
+
date:
|
28
|
+
- Sun, 23 Feb 2014 23:34:30 GMT
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! '{"Error":null,"Result":[{"BindingExpiry":123,"BindingURI":"foobar;rinstance=AAABBB","CSeq":12345,"ID":"<PROVIDER_BINDING_ID>","IsRegistered":true,"LastRegisterAttempt":"2014-02-23T23:33:12.7401371","LastRegisterTime":"2014-02-23T23:33:13.0057672","NextRegistrationTime":"2014-02-23T23:43:08.0057672","ProviderID":"<PROVIDER_ID>","ProviderName":"foobar","RegistrarSIPSocket":"udp:superip","RegistrationFailureMessage":null}],"Success":true}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Sun, 23 Feb 2014 23:34:25 GMT
|
36
|
+
- request:
|
37
|
+
method: get
|
38
|
+
uri: https://www.sipsorcery.com/rest/v0.1/provisioning.svc/sipproviderbinding/get?where=ProviderID%3D%22<PROVIDER_ID>%22&count=1
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ''
|
42
|
+
headers:
|
43
|
+
User-Agent:
|
44
|
+
- Faraday v0.8.9
|
45
|
+
apikey:
|
46
|
+
- <SIPSORCERY_API_KEY>
|
47
|
+
response:
|
48
|
+
status:
|
49
|
+
code: 200
|
50
|
+
message:
|
51
|
+
headers:
|
52
|
+
content-length:
|
53
|
+
- '529'
|
54
|
+
content-type:
|
55
|
+
- application/json; charset=utf-8
|
56
|
+
server:
|
57
|
+
- Microsoft-IIS/7.0
|
58
|
+
x-powered-by:
|
59
|
+
- ASP.NET
|
60
|
+
date:
|
61
|
+
- Sun, 23 Feb 2014 23:56:00 GMT
|
62
|
+
connection:
|
63
|
+
- close
|
64
|
+
body:
|
65
|
+
encoding: US-ASCII
|
66
|
+
string: ! '{"Error":null,"Result":[{"BindingExpiry":123,"BindingURI":"foobar;rinstance=AAABBB","CSeq":12345,"ID":"<PROVIDER_BINDING_ID>","IsRegistered":true,"LastRegisterAttempt":"2014-02-23T23:33:12.7401371","LastRegisterTime":"2014-02-23T23:33:13.0057672","NextRegistrationTime":"2014-02-23T23:43:08.0057672","ProviderID":"<PROVIDER_ID>","ProviderName":"foobar","RegistrarSIPSocket":"udp:superip","RegistrationFailureMessage":null}],"Success":true}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Sun, 23 Feb 2014 23:55:53 GMT
|
69
|
+
recorded_with: VCR 2.6.0
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: sipwizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0
|
5
|
+
version: 0.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- gregory
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
version: '0'
|
36
36
|
none: false
|
37
37
|
name: rake
|
38
|
-
type: :
|
38
|
+
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
requirement: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
version: 1.5.2
|
52
52
|
none: false
|
53
53
|
name: rack
|
54
|
-
type: :
|
54
|
+
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
version: 0.8.9
|
68
68
|
none: false
|
69
69
|
name: faraday
|
70
|
-
type: :
|
70
|
+
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
version: 0.9.0
|
84
84
|
none: false
|
85
85
|
name: faraday_middleware
|
86
|
-
type: :
|
86
|
+
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
@@ -91,6 +91,38 @@ dependencies:
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: 0.9.0
|
93
93
|
none: false
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ~>
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 2.0.5
|
100
|
+
none: false
|
101
|
+
name: hashie
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ~>
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 2.0.5
|
109
|
+
none: false
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
none: false
|
117
|
+
name: activesupport
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
none: false
|
94
126
|
description: SIP Sorcery ruby client
|
95
127
|
email:
|
96
128
|
- greg2502@gmail.com
|
@@ -105,14 +137,64 @@ files:
|
|
105
137
|
- README.md
|
106
138
|
- Rakefile
|
107
139
|
- lib/sipwizard.rb
|
140
|
+
- lib/sipwizard/account.rb
|
141
|
+
- lib/sipwizard/binding.rb
|
142
|
+
- lib/sipwizard/cdr.rb
|
108
143
|
- lib/sipwizard/configuration.rb
|
109
144
|
- lib/sipwizard/connection.rb
|
145
|
+
- lib/sipwizard/customer.rb
|
146
|
+
- lib/sipwizard/dial_plan.rb
|
147
|
+
- lib/sipwizard/provider.rb
|
148
|
+
- lib/sipwizard/provider_binding.rb
|
149
|
+
- lib/sipwizard/rate.rb
|
150
|
+
- lib/sipwizard/relation.rb
|
110
151
|
- lib/sipwizard/version.rb
|
111
152
|
- sipwizard.gemspec
|
153
|
+
- spec/lib/sipwizard/account_spec.rb
|
154
|
+
- spec/lib/sipwizard/binding_spec.rb
|
155
|
+
- spec/lib/sipwizard/cdr_spec.rb
|
112
156
|
- spec/lib/sipwizard/configuration_spec.rb
|
113
157
|
- spec/lib/sipwizard/connection_spec.rb
|
158
|
+
- spec/lib/sipwizard/customer_spec.rb
|
159
|
+
- spec/lib/sipwizard/dial_plan_spec.rb
|
160
|
+
- spec/lib/sipwizard/provider_binding_spec.rb
|
161
|
+
- spec/lib/sipwizard/provider_spec.rb
|
162
|
+
- spec/lib/sipwizard/rate_spec.rb
|
114
163
|
- spec/lib/sipwizard_spec.rb
|
164
|
+
- spec/spec.yml.sample
|
115
165
|
- spec/spec_helper.rb
|
166
|
+
- spec/vcr/sipsorcery/cdr/count.yml
|
167
|
+
- spec/vcr/sipsorcery/cdr/get.yml
|
168
|
+
- spec/vcr/sipsorcery/customeraccount/add.yml
|
169
|
+
- spec/vcr/sipsorcery/customeraccount/count.yml
|
170
|
+
- spec/vcr/sipsorcery/customeraccount/delete.yml
|
171
|
+
- spec/vcr/sipsorcery/customeraccount/get.yml
|
172
|
+
- spec/vcr/sipsorcery/customeraccount/update.yml
|
173
|
+
- spec/vcr/sipsorcery/dialplan/add.yml
|
174
|
+
- spec/vcr/sipsorcery/dialplan/copy.yml
|
175
|
+
- spec/vcr/sipsorcery/dialplan/count.yml
|
176
|
+
- spec/vcr/sipsorcery/dialplan/delete.yml
|
177
|
+
- spec/vcr/sipsorcery/dialplan/get.yml
|
178
|
+
- spec/vcr/sipsorcery/dialplan/update.yml
|
179
|
+
- spec/vcr/sipsorcery/rate/add.yml
|
180
|
+
- spec/vcr/sipsorcery/rate/count.yml
|
181
|
+
- spec/vcr/sipsorcery/rate/delete.yml
|
182
|
+
- spec/vcr/sipsorcery/rate/get.yml
|
183
|
+
- spec/vcr/sipsorcery/rate/update.yml
|
184
|
+
- spec/vcr/sipsorcery/sipaccount/add.yml
|
185
|
+
- spec/vcr/sipsorcery/sipaccount/count.yml
|
186
|
+
- spec/vcr/sipsorcery/sipaccount/delete.yml
|
187
|
+
- spec/vcr/sipsorcery/sipaccount/get.yml
|
188
|
+
- spec/vcr/sipsorcery/sipaccount/update.yml
|
189
|
+
- spec/vcr/sipsorcery/sipaccountbinding/count.yml
|
190
|
+
- spec/vcr/sipsorcery/sipaccountbinding/get.yml
|
191
|
+
- spec/vcr/sipsorcery/sipprovider/add.yml
|
192
|
+
- spec/vcr/sipsorcery/sipprovider/count.yml
|
193
|
+
- spec/vcr/sipsorcery/sipprovider/delete.yml
|
194
|
+
- spec/vcr/sipsorcery/sipprovider/get.yml
|
195
|
+
- spec/vcr/sipsorcery/sipprovider/update.yml
|
196
|
+
- spec/vcr/sipsorcery/sipproviderbinding/count.yml
|
197
|
+
- spec/vcr/sipsorcery/sipproviderbinding/get.yml
|
116
198
|
homepage: http://github.com/gregory/sipwizard
|
117
199
|
licenses:
|
118
200
|
- MIT
|
@@ -139,8 +221,49 @@ signing_key:
|
|
139
221
|
specification_version: 3
|
140
222
|
summary: Wrapper around the sip sorcery api
|
141
223
|
test_files:
|
224
|
+
- spec/lib/sipwizard/account_spec.rb
|
225
|
+
- spec/lib/sipwizard/binding_spec.rb
|
226
|
+
- spec/lib/sipwizard/cdr_spec.rb
|
142
227
|
- spec/lib/sipwizard/configuration_spec.rb
|
143
228
|
- spec/lib/sipwizard/connection_spec.rb
|
229
|
+
- spec/lib/sipwizard/customer_spec.rb
|
230
|
+
- spec/lib/sipwizard/dial_plan_spec.rb
|
231
|
+
- spec/lib/sipwizard/provider_binding_spec.rb
|
232
|
+
- spec/lib/sipwizard/provider_spec.rb
|
233
|
+
- spec/lib/sipwizard/rate_spec.rb
|
144
234
|
- spec/lib/sipwizard_spec.rb
|
235
|
+
- spec/spec.yml.sample
|
145
236
|
- spec/spec_helper.rb
|
237
|
+
- spec/vcr/sipsorcery/cdr/count.yml
|
238
|
+
- spec/vcr/sipsorcery/cdr/get.yml
|
239
|
+
- spec/vcr/sipsorcery/customeraccount/add.yml
|
240
|
+
- spec/vcr/sipsorcery/customeraccount/count.yml
|
241
|
+
- spec/vcr/sipsorcery/customeraccount/delete.yml
|
242
|
+
- spec/vcr/sipsorcery/customeraccount/get.yml
|
243
|
+
- spec/vcr/sipsorcery/customeraccount/update.yml
|
244
|
+
- spec/vcr/sipsorcery/dialplan/add.yml
|
245
|
+
- spec/vcr/sipsorcery/dialplan/copy.yml
|
246
|
+
- spec/vcr/sipsorcery/dialplan/count.yml
|
247
|
+
- spec/vcr/sipsorcery/dialplan/delete.yml
|
248
|
+
- spec/vcr/sipsorcery/dialplan/get.yml
|
249
|
+
- spec/vcr/sipsorcery/dialplan/update.yml
|
250
|
+
- spec/vcr/sipsorcery/rate/add.yml
|
251
|
+
- spec/vcr/sipsorcery/rate/count.yml
|
252
|
+
- spec/vcr/sipsorcery/rate/delete.yml
|
253
|
+
- spec/vcr/sipsorcery/rate/get.yml
|
254
|
+
- spec/vcr/sipsorcery/rate/update.yml
|
255
|
+
- spec/vcr/sipsorcery/sipaccount/add.yml
|
256
|
+
- spec/vcr/sipsorcery/sipaccount/count.yml
|
257
|
+
- spec/vcr/sipsorcery/sipaccount/delete.yml
|
258
|
+
- spec/vcr/sipsorcery/sipaccount/get.yml
|
259
|
+
- spec/vcr/sipsorcery/sipaccount/update.yml
|
260
|
+
- spec/vcr/sipsorcery/sipaccountbinding/count.yml
|
261
|
+
- spec/vcr/sipsorcery/sipaccountbinding/get.yml
|
262
|
+
- spec/vcr/sipsorcery/sipprovider/add.yml
|
263
|
+
- spec/vcr/sipsorcery/sipprovider/count.yml
|
264
|
+
- spec/vcr/sipsorcery/sipprovider/delete.yml
|
265
|
+
- spec/vcr/sipsorcery/sipprovider/get.yml
|
266
|
+
- spec/vcr/sipsorcery/sipprovider/update.yml
|
267
|
+
- spec/vcr/sipsorcery/sipproviderbinding/count.yml
|
268
|
+
- spec/vcr/sipsorcery/sipproviderbinding/get.yml
|
146
269
|
has_rdoc:
|