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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '029bff58c772e1dc42b5220d254ca5555b4a7d74f115af36dc6e9da9c85f7199'
4
- data.tar.gz: f62d4d54a9469db5dafa60cc6db35db8a17f9e4bf734ff03d845a5d20771febf
3
+ metadata.gz: bba82e71b1cff0bda4ff516323e391680d6c5d18d96981f1a4434c702ad5a544
4
+ data.tar.gz: 26782f15c8f3e8cfb493d2629ec22fe12fe517fc969fcadc72e17c2f597a2f8a
5
5
  SHA512:
6
- metadata.gz: 54e8b44760b217dd341d77a92d454654d3f61fe6ac6fb80169a34805a42cdcd3277723627caca3b74678f094cda78b73353d655d554784313c4feb6e74afba34
7
- data.tar.gz: 1f1dfec8a9073a17dac0d0c8b25d71aeb65f70210630fcac602ffc1cfaac2d12c2f5df61a681bd2e0afcbf38864ba78548f3d39e6c3c79ca7c2b88fd9e7c059b
6
+ metadata.gz: e2a32b34e46a3f38736eeeea7ed99694da08bb62d19ae2dbd213c75ebeabb59bd3e37a016eebfb1e72ff43570561ebf873193c80fe88dfe8f4724d02131a6cac
7
+ data.tar.gz: 52054e2cdf526fd255fc12d77d94c19ea0ec1732721b501203bcdb50143324308ae97db90eac599c27890a3314cd5fd8580261a087bbd9aa204e0d472c06c1ba
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
- require "get_env/version"
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 != nil
25
+ elsif !default.nil?
23
26
  default
24
27
  elsif block_given?
25
28
  yield
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GetEnv
4
+ VERSION = '0.2.0.pre3'
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.2
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: 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