sms-easy 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sms/easy/easy.rb +11 -5
- data/lib/sms/easy/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abec3bfe5836ee20f161eea5ab25a3c858d1a344
|
4
|
+
data.tar.gz: 91c5ff410f42418f009b88a3de62c82cb2a20f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b3e2c373e3f216853e14211c70a9ee9eacf3e43729fb9ba4faf46877b62367609dd479a3ab063763a91034710009af6ffb8857c4cc67ec2b3a987fa39f004d5
|
7
|
+
data.tar.gz: 529968ec14df4414545486a6dd8399aae806b60345d6205bb6069c01b6bb529d5b527e3dbbba26598b7e1a98bc90bd0523d34a17b5217aebb3812651d5408580
|
data/lib/sms/easy/easy.rb
CHANGED
@@ -2,6 +2,8 @@ module SMSEasy
|
|
2
2
|
|
3
3
|
class Client
|
4
4
|
|
5
|
+
@@config = {}
|
6
|
+
|
5
7
|
# Delivers the SMS message in the form of an e-mail
|
6
8
|
# sms-easy.deliver("1234567890","at&t","hello world")
|
7
9
|
def deliver(number, carrier, message, options = {})
|
@@ -20,20 +22,24 @@ module SMSEasy
|
|
20
22
|
end
|
21
23
|
|
22
24
|
class << self
|
23
|
-
def
|
24
|
-
@@
|
25
|
+
def configure(opts = nil)
|
26
|
+
@@config = opts || YAML::load(File.open(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'sms-easy.yml')))
|
25
27
|
# require 'pp'
|
26
|
-
# pp
|
28
|
+
# pp @@@@config
|
27
29
|
end
|
28
30
|
|
31
|
+
def config
|
32
|
+
@@config
|
33
|
+
end
|
34
|
+
|
29
35
|
# Returns back a list of all carriers
|
30
36
|
# SMSEasy.carriers
|
31
37
|
def carriers
|
32
|
-
|
38
|
+
@@config['carriers']
|
33
39
|
end
|
34
40
|
|
35
41
|
def from_address
|
36
|
-
|
42
|
+
@@config['config']['from_address']
|
37
43
|
end
|
38
44
|
|
39
45
|
def carrier_name(key)
|
data/lib/sms/easy/version.rb
CHANGED
data/test/test_helper.rb
CHANGED