get_env 0.1.0 → 0.2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/get_env.rb +4 -2
- data/lib/get_env/version.rb +5 -0
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ae6002e2491ed021f13b2c30998401bb8764b02b80a35244c86f4fcc3487f06
|
4
|
+
data.tar.gz: ce08c98b6eb9529128676804e71c2dd0958c7dcc7cfcb9e586c01eb0fb53ff1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36fddc113a9ca9f6aa6d7e88838a0c314c17193e9509c7abcd2809bf910cd6e71ff42fb60c274b237f9e5432fc90a9fce3cd7e5badede00b4f13560a77449ed5
|
7
|
+
data.tar.gz: 0b59cbdab87a82efc2f1657a94e2bf6cb8468e4f0df87f5dd8fe59dc94337b2f5a9e023ff77a675a8fa9c0694b77a04de91d05d0bbe7a240839f3c8a71682aa1
|
data/lib/get_env.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require 'get_env/version'
|
3
4
|
|
4
5
|
module GetEnv
|
5
6
|
def self.[](key)
|
6
7
|
return nil if key.nil?
|
8
|
+
|
7
9
|
v = ENV[key].to_i
|
8
10
|
return v if v.to_s == ENV[key]
|
9
11
|
|
@@ -19,7 +21,7 @@ module GetEnv
|
|
19
21
|
def self.fetch(key, default = nil)
|
20
22
|
if ENV.has_key?(key)
|
21
23
|
self[key]
|
22
|
-
elsif default
|
24
|
+
elsif !default.nil?
|
23
25
|
default
|
24
26
|
elsif block_given?
|
25
27
|
yield
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get_env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-05-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rubocop
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
71
85
|
description: Read values from ENV in a reasonable way
|
72
86
|
email:
|
73
87
|
- bartek@rainforestqa.com
|
@@ -77,6 +91,7 @@ extensions: []
|
|
77
91
|
extra_rdoc_files: []
|
78
92
|
files:
|
79
93
|
- lib/get_env.rb
|
94
|
+
- lib/get_env/version.rb
|
80
95
|
homepage: https://github.com/rainforestapp/get_env
|
81
96
|
licenses:
|
82
97
|
- MIT
|
@@ -92,12 +107,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
107
|
version: '0'
|
93
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
109
|
requirements:
|
95
|
-
- - "
|
110
|
+
- - ">"
|
96
111
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
112
|
+
version: 1.3.1
|
98
113
|
requirements: []
|
99
|
-
|
100
|
-
rubygems_version: 2.7.8
|
114
|
+
rubygems_version: 3.0.3
|
101
115
|
signing_key:
|
102
116
|
specification_version: 4
|
103
117
|
summary: Read values from ENV in a reasonable way
|