promotexter 0.1.2 → 0.1.3

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: 80820699b0b7d984b951894de550f80053e4690f
4
- data.tar.gz: 6aaeb880f5dad98a9cf1683805d53b88070d02c0
3
+ metadata.gz: 188f8874517f3a439d40dc2350db20f4f104b5d8
4
+ data.tar.gz: 579f41792301d1807fc7706fc55073d90d7e1d54
5
5
  SHA512:
6
- metadata.gz: 974d4adbd1991e3088111caf10acd0d9337eb17c09acd6cc2b239d1ae50a603dd55c190a74363c7ffc77af80c112bf33edb65fb40ea394b5fbba3d97db25f48c
7
- data.tar.gz: e71c7694b6c9c01c15789493108c46c1e75a79c4ca4e5acde45ff0b5fbb9862fc9913ca2d5aac4ef1fa20e50d338d55f82f5a74bd39e5364fd4f9e1e5db93de8
6
+ metadata.gz: 3a0d3d7f187b074815d02fa9eba20ae57ef3dc2e70c27a2df3ed26fc6052a4da85705b1b7b91644fd61b21d5d181af8a1929840dd9ca918429bad3decba83b27
7
+ data.tar.gz: 9aded0055d68c832ea2f145e2bbdfaba40e1ac11409d628e66a53460997e5e4c325467bbc813c66462685db8856dca85375389c6f3cdad1ec7467c5839baa806
@@ -4,4 +4,25 @@ require 'promotexter/messenger'
4
4
  require 'promotexter/base'
5
5
 
6
6
  module Promotexter
7
+
8
+ attr_accessor :configuration
9
+
10
+ class << self
11
+ attr_accessor :configuration
12
+ end
13
+
14
+ def self.configure
15
+ self.configuration ||= Configuration.new
16
+ # yield(configuration)
17
+ end
18
+
19
+ class Configuration
20
+
21
+ attr_accessor :api_key
22
+
23
+ def initialize
24
+ @api_key = ''
25
+ end
26
+ end
27
+
7
28
  end
@@ -1,20 +1,22 @@
1
1
  module Promotexter
2
2
  class Base
3
3
 
4
- def initialize clientid, senderid, passkey
4
+ attr_accessor :configuration
5
+
6
+ def initialize clientid, senderid
5
7
  @domain = "http://promotexter.com"
6
8
  @clientid = clientid
7
- @senderid = senderid
8
- @passkey = passkey
9
+ @senderid = senderid
10
+ @api_key = Promotexter.configure.api_key
9
11
  end
10
12
 
11
13
  def send_sms(message, recipient)
12
- messenger = Messenger.new @domain, @clientid, @senderid, @passkey
14
+ messenger = Messenger.new @domain, @clientid, @senderid, @api_key
13
15
  messenger.send_sms(message, recipient)
14
16
  end
15
17
 
16
18
  def get_balance
17
- messenger = Messenger.new @domain, @clientid, @senderid, @passkey
19
+ messenger = Messenger.new @domain, @clientid, @senderid, @api_key
18
20
  messenger.get_balance
19
21
  end
20
22
 
@@ -1,3 +1,3 @@
1
1
  module Promotexter
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promotexter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - denmarkmeralpis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2017-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,7 +57,7 @@ files:
57
57
  - test/promotexter_test.rb
58
58
  - test/sms_test.rb
59
59
  - test/test_helper.rb
60
- homepage: http://genmcrg.com
60
+ homepage: http://nueca.net
61
61
  licenses:
62
62
  - MIT
63
63
  metadata: {}