smshelper 0.2.4 → 0.2.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -1,13 +1,17 @@
1
1
  module Smshelper
2
2
  module Api
3
3
  class Aql < Base
4
- base_uri 'http://smsc.vianett.no/V3/CPA/MT'
4
+ base_uri 'https://gw.aql.com/sms'
5
5
 
6
6
  def initialize(*args)
7
7
  config = args.shift
8
8
  add_query_options! :username => config.aql[:uname], :password => config.aql[:passwd]
9
9
  super
10
10
  end
11
+
12
+ def send_message(message)
13
+ (post 'sms_gw.php')
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -1,13 +1,25 @@
1
1
  module Smshelper
2
2
  module Api
3
3
  class Mycoolsms < Base
4
- base_uri 'http://smsc.vianett.no/V3/CPA/MT'
4
+ base_uri 'https://www.my-cool-sms.com/api-socket.php '
5
5
 
6
6
  def initialize(*args)
7
7
  config = args.shift
8
- add_query_options! :username => config.txtnation[:uname], :password => config.txtnation[:passwd]
8
+ add_query_options! :username => config.mycoolsms[:uname], :password => config.mycoolsms[:passwd]
9
9
  super
10
10
  end
11
+
12
+ def send_message(message)
13
+ (post)
14
+ end
15
+
16
+ def get_balance
17
+ (post '', :extra_query => {:function => :getbalance})
18
+ end
19
+
20
+ def hlr_lookup(number)
21
+
22
+ end
11
23
  end
12
24
  end
13
25
  end
@@ -12,7 +12,7 @@ module Smshelper
12
12
  end
13
13
 
14
14
  def send_message(message)
15
- uuid = @uuid.generate
15
+ uuid = (Digest::CRC32.hexdigest @uuid.generate).unpack('U*').collect {|x| sprintf '%02X', x}.join
16
16
 
17
17
  if message.utf_8
18
18
  message.to_hex_be
data/smshelper.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "smshelper"
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Voip Scout"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smshelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -260,7 +260,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
260
  version: '0'
261
261
  segments:
262
262
  - 0
263
- hash: 1100854447818905524
263
+ hash: -2693916128696688987
264
264
  required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  none: false
266
266
  requirements: