Skip to content

Commit d2da45a

Browse files
committed
🔧 Simplify spec.version
1 parent ac5ad92 commit d2da45a

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

kettle-jem.gemspec

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
# coding: utf-8
22
# frozen_string_literal: true
33

4-
gem_version =
5-
if RUBY_VERSION >= "3.1" # rubocop:disable Gemspec/RubyVersionGlobalsUsage
6-
# Loading Version into an anonymous module allows version.rb to get code coverage from SimpleCov!
7-
# See: https://github.com/simplecov-ruby/simplecov/issues/557#issuecomment-2630782358
8-
# See: https://github.com/panorama-ed/memo_wise/pull/397
9-
Module.new.tap { |mod| Kernel.load("#{__dir__}/lib/kettle/jem/version.rb", mod) }::Kettle::Jem::Version::VERSION
10-
else
11-
# NOTE: Use __FILE__ or __dir__ until removal of Ruby 1.x support
12-
# __dir__ introduced in Ruby 1.9.1
13-
# lib = File.expand_path("../lib", __FILE__)
14-
lib = File.expand_path("lib", __dir__)
15-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
16-
require "kettle/jem/version"
17-
Kettle::Jem::Version::VERSION
18-
end
19-
204
Gem::Specification.new do |spec|
215
spec.name = "kettle-jem"
22-
spec.version = gem_version
6+
spec.version = Module.new.tap { |mod| Kernel.load("#{__dir__}/lib/kettle/jem/version.rb", mod) }::Kettle::Jem::Version::VERSION
237
spec.authors = ["Peter H. Boling"]
248
spec.email = ["floss@galtzo.com"]
259

0 commit comments

Comments
 (0)