incline 0.1.5 → 0.1.7

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: 031e478baf366cdebf99cb4659498632374a87cc
4
- data.tar.gz: a25cdc96040f97b41ba24b637b1a580d27a655e5
3
+ metadata.gz: cf198e645fba31e26e730a4fcf2deae2b72a8d92
4
+ data.tar.gz: 4c5782b14aa7db868e44ec418f0272aa6cbd026a
5
5
  SHA512:
6
- metadata.gz: 8bf9dbd8fe73f9dba8e04fa2c1b43642e22ae62de37edb212ce88e7557b9ed8c5148bfd208a35c9b4368cdd8015299b5122969592cf838917640decf47b53aa8
7
- data.tar.gz: 1be0ccdb1ead2ea1008378d1e0a231c4ffe40023a5f0b13985f3d2bbf1db8f543c0ca19a2a2637cb74db48b30df8c08976086363279d3f266942499a934ce15b
6
+ metadata.gz: e4422ca100423246a3eb80de970c1e6958379b14afc7294c07f4e739f66b3b5442414eae78781d5dc577c303baea32663bb5e3e6dc49f50095dd9afce86b3ed7
7
+ data.tar.gz: b84f5223ea71524f0f445a6a5cdf0aacb3d85d6e63b39397b30db8ea3ed4272c9994b98e949247a0167f4c0115e4367118b6bf02d52fb18217d795ceebf4fc11
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incline (0.1.5)
4
+ incline (0.1.7)
5
5
  ansi (~> 1.5.0)
6
6
  bcrypt
7
7
  bootstrap-sass
@@ -134,10 +134,17 @@ GEM
134
134
  rake (>= 0.8.7)
135
135
  thor (>= 0.18.1, < 2.0)
136
136
  rake (12.0.0)
137
+ rb-fsevent (0.10.2)
138
+ rb-inotify (0.9.10)
139
+ ffi (>= 0.5.0, < 2)
137
140
  redcarpet (3.4.0)
138
141
  rubyserial (0.4.0)
139
142
  ffi (~> 1.9, >= 1.9.3)
140
- sass (3.4.25)
143
+ sass (3.5.1)
144
+ sass-listen (~> 4.0.0)
145
+ sass-listen (4.0.0)
146
+ rb-fsevent (~> 0.9, >= 0.9.4)
147
+ rb-inotify (~> 0.9, >= 0.9.7)
141
148
  sass-rails (5.0.6)
142
149
  railties (>= 4.0.0, < 6)
143
150
  sass (~> 3.1)
@@ -2,6 +2,7 @@ require 'cgi/util'
2
2
  require 'yaml'
3
3
  require 'fileutils'
4
4
  require 'rails'
5
+ require 'erb'
5
6
 
6
7
  module Incline::Extensions
7
8
  ##
@@ -42,7 +43,7 @@ module Incline::Extensions
42
43
  begin
43
44
  yaml = Rails.root.join('config','instance.yml')
44
45
  if File.exist?(yaml)
45
- yaml = (YAML.load_file(yaml) || {}).symbolize_keys
46
+ yaml = (YAML.load(ERB.new(File.read(yaml)).result) || {}).symbolize_keys
46
47
  yaml[:name].blank? ? 'default' : yaml[:name]
47
48
  else
48
49
  'default'
@@ -1,3 +1,4 @@
1
+ require 'erb'
1
2
 
2
3
  module Incline
3
4
  ##
@@ -143,7 +144,7 @@ module Incline
143
144
  end
144
145
  end
145
146
  domains.map do |dom|
146
- dom.to_s.downcase.strip
147
+ dom = dom.to_s.downcase.strip
147
148
  raise ArgumentError, "The domain #{dom.inspect} does not appear to be a valid domain." unless dom =~ /\A[a-z0-9]+(?:[-.][a-z0-9]+)*\.[a-z]+\Z/
148
149
  dom
149
150
  end.each do |dom|
@@ -191,7 +192,7 @@ module Incline
191
192
  begin
192
193
  cfg = Rails.root.join('config','auth.yml')
193
194
  if File.exist?(cfg)
194
- cfg = YAML.load_file(cfg)
195
+ cfg = YAML.load(ERB.new(File.read(cfg)).result)
195
196
  if cfg.is_a?(::Hash)
196
197
  cfg = cfg[Rails.env]
197
198
  (cfg || {}).symbolize_keys
@@ -1,3 +1,3 @@
1
1
  module Incline
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/incline.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'incline/version'
2
2
  require 'incline/log'
3
+ require 'erb'
3
4
 
4
5
  ##
5
6
  # A Rails quick start library.
@@ -45,7 +46,7 @@ module Incline
45
46
  begin
46
47
  yaml = Rails.root.join('config', 'email.yml')
47
48
  if File.exist?(yaml)
48
- cfg = File.exist?(yaml) ? YAML.load_file(yaml) : { }
49
+ cfg = File.exist?(yaml) ? YAML.load(ERB.new(File.read(yaml)).result) : { }
49
50
  cfg = (cfg[Rails.env] || {}).symbolize_keys
50
51
 
51
52
  cfg = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incline
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
  - Beau Barker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails