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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bf931633a809a4f7ede3406e8589fa58e90711706cf4279316ce60b3d9fcfde
4
- data.tar.gz: 38366a984e12e405b5b7e9d0663c4df88ce0afd54a53bdc90dcc1e18edd059ab
3
+ metadata.gz: 5ae6002e2491ed021f13b2c30998401bb8764b02b80a35244c86f4fcc3487f06
4
+ data.tar.gz: ce08c98b6eb9529128676804e71c2dd0958c7dcc7cfcb9e586c01eb0fb53ff1a
5
5
  SHA512:
6
- metadata.gz: ca938d0bfec5b121902ec2599e20deb2bf55271f4597871ed2e32596ab12888f3816b11582466909bfcb6991c05b01ea15166bfd88e3f7715b8cfddd603f2731
7
- data.tar.gz: 547e7e7fad97ed46281f5f82b1af554bb5ba4f7a2b4bbef162760e9a299faf6fa1c3ad232f30d7a13d75e79b2a1f5503ec642636e761675abe02807ecb991f77
6
+ metadata.gz: 36fddc113a9ca9f6aa6d7e88838a0c314c17193e9509c7abcd2809bf910cd6e71ff42fb60c274b237f9e5432fc90a9fce3cd7e5badede00b4f13560a77449ed5
7
+ data.tar.gz: 0b59cbdab87a82efc2f1657a94e2bf6cb8468e4f0df87f5dd8fe59dc94337b2f5a9e023ff77a675a8fa9c0694b77a04de91d05d0bbe7a240839f3c8a71682aa1
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
- require "get_env/version"
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 != nil
24
+ elsif !default.nil?
23
25
  default
24
26
  elsif block_given?
25
27
  yield
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GetEnv
4
+ VERSION = '0.2.0.pre'
5
+ end
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.1.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: 2018-11-23 00:00:00.000000000 Z
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: '0'
112
+ version: 1.3.1
98
113
  requirements: []
99
- rubyforge_project:
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