Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
The template won't have access to Suspenders, since it's called in
isolation.
  • Loading branch information
stevepolitodesign committed May 8, 2024
1 parent 55f209f commit 1919849
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/install/web.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
extend Suspenders::Generators::Helpers
def node_not_installed?
!node_version.present?
end

def node_version_unsupported?
node_version < "20.0.0"
end

def apply_template!
if node_not_installed? || node_version_unsupported?
Expand All @@ -7,7 +13,7 @@ def apply_template!
=== Node version unsupported ===
Suspenders requires Node >= #{Suspenders::MINIMUM_NODE_VERSION}
Suspenders requires Node >= 20.0.0
ERROR

fail Rails::Generators::Error, message
Expand Down

0 comments on commit 1919849

Please sign in to comment.