twilio_phone_verification 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b04aaec63e1e641741a14af719d137fc6c41d1a
4
- data.tar.gz: c9298ed68228c4f8198b6d51d7f481397c99e10d
3
+ metadata.gz: 984b6e425bf2cc64b8cc14cbf50267a9688cd698
4
+ data.tar.gz: c7ebff9dfff654f6d92a6e05338dd810bf1511fb
5
5
  SHA512:
6
- metadata.gz: 36b262c66159bb2e8dcfb99e6771463da3f711f0187364f8f2744d7e16acd5e2a3249c43c7dd4ad8bc88ab915709d17c3e38280dfb863393b762fa424893ae1a
7
- data.tar.gz: 0d23b081b4cef9587d6bf439114681c4ddea29c1a20117de10b3c79d34cb9a8346266fc038b6c108cb901e5e9d7d768c71f8becf78db09f4e454d5a256e75a06
6
+ metadata.gz: d81ae67dd395c8e105348193621af541e2fc756d36cabeb2471c6b890ccac80a60cc3c54723654282475f6181fcfa8026650a91fe06fcfbc13656ec204bf23a5
7
+ data.tar.gz: 580602a9b6bde2e29028d17c2eacaa6caa48fc991e7cde1fe56e57f31d9d7158cc2cf530e184ab764116ed68eaeeb78d7114c212a6da39dcd8da5c567965041a
@@ -19,7 +19,7 @@ module TwilioPhoneVerification
19
19
  end
20
20
 
21
21
  def self.number
22
- ENV.fetch("TWILIO_NUMBER")
22
+ TwilioPhoneVerification.configuration.from
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module TwilioPhoneVerification
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -2,14 +2,20 @@ require "active_support/all"
2
2
  require "twilio_phone_verification/version"
3
3
  require "twilio_phone_verification/phonable"
4
4
  require "twilio_phone_verification/twilio_service"
5
+ require "twilio_phone_verification/configuration"
5
6
  require "twilio-ruby"
6
7
 
7
8
  module TwilioPhoneVerification
8
9
  def self.configure(&block)
10
+ yield configuration
11
+ raise "Configuration error" unless configuration.account_sid && configuration.auth_token && configuration.from
9
12
  Twilio.configure do |config|
10
- yield config
11
- # config.account_sid = ENV.fetch("TWILIO_ACCOUNT_SID")
12
- # config.auth_token = ENV.fetch("TWILIO_AUTH_TOKEN")
13
+ config.account_sid = configuration.account_sid
14
+ config.auth_token = configuration.auth_token
13
15
  end
14
16
  end
17
+
18
+ def self.configuration
19
+ @configuration ||= Configuration.new
20
+ end
15
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio_phone_verification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - vishgleb@mail.ru