gen-env 0.2.1 → 0.2.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/README.md +6 -6
- data/lib/gen/env/version.rb +1 -1
- data/lib/parser.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2992a034494a57a27f8a19cdf9b3f0633d8d972b
|
4
|
+
data.tar.gz: a986f86ab014b1047b3fe9ac1e516a3d22b63c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45e4e29c4c6bfb332fbb9c4d858c8bdec8431a5cb04e002807c09392a845007a67e907cde9590ef93bcc7d2b72e8d6a723bb3bfee4810c50220d3fb539130e69
|
7
|
+
data.tar.gz: 2328eb1f7540c93257f11fdc6910cf7d56ddec33a3d04a0794dde4e673721f488a12ca6d56e27b6b33a44d64dd686b064ce21fe460ed1d2633d0cf5b2549b80d
|
data/README.md
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
More than often, a typical java project requires you to manage multiple properties or env files across different environments. For example, local.env, sit.env, qa.env etc etc. And there are multiple problems managing these sort of environment files.
|
4
4
|
|
5
|
-
#### Problems with multiple .properties
|
5
|
+
#### Problems with multiple .properties/.env files
|
6
6
|
|
7
|
-
1. No better mechanism of logically grouping multiple
|
8
|
-
2. It becomes difficult and cumbersome to find a single
|
9
|
-
3. No way of testing if a particular
|
7
|
+
1. No better mechanism of logically grouping multiple key/value pairs in .properties/.env file, other than developer's discipline. For example, order of individual configurations for database, load-balancer etc. can vary a lot from one environment's configuration file to other's.
|
8
|
+
2. It becomes difficult and cumbersome to find a single key/value pair in all .properties/.env file and change it without juggling with your favorite editor's find and replace feature.
|
9
|
+
3. No way of testing if a particular key/value pair is available in the corresponding .properties/.env file other than manually doing grep on the file. This can cause lots of surprises when you actually deploy an app in environment.
|
10
10
|
|
11
11
|
#### Solutions to above problems
|
12
|
-
1. A simple DSL that can logically group different configurations and produce the final env
|
13
|
-
2. Rather than managing .env
|
12
|
+
1. A simple DSL that can logically group different configurations and produce the final .properties/.env file having same order of key/value pair for different configurations across multiple environments.
|
13
|
+
2. Rather than managing .properties/.env files in plain text files, an ability to write your configurations in ruby language allows you to unit test your configuration files for presence or absense of particular key/value pair.
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
data/lib/gen/env/version.rb
CHANGED
data/lib/parser.rb
CHANGED
@@ -7,7 +7,7 @@ class Parser
|
|
7
7
|
options = {}
|
8
8
|
opt_parser = OptionParser.new do |opt_parser|
|
9
9
|
|
10
|
-
opt_parser.banner = "Usage:
|
10
|
+
opt_parser.banner = "Usage: gen-env --in /path/to/input/environment.rb --out /path/to/output/environment.env"
|
11
11
|
|
12
12
|
opt_parser.on("-iNAME", "--in INPUT_FILE", "Input ruby file path") do |input_environment_file_path|
|
13
13
|
options[:input_environment_file_path] = input_environment_file_path
|