tropo_rest 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,6 +15,7 @@ module TropoRest
15
15
  property :password
16
16
  property :token
17
17
  property :application_id
18
+ property :application
18
19
 
19
20
  end
20
21
  end
@@ -7,6 +7,7 @@ module TropoRest
7
7
  property :state
8
8
  property :country
9
9
  property :description
10
+ property :sms_enabled, :from => :smsEnabled
10
11
 
11
12
  end
12
13
  end
@@ -1,3 +1,3 @@
1
1
  module TropoRest
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -14,12 +14,14 @@ describe TropoRest::Client do
14
14
  {
15
15
  "href": "https://api.tropo.com/v1/applications/123456/addresses/sip/99901123456@sip.tropo.com",
16
16
  "type": "sip",
17
- "address": "9990123456@sip.tropo.com"
17
+ "address": "9990123456@sip.tropo.com",
18
+ "application": "https://api.tropo.com/v1/applications/123456"
18
19
  },
19
20
  {
20
21
  "href": "https://api.tropo.com/v1/applications/123456/addresses/skype/+99000936209990123456",
21
22
  "type": "skype",
22
- "number": "+990009369990123456"
23
+ "number": "+990009369990123456",
24
+ "application": "https://api.tropo.com/v1/applications/123456"
23
25
  },
24
26
  {
25
27
  "href": "https://api.tropo.com/v1/applications/123456/addresses/number/+14075551234",
@@ -27,12 +29,14 @@ describe TropoRest::Client do
27
29
  "prefix": "1407",
28
30
  "number": "4075551234",
29
31
  "city": "Orlando",
30
- "state": "FL"
32
+ "state": "FL",
33
+ "application": "https://api.tropo.com/v1/applications/123456"
31
34
  },
32
35
  {
33
36
  "href": "https://api.tropo.com/v1/applications/123456/addresses/aim/tropocloud",
34
37
  "type": "aim",
35
- "username": "tropocloud"
38
+ "username": "tropocloud",
39
+ "application": "https://api.tropo.com/v1/applications/123456"
36
40
  }
37
41
  ]
38
42
  JSON
@@ -61,27 +65,31 @@ describe TropoRest::Client do
61
65
  fourth = apps[3]
62
66
 
63
67
  first.should be_instance_of(TropoRest::Resource::Address)
64
- first.href.should == "https://api.tropo.com/v1/applications/123456/addresses/sip/99901123456@sip.tropo.com"
65
- first.type.should == "sip"
66
- first.address.should == "9990123456@sip.tropo.com"
68
+ first.href.should == "https://api.tropo.com/v1/applications/123456/addresses/sip/99901123456@sip.tropo.com"
69
+ first.type.should == "sip"
70
+ first.address.should == "9990123456@sip.tropo.com"
71
+ first.application.should == "https://api.tropo.com/v1/applications/123456"
67
72
 
68
73
  second.should be_instance_of(TropoRest::Resource::Address)
69
- second.href.should == "https://api.tropo.com/v1/applications/123456/addresses/skype/+99000936209990123456"
70
- second.type.should == "skype"
71
- second.number.should == "+990009369990123456"
74
+ second.href.should == "https://api.tropo.com/v1/applications/123456/addresses/skype/+99000936209990123456"
75
+ second.type.should == "skype"
76
+ second.number.should == "+990009369990123456"
77
+ second.application.should == "https://api.tropo.com/v1/applications/123456"
72
78
 
73
79
  third.should be_instance_of(TropoRest::Resource::Address)
74
- third.href.should == "https://api.tropo.com/v1/applications/123456/addresses/number/+14075551234"
75
- third.type.should == "number"
76
- third.prefix.should == "1407"
77
- third.number.should == "4075551234"
78
- third.city.should == "Orlando"
79
- third.state.should == "FL"
80
+ third.href.should == "https://api.tropo.com/v1/applications/123456/addresses/number/+14075551234"
81
+ third.type.should == "number"
82
+ third.prefix.should == "1407"
83
+ third.number.should == "4075551234"
84
+ third.city.should == "Orlando"
85
+ third.state.should == "FL"
86
+ third.application.should == "https://api.tropo.com/v1/applications/123456"
80
87
 
81
88
  fourth.should be_instance_of(TropoRest::Resource::Address)
82
- fourth.href.should == "https://api.tropo.com/v1/applications/123456/addresses/aim/tropocloud"
83
- fourth.type.should == "aim"
84
- fourth.username.should == "tropocloud"
89
+ fourth.href.should == "https://api.tropo.com/v1/applications/123456/addresses/aim/tropocloud"
90
+ fourth.type.should == "aim"
91
+ fourth.username.should == "tropocloud"
92
+ fourth.application.should == "https://api.tropo.com/v1/applications/123456"
85
93
  end
86
94
 
87
95
  end
@@ -16,17 +16,20 @@ describe TropoRest::Client do
16
16
  "city": "Orlando",
17
17
  "state": "FL",
18
18
  "country": "United States",
19
- "description": "Phone Number w/ SMS"
19
+ "description": "Phone Number w/ SMS",
20
+ "smsEnabled": true
20
21
  },
21
22
  {
22
23
  "prefix": "1888",
23
24
  "country": "United States",
24
- "description": "Toll Free Phone Number"
25
+ "description": "Toll Free Phone Number",
26
+ "smsEnabled": false
25
27
  },
26
28
  {
27
29
  "prefix": "31",
28
30
  "country": "Netherlands",
29
- "description": "International Phone Number"
31
+ "description": "International Phone Number",
32
+ "smsEnabled": false
30
33
  }
31
34
  ]
32
35
  JSON
@@ -54,16 +57,19 @@ describe TropoRest::Client do
54
57
  first.state.should == "FL"
55
58
  first.country.should == "United States"
56
59
  first.description.should == "Phone Number w/ SMS"
60
+ first.sms_enabled.should == true
57
61
 
58
62
  second.should be_instance_of(TropoRest::Resource::Exchange)
59
63
  second.prefix.should == "1888"
60
64
  second.country.should == "United States"
61
65
  second.description.should == "Toll Free Phone Number"
66
+ second.sms_enabled.should == false
62
67
 
63
68
  third.should be_instance_of(TropoRest::Resource::Exchange)
64
69
  third.prefix.should == "31"
65
70
  third.country.should == "Netherlands"
66
71
  third.description.should == "International Phone Number"
72
+ third.sms_enabled.should == false
67
73
  end
68
74
 
69
75
  end
@@ -4,7 +4,7 @@ describe TropoRest::Resource::Address do
4
4
 
5
5
  it { should be_kind_of(Hashie::Twash) }
6
6
 
7
- %w[href type prefix number address city state country channel username password token application_id].each do |param|
7
+ %w[href type prefix number address city state country channel username password token application_id application].each do |param|
8
8
  it { should respond_to(param) }
9
9
  it { should respond_to("#{param}=") }
10
10
  end
@@ -4,7 +4,7 @@ describe TropoRest::Resource::Exchange do
4
4
 
5
5
  it { should be_kind_of(Hashie::Twash) }
6
6
 
7
- %w[prefix city state country description].each do |param|
7
+ %w[prefix city state country description sms_enabled].each do |param|
8
8
  it { should respond_to(param) }
9
9
  it { should respond_to("#{param}=") }
10
10
  end
metadata CHANGED
@@ -1,182 +1,178 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tropo_rest
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Christopher Durtschi
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-06-04 00:00:00 -06:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-21 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: bundler
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70152096108680 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
23
21
  version: 1.0.0
24
22
  type: :development
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70152096108680
25
+ - !ruby/object:Gem::Dependency
28
26
  name: rake
29
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &70152096108200 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
29
+ requirements:
32
30
  - - ~>
33
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
34
32
  version: 0.8.7
35
33
  type: :development
36
34
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70152096108200
36
+ - !ruby/object:Gem::Dependency
39
37
  name: rspec
40
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &70152096107740 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
40
+ requirements:
43
41
  - - ~>
44
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
45
43
  version: 2.3.0
46
44
  type: :development
47
45
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *70152096107740
47
+ - !ruby/object:Gem::Dependency
50
48
  name: webmock
51
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &70152096107280 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
51
+ requirements:
54
52
  - - ~>
55
- - !ruby/object:Gem::Version
53
+ - !ruby/object:Gem::Version
56
54
  version: 1.6.1
57
55
  type: :development
58
56
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *70152096107280
58
+ - !ruby/object:Gem::Dependency
61
59
  name: autotest
62
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &70152096106820 !ruby/object:Gem::Requirement
63
61
  none: false
64
- requirements:
62
+ requirements:
65
63
  - - ~>
66
- - !ruby/object:Gem::Version
64
+ - !ruby/object:Gem::Version
67
65
  version: 4.3.2
68
66
  type: :development
69
67
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *70152096106820
69
+ - !ruby/object:Gem::Dependency
72
70
  name: json
73
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &70152096106360 !ruby/object:Gem::Requirement
74
72
  none: false
75
- requirements:
73
+ requirements:
76
74
  - - ~>
77
- - !ruby/object:Gem::Version
78
- version: "1.4"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.4'
79
77
  type: :development
80
78
  prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
79
+ version_requirements: *70152096106360
80
+ - !ruby/object:Gem::Dependency
83
81
  name: yard
84
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ requirement: &70152096105900 !ruby/object:Gem::Requirement
85
83
  none: false
86
- requirements:
84
+ requirements:
87
85
  - - ~>
88
- - !ruby/object:Gem::Version
86
+ - !ruby/object:Gem::Version
89
87
  version: 0.6.4
90
88
  type: :development
91
89
  prerelease: false
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
90
+ version_requirements: *70152096105900
91
+ - !ruby/object:Gem::Dependency
94
92
  name: autotest-fsevent
95
- requirement: &id008 !ruby/object:Gem::Requirement
93
+ requirement: &70152096105400 !ruby/object:Gem::Requirement
96
94
  none: false
97
- requirements:
95
+ requirements:
98
96
  - - ~>
99
- - !ruby/object:Gem::Version
97
+ - !ruby/object:Gem::Version
100
98
  version: 0.2.4
101
99
  type: :development
102
100
  prerelease: false
103
- version_requirements: *id008
104
- - !ruby/object:Gem::Dependency
101
+ version_requirements: *70152096105400
102
+ - !ruby/object:Gem::Dependency
105
103
  name: autotest-growl
106
- requirement: &id009 !ruby/object:Gem::Requirement
104
+ requirement: &70152096104940 !ruby/object:Gem::Requirement
107
105
  none: false
108
- requirements:
106
+ requirements:
109
107
  - - ~>
110
- - !ruby/object:Gem::Version
108
+ - !ruby/object:Gem::Version
111
109
  version: 0.2.9
112
110
  type: :development
113
111
  prerelease: false
114
- version_requirements: *id009
115
- - !ruby/object:Gem::Dependency
112
+ version_requirements: *70152096104940
113
+ - !ruby/object:Gem::Dependency
116
114
  name: ruby-debug19
117
- requirement: &id010 !ruby/object:Gem::Requirement
115
+ requirement: &70152096104560 !ruby/object:Gem::Requirement
118
116
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: "0"
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
123
121
  type: :development
124
122
  prerelease: false
125
- version_requirements: *id010
126
- - !ruby/object:Gem::Dependency
123
+ version_requirements: *70152096104560
124
+ - !ruby/object:Gem::Dependency
127
125
  name: faraday
128
- requirement: &id011 !ruby/object:Gem::Requirement
126
+ requirement: &70152096104020 !ruby/object:Gem::Requirement
129
127
  none: false
130
- requirements:
128
+ requirements:
131
129
  - - ~>
132
- - !ruby/object:Gem::Version
130
+ - !ruby/object:Gem::Version
133
131
  version: 0.6.0
134
132
  type: :runtime
135
133
  prerelease: false
136
- version_requirements: *id011
137
- - !ruby/object:Gem::Dependency
134
+ version_requirements: *70152096104020
135
+ - !ruby/object:Gem::Dependency
138
136
  name: faraday_middleware
139
- requirement: &id012 !ruby/object:Gem::Requirement
137
+ requirement: &70152096103520 !ruby/object:Gem::Requirement
140
138
  none: false
141
- requirements:
139
+ requirements:
142
140
  - - ~>
143
- - !ruby/object:Gem::Version
141
+ - !ruby/object:Gem::Version
144
142
  version: 0.6.0
145
143
  type: :runtime
146
144
  prerelease: false
147
- version_requirements: *id012
148
- - !ruby/object:Gem::Dependency
145
+ version_requirements: *70152096103520
146
+ - !ruby/object:Gem::Dependency
149
147
  name: multi_json
150
- requirement: &id013 !ruby/object:Gem::Requirement
148
+ requirement: &70152096103060 !ruby/object:Gem::Requirement
151
149
  none: false
152
- requirements:
150
+ requirements:
153
151
  - - ~>
154
- - !ruby/object:Gem::Version
152
+ - !ruby/object:Gem::Version
155
153
  version: 1.0.0
156
154
  type: :runtime
157
155
  prerelease: false
158
- version_requirements: *id013
159
- - !ruby/object:Gem::Dependency
156
+ version_requirements: *70152096103060
157
+ - !ruby/object:Gem::Dependency
160
158
  name: hashie
161
- requirement: &id014 !ruby/object:Gem::Requirement
159
+ requirement: &70152096102600 !ruby/object:Gem::Requirement
162
160
  none: false
163
- requirements:
161
+ requirements:
164
162
  - - ~>
165
- - !ruby/object:Gem::Version
163
+ - !ruby/object:Gem::Version
166
164
  version: 1.0.0
167
165
  type: :runtime
168
166
  prerelease: false
169
- version_requirements: *id014
170
- description: A simple wrapper for the Tropo REST API to manipulate applications, addresses, exchanges, sessions.
171
- email:
167
+ version_requirements: *70152096102600
168
+ description: A simple wrapper for the Tropo REST API to manipulate applications, addresses,
169
+ exchanges, sessions.
170
+ email:
172
171
  - christopher.durtschi@gmail.com
173
172
  executables: []
174
-
175
173
  extensions: []
176
-
177
174
  extra_rdoc_files: []
178
-
179
- files:
175
+ files:
180
176
  - .gitignore
181
177
  - .rspec
182
178
  - Gemfile
@@ -217,36 +213,31 @@ files:
217
213
  - spec/tropo_rest/resource/exchange_spec.rb
218
214
  - spec/tropo_rest_spec.rb
219
215
  - tropo_rest.gemspec
220
- has_rdoc: true
221
216
  homepage: http://rubygems.org/gems/tropo_rest
222
217
  licenses: []
223
-
224
218
  post_install_message:
225
219
  rdoc_options: []
226
-
227
- require_paths:
220
+ require_paths:
228
221
  - lib
229
- required_ruby_version: !ruby/object:Gem::Requirement
222
+ required_ruby_version: !ruby/object:Gem::Requirement
230
223
  none: false
231
- requirements:
232
- - - ">="
233
- - !ruby/object:Gem::Version
234
- hash: -4002703830484713363
235
- segments:
224
+ requirements:
225
+ - - ! '>='
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ segments:
236
229
  - 0
237
- version: "0"
238
- required_rubygems_version: !ruby/object:Gem::Requirement
230
+ hash: 4567797839494683031
231
+ required_rubygems_version: !ruby/object:Gem::Requirement
239
232
  none: false
240
- requirements:
241
- - - ">="
242
- - !ruby/object:Gem::Version
233
+ requirements:
234
+ - - ! '>='
235
+ - !ruby/object:Gem::Version
243
236
  version: 1.3.6
244
237
  requirements: []
245
-
246
238
  rubyforge_project: tropo_rest
247
- rubygems_version: 1.6.1
239
+ rubygems_version: 1.8.6
248
240
  signing_key:
249
241
  specification_version: 3
250
242
  summary: Library to interact with Tropo's REST API
251
243
  test_files: []
252
-