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

version check #434

Merged
merged 96 commits into from
Apr 29, 2021
Merged

version check #434

merged 96 commits into from
Apr 29, 2021

Conversation

leastbad
Copy link
Contributor

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

During Rails startup, phone home to Github and compare local version against LATEST.

Adds new config.on_new_version_available flag to SR initializer which can be :exit, :warn or :ignore.

Defaults to :ignore (no connection attempted). Test only runs in development mode.

Network call is set to timeout 1s connect, 1s read (2s total).

Test will emit a message about skipping checks if running a pre-release build.

Test will not run if sanity checks are set to :ignore, regardless of on_new_version_available setting.

Updating LATEST will have to become part of the version deployment process.

Fixes #433

Why should this be added

This should be recommended to users struggling with keeping versions up to date. Goal is to reduce support version.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@marcoroth
Copy link
Member

Awesome, I love this addition!

I also like that the check is disabled by default, so we are only requesting stuff in the background if the user "permits" and actually wants it.

The only thing I would reconsider is the use of LATEST. It's another file we have to maintain if we release a new version. Maybe it would make more sense to request the latest version over the GitHub API, because the information is already there.

Either via the git tag:

curl https://api.github.com/repos/hopsoft/stimulus_reflex/tags

or via the GitHub releases:

curl https://api.github.com/repos/hopsoft/stimulus_reflex/releases/latest

@leastbad leastbad added this to the 3.4.2 milestone Feb 4, 2021
leastbad and others added 28 commits March 25, 2021 07:28
…#479)

* don't run on every attribute change (just `data-reflex` and `data-action`)

Co-authored-by: leastbad <38150464+leastbad@users.noreply.github.com>
add `useReflex` js function to "support" the composable pattern
…mulusreflex#486)

* Restructure receive

* Extract ReflexData and ReflexFactory
@leastbad leastbad merged commit 615face into stimulusreflex:master Apr 29, 2021
@leastbad leastbad deleted the version_update branch August 16, 2021 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SR+CR version checks on startup in development
9 participants