inteltech_sms 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -25,7 +25,7 @@ rvm:
25
25
  - 1.8.7
26
26
  - 1.9.3
27
27
  - 2.0.0
28
- - rbx-19mode
28
+ - rbx
29
29
  - jruby-19mode
30
30
  - ree
31
31
 
@@ -56,7 +56,7 @@ matrix:
56
56
  - RUBYGEMS_VERSION=1.8.25
57
57
  - TEST_GEM=true
58
58
  - secure: "D6Sd+bPmNb3P+98W1arc+SbaFV8oC+0NhnZX9fcoIqCHfnVpt6Vd54idUxJv\nhhFUFmySl17zCX/HRaVoscpCYPcJWRWIeXSD4qrHlObaTx+BDKlMAlWl/Y7d\nQy9c4g+QbDhz94l3DeNW7VbCYz/YYyRPBCcZK+K3H1KPmMtngRU="
59
- - rvm: rbx-19mode
59
+ - rvm: rbx
60
60
  env:
61
61
  - RUBYGEMS_VERSION=1.8.25
62
62
  - TEST_GEM=true
@@ -67,8 +67,8 @@ matrix:
67
67
  - TEST_GEM=true
68
68
  - secure: "D6Sd+bPmNb3P+98W1arc+SbaFV8oC+0NhnZX9fcoIqCHfnVpt6Vd54idUxJv\nhhFUFmySl17zCX/HRaVoscpCYPcJWRWIeXSD4qrHlObaTx+BDKlMAlWl/Y7d\nQy9c4g+QbDhz94l3DeNW7VbCYz/YYyRPBCcZK+K3H1KPmMtngRU="
69
69
  allow_failures:
70
- - rvm: rbx-19mode
71
- - rvm: rbx-19mode
70
+ - rvm: rbx
71
+ - rvm: rbx
72
72
  env:
73
73
  - RUBYGEMS_VERSION=1.8.25
74
74
  - TEST_GEM=true
data/Gemfile CHANGED
@@ -9,10 +9,19 @@ group :development do
9
9
  gem "rdoc", ">= 3.12"
10
10
  gem "bundler", ">= 1.2.3"
11
11
  gem "jeweler", ">= 1.8.4"
12
- gem "travis", ">= 0"
13
- gem "travis-lint", ">= 0"
12
+ platforms :ruby do
13
+ # not jruby
14
+ gem "travis", ">= 1.6.0"
15
+ gem "travis-lint", ">= 0"
16
+ end
14
17
  gem 'shoulda-context', '>= 0'
15
18
  gem 'coveralls', :require => false
19
+
20
+ if RUBY_VERSION =~ /^1.8/
21
+ gem 'nokogiri', '~> 1.5.11' # dependency of jeweler, later versions require ruby 1.9.1
22
+ # mime-types 2.0 requires Ruby version >= 1.9.2
23
+ gem "mime-types", "< 2.0"
24
+ end
16
25
  end
17
26
 
18
27
  group :test do
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = inteltech_sms
2
2
 
3
- InteltechSms is a ruby gem that provides an InteltechSms class to check credit and send SMS text messages to single or multiple recipients
3
+ InteltechSms is a ruby gem that provides an InteltechSms class to check credit and send SMS text messages to single or multiple recipients.
4
4
 
5
5
  == Installation
6
6
 
@@ -130,11 +130,12 @@ These are passed to the send_sms and send_multiple_sms methods via an optional h
130
130
 
131
131
  == Copyright
132
132
 
133
- Copyright (c) 2013 Ian Heggie. See LICENSE.txt for further details.
133
+ Copyright (c) 2013 Ian Heggie - MIT License. See LICENSE.txt for further details.
134
134
 
135
135
  === Known issues
136
136
 
137
- * The SMS Gateway no longer responds with 2015 Bad number when a mobile number is not connected. The gateway accepts the request and charges for it, then posts the failure in the history log. (Tested using numbers reserved for fictitious use in films and books etc - tests are now disabled)
137
+ * The SMS Gateway no longer responds with 2015 Bad number when a mobile number is not connected. The gateway accepts the request and charges for it, then posts the failure in the history log. (Previously tested using numbers reserved for fictitious use in films and books etc - tests are now disabled)
138
+ * The SMS Gateway no longer responds with 2006 Unathorized when a blank username is submitted (An internal 2102 error is returned instead).
138
139
 
139
140
  === Main Contributors
140
141
 
@@ -143,5 +144,5 @@ Copyright (c) 2013 Ian Heggie. See LICENSE.txt for further details.
143
144
 
144
145
  === Other/Ongoing Contributors
145
146
 
146
- * Intelligent Technologies (inteltech.com.au) - Contributing an hour and 5% commission to development costs
147
+ * Intelligent Technologies (inteltech.com.au) - Contributed an hour and 5% commission to development costs
147
148
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "inteltech_sms"
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ian Heggie"]
12
- s.date = "2013-12-01"
12
+ s.date = "2014-02-17"
13
13
  s.description = "Ruby gem that provides an InteltechSms class to check credit and send SMS text messages to single or multiple recipients"
14
14
  s.email = "ian@heggie.biz"
15
15
  s.extra_rdoc_files = [
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".coveralls.yml",
21
21
  ".document",
22
- ".rbenv-gemsets",
23
22
  ".travis.yml",
24
23
  "Gemfile",
25
24
  "LICENSE.txt",
@@ -46,7 +45,7 @@ Gem::Specification.new do |s|
46
45
  s.add_development_dependency(%q<rdoc>, [">= 3.12"])
47
46
  s.add_development_dependency(%q<bundler>, [">= 1.2.3"])
48
47
  s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
49
- s.add_development_dependency(%q<travis>, [">= 0"])
48
+ s.add_development_dependency(%q<travis>, [">= 1.6.0"])
50
49
  s.add_development_dependency(%q<travis-lint>, [">= 0"])
51
50
  s.add_development_dependency(%q<shoulda-context>, [">= 0"])
52
51
  s.add_development_dependency(%q<coveralls>, [">= 0"])
@@ -54,7 +53,7 @@ Gem::Specification.new do |s|
54
53
  s.add_dependency(%q<rdoc>, [">= 3.12"])
55
54
  s.add_dependency(%q<bundler>, [">= 1.2.3"])
56
55
  s.add_dependency(%q<jeweler>, [">= 1.8.4"])
57
- s.add_dependency(%q<travis>, [">= 0"])
56
+ s.add_dependency(%q<travis>, [">= 1.6.0"])
58
57
  s.add_dependency(%q<travis-lint>, [">= 0"])
59
58
  s.add_dependency(%q<shoulda-context>, [">= 0"])
60
59
  s.add_dependency(%q<coveralls>, [">= 0"])
@@ -63,7 +62,7 @@ Gem::Specification.new do |s|
63
62
  s.add_dependency(%q<rdoc>, [">= 3.12"])
64
63
  s.add_dependency(%q<bundler>, [">= 1.2.3"])
65
64
  s.add_dependency(%q<jeweler>, [">= 1.8.4"])
66
- s.add_dependency(%q<travis>, [">= 0"])
65
+ s.add_dependency(%q<travis>, [">= 1.6.0"])
67
66
  s.add_dependency(%q<travis-lint>, [">= 0"])
68
67
  s.add_dependency(%q<shoulda-context>, [">= 0"])
69
68
  s.add_dependency(%q<coveralls>, [">= 0"])
@@ -106,17 +106,26 @@ class TestInteltechSms < Test::Unit::TestCase
106
106
  ex = assert_raises InteltechSms::Error do
107
107
  @bad_gateway.send_sms TEST_SMS, 'Tests from ruby - with blank username raise an Unauthorized Error exception when send_sms is called' << UNIQUE_STRING
108
108
  end
109
- assert_equal InteltechSms::Unauthorized.new(TEST_SMS, "2006"), ex.response
109
+ if ex.response.response_code == "2102" # recent changes produce an internal error
110
+ assert_equal InteltechSms::Failure.new(TEST_SMS, "2102"), ex.response
111
+ else
112
+ assert_equal InteltechSms::Unauthorized.new(TEST_SMS, "2006"), ex.response
113
+ end
110
114
  end
111
115
 
112
116
  should "return an array Unauthorized responses when send_multiple_sms is called" do
113
117
  @res = @bad_gateway.send_multiple_sms [TEST_SMS, TEST_SMS2], 'Test from Ruby - with blank username return an array Unauthorized responses when send_multiple_sms is called' << UNIQUE_STRING
114
118
  assert_kind_of Array, @res
115
- assert_equal 2, @res.length, "send_multiple_sms returns results for each sms sent"
116
- assert_kind_of InteltechSms::Unauthorized, @res[0], "send_multiple_sms returns Unauthorized for 1st element"
117
- assert_equal InteltechSms::Unauthorized.new(TEST_SMS, "2006"), @res[0]
118
- assert_kind_of InteltechSms::Unauthorized, @res[1], "send_multiple_sms returns Unauthorized for 2nd element"
119
- assert_equal InteltechSms::Unauthorized.new(TEST_SMS2, "2006"), @res[1]
119
+ if @res.length == 1
120
+ assert_kind_of InteltechSms::Failure, @res[0], "send_multiple_sms can trigger internal error"
121
+ assert_equal InteltechSms::Failure.new('none', '2102'), @res[0]
122
+ else
123
+ assert_equal 2, @res.length, "send_multiple_sms returns results for each sms sent"
124
+ assert_kind_of InteltechSms::Unauthorized, @res[0], "send_multiple_sms returns Unauthorized for 1st element"
125
+ assert_equal InteltechSms::Unauthorized.new(TEST_SMS, "2006"), @res[0]
126
+ assert_kind_of InteltechSms::Unauthorized, @res[1], "send_multiple_sms returns Unauthorized for 2nd element"
127
+ assert_equal InteltechSms::Unauthorized.new(TEST_SMS2, "2006"), @res[1]
128
+ end
120
129
  end
121
130
 
122
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inteltech_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-01 00:00:00.000000000 Z
12
+ date: 2014-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 1.6.0
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
- version: '0'
77
+ version: 1.6.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: travis-lint
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,6 @@ extra_rdoc_files:
134
134
  files:
135
135
  - .coveralls.yml
136
136
  - .document
137
- - .rbenv-gemsets
138
137
  - .travis.yml
139
138
  - Gemfile
140
139
  - LICENSE.txt
@@ -162,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
161
  version: '0'
163
162
  segments:
164
163
  - 0
165
- hash: 3823831379726241367
164
+ hash: -4430373541633431441
166
165
  required_rubygems_version: !ruby/object:Gem::Requirement
167
166
  none: false
168
167
  requirements:
data/.rbenv-gemsets DELETED
@@ -1 +0,0 @@
1
- inteltech_sms default