get_env 0.1.1 → 0.2.0.pre2

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: c83d3a6f751e8ea976c3ac37dbd321043a92aabd7861dc23d6d4d2b78157e746
4
- data.tar.gz: '07067697220b37778162b720dba731b15363cff6b0a4c4e99048d685f52a4dfd'
3
+ metadata.gz: e06a707490d36ccf55c909423cdc4185efb98d0018c4a954d302a98b2294131e
4
+ data.tar.gz: 4d925bb7f635ecf0c830c3ed209a37294b2c7dd41fb9fee5ff1f60c1681cca2e
5
5
  SHA512:
6
- metadata.gz: 1482ced9cff8d951d1da39b79622ccfbced9d597d123ce82def74cb8387f509c1144a2235dc9bf307a5c9bb08b42fffdb3bddd8db3fbee9e10345b6945890ffb
7
- data.tar.gz: 6fc57902da7807514f17485e02b7257a84e79077815143714352b44f0339a80954d099730d6fcec68366f24343f19ff9b0c95dca50ac4f3e8a3ab9fd8330cc2e
6
+ metadata.gz: 3042f5cc67b26a11118a7eb275fad83be33206bccf8938bc15d561afe83d45f955916e9a529c452e9504f12b97fc582d895e0ab283d58a162a3413b163e27bc3
7
+ data.tar.gz: '0590900f9eda5c7b8a55fc30b6fab903647cd4bb4fe105811a38d94f56aa675167fff9c1c6436031433d406395e1ee1699e199a1793066f1e6d63a83361a98b3'
@@ -1,9 +1,16 @@
1
1
  # frozen_string_literal: true
2
- require "get_env/version"
2
+
3
+ require 'get_env/version'
4
+ begin
5
+ require 'rubocop/cop/lint/no_env'
6
+ rescue LoadError # rubocop:disable Lint/SuppressedException
7
+ # no rubocop
8
+ end
3
9
 
4
10
  module GetEnv
5
11
  def self.[](key)
6
12
  return nil if key.nil?
13
+
7
14
  v = ENV[key].to_i
8
15
  return v if v.to_s == ENV[key]
9
16
 
@@ -19,7 +26,7 @@ module GetEnv
19
26
  def self.fetch(key, default = nil)
20
27
  if ENV.has_key?(key)
21
28
  self[key]
22
- elsif default != nil
29
+ elsif !default.nil?
23
30
  default
24
31
  elsif block_given?
25
32
  yield
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GetEnv
4
+ VERSION = '0.2.0.pre2'
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.1
4
+ version: 0.2.0.pre2
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