tepee 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9e0ccf99d106a61407b6f7d076165f60e30f24d
4
- data.tar.gz: 217bc76c1c6558b4092f44480f25b90f15159ddc
3
+ metadata.gz: 0018ed23223a1b07a30efed76e265fb4aeac18ab
4
+ data.tar.gz: 3eb5103686c9f87c014bd03e365fc78f25c0aefe
5
5
  SHA512:
6
- metadata.gz: fca3087eb54625901d20528e79de769e243753bf4e14ad1d0b5cc80ecbf6c3f4bae4d7f5aeaf82cc1218a36795f4f7d1db33931ad16d3babd9dea9ae87643c43
7
- data.tar.gz: 0f1d3eb8de91be2b0668d996f9bba6a4b9cb9aecae692b21004a14ce3955608feedf0b1b04bd70236d2fe2b21badae261efab3f2a8d02a347829aa7318ad06c4
6
+ metadata.gz: 4d22023c8b76928aff661d102d2ddfdaee8ef0dc5b12dc3d2da7bceb2e924244eecbd35230ddaf49251dbbfbea67f089ad2444d0c41748884c83fe52267ad138
7
+ data.tar.gz: 49625ecd98b9773f52874b5a76ec94887aab2393166d747d214010bfc18d5353ea3b5ec6d579a614777ad38bc57c525255dff7d3ce87155db907b38393685c04
data/README.md CHANGED
@@ -10,7 +10,17 @@ This gem aims to make your rails app (or lib, script, ...) by making your enviro
10
10
 
11
11
  ### Setup
12
12
 
13
- Your conf class must inherit from Tepee.
13
+ #### Gemfile
14
+
15
+ ```ruby
16
+ # ...
17
+ gem 'tepee'
18
+ # ...
19
+ ```
20
+
21
+ #### Code
22
+
23
+ Your configuration class must inherit from Tepee.
14
24
 
15
25
  ```ruby
16
26
  class MyApp::Configuration < Tepee
@@ -61,11 +71,11 @@ That value is either:
61
71
  ```ruby
62
72
  class MyApp::Configuration < Tepee
63
73
  section(:foo) do
64
- # Can be overrided by the FOO_VALUE environment variable.
74
+ # Can be overridden by the FOO_VALUE environment variable.
65
75
  # Accessible via MyApp::Configuration.foo.value
66
76
  add :value, "I'm a foo value"
67
77
  section(:bar) do
68
- # Can be overrided by the FOO_BAR_VALUE environment variable.
78
+ # Can be overridden by the FOO_BAR_VALUE environment variable.
69
79
  # Accessible via Appaloosa::Configuration.foo.bar.value
70
80
  add :value, "I'm a bar value"
71
81
  end
data/lib/tepee.rb CHANGED
@@ -10,7 +10,7 @@ class Tepee
10
10
 
11
11
  protected
12
12
 
13
- def add(name, default, env_var: "#{env_var_prefix}#{name}")
13
+ def add(name, default = nil, env_var: "#{env_var_prefix}#{name}")
14
14
  value = ENV[String(env_var).upcase] || default
15
15
  const_set(String(name).upcase, value)
16
16
  define_singleton_method(name) { value }
data/lib/tepee/version.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  class Tepee
5
5
  # This module holds the Tepee version information.
6
6
  module Version
7
- STRING = '0.0.1'.freeze
7
+ STRING = '0.0.2'.freeze
8
8
 
9
9
  module_function
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tepee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Ignjatovic
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-06-22 00:00:00.000000000 Z
14
+ date: 2016-06-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec