tree_config 0.0.1 → 0.0.2
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 +4 -4
- data/.travis.yml +8 -0
- data/README.md +11 -1
- data/lib/tree_config/vendor/directory_tree.rb +1 -0
- data/lib/tree_config/version.rb +1 -1
- data/spec/fixtures/empty/.keep +0 -0
- data/spec/fixtures/nest2/B/.keep +0 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d5eaca4c2821b9bc0abc0fda27deeccb48aa6b
|
4
|
+
data.tar.gz: d9df10e2c5eda55f1b3965c966d03fe237f6767c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea50746a3823f300c33587afd650abd3b74c67e788fc659ba3b21b554a1df362e831aaa3da5a770e66226187f9db7ef522da88d2f1d15e3f7a864723862324f6
|
7
|
+
data.tar.gz: c052752bbdccd8a7e62a3c51bb156a091de81607cf6387576d13af802746086f20ab2fabfcb2127a97e4f8a226ed16bd08554910c9baca6ffd3b265df0ed3b7a
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,19 +1,29 @@
|
|
1
1
|
# TreeConfig
|
2
|
+

|
3
|
+
|
4
|
+

|
5
|
+
|
2
6
|
Rails very simple configuration gem, which use "folder structure" as settings key
|
3
7
|
|
4
8
|
## Installation
|
5
9
|
|
6
10
|
Add this line to your application's Gemfile:
|
7
11
|
|
12
|
+
```ruby
|
8
13
|
gem 'tree_config'
|
14
|
+
```
|
9
15
|
|
10
16
|
And then execute:
|
11
17
|
|
18
|
+
```
|
12
19
|
$ bundle
|
20
|
+
```
|
13
21
|
|
14
22
|
Or install it yourself as:
|
15
23
|
|
24
|
+
```
|
16
25
|
$ gem install tree_config
|
26
|
+
```
|
17
27
|
|
18
28
|
## Usage
|
19
29
|
Use rails generator to generate default config folder
|
@@ -42,7 +52,7 @@ The content of A is access by properties notation (For example Settings.folder1.
|
|
42
52
|
|
43
53
|
## Contributing
|
44
54
|
|
45
|
-
1. Fork it ( http://github.com/
|
55
|
+
1. Fork it ( http://github.com/huydx/tree_config/fork )
|
46
56
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
57
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
58
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -11,6 +11,7 @@ module TreeConfig
|
|
11
11
|
struct_obj.send("#{entry}=", DeepStruct.new)
|
12
12
|
struct_obj.send("#{entry}=", self.load(full_path, struct_obj.send("#{entry}")))
|
13
13
|
else
|
14
|
+
next if entry.empty? || (entry[-3,3] != "yml" && entry[-4,4] != "yaml")
|
14
15
|
hash = ActiveSupport::HashWithIndifferentAccess.new(
|
15
16
|
begin
|
16
17
|
YAML.load(File.open(full_path))
|
data/lib/tree_config/version.rb
CHANGED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tree_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- huydx
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
77
78
|
- Gemfile
|
78
79
|
- LICENSE.txt
|
79
80
|
- README.md
|
@@ -88,9 +89,11 @@ files:
|
|
88
89
|
- lib/tree_config/vendor/deep_struct.rb
|
89
90
|
- lib/tree_config/vendor/directory_tree.rb
|
90
91
|
- lib/tree_config/version.rb
|
92
|
+
- spec/fixtures/empty/.keep
|
91
93
|
- spec/fixtures/nest1/A1/test.yml
|
92
94
|
- spec/fixtures/nest2/A/C/test.yml
|
93
95
|
- spec/fixtures/nest2/A/test.yml
|
96
|
+
- spec/fixtures/nest2/B/.keep
|
94
97
|
- spec/fixtures/onefile/test.yml
|
95
98
|
- spec/fixtures/onefile_num/test.yml
|
96
99
|
- spec/fixtures/twofile/test1.yml
|
@@ -118,14 +121,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
121
|
version: '0'
|
119
122
|
requirements: []
|
120
123
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.4.1
|
122
125
|
signing_key:
|
123
126
|
specification_version: 4
|
124
127
|
summary: Rails config store gem
|
125
128
|
test_files:
|
129
|
+
- spec/fixtures/empty/.keep
|
126
130
|
- spec/fixtures/nest1/A1/test.yml
|
127
131
|
- spec/fixtures/nest2/A/C/test.yml
|
128
132
|
- spec/fixtures/nest2/A/test.yml
|
133
|
+
- spec/fixtures/nest2/B/.keep
|
129
134
|
- spec/fixtures/onefile/test.yml
|
130
135
|
- spec/fixtures/onefile_num/test.yml
|
131
136
|
- spec/fixtures/twofile/test1.yml
|