-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handles scenario where
semver2
is not installed when `bundle instal…
…l` is run
- Loading branch information
1 parent
82137cb
commit bfc990c
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'semver' | ||
begin | ||
require 'semver' | ||
# rubocop:disable Style/FormatStringToken | ||
semver_version = SemVer.find.format('%M.%m.%p%s%d') | ||
# rubocop:enable Style/FormatStringToken | ||
rescue LoadError | ||
semver_version = '0.0.0' | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'freshli-commons' | ||
|
||
# rubocop:disable Style/FormatStringToken | ||
spec.version = SemVer.find.format('%M.%m.%p%s%d') | ||
# rubocop:enable Style/FormatStringToken | ||
spec.version = semver_version | ||
|
||
spec.authors = ['M. Scott Ford'] | ||
spec.email = ['[email protected]'] | ||
|