sms_gateway 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/sms_gateway.rb CHANGED
@@ -1,13 +1,9 @@
1
- require 'rails'
2
- require 'rails/generators'
3
-
4
1
  require 'sms_gateway/base'
5
2
  require 'sms_gateway/sms'
6
3
  require 'sms_gateway/adapters/sms_global'
7
4
  require 'sms_gateway/adapters/sms_trade'
8
5
  require 'sms_gateway/adapters/test'
9
6
  require 'sms_gateway/jobs/sms_job'
10
- require 'sms_gateway/generators/install/install_generator'
11
7
 
12
8
  module SmsGateway
13
9
  end
@@ -18,11 +18,10 @@ module SmsGateway
18
18
  attr_accessor :deliveries
19
19
 
20
20
  def initialize(config={})
21
- @logger = Logger.new(STDOUT)
21
+ #@logger = Logger.new(STDOUT)
22
22
  end
23
23
 
24
24
  def send_sms(sms)
25
- #@logger.info "would be sending sms: #{sms.to_s}"
26
25
  SmsGateway::Base.deliveries << sms
27
26
  end
28
27
 
@@ -21,7 +21,7 @@ module SmsGateway
21
21
  end
22
22
 
23
23
  def config=(options)
24
- @config = options.symbolize_keys
24
+ @config = options
25
25
  adapter = @config.delete(:adapter)
26
26
  @config.each do |k,v|
27
27
  self.send "#{k}=", v
@@ -30,7 +30,7 @@ module SmsGateway
30
30
  end
31
31
 
32
32
  def deliver(options)
33
- self.adapter.send_sms(SmsGateway::Sms.new(options.symbolize_keys))
33
+ self.adapter.send_sms(SmsGateway::Sms.new(options))
34
34
  end
35
35
 
36
36
  def self.deliver_later(text, to, from=Base.config[:from])
@@ -1,3 +1,6 @@
1
+ require 'rails'
2
+ require 'rails/generators'
3
+
1
4
  module SmsGateway
2
5
 
3
6
  module Generators
@@ -1,4 +1,4 @@
1
1
  module SmsGateway
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: