esendex 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/esendex/application_controller.rb +4 -4
  3. data/app/controllers/esendex/inbound_messages_controller.rb +11 -11
  4. data/app/controllers/esendex/message_delivered_events_controller.rb +11 -11
  5. data/app/controllers/esendex/message_failed_events_controller.rb +11 -11
  6. data/app/controllers/esendex/push_notification_handler.rb +41 -41
  7. data/config/routes.rb +5 -5
  8. data/lib/esendex.rb +63 -62
  9. data/lib/esendex/account.rb +44 -44
  10. data/lib/esendex/api_connection.rb +29 -29
  11. data/lib/esendex/dispatcher_result.rb +25 -25
  12. data/lib/esendex/engine.rb +4 -4
  13. data/lib/esendex/exceptions.rb +25 -25
  14. data/lib/esendex/hash_serialisation.rb +23 -23
  15. data/lib/esendex/inbound_message.rb +30 -30
  16. data/lib/esendex/message.rb +38 -38
  17. data/lib/esendex/message_batch_submission.rb +50 -50
  18. data/lib/esendex/message_delivered_event.rb +29 -29
  19. data/lib/esendex/message_failed_event.rb +29 -29
  20. data/lib/esendex/railtie.rb +11 -11
  21. data/lib/esendex/version.rb +3 -3
  22. data/lib/esendex/voice_message.rb +25 -0
  23. data/lib/tasks/esendex.rake +29 -29
  24. data/licence.txt +23 -23
  25. data/readme.md +186 -186
  26. data/spec/account_spec.rb +211 -211
  27. data/spec/api_connection_spec.rb +78 -78
  28. data/spec/controllers/message_delivered_events_controller_spec.rb +29 -29
  29. data/spec/controllers/push_notification_handler_spec.rb +96 -96
  30. data/spec/dummy/README.rdoc +261 -261
  31. data/spec/dummy/Rakefile +7 -7
  32. data/spec/dummy/app/assets/javascripts/application.js +15 -15
  33. data/spec/dummy/app/assets/stylesheets/application.css +13 -13
  34. data/spec/dummy/app/controllers/application_controller.rb +3 -3
  35. data/spec/dummy/app/helpers/application_helper.rb +2 -2
  36. data/spec/dummy/app/views/layouts/application.html.erb +14 -14
  37. data/spec/dummy/config.ru +4 -4
  38. data/spec/dummy/config/application.rb +66 -66
  39. data/spec/dummy/config/boot.rb +9 -9
  40. data/spec/dummy/config/environment.rb +5 -5
  41. data/spec/dummy/config/environments/development.rb +37 -37
  42. data/spec/dummy/config/environments/production.rb +67 -67
  43. data/spec/dummy/config/environments/test.rb +39 -39
  44. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
  45. data/spec/dummy/config/initializers/inflections.rb +15 -15
  46. data/spec/dummy/config/initializers/mime_types.rb +5 -5
  47. data/spec/dummy/config/initializers/secret_token.rb +7 -7
  48. data/spec/dummy/config/initializers/session_store.rb +8 -8
  49. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
  50. data/spec/dummy/config/locales/en.yml +5 -5
  51. data/spec/dummy/config/routes.rb +4 -4
  52. data/spec/dummy/public/404.html +26 -26
  53. data/spec/dummy/public/422.html +26 -26
  54. data/spec/dummy/public/500.html +25 -25
  55. data/spec/dummy/script/rails +6 -6
  56. data/spec/hash_serialisation_spec.rb +52 -52
  57. data/spec/inbound_message_spec.rb +42 -42
  58. data/spec/message_batch_submission_spec.rb +54 -54
  59. data/spec/message_delivered_event_spec.rb +32 -32
  60. data/spec/message_failed_event_spec.rb +32 -32
  61. data/spec/message_spec.rb +49 -49
  62. data/spec/spec_helper.rb +41 -41
  63. data/spec/voice_message_spec.rb +29 -0
  64. metadata +12 -9
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe VoiceMessage do
4
+ context 'a voice message' do
5
+ let(:to) { random_mobile }
6
+ let(:body) { random_string }
7
+ let(:message) { Esendex::VoiceMessage.new(to, body) }
8
+
9
+ subject { message.xml_node }
10
+
11
+ context 'its xml' do
12
+ it "contains to" do
13
+ subject.at_xpath('//message/to').content.should eq(to)
14
+ end
15
+
16
+ it "contains body" do
17
+ subject.at_xpath('//message/body').content.should eq(body)
18
+ end
19
+
20
+ it "contains type" do
21
+ subject.at_xpath('//message/type').content.should eq('Voice')
22
+ end
23
+
24
+ it "contains language" do
25
+ subject.at_xpath('//message/lang').content.should eq('en-GB')
26
+ end
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esendex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Bird
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nestful
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.0.8
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.0.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.4.4.1
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: 1.4.4.1
41
41
  description: Send SMS from your application using the Esendex API
@@ -67,6 +67,7 @@ files:
67
67
  - lib/esendex/message_failed_event.rb
68
68
  - lib/esendex/railtie.rb
69
69
  - lib/esendex/version.rb
70
+ - lib/esendex/voice_message.rb
70
71
  - lib/tasks/esendex.rake
71
72
  - licence.txt
72
73
  - readme.md
@@ -108,6 +109,7 @@ files:
108
109
  - spec/message_failed_event_spec.rb
109
110
  - spec/message_spec.rb
110
111
  - spec/spec_helper.rb
112
+ - spec/voice_message_spec.rb
111
113
  homepage: http://developers.esendex.com
112
114
  licenses: []
113
115
  metadata: {}
@@ -117,17 +119,17 @@ require_paths:
117
119
  - lib
118
120
  required_ruby_version: !ruby/object:Gem::Requirement
119
121
  requirements:
120
- - - '>='
122
+ - - ">="
121
123
  - !ruby/object:Gem::Version
122
124
  version: '0'
123
125
  required_rubygems_version: !ruby/object:Gem::Requirement
124
126
  requirements:
125
- - - '>='
127
+ - - ">="
126
128
  - !ruby/object:Gem::Version
127
129
  version: '0'
128
130
  requirements: []
129
131
  rubyforge_project:
130
- rubygems_version: 2.4.8
132
+ rubygems_version: 2.5.1
131
133
  signing_key:
132
134
  specification_version: 4
133
135
  summary: Gem for interacting with the Esendex API
@@ -170,3 +172,4 @@ test_files:
170
172
  - spec/message_failed_event_spec.rb
171
173
  - spec/message_spec.rb
172
174
  - spec/spec_helper.rb
175
+ - spec/voice_message_spec.rb