filegen 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -1
- data/README.md +7 -4
- data/lib/filegen/version.rb +1 -1
- metadata +2 -1
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -33,10 +33,15 @@ Please make sure you have an ERB-template available. It needs to end with
|
|
33
33
|
`.erb`! Place in anywhere you like. It's important that the name of variable in
|
34
34
|
the template matches the name of environment variable or yaml-key: wording,
|
35
35
|
case. The lookup is case-sensitive. If you want to get access to the variable,
|
36
|
-
you need to use the `lookup`-method.
|
36
|
+
you need to use the `lookup`-method. It also provides a default value if the
|
37
|
+
variable looked up is undefined.
|
37
38
|
|
38
|
-
```
|
39
|
+
```ruby
|
40
|
+
# look up variable
|
39
41
|
lookup(<variable>)
|
42
|
+
|
43
|
+
# look up variable and use default value if variable is undefined
|
44
|
+
lookup(<variable>, <default_value>)
|
40
45
|
```
|
41
46
|
|
42
47
|
If you want to write the output to a file you need
|
@@ -65,8 +70,6 @@ commandline
|
|
65
70
|
```
|
66
71
|
|
67
72
|
|
68
|
-
|
69
|
-
|
70
73
|
### Generate a file based on Environment Variables
|
71
74
|
|
72
75
|
The content of `template.erb`:
|
data/lib/filegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- .simplecov
|
43
43
|
- .travis.yml
|
44
44
|
- .yardopts
|
45
|
+
- CHANGELOG.md
|
45
46
|
- Gemfile
|
46
47
|
- LICENSE.md
|
47
48
|
- README.DEVELOPER.md
|