simple_config 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.rdoc +46 -2
  2. data/VERSION +1 -1
  3. data/simple_config.gemspec +2 -2
  4. metadata +4 -4
data/README.rdoc CHANGED
@@ -1,6 +1,50 @@
1
- = simple_config
1
+ = Installation
2
2
 
3
- Description goes here.
3
+ gem install simple_confign
4
+
5
+ or
6
+
7
+ gem 'simple_config'
8
+
9
+ in Gemfile
10
+
11
+ == Description
12
+
13
+ Allows dot notation to access properties that are defined in YML file
14
+
15
+ == Usage
16
+
17
+ Default configuration file example:
18
+
19
+ geometry:
20
+ type: square
21
+ background_color: red
22
+ position:
23
+ top-left:
24
+ - 0
25
+ - 0
26
+ right-bottom:
27
+ - 100
28
+ - 100
29
+
30
+ SimpleConfig.type # "square"
31
+ SimpleConfig.position # OpenStruct
32
+ SimpleConfig.position.top-left # [0, 0]
33
+
34
+ Also it's possible to use file name as a first parameter:
35
+
36
+ SimpleConfig.config_file1.property #config_file1 will be loaded
37
+ SimpleConfig.config_file2.property #config_file2 will be loaded
38
+
39
+ Default config file will be used if specific one not found.
40
+
41
+ == Options
42
+
43
+ Example of initializers/simple_config.rb:
44
+
45
+ SimpleConfig.default = :default_file #set default configuration file name to default_file.yml. Default value :config
46
+ SimpleConfig.directory = :default_directory #set default configuration directory to default_directory. Default value :config
47
+
4
48
 
5
49
  == Contributing to simple_config
6
50
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple_config}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Valeriy Prokopchuk"]
12
- s.date = %q{2010-12-02}
12
+ s.date = %q{2011-01-14}
13
13
  s.description = %q{Simle confuguration utilies}
14
14
  s.email = %q{vprokopchuk@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Valeriy Prokopchuk
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-02 00:00:00 +02:00
17
+ date: 2011-01-14 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- hash: 917526611
117
+ hash: -4590238942359748247
118
118
  segments:
119
119
  - 0
120
120
  version: "0"