Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually check optional Rails dependency version #481

Merged
merged 1 commit into from Feb 14, 2024

Conversation

bkeepers
Copy link
Owner

This adds a manual check for the Rails version before loading the railtie.

Fixes #480

@mvz
Copy link

mvz commented Feb 14, 2024

How about moving all of the Rails integration to dotenv-rails instead?

Oh, I see the integration was recently moved into dotenv on purpose.

@bkeepers bkeepers merged commit ac8ea76 into main Feb 14, 2024
12 checks passed
@bkeepers bkeepers deleted the check-optional-rails branch February 14, 2024 19:41
that-jill pushed a commit to powerhome/power-web-development-interview that referenced this pull request Feb 14, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [dotenv-rails](https://togithub.com/bkeepers/dotenv) | `3.0.0` ->
`3.0.1` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/dotenv-rails/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/dotenv-rails/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/dotenv-rails/3.0.0/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/dotenv-rails/3.0.0/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>bkeepers/dotenv (dotenv-rails)</summary>

###
[`v3.0.1`](https://togithub.com/bkeepers/dotenv/blob/HEAD/Changelog.md#301)

[Compare
Source](https://togithub.com/bkeepers/dotenv/compare/v3.0.0...v3.0.1)

**What's Changed**

- Disable autorestore if using climate_control or ice_age by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[bkeepers/dotenv#483
- Join files to Rails.root at load time by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[bkeepers/dotenv#484
- Manually check optional Rails dependency version by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[bkeepers/dotenv#481

**Full Changelog**:
bkeepers/dotenv@v3.0.0...v3.0.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/powerhome/power-web-development-interview).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@Earlopain
Copy link

Would it make sense to raise instead? When requiring this file, I expect it to work and warnings may or may not be seen. Rails itself for example raises when requiring files that require dependencies that are missing/not satisfied.

https://github.com/rails/rails/blob/9aeb1de2455e2988a90a49f73f87b60a58bcd173/activesupport/lib/active_support/cache/redis_cache_store.rb#L3-L11
https://github.com/rails/rails/blob/9aeb1de2455e2988a90a49f73f87b60a58bcd173/activesupport/lib/active_support/message_pack.rb#L3-L11

@bkeepers
Copy link
Owner Author

@Earlopain I debated about that. I decided not to because of all the unpredicable ways people use dotenv (like in another gem that still has Rails <6.1 in their build matrix). I would really prefer to raise, but I feel uneasy about it. 🤔

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.

Rails < v6.1: LocalJumpError in tagged logging
3 participants