env_parser 1.7.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -4
  3. data/Gemfile.lock +34 -3
  4. data/env_parser.gemspec +19 -12
  5. data/lib/env_parser/types/chronology_types.rb +1 -1
  6. data/lib/env_parser/types/internet_types.rb +1 -0
  7. data/lib/env_parser/version.rb +1 -1
  8. data/lib/env_parser.rb +17 -15
  9. metadata +4 -113
  10. data/.circleci/config.yml +0 -64
  11. data/.gitignore +0 -14
  12. data/.rspec +0 -3
  13. data/.rubocop.yml +0 -64
  14. data/.ruby-version +0 -1
  15. data/.yardopts +0 -1
  16. data/bin/console +0 -14
  17. data/bin/setup +0 -8
  18. data/docs/EnvParser/AutoregisterFileNotFound.html +0 -146
  19. data/docs/EnvParser/Error.html +0 -140
  20. data/docs/EnvParser/TypeAlreadyDefined.html +0 -143
  21. data/docs/EnvParser/TypeAlreadyDefinedError.html +0 -145
  22. data/docs/EnvParser/Types/BaseTypes.html +0 -179
  23. data/docs/EnvParser/Types/ChronologyTypes.html +0 -161
  24. data/docs/EnvParser/Types/InternetTypes.html +0 -173
  25. data/docs/EnvParser/Types.html +0 -130
  26. data/docs/EnvParser/UnknownTypeError.html +0 -145
  27. data/docs/EnvParser/UnparseableAutoregisterSpec.html +0 -146
  28. data/docs/EnvParser/ValueNotAllowed.html +0 -144
  29. data/docs/EnvParser/ValueNotAllowedError.html +0 -147
  30. data/docs/EnvParser/ValueNotConvertibleError.html +0 -145
  31. data/docs/EnvParser.html +0 -1194
  32. data/docs/EnvParserTypes/BaseTypes.html +0 -178
  33. data/docs/EnvParserTypes/ChronologyTypes.html +0 -159
  34. data/docs/EnvParserTypes/InternetTypes.html +0 -159
  35. data/docs/EnvParserTypes/TimeTypes.html +0 -158
  36. data/docs/EnvParserTypes.html +0 -129
  37. data/docs/_index.html +0 -245
  38. data/docs/class_list.html +0 -54
  39. data/docs/css/common.css +0 -1
  40. data/docs/css/full_list.css +0 -206
  41. data/docs/css/style.css +0 -1089
  42. data/docs/file.README.html +0 -334
  43. data/docs/file_list.html +0 -59
  44. data/docs/frames.html +0 -22
  45. data/docs/index.html +0 -334
  46. data/docs/js/app.js +0 -801
  47. data/docs/js/full_list.js +0 -334
  48. data/docs/js/jquery.js +0 -4
  49. data/docs/method_list.html +0 -94
  50. data/docs/top-level-namespace.html +0 -112
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a22f6fe6059d6b8831b48ade5fcaead64017946c022f5052a8e5271684f8e96
4
- data.tar.gz: d214cb37e02dddb67883d52cd835d64c61eb40358210fa9e022bdaf7e20ea2d7
3
+ metadata.gz: a93e0a4e225b4aef6eb45b249bd39c37394c6657b6090e1136173dff2c9061a5
4
+ data.tar.gz: e970f68c44010617f946b1b26e2eae9c8d728a478067d20af74af97b8c841fed
5
5
  SHA512:
6
- metadata.gz: e9a18edca052bbe93997029ca7d45667d43a0c172da047ec017ffeaaef613d4c00caa2ff2e228ad0e923d0b7bbb83c51cd1a136c4eb0b11f49aa40d403ab0a47
7
- data.tar.gz: f41c2471b26f4c8884f00d83224f811391515c95ee849c5b58150185ae4945d97418e3fb23eee552f00bb00062635c3f4fc988e3e40fd5a835df97d32fa450a5
6
+ metadata.gz: faf1d9d145986fbcd73d66d58d3b81a5a49521cacb1f9f5d29877bcdfc8339f4323c663acea28e67ebf86260cffe5511d2332748dba1880cea594170fe57390c
7
+ data.tar.gz: 986dc72b385820beb8899fc3d699fc0a178385e372b010489b39b8a9df7a63f12cb8d9878c7fb4a5dda78efe4b39f61d2a1e3b0ee7e9bbdcc0e902aba36092bf
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
1
  source 'https://rubygems.org'
2
-
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in env_parser.gemspec
6
2
  gemspec
3
+
4
+ gem 'irb'
5
+ gem 'rspec', '~> 3'
6
+ gem 'rspec_junit_formatter'
7
+ gem 'rubocop'
8
+ gem 'yard'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- env_parser (1.6.2)
4
+ env_parser (1.7.1)
5
5
  activesupport (>= 6.1.0, < 9)
6
6
  chronic (~> 0)
7
7
  chronic_duration (~> 0)
@@ -32,8 +32,15 @@ GEM
32
32
  connection_pool (3.0.2)
33
33
  diff-lcs (1.6.2)
34
34
  drb (2.2.3)
35
+ erb (6.0.7)
35
36
  i18n (1.15.2)
36
37
  concurrent-ruby (~> 1.0)
38
+ io-console (0.9.2)
39
+ irb (1.18.0)
40
+ pp (>= 0.6.0)
41
+ prism (>= 1.3.0)
42
+ rdoc (>= 4.0.0)
43
+ reline (>= 0.4.2)
37
44
  json (2.19.9)
38
45
  language_server-protocol (3.17.0.5)
39
46
  lint_roller (1.1.0)
@@ -46,10 +53,24 @@ GEM
46
53
  parser (3.3.11.1)
47
54
  ast (~> 2.4.1)
48
55
  racc
56
+ pp (0.6.4)
57
+ prettyprint
58
+ prettyprint (0.2.0)
49
59
  prism (1.9.0)
50
60
  racc (1.8.1)
51
61
  rainbow (3.1.1)
62
+ rbs (4.1.3)
63
+ logger
64
+ prism (>= 1.6.0)
65
+ tsort
66
+ rdoc (8.1.0)
67
+ erb
68
+ prism (>= 1.6.0)
69
+ rbs (>= 4.0.0)
70
+ tsort
52
71
  regexp_parser (2.12.0)
72
+ reline (0.7.0)
73
+ io-console (~> 0.5)
53
74
  rspec (3.13.2)
54
75
  rspec-core (~> 3.13.0)
55
76
  rspec-expectations (~> 3.13.0)
@@ -81,6 +102,7 @@ GEM
81
102
  prism (~> 1.7)
82
103
  ruby-progressbar (1.13.0)
83
104
  securerandom (0.4.1)
105
+ tsort (0.2.0)
84
106
  tzinfo (2.0.6)
85
107
  concurrent-ruby (~> 1.0)
86
108
  unicode-display_width (3.2.0)
@@ -94,8 +116,8 @@ PLATFORMS
94
116
  x86_64-linux
95
117
 
96
118
  DEPENDENCIES
97
- bundler (~> 4)
98
119
  env_parser!
120
+ irb
99
121
  rspec (~> 3)
100
122
  rspec_junit_formatter
101
123
  rubocop
@@ -112,8 +134,11 @@ CHECKSUMS
112
134
  connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
113
135
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
114
136
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
115
- env_parser (1.6.2)
137
+ env_parser (1.7.1)
138
+ erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
116
139
  i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
140
+ io-console (0.9.2) sha256=efa74f891dd03c0939a931dfc6e74c2813d904763d456ea9762b0525e748db08
141
+ irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
117
142
  json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
118
143
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
119
144
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
@@ -122,10 +147,15 @@ CHECKSUMS
122
147
  numerizer (0.1.1) sha256=10ec9efec62472b69a3a0e275a18a44baa595ce6e2e4cfc1678d5cb2974c336f
123
148
  parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
124
149
  parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
150
+ pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
151
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
125
152
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
126
153
  racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
127
154
  rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
155
+ rbs (4.1.3) sha256=0c4474a9751cdc14364bfad0b3e53678323bbdc2c31683b0445932867dbab8c4
156
+ rdoc (8.1.0) sha256=befc37880a5cfd36dcb176c748b5fd5ee39dd3536a75e81824e4972ce230f60a
128
157
  regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
158
+ reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
129
159
  rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
130
160
  rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
131
161
  rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
@@ -136,6 +166,7 @@ CHECKSUMS
136
166
  rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
137
167
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
138
168
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
169
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
139
170
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
140
171
  unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
141
172
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
data/env_parser.gemspec CHANGED
@@ -1,9 +1,7 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'env_parser/version'
1
+ require_relative 'lib/env_parser/version'
4
2
 
5
3
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = ['>= 3']
4
+ spec.required_ruby_version = '>= 3.4'
7
5
 
8
6
  spec.name = 'env_parser'
9
7
  spec.version = EnvParser::VERSION
@@ -14,19 +12,28 @@ Gem::Specification.new do |spec|
14
12
  spec.homepage = 'https://github.com/nestor-custodio/env_parser'
15
13
  spec.license = 'MIT'
16
14
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |filename| filename.start_with? 'spec/' }
15
+ spec.files = `git ls-files -z`.split("\x0") & Dir['*', 'lib/**/*']
18
16
  spec.executables = []
19
17
  spec.require_paths = ['lib']
20
18
 
21
- spec.metadata['rubygems_mfa_required'] = 'true'
19
+ # ---
20
+
21
+ spec.metadata = {
22
+ # See: https://guides.rubygems.org/specification-reference/#metadata
23
+
24
+ # RubyGems.org Security
25
+ #
26
+ 'allowed_push_host' => 'https://rubygems.org',
27
+ 'rubygems_mfa_required' => 'true',
28
+
29
+ # Metadata-Provided URIs
30
+ #
31
+ 'homepage_uri' => spec.homepage
32
+ }
33
+
34
+ # ---
22
35
 
23
36
  spec.add_dependency 'activesupport', ['>= 6.1.0', '< 9']
24
37
  spec.add_dependency 'chronic', '~> 0'
25
38
  spec.add_dependency 'chronic_duration', '~> 0'
26
-
27
- spec.add_development_dependency 'bundler', '~> 4'
28
- spec.add_development_dependency 'rspec', '~> 3'
29
- spec.add_development_dependency 'rspec_junit_formatter'
30
- spec.add_development_dependency 'rubocop'
31
- spec.add_development_dependency 'yard'
32
39
  end
@@ -88,7 +88,7 @@ module EnvParser::Types
88
88
  # With `raise_exceptions` set, ChronicDuration will fail on the "P" and "T" in ISO8601
89
89
  # periods, so we have to check for and remove them.
90
90
  #
91
- iso_period = %r{^\s*P(?:[0-9.]Y)?(?:[0-9.]M)?(?:[0-9.]W)?(?:[0-9.]D)?(?:T(?:[0-9.]H)?(?:[0-9.]M)?(?:[0-9.]S)?)?\s*$}
91
+ iso_period = %r{^\s*P(?:[0-9.]Y)?(?:[0-9.]M)?(?:[0-9.]W)?(?:[0-9.]D)?(?:T(?:[0-9.]H)?(?:[0-9.]M)?(?:[0-9.]S)?)?\s*$} # rubocop:disable Layout/LineLength
92
92
  value = value.delete 'PT' if value =~ iso_period
93
93
 
94
94
  value = ChronicDuration.parse value, keep_zero: true
@@ -110,6 +110,7 @@ module EnvParser::Types
110
110
 
111
111
  EnvParser.define_type(:version, aliases: :semver, if_unset: nil) do |value|
112
112
  # We're using the official semver.org-provided regex.
113
+ #
113
114
  semver = %r{^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$} # rubocop:disable Layout/LineLength
114
115
 
115
116
  match_data = value.match(semver)
@@ -1,3 +1,3 @@
1
1
  class EnvParser
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.2'.freeze
3
3
  end
data/lib/env_parser.rb CHANGED
@@ -46,10 +46,10 @@ class EnvParser
46
46
 
47
47
  given_types = (Array(name) + Array(options[:aliases])).map(&:to_s).map(&:to_sym)
48
48
  given_types.each do |type|
49
- raise(TypeAlreadyDefinedError, "cannot redefine #{type.inspect}") if known_types.key?(type)
49
+ raise(TypeAlreadyDefinedError, "cannot redefine #{type.inspect}") if known_types.has_key?(type)
50
50
 
51
51
  known_types[type] = {
52
- parser: parser,
52
+ parser: parser,
53
53
  if_unset: options[:if_unset]
54
54
  }
55
55
  end
@@ -114,13 +114,13 @@ class EnvParser
114
114
  value = value.to_s
115
115
 
116
116
  type = known_types[options[:as]]
117
- raise(ArgumentError, 'missing `as` parameter') unless options.key?(:as)
117
+ raise(ArgumentError, 'missing `as` parameter') unless options.has_key?(:as)
118
118
  raise(UnknownTypeError, "invalid `as` parameter: #{options[:as].inspect}") unless type
119
119
 
120
- return (options.key?(:if_unset) ? options[:if_unset] : type[:if_unset]) if value.blank?
120
+ return (options.has_key?(:if_unset) ? options[:if_unset] : type[:if_unset]) if value.blank?
121
121
 
122
122
  value = type[:parser].call(value)
123
- check_for_set_inclusion(value, set: options[:from_set]) if options.key?(:from_set)
123
+ check_for_set_inclusion(value, set: options[:from_set]) if options.has_key?(:from_set)
124
124
  check_user_defined_validations(value, proc: options[:validated_by], block: validation_block)
125
125
 
126
126
  value
@@ -188,10 +188,11 @@ class EnvParser
188
188
  #
189
189
  # @raise [ArgumentError]
190
190
  #
191
- def register(name, options = {}, &validation_block)
191
+ def register(name, options = {}, &)
192
192
  # Allow for registering multiple variables simultaneously via a single call.
193
193
  if name.is_a? Hash
194
194
  raise(ArgumentError, 'cannot register multiple values with one block') if block_given?
195
+
195
196
  return register_all(name)
196
197
  end
197
198
 
@@ -199,22 +200,23 @@ class EnvParser
199
200
  within = options.fetch(:within, Kernel)
200
201
 
201
202
  named = name
202
- named = options.fetch(:named, name) if options.key? :within
203
+ named = options.fetch(:named, name) if options.has_key? :within
203
204
 
204
205
  # ENV *seems* like a Hash and it does *some* Hash-y things, but it is NOT a Hash and that can
205
206
  # bite you in some cases. Making sure we're working with a straight-up Hash saves a lot of
206
207
  # sanity checks later on. This is also a good place to make sure we're working with a String
207
208
  # key.
209
+ #
208
210
  if from == ENV
209
211
  from = from.to_h
210
212
  name = name.to_s
211
213
  end
212
214
 
213
215
  raise ArgumentError, "invalid `from` parameter: #{from.class}" unless from.is_a? Hash
214
- raise ArgumentError, "invalid `within` parameter: #{within.inspect}" unless within.is_a?(Module) || within.is_a?(Class)
216
+ raise ArgumentError, "invalid `within` parameter: #{within.inspect}" unless within.is_a? Module
215
217
 
216
218
  value = from[name]
217
- value = parse(value, options, &validation_block)
219
+ value = parse(value, options, &)
218
220
  within.const_set(named.upcase.to_sym, value.dup.freeze)
219
221
 
220
222
  value
@@ -231,12 +233,12 @@ class EnvParser
231
233
  #
232
234
  def add_env_bindings
233
235
  ENV.instance_eval do
234
- def parse(name, options = {}, &validation_block)
235
- EnvParser.parse(self[name.to_s], options, &validation_block)
236
+ def parse(name, options = {}, &)
237
+ EnvParser.parse(self[name.to_s], options, &)
236
238
  end
237
239
 
238
- def register(*args)
239
- EnvParser.register(*args)
240
+ def register(*)
241
+ EnvParser.register(*)
240
242
  end
241
243
  end
242
244
 
@@ -265,8 +267,8 @@ class EnvParser
265
267
  autoregister_spec.deep_symbolize_keys!
266
268
  autoregister_spec.transform_values! do |spec|
267
269
  sanitized = spec.slice(:as, :named, :within, :if_unset, :from_set)
268
- sanitized[:as] = sanitized[:as].to_sym if sanitized.key? :as
269
- sanitized[:within] = sanitized[:within].constantize if sanitized.key? :within
270
+ sanitized[:as] = sanitized[:as].to_sym if sanitized.has_key? :as
271
+ sanitized[:within] = sanitized[:within].constantize if sanitized.has_key? :within
270
272
 
271
273
  sanitized
272
274
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nestor Custodio
@@ -57,128 +57,17 @@ dependencies:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
- - !ruby/object:Gem::Dependency
61
- name: bundler
62
- requirement: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '4'
67
- type: :development
68
- prerelease: false
69
- version_requirements: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '4'
74
- - !ruby/object:Gem::Dependency
75
- name: rspec
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '3'
81
- type: :development
82
- prerelease: false
83
- version_requirements: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "~>"
86
- - !ruby/object:Gem::Version
87
- version: '3'
88
- - !ruby/object:Gem::Dependency
89
- name: rspec_junit_formatter
90
- requirement: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- type: :development
96
- prerelease: false
97
- version_requirements: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- - !ruby/object:Gem::Dependency
103
- name: rubocop
104
- requirement: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '0'
109
- type: :development
110
- prerelease: false
111
- version_requirements: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: '0'
116
- - !ruby/object:Gem::Dependency
117
- name: yard
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '0'
123
- type: :development
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '0'
130
60
  email:
131
61
  - nestor@custodio.org
132
62
  executables: []
133
63
  extensions: []
134
64
  extra_rdoc_files: []
135
65
  files:
136
- - ".circleci/config.yml"
137
- - ".gitignore"
138
- - ".rspec"
139
- - ".rubocop.yml"
140
- - ".ruby-version"
141
- - ".yardopts"
142
66
  - Gemfile
143
67
  - Gemfile.lock
144
68
  - LICENSE.txt
145
69
  - README.md
146
70
  - Rakefile
147
- - bin/console
148
- - bin/setup
149
- - docs/EnvParser.html
150
- - docs/EnvParser/AutoregisterFileNotFound.html
151
- - docs/EnvParser/Error.html
152
- - docs/EnvParser/TypeAlreadyDefined.html
153
- - docs/EnvParser/TypeAlreadyDefinedError.html
154
- - docs/EnvParser/Types.html
155
- - docs/EnvParser/Types/BaseTypes.html
156
- - docs/EnvParser/Types/ChronologyTypes.html
157
- - docs/EnvParser/Types/InternetTypes.html
158
- - docs/EnvParser/UnknownTypeError.html
159
- - docs/EnvParser/UnparseableAutoregisterSpec.html
160
- - docs/EnvParser/ValueNotAllowed.html
161
- - docs/EnvParser/ValueNotAllowedError.html
162
- - docs/EnvParser/ValueNotConvertibleError.html
163
- - docs/EnvParserTypes.html
164
- - docs/EnvParserTypes/BaseTypes.html
165
- - docs/EnvParserTypes/ChronologyTypes.html
166
- - docs/EnvParserTypes/InternetTypes.html
167
- - docs/EnvParserTypes/TimeTypes.html
168
- - docs/_index.html
169
- - docs/class_list.html
170
- - docs/css/common.css
171
- - docs/css/full_list.css
172
- - docs/css/style.css
173
- - docs/file.README.html
174
- - docs/file_list.html
175
- - docs/frames.html
176
- - docs/index.html
177
- - docs/js/app.js
178
- - docs/js/full_list.js
179
- - docs/js/jquery.js
180
- - docs/method_list.html
181
- - docs/top-level-namespace.html
182
71
  - env_parser.gemspec
183
72
  - lib/env_parser.rb
184
73
  - lib/env_parser/autoregister.rb
@@ -192,7 +81,9 @@ homepage: https://github.com/nestor-custodio/env_parser
192
81
  licenses:
193
82
  - MIT
194
83
  metadata:
84
+ allowed_push_host: https://rubygems.org
195
85
  rubygems_mfa_required: 'true'
86
+ homepage_uri: https://github.com/nestor-custodio/env_parser
196
87
  rdoc_options: []
197
88
  require_paths:
198
89
  - lib
@@ -200,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
91
  requirements:
201
92
  - - ">="
202
93
  - !ruby/object:Gem::Version
203
- version: '3'
94
+ version: '3.4'
204
95
  required_rubygems_version: !ruby/object:Gem::Requirement
205
96
  requirements:
206
97
  - - ">="
data/.circleci/config.yml DELETED
@@ -1,64 +0,0 @@
1
- # Ruby CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
- #
5
- version: 2.1
6
- jobs:
7
- build:
8
- docker:
9
- # specify the version you desire here
10
- - image: cimg/ruby:3.4
11
-
12
- # Specify service dependencies here if necessary
13
- # CircleCI maintains a library of pre-built images
14
- # documented at https://circleci.com/docs/2.0/circleci-images/
15
- # - image: circleci/postgres:9.4
16
-
17
- working_directory: ~/repo
18
-
19
- steps:
20
- - checkout
21
-
22
- # Download and cache dependencies
23
- - restore_cache:
24
- keys:
25
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
26
- # fall back to using the latest cache if no exact match is found
27
- - v1-dependencies
28
-
29
- - run:
30
- name: update bundler
31
- command: |
32
- gem install bundler --version $(tail -n 1 ~/repo/Gemfile.lock | tr -d ' ')
33
-
34
- - run:
35
- name: install dependencies
36
- command: |
37
- bundle config set path vendor/bundle
38
- bundle install --jobs=$(nproc) --retry=3
39
-
40
- - save_cache:
41
- paths:
42
- - ./vendor/bundle
43
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
44
-
45
- # run tests!
46
- - run:
47
- name: run tests
48
- command: |
49
- mkdir /tmp/test-results
50
- TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
51
-
52
- bundle exec rspec --format progress \
53
- --format RspecJunitFormatter \
54
- --out /tmp/test-results/rspec.xml \
55
- --format progress \
56
- -- \
57
- $TEST_FILES
58
-
59
- # collect reports
60
- - store_test_results:
61
- path: /tmp/test-results
62
- - store_artifacts:
63
- path: /tmp/test-results
64
- destination: test-results
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /pkg/
6
- /spec/reports/
7
- /tmp/
8
- /true/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
-
13
- # don't commit gem builds
14
- env_parser-*.gem
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,64 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 3.0
3
- SuggestExtensions: false
4
- NewCops: enable
5
-
6
-
7
- Layout/EmptyLineAfterGuardClause:
8
- # Add empty line after guard clause.
9
- Enabled: false
10
-
11
- Layout/LineLength:
12
- # Checks that line length does not exceed the configured limit.
13
- Max: 150
14
-
15
-
16
- Metrics/AbcSize:
17
- # A calculated magnitude based on number of assignments, branches, and conditions.
18
- Max: 30
19
-
20
- Metrics/BlockLength:
21
- # Avoid long blocks with many lines.
22
- Exclude:
23
- - 'spec/**/*.rb'
24
-
25
- Metrics/CyclomaticComplexity:
26
- # A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
27
- Max: 10
28
-
29
- Metrics/MethodLength:
30
- # Avoid methods longer than 25 lines of code.
31
- Max: 25
32
-
33
-
34
- Style/AsciiComments:
35
- # Use only ASCII symbols in comments.
36
- #
37
- # NLC: We're allowing non-breaking spaces (' '), as they're needed to prevent
38
- # browsers from collapsing multiple spaces in documentation code blocks.
39
- AllowedChars:
40
- - ' '
41
-
42
- Style/ClassAndModuleChildren:
43
- # Checks style of children classes and modules.
44
- Enabled: false
45
-
46
- Style/FetchEnvVar:
47
- # Suggests `ENV.fetch` for the replacement of `ENV[]`.
48
- Enabled: false
49
-
50
- Style/FrozenStringLiteralComment:
51
- # Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default.
52
- EnforcedStyle: never
53
-
54
- Style/NumericLiterals:
55
- # Add underscores to large numeric literals to improve their readability.
56
- Enabled: false
57
-
58
- Style/RegexpLiteral:
59
- # Use / or %r around regular expressions.
60
- EnforcedStyle: percent_r
61
-
62
- Style/StringLiterals:
63
- # Check for use of ' vs ".
64
- ConsistentQuotesInMultiline: true
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.4
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- --output-dir=./docs --no-private --markup=markdown --format=html
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'env_parser'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here