app_configuration 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -1
- data/lib/app_configuration.rb +2 -2
- data/lib/app_configuration/config.rb +6 -6
- data/lib/app_configuration/version.rb +1 -1
- metadata +14 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 72797d770c323676b6cdf0b1e9a0f39b6d424c46
|
4
|
+
data.tar.gz: 11ac43c453f1779e6bd45cd65c06c28ce1402ecb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 66f2d256f13730c3d37d83fa65a1ad36856c2874c2af72fb40f0b7b68124c0e92294172a3985ea86674816ec6fd4e9588d77db4d875f3ffef72754c67c0a991b
|
7
|
+
data.tar.gz: 1617446118e13e7a0dadaf4e418a93c2ca1ed74ce05be693c90c948f9c472339974a57bf150074c65c62cb5f0aad1ceed5d498175081660b5634af06cb0767b8
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# AppConfiguration
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/app_configuration.png)](http://badge.fury.io/rb/app_configuration)
|
3
4
|
[![Build Status](https://travis-ci.org/guidomb/app_configuration.png)](https://travis-ci.org/guidomb/app_configuration)
|
4
5
|
[![Coverage Status](https://coveralls.io/repos/guidomb/app_configuration/badge.png?branch=master)](https://coveralls.io/r/guidomb/app_configuration)
|
5
|
-
|
6
|
+
[![Code Climate](https://codeclimate.com/github/guidomb/app_configuration.png)](https://codeclimate.com/github/guidomb/app_configuration)
|
6
7
|
|
7
8
|
**AppConfiguration** is a very simple gem that helps you configure your Ruby applications. **AppConfiguration** uses YAML config files or environmental variales to set
|
8
9
|
the configuration parameters.
|
data/lib/app_configuration.rb
CHANGED
@@ -9,7 +9,7 @@ module AppConfiguration
|
|
9
9
|
optional_attr :base_local_path, default: './'
|
10
10
|
optional_attr :base_global_path, default: '~/'
|
11
11
|
optional_attr :use_env_variables, default: true
|
12
|
-
optional_attr :prefix
|
12
|
+
optional_attr :prefix
|
13
13
|
|
14
14
|
# Class Methods
|
15
15
|
|
@@ -27,17 +27,17 @@ module AppConfiguration
|
|
27
27
|
|
28
28
|
# Instance Methods
|
29
29
|
|
30
|
-
def initialize(config_file_name, &block)
|
30
|
+
def initialize(config_file_name = nil, &block)
|
31
31
|
super() # Sets default values for optional attributes
|
32
|
-
@config_file_name = config_file_name
|
32
|
+
@config_file_name = config_file_name if config_file_name
|
33
33
|
self.instance_eval(&block) if block_given?
|
34
34
|
end
|
35
35
|
|
36
|
-
def local_config_path
|
36
|
+
def local_config_path
|
37
37
|
@local_config_path ||= config_path(@base_local_path)
|
38
38
|
end
|
39
39
|
|
40
|
-
def global_config_path
|
40
|
+
def global_config_path
|
41
41
|
@global_config_path ||= config_path(@base_global_path)
|
42
42
|
end
|
43
43
|
|
@@ -72,4 +72,4 @@ module AppConfiguration
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
end
|
75
|
+
end
|
metadata
CHANGED
@@ -1,46 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_configuration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Guido Marucci Blas
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
description: A gem to handle ruby application configurations using both YAML config
|
@@ -51,9 +46,9 @@ executables: []
|
|
51
46
|
extensions: []
|
52
47
|
extra_rdoc_files: []
|
53
48
|
files:
|
54
|
-
- .gitignore
|
55
|
-
- .rspec
|
56
|
-
- .travis.yml
|
49
|
+
- ".gitignore"
|
50
|
+
- ".rspec"
|
51
|
+
- ".travis.yml"
|
57
52
|
- Gemfile
|
58
53
|
- LICENSE.txt
|
59
54
|
- README.md
|
@@ -72,33 +67,26 @@ files:
|
|
72
67
|
- spec/spec_helper.rb
|
73
68
|
homepage: http://github.com/guidomb/app_configuration
|
74
69
|
licenses: []
|
70
|
+
metadata: {}
|
75
71
|
post_install_message:
|
76
72
|
rdoc_options: []
|
77
73
|
require_paths:
|
78
74
|
- lib
|
79
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
76
|
requirements:
|
82
|
-
- -
|
77
|
+
- - ">="
|
83
78
|
- !ruby/object:Gem::Version
|
84
79
|
version: '0'
|
85
|
-
segments:
|
86
|
-
- 0
|
87
|
-
hash: -1897401157877901857
|
88
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
81
|
requirements:
|
91
|
-
- -
|
82
|
+
- - ">="
|
92
83
|
- !ruby/object:Gem::Version
|
93
84
|
version: '0'
|
94
|
-
segments:
|
95
|
-
- 0
|
96
|
-
hash: -1897401157877901857
|
97
85
|
requirements: []
|
98
86
|
rubyforge_project:
|
99
|
-
rubygems_version:
|
87
|
+
rubygems_version: 2.4.5
|
100
88
|
signing_key:
|
101
|
-
specification_version:
|
89
|
+
specification_version: 4
|
102
90
|
summary: A gem to handle ruby application configurations
|
103
91
|
test_files:
|
104
92
|
- spec/app_configuration/config_spec.rb
|