govdelivery-tms 0.9.4 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OGU2YjhiZjAxYTBmOWZjNGRiOGEzYmJmM2JiYmFhNjVkY2U4NGJmYw==
5
- data.tar.gz: !binary |-
6
- Y2EzNjAyZDA5MWRiZmYyYzBmMzkyZWYyYzc5NDQ1MjMwZjY1NmM5NA==
2
+ SHA1:
3
+ metadata.gz: 8bdc485be8147842826216f48d724ee07c7bde03
4
+ data.tar.gz: 1e5d995d8cb0695a3daded617e76c4b3759605c2
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- M2ZhODFhYmQxZTZkMmI1MmU3NzA3OGNlNzFkMDlkMmQ1MTYwOWViMWNkYWRh
10
- Yzg5ZDI4Y2I5ZDZlZGE1OTQyYWZkNjAxNmJkOWFmYTU1NWNjMzIxYTM1ZmUx
11
- ZmI0MTA2MTMwNGIxZWI2YzlkYjQ2YzBlYWI0YjFhMGQ0MDk5NmU=
12
- data.tar.gz: !binary |-
13
- MmJmNzk5ZjRiNWI1OTJiNjIyYTFmMDY0MTgyZmFhZmQ1ZWQxNzA4YmZmMmU5
14
- ZjZmMWUzMDUwZTJhMGY3NGQzNjE3ZTAzZjVhNmNlMGRkNGU0NDU5MTBlODUw
15
- NTM0ZDE0ZDU4ZDFkODZhNWE0MzEyYmVmMWY3NTA3NzEwMzQ2ZWE=
6
+ metadata.gz: c1ddd27b65010b1e4371ffce2c346fb53ceea4c23d52051a591cddcade463241569bc3be75b32a01eb8dd7e47e4a0aafa7987bfc9b54ff4838c2228a3ebd19e2
7
+ data.tar.gz: c9c92d45100e11774b74c77840189c3f3b7cb884230ea4403d6e419b0e7214404993cbdd1f936f85fd922141e46e86b9a38e3ca6fe7d877e128e97e516fb9fcf
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_runtime_dependency 'activesupport'
18
18
  s.add_runtime_dependency 'faraday'
19
19
  s.add_runtime_dependency 'faraday_middleware'
20
- s.add_runtime_dependency 'mime-types'
20
+ s.add_runtime_dependency 'mime-types', ['< 3.0']
21
21
 
22
22
  s.files = %w(
23
23
  Gemfile
@@ -1,11 +1,23 @@
1
1
  module GovDelivery::TMS #:nodoc:
2
+ # FromAddress is an email address, associated response addresses (reply to,
3
+ # error to), and a display name that is used when sending an email via TMS.
4
+ # All messages sent via TMS must have a FromAddress, which can be set via or
5
+ # via a template. If neither is set with a message is sent, then the account's
6
+ # default FromAddress will be used.
7
+ #
8
+ # This resource is read-only.
9
+ #
10
+ # To add more FromAddresses to your account, please contact your CSC.
11
+ #
12
+ # @attr from_email [String] Email address that a message will be sent from
13
+ # @attr from_name [String] Display name of the sender of a message
14
+ # @attr reploy_to_email [Stirng] Email address that will be used for the Reply-To header
15
+ # @attr bounce_email [String] Email address that will be used for the Errors-To header
16
+ # @attr is_default [Boolean] Indicates if the FromAddress is the account's default FromAddress
2
17
  class FromAddress
3
18
  include InstanceResource
4
19
 
5
- # @!parse attr_accessor :from_email, :reply_to_email, :bounce_email, :is_default
6
- writeable_attributes :from_email, :reply_to_email, :bounce_email, :is_default
7
-
8
20
  # @!parse attr_reader :id, :created_at
9
- readonly_attributes :id, :created_at
21
+ readonly_attributes :id, :created_at, :from_email, :from_name, :reply_to_email, :bounce_email, :is_default
10
22
  end
11
23
  end
@@ -1,5 +1,5 @@
1
1
  module GovDelivery
2
2
  module TMS #:nodoc:
3
- VERSION = '0.9.4'.freeze
3
+ VERSION = '0.10.0'.freeze
4
4
  end
5
5
  end
@@ -12,6 +12,7 @@ describe GovDelivery::TMS::FromAddress do
12
12
  it 'should be able to get a list of email templates' do
13
13
  response = [{
14
14
  'from_email' => 'something@evotest.govdelivery.com',
15
+ 'from_name' => 'Something',
15
16
  'reply_to_email' => 'something@evotest.govdelivery.com',
16
17
  'bounce_email' => 'something@evotest.govdelivery.com',
17
18
  'is_default' => true,
@@ -25,38 +26,7 @@ describe GovDelivery::TMS::FromAddress do
25
26
  expect(addresses.collection.length).to eq(1)
26
27
  expect(addresses.collection.first.class).to eq(GovDelivery::TMS::FromAddress)
27
28
  expect(addresses.collection.first.from_email).to eq('something@evotest.govdelivery.com')
28
- end
29
- end
30
-
31
- context 'creating a from address' do
32
- let(:client) do
33
- double('client')
34
- end
35
-
36
- before do
37
- @fromaddress = GovDelivery::TMS::FromAddress.new(client, '/from_addresses', from_email: 'something@evotest.govdelivery.com',
38
- reply_to_email: 'something@evotest.govdelivery.com',
39
- bounce_email: 'something@evotest.govdelivery.com',
40
- is_default: true)
41
- end
42
-
43
- it 'should post successfully' do
44
- response = {
45
- 'from_email' => 'something@evotest.govdelivery.com',
46
- 'reply_to_email' => 'something@evotest.govdelivery.com',
47
- 'bounce_email' => 'something@evotest.govdelivery.com',
48
- 'is_default' => true,
49
- 'created_at' => 'sometime',
50
- '_links' => { 'self' => '/from_addresses/1' }
51
- }
52
- expect(@fromaddress.client).to receive('post').with(@fromaddress).and_return(double('response', status: 201, body: response))
53
- @fromaddress.post
54
- expect(@fromaddress.from_email).to eq('something@evotest.govdelivery.com')
55
- expect(@fromaddress.reply_to_email).to eq('something@evotest.govdelivery.com')
56
- expect(@fromaddress.bounce_email).to eq('something@evotest.govdelivery.com')
57
- expect(@fromaddress.is_default).to eq(true)
58
- expect(@fromaddress.created_at).to eq('sometime')
59
- expect(@fromaddress.href).to eq('/from_addresses/1')
29
+ expect(addresses.collection.first.from_name).to eq('Something')
60
30
  end
61
31
  end
62
32
 
metadata CHANGED
@@ -1,72 +1,72 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govdelivery-tms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GovDelivery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-03 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mime-types
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - "<"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - "<"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
69
- description: ! "A reference implementation, written in Ruby,\n to
68
+ version: '3.0'
69
+ description: "A reference implementation, written in Ruby,\n to
70
70
  interact with GovDelivery's TMS API. The client is\n compatible
71
71
  with Ruby 1.9 and 2.0. "
72
72
  email:
@@ -134,17 +134,17 @@ require_paths:
134
134
  - lib
135
135
  required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ! '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.4.6
147
+ rubygems_version: 2.2.3
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: A ruby client to interact with the GovDelivery TMS REST API.
@@ -165,4 +165,3 @@ test_files:
165
165
  - spec/sms_messages_spec.rb
166
166
  - spec/spec_helper.rb
167
167
  - spec/tms_spec.rb
168
- has_rdoc: