Skip to content

Update README.md file - #2

Merged
azimux merged 1 commit into
foobara:mainfrom
zhephyn:update-docs
Oct 21, 2026
Merged

azimux merged 1 commit into
foobara:mainfrom
zhephyn:update-docs

Conversation

@zhephyn

@zhephyn zhephyn commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
@zhephyn

zhephyn commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

new update is up. Most of the changes are based on the feedback from the review session.

The example which was related to teaching someone how to use the gem was mostly scrapped, except for this part which explains the workings of some code from the gem itself. which is why i kinda left it in.

Which environment to use: it checks the DOTENV_ENV environment variable first, then FOOBARA_ENV, and if neither is set, it uses development.

also not sure which of these three is most grammatically accurate: "a higher precedent", "higher precedence" or "higher precedent", so could use your help on that. otherwise lmk wyt.

Comment thread README.md Outdated
@@ -1,43 +1,92 @@
# Foobara::LoadDotenv
# Foobara::LoadDotEnv

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original spelling of Foobara::Dotenv is the right one

Comment thread README.md Outdated
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library
into a gem. Put your Ruby code in the file `lib/foobara/load_dotenv`. To experiment with that code, run `bin/console`
for an interactive prompt.
Usually many projects keep their environment variables in small text files named `.env`. This gem loads those variables for you, picking the right ones for the specific environment you are in such as (development, test or production).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should ditch this paragraph since I think it doesn't add anything over the first paragraph and other parts of the file and the knowledge somebody would have if they were interested in this gem.

Comment thread README.md Outdated
Foobara::LoadDotenv.run!(env: "test", dir: Dir.pwd)
```

Here `env: "test"` picks the `test` environment, and `dir: Dir.pwd` picks the folder which in this case is the current working directory. You can also pass the environment variable as a symbol, like `env: :test`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should mention the symbol thing. It's too much low-level detail that wouldn't matter to people using the gem and isn't something I'd want to couple to.

Comment thread README.md Outdated
```

## Usage
With no arguments, the loader works out two things for itself:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just call them defaults and I think we should present the version with explicit values first and then mention the defaults afterwards. That will probably be more informative.

Comment thread README.md Outdated

NOTE:

- The specified directory in the command must exist.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems too obvious to mention so we should delete it

Comment thread README.md Outdated

- The specified directory in the command must exist.

- The gem overwrites any environment variables already set in your terminal or system when it loads the matching `.env` files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep this information since I don't think all dotenv loaders work this way... some won't override existing values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just combine it with the previous line so like NOTE: This gem overwrites... to save vertical space.

Comment thread README.md Outdated
# Foobara::LoadDotEnv

TODO: Delete this and the text below, and describe your gem
`foobara-dotenv-loader` is a gem which provides `Foobara::LoadDotenv`,a loader that picks the right `.env` files for your environment and loads them in a consistent, conventional order.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add a space after this comma

Comment thread README.md Outdated
## Usage

$ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
### Load your files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could ditch this header. There no other ### section in here so kind of not point in labeling this one.

@azimux

azimux commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Only had a couple small comments and then I think it's good enough to merge! Can we squash the commits down to 1 commit?

@zhephyn
zhephyn force-pushed the update-docs branch 2 times, most recently from bec39f8 to 71f424e Compare October 21, 2026 19:12
@azimux

azimux commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@azimux
azimux merged commit d49e14b into foobara:main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants