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

Only use Spring if already loaded #511

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

runephilosof-abtion
Copy link
Contributor

This makes it possible for the user to selectively use Spring on a command to command basis

Fixes #510

This makes it possible for the user to selectively use Spring on a command to command basis

Fixes bkeepers#510
@bkeepers
Copy link
Owner

Thanks @runephilosof-abtion! I made a few changes to get the tests passing. I'll release this shortly.

@bkeepers bkeepers merged commit 4223d1f into bkeepers:main Sep 17, 2024
12 checks passed
alpaca-tc added a commit to alpaca-tc/dotenv that referenced this pull request Sep 18, 2024
alpaca-tc added a commit to alpaca-tc/dotenv that referenced this pull request Sep 18, 2024
An exception occurs when invoking the rake task via ./bin/rails.

```
bin/rails aborted!
NoMethodError: undefined method `watch' for Spring:Module (NoMethodError)

    Spring.watch event.payload[:env].filename if Rails.application
          ^^^^^^
.bundle/ruby/3.2.0/gems/dotenv-3.1.3/lib/dotenv/rails.rb:16:in `block in <main>'
```

When using `./bin/rails`, 'spring/client' is loaded, but 'spring/watcher', which is unnecessary for the client-side, is not required.

This PR follows up on bkeepers#511 and fixes exception.
bkeepers added a commit that referenced this pull request Sep 18, 2024
derricklannaman referenced this pull request in powerhome/power-web-development-interview Sep 24, 2024
This PR contains the following updates:

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

---

### Release Notes

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

###
[`v3.1.4`](https://redirect.github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#314)

[Compare
Source](https://redirect.github.com/bkeepers/dotenv/compare/v3.1.3...v3.1.4)

- Fix an error when only the `Spring::Client` is loaded by
[@&#8203;alpaca-tc](https://redirect.github.com/alpaca-tc) in
[https://github.com/bkeepers/dotenv/pull/512](https://redirect.github.com/bkeepers/dotenv/pull/512)

##### New Contributors

- [@&#8203;alpaca-tc](https://redirect.github.com/alpaca-tc) made their
first contribution in
[https://github.com/bkeepers/dotenv/pull/512](https://redirect.github.com/bkeepers/dotenv/pull/512)

**Full Changelog**:
bkeepers/dotenv@v3.1.3...v3.1.4

###
[`v3.1.3`](https://redirect.github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#313)

[Compare
Source](https://redirect.github.com/bkeepers/dotenv/compare/v3.1.2...v3.1.3)

- Only use Spring if already loaded by
[@&#8203;runephilosof-abtion](https://redirect.github.com/runephilosof-abtion)
in
[https://github.com/bkeepers/dotenv/pull/511](https://redirect.github.com/bkeepers/dotenv/pull/511)
-   Doc Updates:
- Spell out 'FILENAME' in readme by
[@&#8203;mikegee](https://redirect.github.com/mikegee) in
[https://github.com/bkeepers/dotenv/pull/505](https://redirect.github.com/bkeepers/dotenv/pull/505)
- Provide a 'Changelog' link on rubygems.org/gems/dotenv by
[@&#8203;mark-young-atg](https://redirect.github.com/mark-young-atg) in
[https://github.com/bkeepers/dotenv/pull/506](https://redirect.github.com/bkeepers/dotenv/pull/506)
- README.md: typo "exiting" by
[@&#8203;olleolleolle](https://redirect.github.com/olleolleolle) in
[https://github.com/bkeepers/dotenv/pull/508](https://redirect.github.com/bkeepers/dotenv/pull/508)
- cleanup: Run standard:fix by
[@&#8203;olleolleolle](https://redirect.github.com/olleolleolle) in
[https://github.com/bkeepers/dotenv/pull/509](https://redirect.github.com/bkeepers/dotenv/pull/509)

##### New Contributors

- [@&#8203;mikegee](https://redirect.github.com/mikegee) made their
first contribution in
[https://github.com/bkeepers/dotenv/pull/505](https://redirect.github.com/bkeepers/dotenv/pull/505)
- [@&#8203;mark-young-atg](https://redirect.github.com/mark-young-atg)
made their first contribution in
[https://github.com/bkeepers/dotenv/pull/506](https://redirect.github.com/bkeepers/dotenv/pull/506)
- [@&#8203;olleolleolle](https://redirect.github.com/olleolleolle) made
their first contribution in
[https://github.com/bkeepers/dotenv/pull/508](https://redirect.github.com/bkeepers/dotenv/pull/508)
-
[@&#8203;runephilosof-abtion](https://redirect.github.com/runephilosof-abtion)
made their first contribution in
[https://github.com/bkeepers/dotenv/pull/511](https://redirect.github.com/bkeepers/dotenv/pull/511)

**Full Changelog**:
bkeepers/dotenv@v3.1.2...v3.1.3

</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 is behind base branch, 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/powerhome/power-web-development-interview).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

Don't load Spring, just check if it is already loaded
2 participants