get_env 0.1.2 → 0.2.0.pre3
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 +5 -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: bba82e71b1cff0bda4ff516323e391680d6c5d18d96981f1a4434c702ad5a544
|
4
|
+
data.tar.gz: 26782f15c8f3e8cfb493d2629ec22fe12fe517fc969fcadc72e17c2f597a2f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2a32b34e46a3f38736eeeea7ed99694da08bb62d19ae2dbd213c75ebeabb59bd3e37a016eebfb1e72ff43570561ebf873193c80fe88dfe8f4724d02131a6cac
|
7
|
+
data.tar.gz: 52054e2cdf526fd255fc12d77d94c19ea0ec1732721b501203bcdb50143324308ae97db90eac599c27890a3314cd5fd8580261a087bbd9aa204e0d472c06c1ba
|
data/lib/get_env.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require 'get_env/version'
|
4
|
+
require 'get_env/cops'
|
3
5
|
|
4
6
|
module GetEnv
|
5
7
|
def self.[](key)
|
6
8
|
return nil if key.nil?
|
9
|
+
|
7
10
|
v = ENV[key].to_i
|
8
11
|
return v if v.to_s == ENV[key]
|
9
12
|
|
@@ -19,7 +22,7 @@ module GetEnv
|
|
19
22
|
def self.fetch(key, default = nil)
|
20
23
|
if ENV.has_key?(key)
|
21
24
|
self[key]
|
22
|
-
elsif default
|
25
|
+
elsif !default.nil?
|
23
26
|
default
|
24
27
|
elsif block_given?
|
25
28
|
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.pre3
|
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
|