Permalink
Browse files

Merge pull request #3 from JakubOboza/master

Made it compatible with Ruby 2.0
  • Loading branch information...
2 parents 36877c8 + ef930d2 commit 898dcf51f34996ba94e01669c3df862054104c89 @adammck committed Oct 7, 2013
Showing with 21 additions and 11 deletions.
  1. +14 −3 README.rdoc
  2. +7 −8 rubygsm.gemspec
View
17 README.rdoc
@@ -3,21 +3,26 @@ to provide a nifty interface to send and receive SMS messages via a GSM modem.
=== Sample Usage
-
+
class ReverseApp
def initialize(gsm)
gsm.receive(method(:incoming))
@gsm = gsm
end
-
+
def incoming(from, datetime, message)
@gsm.send(from, message.reverse)
end
end
- gsm = GsmModem.new
+ gsm = Gsm::Modem.new("/dev/tty.usbserial")
ReverseApp.new(gsm)
+If you just want to send sms
+
+ gsm = Gsm::Modem.new("/dev/tty.usbserial")
+ msg = Gsm::Outgoing.new(gsm, "+447777777777", "Oh hai")
+ msg.send!
=== Installing
RubyGSM is distributed via GitHub[http://github.com/adammck/rubygsm], which you must
@@ -41,6 +46,12 @@ ignore the Gem dependancy:
$ sudo apt-get install libserialport-ruby
$ sudo gem install --ignore-dependencies adammck-rubygsm
+=== Building gem
+
+ $ gem build rubygsm.gemspec
+
+=== Known issues
+There is a known issue when you try to send message to shortcode. Enble :debug to see problem.
=== Devices Tested
* Multitech MTCBA
View
15 rubygsm.gemspec
@@ -1,13 +1,13 @@
Gem::Specification.new do |s|
s.name = "rubygsm"
- s.version = "0.41"
- s.date = "2009-03-05"
+ s.version = "0.42"
+ s.date = "2013-10-05"
s.summary = "Send and receive SMS with a GSM modem"
s.email = "adam.mckaig@gmail.com"
s.homepage = "http://github.com/adammck/rubygsm"
s.authors = ["Adam Mckaig"]
s.has_rdoc = true
-
+
s.files = [
"rubygsm.gemspec",
"README.rdoc",
@@ -17,14 +17,13 @@ Gem::Specification.new do |s|
"lib/rubygsm/log.rb",
"lib/rubygsm/msg/incoming.rb",
"lib/rubygsm/msg/outgoing.rb",
- "bin/gsm-modem-band",
- "bin/gsm-app-monitor"
+ "bin/gsm-modem-band"
]
-
+
s.executables = [
"gsm-modem-band",
"sms"
]
-
- s.add_dependency("toholio-serialport", ["> 0.7.1"])
+
+ s.add_dependency("serialport", [">= 1.1.0"])
end

0 comments on commit 898dcf5

Please sign in to comment.