spec/version_spec.rb in pheme-4.1.0 vs spec/version_spec.rb in pheme-4.1.1
- old
+ new
@@ -2,11 +2,10 @@
describe Pheme do
def get_version(git, branch = 'HEAD')
git.grep('VERSION = ', 'lib/*/version.rb', { object: branch }).
map { |_sha, matches| matches.first[1] }.
- map { |version_string| parse_version(version_string) }.
- reject(&:nil?).
+ filter_map { |version_string| parse_version(version_string) }.
first
end
def parse_version(string)
string.match(/VERSION = ['"](.*)['"]/)[1]