Skip to content

Commit

Permalink
Move gemspec files to top of lib directory.
Browse files Browse the repository at this point in the history
  They have version.rb files with same directory.
  But version.rb have been removed at ruby/ruby#3375
  There is no reason to locate under the library name of directory.
  • Loading branch information
hsbt committed Jun 19, 2023
1 parent 20629a6 commit cae26ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timeout.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

name = File.basename(__FILE__, ".gemspec")
version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
end rescue nil
Expand Down

0 comments on commit cae26ed

Please sign in to comment.