configer 1.2.4 → 1.3.0

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: 2e4b68ec282aea92b876d3295d3b7d484c80834c
4
- data.tar.gz: d57ac80d2f3651a46b1c3eeb573f8efa1efac935
3
+ metadata.gz: 8b78da41fd3a5fca93fb45ecca03a556ad463df4
4
+ data.tar.gz: a8b166b52c809addb0ede7a60a2ac19a7b5d0a6b
5
5
  SHA512:
6
- metadata.gz: 806972683146051cafa7ed55e4a5a0ace94a3c2bdb1159c4fb0d49aebf707bf93f651ea77efd97bb3443677276935a367a59e6c627c890771c48fa1508b102e4
7
- data.tar.gz: 10761a5426d2ff3e572fc6691cab371d07241bcf6bf93747baa9529bda9f5ab3a2ae2e5cf26e93fc87684859d061613f7b8c129943304670be25c6f4e0a317bf
6
+ metadata.gz: 1dc09b115d153361217a2eb2d3d06a7447859be9d8a2b727fd5c7221305bbe757ad4bdcbc4cbcd3ca166a2e6e77e76a21c9c77f61142ba97887c747a9de4d125
7
+ data.tar.gz: 2f281faef0050d5b60e5b1a9a0274a7c33bfc3fb4d857e963e39b22fd5e63fe97e36e8b3bf41f6c7d1b7895f931e6c1b04c58160bfdda463c25cff9c67d68c9c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.4
1
+ 1.3.0
@@ -10,7 +10,7 @@ module Configer
10
10
  [:r,:folder,:dir,:directory].each do |sym|
11
11
  opts[:root] ||= opts.delete(sym)
12
12
  end
13
- opts[:root] ||= Dir.pwd
13
+ opts[:root] ||= Configer.pwd
14
14
 
15
15
  opts[:out] ||= opts.delete(:o) || opts.delete(:to) || Configer::Object
16
16
  raise(ArgumentError,"out/to must point to hashlike object") unless opts[:out].class <= ::Hash
@@ -81,6 +81,7 @@ module Configer
81
81
  def self.config_hash
82
82
  return Object.parse(Support.mount_config_and_lib_meta)
83
83
  end
84
+
84
85
  end
85
86
 
86
87
  class << self
@@ -1,5 +1,15 @@
1
1
  module Configer
2
2
 
3
+ def self.pwd
4
+
5
+ if defined?(Rails) && !(Rails.root.nil?)
6
+ return Rails.root.to_s
7
+ else
8
+ return Dir.pwd.to_s
9
+ end
10
+
11
+ end
12
+
3
13
  module Support
4
14
 
5
15
  #> return mounted config objects
@@ -35,18 +45,18 @@ module Configer
35
45
  end
36
46
 
37
47
  #> load lib meta folders files
38
- if File.exist?(File.join(Dir.pwd,'lib'))
39
- config_yaml_paths.push_paths *Dir.glob(File.join(Dir.pwd,'lib','**','{meta,META}','*.{yaml,yml,json}'))
40
- config_yaml_paths.push_paths *Dir.glob(File.join(Dir.pwd,'lib','{meta,META}','**','*.{yaml,yml,json}'))
48
+ if File.exist?(File.join(Configer.pwd,'lib'))
49
+ config_yaml_paths.push_paths *Dir.glob(File.join(Configer.pwd,'lib','**','{meta,META}','*.{yaml,yml,json}'))
50
+ config_yaml_paths.push_paths *Dir.glob(File.join(Configer.pwd,'lib','{meta,META}','**','*.{yaml,yml,json}'))
41
51
  config_yaml_paths.compact!
42
52
  end
43
53
 
44
54
  #> load config folder
45
- if File.exist?(File.join(Dir.pwd,'config'))
55
+ if File.exist?(File.join(Configer.pwd,'config'))
46
56
 
47
- config_yaml_paths.push_paths *Dir.glob(File.join(Dir.pwd,'config','*.{yaml,yml,json}'))
48
- if File.exist?(File.join(Dir.pwd,'config','environments'))
49
- config_yaml_paths.push_paths *Dir.glob(File.join(Dir.pwd,'config','environments','*.{yaml,yml,json}'))
57
+ config_yaml_paths.push_paths *Dir.glob(File.join(Configer.pwd,'config','*.{yaml,yml,json}'))
58
+ if File.exist?(File.join(Configer.pwd,'config','environments'))
59
+ config_yaml_paths.push_paths *Dir.glob(File.join(Configer.pwd,'config','environments','*.{yaml,yml,json}'))
50
60
  end
51
61
  config_yaml_paths.compact!
52
62
 
@@ -10,7 +10,7 @@ module Configer
10
10
  [:r,:folder,:dir,:directory].each do |sym|
11
11
  opts[:root] ||= opts.delete(sym)
12
12
  end
13
- opts[:root] ||= Dir.pwd
13
+ opts[:root] ||= Configer.pwd
14
14
 
15
15
  opts[:out] ||= opts.delete(:o) || opts.delete(:to) || Configer::Object
16
16
  raise(ArgumentError,"out/to must point to hashlike object") unless opts[:out].class <= ::Hash
@@ -0,0 +1 @@
1
+ puts 'Hello PMIP 0.3.2! - Please see http://code.google.com/p/pmip/ for full instructions and plugin helper bundles.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-05 00:00:00.000000000 Z
11
+ date: 2014-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -63,6 +63,7 @@ files:
63
63
  - lib/configer/object.rb
64
64
  - lib/configer/support.rb
65
65
  - lib/configer/yaml.rb
66
+ - pmip/pmip.rb
66
67
  - sample/load_meta_files.rb
67
68
  - sample/meta/hello.json
68
69
  - sample/meta/test.yml