Coerce version number to Bundler-accepted format

The Ruby package manager, Bundler, chokes on the "+" in a version number
like "4.1.0+1".  This fix translates "+" to "." in the version number
read from package.json.
This commit is contained in:
Jonathan Hefner
2018-04-29 17:23:01 -05:00
parent ee7f021f67
commit d9f9944d5a

View File

@@ -3,7 +3,7 @@ $package = JSON.parse(File.read(File.expand_path("package.json", __dir__)))
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "bootswatch" s.name = "bootswatch"
s.version = $package["version"] s.version = $package["version"].tr("+", ".")
s.author = $package["author"] s.author = $package["author"]
s.homepage = $package["homepage"] s.homepage = $package["homepage"]
s.summary = $package["description"] s.summary = $package["description"]