persey 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64a5c154b43d81e9f986339f73a9f85cc861b059
4
- data.tar.gz: 0c5d8a0d96946015c87777d12efd69fa49aa9921
3
+ metadata.gz: c452b231ea5687d4a3e655cda07171445ceeac98
4
+ data.tar.gz: cb8fa6a1298b11b67dd17abb8d28e73370eb07b6
5
5
  SHA512:
6
- metadata.gz: eb9d2a412b8f013c8982a6984b53175b97c034b9081dbef94ff7da76b31ec8724783f1ddde0078d4e97253d7d08e15d402775fba6ad8ee406f554869d211d27e
7
- data.tar.gz: 636a151f73fd8710e75b19eafb2afcec3ce83096e0c7071649c3b4760c517c31d43e556e9c744efa9eeb645242845748e2cd188ff0ee8a6db929d63ec2b85d21
6
+ metadata.gz: 4b0d716b41f2782f1dd95bbc8529b65e4c943c5b5d830461997001235e91ab5f50b62ec0373d4000fd3eea75acf1b4d568eb4f4d6b37ae9932e347dd83b22934
7
+ data.tar.gz: eff169c18ce5442cdb37ac4525a20dfdce1c1e2725fcc6652c06e7576f2b91ad6b24733674f9bc5764cac5dddaa8155d16e29fb7443c93d542823abab3bafbee
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Summary
5
5
 
6
- Persey help you easily manage the configuration, depending on the environment.
6
+ Persey help you easily manage the configuration, depending on the environment.
7
7
  The main objective is to provide opportunities to reuse the
8
8
  configuration provided by the project, as the default configuration.
9
9
 
@@ -11,12 +11,12 @@ configuration provided by the project, as the default configuration.
11
11
 
12
12
  For the occurrence of the gem was a few prerequisites.
13
13
 
14
- * Work on opensource projects that support the relevance of problem configurations, changing the appearance of new versions and functionality.
15
- * Use in the project configuration, diversity in different files, and the inability to unite all in one configuration
14
+ * Work on opensource projects that support the relevance of problem configurations, changing the appearance of new versions and functionality.
15
+ * Use in the project configuration, diversity in different files, and the inability to unite all in one configuration
16
16
  * Desire to use sensitive data as easily as those that can be safely stored in the repository.
17
- * Sometimes configuration happens in a variety of formats: yaml, json, ini
17
+ * Sometimes configuration happens in a variety of formats: yaml, json, ini
18
18
 
19
- I do not want to engage in writing parsers, I want to work fine :)
19
+ I do not want to engage in writing parsers, I want to work fine :)
20
20
 
21
21
  This solution allows to **accumulate** different configs in one, with the **possibility of reusability** of configuration options and **simple override**. It uses an **intuitive DSL**.
22
22
 
@@ -25,7 +25,7 @@ This solution allows to **accumulate** different configs in one, with the **poss
25
25
  Add this to your `Gemfile`:
26
26
 
27
27
  ``` ruby
28
- gem "persey", '>= 0.0.6'
28
+ gem "persey", '>= 0.0.8'
29
29
  ```
30
30
 
31
31
  Generate default config file
@@ -90,9 +90,9 @@ Persey.init Rails.env do # set current environment
90
90
  # and now we use configs for our options, which are not declared in any config
91
91
  uri -> { "#{protocol}://#{domain}:#{port}" }
92
92
  end
93
-
93
+
94
94
  site_uri -> { web.uri } # we can re-re-use different options
95
-
95
+
96
96
  email do
97
97
  pop do
98
98
  address 'pop.example.com'
@@ -135,7 +135,7 @@ module AppName
135
135
  def self.config
136
136
  Persey.config
137
137
  end
138
-
138
+
139
139
  class Application < Rails::Application
140
140
  # ...
141
141
  end
@@ -33,7 +33,7 @@ module Persey
33
33
  current_config = deep_merge(parent_config, current_config)
34
34
  end
35
35
 
36
- current_config = @config.merge(current_config)
36
+ current_config = @config.deep_merge(current_config)
37
37
  end
38
38
 
39
39
  private
@@ -1,3 +1,3 @@
1
1
  module Persey
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -20,6 +20,10 @@ class PerseyTest < TestCase
20
20
  first "first value"
21
21
  second "second value"
22
22
  end
23
+
24
+ first do
25
+ testss -> { second }
26
+ end
23
27
  end
24
28
  end
25
29
  end
@@ -31,6 +35,9 @@ class PerseyTest < TestCase
31
35
  def test_correct_config
32
36
  @config = Persey.config
33
37
  assert { @config.option.first == "first value" }
38
+ assert { @config.first.testss == "foo value" }
39
+ assert { @config.first.second == "foo value" }
40
+ assert { @config.namespace.another_key == "another key value" }
34
41
  assert { @config.namespace.another_key == "another key value" }
35
42
  assert { @config.key == "key value" }
36
43
  assert { @config.json_config.owner.name == "John Doe" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kumanyaev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-30 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.0.3
138
+ rubygems_version: 2.0.14
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Helps you easily manage environment specific settings