Skip to content

Commit

Permalink
Add matchers to enable lte-defined Elm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
knuton authored Jan 8, 2018
1 parent d775b15 commit d044926
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/elm_install/identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ def version(directory)
#
# @return [String] The version
def elm_version(directory)
if json(directory)['elm-version'] =~ /<\s*0\.19/
when json(directory)['elm-version']
case /<\s*0\.19/, /<=\s*0\.18/
'0.18'
elsif json(directory)['elm-version'] =~ /<\s*0\.18/
case /<\s*0\.18/, /<=\s*0\.17/
'0.17'
elsif json(directory)['elm-version'] =~ /<\s*0\.17/
case /<\s*0\.17/, /<=\s*0\.16/
'0.16'
else
''
Expand Down

0 comments on commit d044926

Please sign in to comment.