spec/version_spec.rb in pheme-3.0.1 vs spec/version_spec.rb in pheme-3.1.0

- old
+ new

@@ -1,13 +1,13 @@ require 'git' describe Pheme do def get_version(git, branch = 'HEAD') - git.grep('VERSION = ', 'lib/*/version.rb', { object: branch }) - .map { |_sha, matches| matches.first[1] } - .map(&method(:parse_version)) - .reject(&:nil?) - .first + git.grep('VERSION = ', 'lib/*/version.rb', { object: branch }). + map { |_sha, matches| matches.first[1] }. + map(&method(:parse_version)). + reject(&:nil?). + first end def parse_version(string) string.match(/VERSION = ['"](.*)['"]/)[1] end