nvar 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc50fc2cf63ed49d3671ec10dd9279e5a200c1634ade7c6633482bddaa870dfe
4
- data.tar.gz: 2f19a26d8e083fde95334cc0d0998d4b6cb8e2eeafd955b5dc3d3954927b6bb9
3
+ metadata.gz: 5623fcf10c45adddb15aee26416afa566eeb57972db115b930913fb874b0e7d9
4
+ data.tar.gz: 2b5d10f4fc45886002a0eccd0dde8d1709cf7e4d38b8e4e8e672509cef318eb8
5
5
  SHA512:
6
- metadata.gz: 98aa1a93523ab7759c577bfa507a86488788a754e8c2c36fc997c5f2fc7574867fd4a75f8c02ea398daf6c7743be69805b11890712bbb04a149b121c1582a70b
7
- data.tar.gz: abb3c611bf5254f9691df14b2ad6d9da2c3f4261e406b76e278abca5b4329724e757bdd374c32ec2e32bbeba6ddea86885f176a4a9b81dc5c22f0c8a0f001c10
6
+ metadata.gz: 60ca286c6d6741804fcb8f31652db93a728764e9a03af2119075c03d804640bcb2802a428ae3042f0d0658453e79d1f629dce7e0b0c1c6a198a602b8ab48a732
7
+ data.tar.gz: dfecc072b41861cb91ac42471460277deaefd5b12d468b0456038cea174247d61c81d3c309ba6ba98e4984e6abb008267f0b652b574722b801ea4e427e89e94c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nvar (0.1.0)
4
+ nvar (0.1.1)
5
5
  activesupport (>= 5.0.0, < 8.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -60,9 +60,13 @@ Your tests shouldn't be reliant on your environment, so generally, you want to h
60
60
  Now that you've been through and configured the environment variables that are necessary for your app, `Nvar` will write your environment variables to top-level constants, cast to any types you've specified, and raise an informative error if any are absent.
61
61
  ### .env files
62
62
 
63
- `Nvar` works well with gems like `dotenv` that source their config from a `.env` file. If an environment variable is unset when the app initializes and isn't present in `.env`, it will be added to that file. If a default value is specified in your `Nvar` config, that will be passed to `.env` too.
63
+ `Nvar` works well with gems like `dotenv-rails` that source their config from a `.env` file. If an environment variable is unset when the app initializes and isn't present in `.env`, it will be added to that file. If a default value is specified in your `Nvar` config, that will be passed to `.env` too.
64
64
 
65
- When using gems such as `dotenv`, make sure you load those first so that the environment is ready for `Nvar` to check.
65
+ When using gems such as `dotenv-rails`, make sure you load those first so that the environment is ready for `Nvar` to check.
66
+
67
+ ### `rake nvar:verify_environment_file`
68
+
69
+ This Rake task provided by `Nvar` is super helpful for your project's developer experience. Based on what's currently in the environment, it'll show any environment variables that are missing and add declarations for them to `.env`. And if you've set a `default_value` in your config, that'll get written too.
66
70
 
67
71
  ## Development
68
72
 
@@ -82,3 +86,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
82
86
  ## Code of Conduct
83
87
 
84
88
  Everyone interacting in the Nvar project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/boardfish/nvar/blob/master/CODE_OF_CONDUCT.md).
89
+
90
+ ## This gem's name
91
+
92
+ This gem isn't associated with [sneakertack/nvar](https://github.com/sneakertack/nvar).
@@ -16,7 +16,7 @@ module Nvar
16
16
  @type = type
17
17
  @required = args[:required].nil? ? true : args[:required]
18
18
  @filter_from_requests = filter_from_requests.yield_self { |f| [true, false].include?(f) ? f : f&.to_sym }
19
- @value = fetch_value(args.slice(:passthrough, :default_value))
19
+ @value = fetch_value(**args.slice(:passthrough, :default_value))
20
20
  @defined = true
21
21
  rescue KeyError
22
22
  @value = args[:default_value]
data/lib/nvar/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nvar
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nvar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Fish
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-17 00:00:00.000000000 Z
11
+ date: 2022-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport