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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98f49ef1e704a1ff5f78d6f6e31870178d2084dc
4
- data.tar.gz: 247be2d1b8482939d54a4a4e1504bf718c00456f
3
+ metadata.gz: abec3bfe5836ee20f161eea5ab25a3c858d1a344
4
+ data.tar.gz: 91c5ff410f42418f009b88a3de62c82cb2a20f2a
5
5
  SHA512:
6
- metadata.gz: 9e70ccb092f0a0487393d0543d044f7286031f4b013a7d3071f9731b30a7a9cb1538569b5b16eb417d5d72e7e7b53bdc9244314d5f194f574445c43f7454889b
7
- data.tar.gz: 81ecdec9642d0bc26c31ba3fb3ead61818a3f92143eaf14e89acd4b683d62cf3b9297c7f6253e2da535ea9f022aadbad975d66463a2a59e6104024e391f5f0a4
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 config_yaml(opts = nil)
24
- @@config_yaml = opts || YAML::load(File.open(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'sms-easy.yml')))
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 @@config_yaml
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
- config_yaml['carriers']
38
+ @@config['carriers']
33
39
  end
34
40
 
35
41
  def from_address
36
- config_yaml['config']['from_address']
42
+ @@config['config']['from_address']
37
43
  end
38
44
 
39
45
  def carrier_name(key)
@@ -1,3 +1,3 @@
1
1
  module SMSEasy
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -2,4 +2,4 @@ gem 'minitest'
2
2
  require 'minitest/autorun'
3
3
  require 'minitest/pride'
4
4
  require_relative File.join('..', 'lib', 'sms-easy.rb')
5
- SMSEasy::Client.config_yaml
5
+ SMSEasy::Client.configure
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms-easy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan G. Lim