alidayu_sms 0.3.2 → 0.3.3

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: a49b560940b7a42d217237304af67b259c0bca0d
4
- data.tar.gz: a91fdc58d71551c128c85ef923fb3335857da24f
3
+ metadata.gz: d3c44fca7fc42905e9de5812c6643e64b5faeed5
4
+ data.tar.gz: bb6479d31f56d307d5a4fe536f4f9a0e312f54a7
5
5
  SHA512:
6
- metadata.gz: 7c0893f61e83099c48305d0fc008f60492aa9788d0368db00ea46bc54cf5c7685261e4f41c36e5d2bd1ed5d0e546514563975d1a1c014b743e142977356efc48
7
- data.tar.gz: 713ef0cf8287f427b4390c96353082a026384feb6906d1da2f3efd4a4d5be43e45ba6adfddbc23f360e382bafc0210c49744f55d764203b678023fd7aba8d807
6
+ metadata.gz: b6e2e8ee94d3ce3010214109d30243a8efd6d566ddc75008837c726ac121a1a54978a0a1f1541bc75ccb538da21a4ee4fb57722536e40902151c86365e9ab070
7
+ data.tar.gz: 3c0acd5855a00c3f12ea58b70cd8308ef40140e444cf902adec1366b8bd0580f3fb003bdb25f232b83ca09f8274d66b404a84fbd0883c34ce3aa8166bfe9d525
@@ -6,12 +6,15 @@ require "active_support/all"
6
6
  require "alidayu_sms/version"
7
7
  require "alidayu_sms/alidayu"
8
8
 
9
+ require 'erb' unless defined? ERB
9
10
  require 'yaml' unless defined? YMAL
10
11
 
11
12
  # 连接配置文件
12
13
  def load_config
13
14
  if defined? ::Rails
14
- @sms_config ||= HashWithIndifferentAccess.new(YAML.load_file("#{::Rails.root}/config/alidayu_sms.yml")[::Rails.env] || {})
15
+ @sms_config ||= HashWithIndifferentAccess.new(
16
+ YAML.load(ERB::new(File.read("#{::Rails.root}/config/alidayu_sms.yml")).result)[::Rails.env] || {}
17
+ )
15
18
  else
16
19
  {}
17
20
  end
@@ -1,3 +1,3 @@
1
1
  module AlidayuSms
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alidayu_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jack ping
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n