env_compat 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/env_compat.rb +8 -0
- data/lib/env_compat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 122f8ca8d129b5e80ab418738aab64c716b88409
|
4
|
+
data.tar.gz: 5f13c4c6e0f6980617cdc1771365a93a2ba6e63c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baf554e871754b85379ae242e2ed30eccdbb28e57a5e3a3eaff21676a7238b5612a510191416ee1807446d751f32cbcc10c20838cd2168ea61628691b5b1ed19
|
7
|
+
data.tar.gz: 62680154a37b7531f6f334df8b3ff4f30d161e2644bc4087981b158df2c3434c58b2cc7d49605f791b457eb3a6d3b97280535dd2221d55a8bd878cd38d12c944
|
data/README.md
CHANGED
@@ -20,7 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
Three methods are provided `:auto`, `:encode`, and `:decode`. Provide a tag for
|
24
|
+
`:auto` and it will use that to determine whether or not to encode or decode. You
|
25
|
+
can see this example tag usage in the Bundler library.
|
26
|
+
|
23
27
|
```ruby
|
28
|
+
|
29
|
+
EnvCompat.auto :bundle, "https://github.com/company/private-repo.git"
|
30
|
+
# => "BUNDLE_HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT"
|
31
|
+
|
32
|
+
EnvCompat.auto :bundle, "BUNDLE_HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT"
|
33
|
+
# => "HTTPS://GITHUB.COM/COMPANY/PRIVATE-REPO.GIT"
|
34
|
+
|
24
35
|
EnvCompat.encode "https://github.com/company/private-repo.git"
|
25
36
|
# => "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT"
|
26
37
|
|
@@ -28,8 +39,9 @@ EnvCompat.decode "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT"
|
|
28
39
|
# => HTTPS://GITHUB.COM/COMPANY/PRIVATE-REPO.GIT
|
29
40
|
```
|
30
41
|
|
31
|
-
To define
|
32
|
-
the EnvCompat module instance method of `:mapping`.
|
42
|
+
To define your own custom special character mappings feel free to overwrite
|
43
|
+
the EnvCompat module instance method of `:mapping`. **NOTE:** When changing
|
44
|
+
mapping the underscore symbol must be mapped.
|
33
45
|
|
34
46
|
```ruby
|
35
47
|
def EnvCompat.mapping
|
data/lib/env_compat.rb
CHANGED
data/lib/env_compat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: env_compat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|