fast_config 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -13
  2. data/lib/fast_config.rb +11 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- Y2VmNGVkZTE4YTQ0MzA5ODIzY2NmYTIxNTNkYmJjZWZiMjE3ZjlhMw==
5
- data.tar.gz: !binary |-
6
- ZjdiYjYzMDdhYmQxZmVjNmE1MDhmODk4YWYxNzRjOTdlMTYwNDUwYw==
2
+ SHA1:
3
+ metadata.gz: 213c7dec7755710ac7574ddd535621d88fc68319
4
+ data.tar.gz: 0ef30a6b0ceb8dd82989bb613291bb8e544cd620
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MWNjZWZkODY3YWFjODIyM2I4ZDIyOGQ5OTg0ODVlYzk2MmNkZTcxN2MwODg1
10
- NWYwYTU2YWU5N2ExOWEwNTRkYmZiNzg3YTc0N2U1Zjk1ZWEwODE4NjU3OTZm
11
- ZDZmNjkzZGNhNjdkMTQxYjMxM2U2OTQ3ZTU2ZDQyOGYzNzIxYzE=
12
- data.tar.gz: !binary |-
13
- ZTFkNTRhMTU4Nzg3OTJmMTY5YmU2NWZkZWM0OGJlN2ZlZjUyYjI4MTczYTNi
14
- NDhlYWQzYmE1NTY2NDQwN2ExNzhkZGY4MDY2ZTM2ZTJkNTRjNmY5YThkNDIy
15
- NDY3MDVhYTMwYTk2MDNhZjA2OGNiZDkxMmM3MWQ4NTQwYTFlOGM=
6
+ metadata.gz: 64e2e5e8544e04ac492ce009bc20b262ee0347dddd89d2135d9d3f29433ddbd858bf7624328f0e3709a900eafc56e117a42a1cac5a1496983ee1638db4edd40c
7
+ data.tar.gz: 92fd9757fe06401c528100d6c01cd29e5c00da0473b87061c6cd7ba89f92af6687ff5f4eeb31cefde6c70bbfcbcadbe18a5fd7edac3e19cfe81e48e3dab9a2cd
data/lib/fast_config.rb CHANGED
@@ -1,8 +1,18 @@
1
1
  require 'yaml'
2
2
 
3
3
  module FastConfig
4
+ @@config_dir = nil
5
+ def self.config_dir=(dir)
6
+ @@config_dir = dir
7
+ end
8
+
9
+ def self.config_dir
10
+ ENV['FAST_CONFIG_DIR'] || @@config_dir || "config"
11
+ end
12
+
4
13
  def self.extended(main_class)
5
- configs = YAML.load_file(File.expand_path("config/#{snake_case(main_class)}.yml"))
14
+ puts self.config_dir
15
+ configs = YAML.load_file(File.expand_path("#{self.config_dir}/#{snake_case(main_class)}.yml"))
6
16
  configs[snake_case(main_class)].each{ |k,v| main_class.set(k.to_sym, v) }
7
17
  super
8
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Reister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -41,17 +41,17 @@ require_paths:
41
41
  - lib
42
42
  required_ruby_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ! '>='
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ! '>='
49
+ - - '>='
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project:
54
- rubygems_version: 2.2.2
54
+ rubygems_version: 2.4.2
55
55
  signing_key:
56
56
  specification_version: 4
57
57
  summary: FAST config files