Repository navigation
Update README.md file - #2
Conversation
|
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.
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. |
| @@ -1,43 +1,92 @@ | |||
| # Foobara::LoadDotenv | |||
| # Foobara::LoadDotEnv | |||
There was a problem hiding this comment.
The original spelling of Foobara::Dotenv is the right one
| 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). |
There was a problem hiding this comment.
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.
| 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`. |
There was a problem hiding this comment.
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.
| ``` | ||
|
|
||
| ## Usage | ||
| With no arguments, the loader works out two things for itself: |
There was a problem hiding this comment.
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.
|
|
||
| NOTE: | ||
|
|
||
| - The specified directory in the command must exist. |
There was a problem hiding this comment.
This seems too obvious to mention so we should delete it
|
|
||
| - 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. |
There was a problem hiding this comment.
We can keep this information since I don't think all dotenv loaders work this way... some won't override existing values.
There was a problem hiding this comment.
We could just combine it with the previous line so like NOTE: This gem overwrites... to save vertical space.
| # 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. |
There was a problem hiding this comment.
should add a space after this comma
| ## Usage | ||
|
|
||
| $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG | ||
| ### Load your files |
There was a problem hiding this comment.
I think we could ditch this header. There no other ### section in here so kind of not point in labeling this one.
|
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? |
bec39f8 to
71f424e
Compare
|
Thanks! |
No description provided.