inteltech_sms 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rbenv-gemsets ADDED
@@ -0,0 +1 @@
1
+ inteltech_sms default
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.8.7-p371
data/.travis.yml CHANGED
@@ -1,17 +1,32 @@
1
- language: ruby
2
- notifications:
3
- email:
4
- on_success: change
1
+ ---
2
+ notifications:
3
+ email:
5
4
  on_failure: always
6
- rvm:
7
- - 1.8.7
8
- - 1.9.3
9
- before_install:
10
- - gem update --system
11
- - gem --version
12
- - gem install bundler
13
- - bundle --version
14
- before_script:
15
- - bundle exec rake install
16
- env:
5
+ on_success: change
6
+ matrix:
7
+ allow_failures:
8
+ - rvm: jruby-head
9
+ - rvm: ruby-head
10
+ - rvm: ree
11
+ before_script:
12
+ - bundle exec rake install
13
+ language: ruby
14
+ before_install:
15
+ - gem update --system
16
+ - gem --version
17
+ - gem install bundler
18
+ - bundle --version
19
+ env:
20
+ global:
17
21
  - TEST_GEM=true
22
+ - secure: "D6Sd+bPmNb3P+98W1arc+SbaFV8oC+0NhnZX9fcoIqCHfnVpt6Vd54idUxJv\nhhFUFmySl17zCX/HRaVoscpCYPcJWRWIeXSD4qrHlObaTx+BDKlMAlWl/Y7d\nQy9c4g+QbDhz94l3DeNW7VbCYz/YYyRPBCcZK+K3H1KPmMtngRU="
23
+ rvm:
24
+ - 1.8.7
25
+ - 1.9.3
26
+ - rbx-18mode
27
+ - rbx-19mode
28
+ - jruby-18mode
29
+ - jruby-19mode
30
+ - jruby-head
31
+ - ruby-head
32
+ - ree
data/Gemfile CHANGED
@@ -9,11 +9,12 @@ 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"
12
13
  gem "travis-lint", ">= 0"
13
14
  gem 'shoulda-context', '>= 0'
14
15
  end
15
16
 
16
17
  group :test do
17
- gem "rcov", ">= 0", :platforms => :ruby_18
18
+ gem "rcov", ">= 0", :platforms => :mri_18
18
19
  gem "simplecov", ">= 0", :require => false, :platforms => :ruby_19
19
20
  end
data/Gemfile.lock CHANGED
@@ -1,15 +1,41 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ addressable (2.3.2)
5
+ backports (2.7.1)
6
+ coderay (1.0.8)
7
+ faraday (0.8.4)
8
+ multipart-post (~> 1.1)
9
+ faraday_middleware (0.9.0)
10
+ faraday (>= 0.7.4, < 0.9)
11
+ gh (0.9.1)
12
+ addressable
13
+ backports (~> 2.3)
14
+ faraday (~> 0.8)
15
+ multi_json (~> 1.0)
16
+ net-http-persistent (>= 2.7)
17
+ net-http-pipeline
4
18
  git (1.2.5)
5
19
  hashr (0.0.22)
20
+ highline (1.6.15)
6
21
  jeweler (1.8.4)
7
22
  bundler (~> 1.0)
8
23
  git (>= 1.2.5)
9
24
  rake
10
25
  rdoc
11
26
  json (1.7.6)
27
+ launchy (2.1.2)
28
+ addressable (~> 2.3)
29
+ method_source (0.8.1)
12
30
  multi_json (1.5.0)
31
+ multipart-post (1.1.5)
32
+ net-http-persistent (2.8)
33
+ net-http-pipeline (1.0.1)
34
+ netrc (0.7.7)
35
+ pry (0.9.11.4)
36
+ coderay (~> 1.0.5)
37
+ method_source (~> 0.8)
38
+ slop (~> 3.4)
13
39
  rake (10.0.3)
14
40
  rcov (1.0.0)
15
41
  rdoc (3.12)
@@ -19,6 +45,17 @@ GEM
19
45
  multi_json (~> 1.0)
20
46
  simplecov-html (~> 0.7.1)
21
47
  simplecov-html (0.7.1)
48
+ slop (3.4.3)
49
+ travis (1.1.3)
50
+ backports (~> 2.6)
51
+ faraday (~> 0.8)
52
+ faraday_middleware (~> 0.9)
53
+ gh (~> 0.9)
54
+ highline (~> 1.6)
55
+ launchy (~> 2.1)
56
+ net-http-persistent (~> 2.8)
57
+ netrc (~> 0.7)
58
+ pry (~> 0.9)
22
59
  travis-lint (1.5.0)
23
60
  hashr (~> 0.0.22)
24
61
 
@@ -32,4 +69,5 @@ DEPENDENCIES
32
69
  rdoc (~> 3.12)
33
70
  shoulda-context
34
71
  simplecov
72
+ travis
35
73
  travis-lint
data/README.rdoc CHANGED
@@ -15,7 +15,7 @@ As a Gem from gemcutter
15
15
 
16
16
  == Usage
17
17
 
18
- You will require an account with inteltech.com.au for the username and secret key. New accounts come with some free credits.
18
+ You will require an account with http://inteltech.com.au for the username and secret key - They offer a free trial so you can try before buying.
19
19
 
20
20
  Note: Inteltech's gateway assumes numbers not in international format (ie starting with a plus sign) are australian numbers.
21
21
 
@@ -50,6 +50,26 @@ Example ruby code:
50
50
  puts "send_multiple_sms (sending to mobiles should work, sending to a landline should fail):"
51
51
  puts res2.collect {|r| "sms to #{r.sms} #{r.success? ? 'was successfull' : "failed (#{r.class} with code #{r.response_code})"}."}.join("\n")
52
52
 
53
+ === Optional arguments
54
+
55
+ There are a few optional parameters that the gateway will accept.
56
+
57
+ • senderid – 15 character custom sender ID which can be a mobile number or a alphanumeric string.
58
+ e.g. send message from MYCOMPANY. (Additional cost of 0.5 credits/message applies).
59
+ Do not use spaces. If left blank, a random mobile number will be used.
60
+
61
+ • schedule – Allows you to schedule a message delivery. Must be in unix format. e.g. 1348742950 (Use Time.now.utc.to_i to get the current time)
62
+
63
+ These are passed to the send_sms and send_multiple_sms methods via an optional hash argument:
64
+
65
+ # To schedule the sms in 12 minutes time ...
66
+
67
+ res = gateway.send_sms(test_sms,'Test from Ruby', :schedule => Time.now.utc.to_i + (12 * 60))
68
+
69
+ # To schedule the sms and supply a custom sender id
70
+
71
+ res2 = gateway.send_multiple_sms([test_sms, test_sms2, landline_sms],'Test from Ruby to multiple numbers', :senderid => 'MYCOMPANY', :schedule => 1348742950)
72
+
53
73
  == Continuous integration tests
54
74
 
55
75
  Travis CI testing result: {<img src="https://travis-ci.org/ianheggie/inteltech_sms.png" />}[https://travis-ci.org/ianheggie/inteltech_sms]
@@ -74,5 +94,6 @@ Copyright (c) 2013 Ian Heggie. See LICENSE.txt for further details.
74
94
  * Timelapse Pty Ltd (timelapse.com.au) - Paid for development of lib/inteltech_sms.rb and released code for public use
75
95
 
76
96
  === Other/Ongoing Contributors
77
- * Intelligent Technologies - Contributing an hour and 5% commission to development costs
97
+
98
+ * Intelligent Technologies (inteltech.com.au) - Contributing an hour and 5% commission to development costs
78
99
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "inteltech_sms"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
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-01-22"
12
+ s.date = "2013-02-04"
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 = [
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
+ ".rbenv-gemsets",
22
+ ".ruby-version",
21
23
  ".travis.yml",
22
24
  "Gemfile",
23
25
  "Gemfile.lock",
@@ -33,7 +35,7 @@ Gem::Specification.new do |s|
33
35
  s.homepage = "http://github.com/ianheggie/inteltech_sms"
34
36
  s.licenses = ["MIT"]
35
37
  s.require_paths = ["lib"]
36
- s.rubygems_version = "1.8.24"
38
+ s.rubygems_version = "1.8.25"
37
39
  s.summary = "Ruby Gem to send SMS via inteltech.com.au"
38
40
 
39
41
  if s.respond_to? :specification_version then
@@ -43,12 +45,14 @@ Gem::Specification.new do |s|
43
45
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
44
46
  s.add_development_dependency(%q<bundler>, ["~> 1.2.3"])
45
47
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
48
+ s.add_development_dependency(%q<travis>, [">= 0"])
46
49
  s.add_development_dependency(%q<travis-lint>, [">= 0"])
47
50
  s.add_development_dependency(%q<shoulda-context>, [">= 0"])
48
51
  else
49
52
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
50
53
  s.add_dependency(%q<bundler>, ["~> 1.2.3"])
51
54
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
55
+ s.add_dependency(%q<travis>, [">= 0"])
52
56
  s.add_dependency(%q<travis-lint>, [">= 0"])
53
57
  s.add_dependency(%q<shoulda-context>, [">= 0"])
54
58
  end
@@ -56,6 +60,7 @@ Gem::Specification.new do |s|
56
60
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
57
61
  s.add_dependency(%q<bundler>, ["~> 1.2.3"])
58
62
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
63
+ s.add_dependency(%q<travis>, [">= 0"])
59
64
  s.add_dependency(%q<travis-lint>, [">= 0"])
60
65
  s.add_dependency(%q<shoulda-context>, [">= 0"])
61
66
  end
data/test/helper.rb CHANGED
@@ -11,6 +11,7 @@ require 'test/unit'
11
11
  require 'shoulda-context'
12
12
 
13
13
  unless ENV['TEST_GEM']
14
+ puts "test/helper: Adding ../lib to $LOAD_PATH"
14
15
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
15
16
  end
16
17
  #$LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -20,6 +20,7 @@ class TestInteltechSms < Test::Unit::TestCase
20
20
  puts "Tests for non error conditions are disabled (missing SMS_USERNAME and SMS_KEY values for a valid account)"
21
21
  else
22
22
  @@username = ENV['SMS_USERNAME']
23
+ puts "Tests for non error conditions have been enabled"
23
24
  @@secure_key = ENV['SMS_KEY']
24
25
  if ENV['MOBILE_NUMBER'].to_s.empty?
25
26
  puts "If MOBILE_NUMBER is supplied, then a test sms will be sent (using one credit)"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inteltech_sms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian Heggie
@@ -15,9 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-22 00:00:00 Z
18
+ date: 2013-02-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
+ type: :development
21
22
  requirement: &id001 !ruby/object:Gem::Requirement
22
23
  none: false
23
24
  requirements:
@@ -31,8 +32,8 @@ dependencies:
31
32
  version_requirements: *id001
32
33
  name: rdoc
33
34
  prerelease: false
34
- type: :development
35
35
  - !ruby/object:Gem::Dependency
36
+ type: :development
36
37
  requirement: &id002 !ruby/object:Gem::Requirement
37
38
  none: false
38
39
  requirements:
@@ -47,8 +48,8 @@ dependencies:
47
48
  version_requirements: *id002
48
49
  name: bundler
49
50
  prerelease: false
50
- type: :development
51
51
  - !ruby/object:Gem::Dependency
52
+ type: :development
52
53
  requirement: &id003 !ruby/object:Gem::Requirement
53
54
  none: false
54
55
  requirements:
@@ -63,8 +64,8 @@ dependencies:
63
64
  version_requirements: *id003
64
65
  name: jeweler
65
66
  prerelease: false
66
- type: :development
67
67
  - !ruby/object:Gem::Dependency
68
+ type: :development
68
69
  requirement: &id004 !ruby/object:Gem::Requirement
69
70
  none: false
70
71
  requirements:
@@ -75,10 +76,10 @@ dependencies:
75
76
  - 0
76
77
  version: "0"
77
78
  version_requirements: *id004
78
- name: travis-lint
79
+ name: travis
79
80
  prerelease: false
80
- type: :development
81
81
  - !ruby/object:Gem::Dependency
82
+ type: :development
82
83
  requirement: &id005 !ruby/object:Gem::Requirement
83
84
  none: false
84
85
  requirements:
@@ -89,9 +90,22 @@ dependencies:
89
90
  - 0
90
91
  version: "0"
91
92
  version_requirements: *id005
92
- name: shoulda-context
93
+ name: travis-lint
93
94
  prerelease: false
95
+ - !ruby/object:Gem::Dependency
94
96
  type: :development
97
+ requirement: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ version_requirements: *id006
107
+ name: shoulda-context
108
+ prerelease: false
95
109
  description: Ruby gem that provides an InteltechSms class to check credit and send SMS text messages to single or multiple recipients
96
110
  email: ian@heggie.biz
97
111
  executables: []
@@ -103,6 +117,8 @@ extra_rdoc_files:
103
117
  - README.rdoc
104
118
  files:
105
119
  - .document
120
+ - .rbenv-gemsets
121
+ - .ruby-version
106
122
  - .travis.yml
107
123
  - Gemfile
108
124
  - Gemfile.lock
@@ -143,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
159
  requirements: []
144
160
 
145
161
  rubyforge_project:
146
- rubygems_version: 1.8.24
162
+ rubygems_version: 1.8.25
147
163
  signing_key:
148
164
  specification_version: 3
149
165
  summary: Ruby Gem to send SMS via inteltech.com.au