tms_client 0.4.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -2
- data/README.md +43 -1
- data/Rakefile +16 -4
- data/bin/autospec +16 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/rake +16 -0
- data/bin/redcarpet +16 -0
- data/bin/rspec +16 -0
- data/bin/tt +16 -0
- data/bin/yard +16 -0
- data/bin/yardoc +16 -0
- data/bin/yri +16 -0
- data/lib/tms_client/client.rb +4 -2
- data/lib/tms_client/errors.rb +1 -1
- data/lib/tms_client/instance_resource.rb +5 -2
- data/lib/tms_client/resource/collections.rb +20 -0
- data/lib/tms_client/resource/email_message.rb +16 -8
- data/lib/tms_client/resource/ipaws_acknowledgement.rb +9 -0
- data/lib/tms_client/resource/ipaws_alert.rb +38 -0
- data/lib/tms_client/resource/ipaws_category.rb +7 -0
- data/lib/tms_client/resource/ipaws_cog_profile.rb +29 -0
- data/lib/tms_client/resource/ipaws_event_code.rb +7 -0
- data/lib/tms_client/resource/ipaws_nwem_area.rb +18 -0
- data/lib/tms_client/resource/ipaws_nwem_authorization.rb +9 -0
- data/lib/tms_client/resource/ipaws_nwem_auxilary_data.rb +8 -0
- data/lib/tms_client/resource/ipaws_response_type.rb +7 -0
- data/lib/tms_client/resource/ipaws_static_resource.rb +8 -0
- data/lib/tms_client/resource/sms_message.rb +14 -5
- data/lib/tms_client/resource/voice_message.rb +16 -7
- data/lib/tms_client/version.rb +1 -1
- data/lib/tms_client.rb +10 -2
- data/spec/client_spec.rb +6 -2
- data/spec/email_message_spec.rb +25 -9
- data/spec/instance_resource_spec.rb +19 -2
- data/spec/ipaws_acknowledgement_spec.rb +16 -0
- data/spec/ipaws_alerts_spec.rb +192 -0
- data/spec/ipaws_cog_profile_spec.rb +75 -0
- data/spec/ipaws_event_codes_spec.rb +35 -0
- data/spec/ipaws_nwem_areas_spec.rb +58 -0
- data/spec/ipaws_nwem_authorization_spec.rb +16 -0
- data/spec/mail/delivery_method_spec.rb +1 -1
- data/spec/sms_message_spec.rb +9 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/voice_message_spec.rb +63 -0
- data/spec/voice_messages_spec.rb +21 -0
- data/tms_client.gemspec +3 -1
- metadata +66 -7
- checksums.yaml +0 -15
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe TMS::VoiceMessages do
|
4
|
+
context "creating a new messages list" do
|
5
|
+
let(:client) do
|
6
|
+
double('client')
|
7
|
+
end
|
8
|
+
before do
|
9
|
+
@messages = TMS::VoiceMessages.new(client, '/messages')
|
10
|
+
end
|
11
|
+
it 'should GET itself' do
|
12
|
+
body = [{:short_body => 'hi ho', :created_at => 'a while ago'}, {:short_body => 'feel me flow', :created_at => 'longer ago'}]
|
13
|
+
@messages.client.should_receive(:get).and_return(double('response', :body => body, :status => 200, :headers => {'link' => "</messages/page/2>; rel=\"next\",</messages/page/11>; rel=\"last\""}))
|
14
|
+
|
15
|
+
@messages.get
|
16
|
+
@messages.collection.length.should == 2
|
17
|
+
@messages.next.href.should == '/messages/page/2'
|
18
|
+
@messages.last.href.should == '/messages/page/11'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/tms_client.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
3
|
require "tms_client/version"
|
4
|
-
|
4
|
+
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "tms_client"
|
7
7
|
s.version = TMS::VERSION
|
@@ -14,6 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
to interact with GovDelivery's TMS API. The client is
|
15
15
|
compatible with Ruby 1.9 and 2.0. }
|
16
16
|
|
17
|
+
# This will default active support to the latest stable version
|
18
|
+
# if the variable is nil.
|
17
19
|
s.add_runtime_dependency "activesupport"
|
18
20
|
s.add_runtime_dependency "faraday"
|
19
21
|
s.add_runtime_dependency "faraday_middleware"
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tms_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- GovDelivery
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: activesupport
|
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: faraday
|
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: faraday_middleware
|
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
|
@@ -57,7 +64,17 @@ description: ! "A reference implementation, written in Ruby, \n
|
|
57
64
|
with Ruby 1.9 and 2.0. "
|
58
65
|
email:
|
59
66
|
- support@govdelivery.com
|
60
|
-
executables:
|
67
|
+
executables:
|
68
|
+
- autospec
|
69
|
+
- htmldiff
|
70
|
+
- ldiff
|
71
|
+
- rake
|
72
|
+
- redcarpet
|
73
|
+
- rspec
|
74
|
+
- tt
|
75
|
+
- yard
|
76
|
+
- yardoc
|
77
|
+
- yri
|
61
78
|
extensions: []
|
62
79
|
extra_rdoc_files: []
|
63
80
|
files:
|
@@ -83,6 +100,16 @@ files:
|
|
83
100
|
- lib/tms_client/resource/email_recipient_click.rb
|
84
101
|
- lib/tms_client/resource/email_recipient_open.rb
|
85
102
|
- lib/tms_client/resource/inbound_sms_message.rb
|
103
|
+
- lib/tms_client/resource/ipaws_acknowledgement.rb
|
104
|
+
- lib/tms_client/resource/ipaws_alert.rb
|
105
|
+
- lib/tms_client/resource/ipaws_category.rb
|
106
|
+
- lib/tms_client/resource/ipaws_cog_profile.rb
|
107
|
+
- lib/tms_client/resource/ipaws_event_code.rb
|
108
|
+
- lib/tms_client/resource/ipaws_nwem_area.rb
|
109
|
+
- lib/tms_client/resource/ipaws_nwem_authorization.rb
|
110
|
+
- lib/tms_client/resource/ipaws_nwem_auxilary_data.rb
|
111
|
+
- lib/tms_client/resource/ipaws_response_type.rb
|
112
|
+
- lib/tms_client/resource/ipaws_static_resource.rb
|
86
113
|
- lib/tms_client/resource/keyword.rb
|
87
114
|
- lib/tms_client/resource/recipient.rb
|
88
115
|
- lib/tms_client/resource/sms_message.rb
|
@@ -96,6 +123,12 @@ files:
|
|
96
123
|
- spec/email_message_spec.rb
|
97
124
|
- spec/inbound_sms_messages_spec.rb
|
98
125
|
- spec/instance_resource_spec.rb
|
126
|
+
- spec/ipaws_acknowledgement_spec.rb
|
127
|
+
- spec/ipaws_alerts_spec.rb
|
128
|
+
- spec/ipaws_cog_profile_spec.rb
|
129
|
+
- spec/ipaws_event_codes_spec.rb
|
130
|
+
- spec/ipaws_nwem_areas_spec.rb
|
131
|
+
- spec/ipaws_nwem_authorization_spec.rb
|
99
132
|
- spec/keyword_spec.rb
|
100
133
|
- spec/keywords_spec.rb
|
101
134
|
- spec/mail/delivery_method_spec.rb
|
@@ -103,28 +136,47 @@ files:
|
|
103
136
|
- spec/sms_messages_spec.rb
|
104
137
|
- spec/spec_helper.rb
|
105
138
|
- spec/tms_client_spec.rb
|
139
|
+
- spec/voice_message_spec.rb
|
140
|
+
- spec/voice_messages_spec.rb
|
141
|
+
- bin/autospec
|
142
|
+
- bin/htmldiff
|
143
|
+
- bin/ldiff
|
144
|
+
- bin/rake
|
145
|
+
- bin/redcarpet
|
146
|
+
- bin/rspec
|
147
|
+
- bin/tt
|
148
|
+
- bin/yard
|
149
|
+
- bin/yardoc
|
150
|
+
- bin/yri
|
106
151
|
homepage: http://govdelivery.com
|
107
152
|
licenses: []
|
108
|
-
metadata: {}
|
109
153
|
post_install_message:
|
110
154
|
rdoc_options: []
|
111
155
|
require_paths:
|
112
156
|
- lib
|
113
157
|
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
114
159
|
requirements:
|
115
160
|
- - ! '>='
|
116
161
|
- !ruby/object:Gem::Version
|
117
162
|
version: '0'
|
163
|
+
segments:
|
164
|
+
- 0
|
165
|
+
hash: -3231966882544892365
|
118
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
|
+
none: false
|
119
168
|
requirements:
|
120
169
|
- - ! '>='
|
121
170
|
- !ruby/object:Gem::Version
|
122
171
|
version: '0'
|
172
|
+
segments:
|
173
|
+
- 0
|
174
|
+
hash: -3231966882544892365
|
123
175
|
requirements: []
|
124
176
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
177
|
+
rubygems_version: 1.8.23.2
|
126
178
|
signing_key:
|
127
|
-
specification_version:
|
179
|
+
specification_version: 3
|
128
180
|
summary: A ruby client to interact with the GovDelivery TMS REST API.
|
129
181
|
test_files:
|
130
182
|
- spec/client_spec.rb
|
@@ -132,6 +184,12 @@ test_files:
|
|
132
184
|
- spec/email_message_spec.rb
|
133
185
|
- spec/inbound_sms_messages_spec.rb
|
134
186
|
- spec/instance_resource_spec.rb
|
187
|
+
- spec/ipaws_acknowledgement_spec.rb
|
188
|
+
- spec/ipaws_alerts_spec.rb
|
189
|
+
- spec/ipaws_cog_profile_spec.rb
|
190
|
+
- spec/ipaws_event_codes_spec.rb
|
191
|
+
- spec/ipaws_nwem_areas_spec.rb
|
192
|
+
- spec/ipaws_nwem_authorization_spec.rb
|
135
193
|
- spec/keyword_spec.rb
|
136
194
|
- spec/keywords_spec.rb
|
137
195
|
- spec/mail/delivery_method_spec.rb
|
@@ -139,4 +197,5 @@ test_files:
|
|
139
197
|
- spec/sms_messages_spec.rb
|
140
198
|
- spec/spec_helper.rb
|
141
199
|
- spec/tms_client_spec.rb
|
142
|
-
|
200
|
+
- spec/voice_message_spec.rb
|
201
|
+
- spec/voice_messages_spec.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
YWFkYWUyYTcyMmRkN2M0MDFjYTE2YzI3ZDBiNWY4NGVjZGI3MDZjNw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MmVjM2Y4ODVkNDYyZjAwYzUxMDc3N2VkNmU1OTgwNmI1MTIwZGYyMw==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZTZhMDI0MjA4MjhmNjM2YzRhOGYxMGQ4NGE2Y2JhNWM5ZGM4OWUwMjE0MjMx
|
10
|
-
MDdjZTRmZDQ0OGNkNTNjMjAzNDdmNzhhMTBkMjcyMGY3YTNiMmViODdkY2U5
|
11
|
-
OGNkNGFiMWY4ZjkwZTIwOWQxODdlNTVmYzFmODA5N2YyOWZjODM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NGZmNTJkYjFlMTllNjk2YjE5N2M1ZjU1OTU5MDVlMDBjNGMyZWM2ZThiM2M3
|
14
|
-
OTU0OWRiN2Y3ZjhiYzdkMGQwN2FiYjE0ZThjZjQyOTRiN2M3OGQ4MmRkNGM2
|
15
|
-
ZjNjNDViYmI1MmMwMmUxYzVkMjQ1MTZiZDYwNDAzZjdiYzJkZDk=
|