Sha256: 1f1eb41243d90b11bf2de2a2ac93558d4ac893d86dadf6b173bc52a460ed5bfd

Contents?: true

Size: 480 Bytes

Versions: 6

Compression:

Stored size: 480 Bytes

Contents

# encoding: utf-8
require 'fedux_org_stdlib/rake/exceptions'

module FeduxOrgStdlib
  module Versionable
    def version_file(working_directory = Dir.getwd)
      paths = []
      paths << File.join(working_directory, 'lib', '**', 'version.rb')

      file = Dir.glob(paths.shift).first while !paths.blank? and file.blank?

      raise FeduxOrgStdlib::Rake::Exceptions::VersionFileNotFound, JSON.dump(message: 'Cannot find version file') unless file

      file
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.7.19 lib/fedux_org_stdlib/versionable.rb
fedux_org-stdlib-0.7.18 lib/fedux_org_stdlib/versionable.rb
fedux_org-stdlib-0.7.17 lib/fedux_org_stdlib/versionable.rb
fedux_org-stdlib-0.7.16 lib/fedux_org_stdlib/versionable.rb
fedux_org-stdlib-0.7.15 lib/fedux_org_stdlib/versionable.rb
fedux_org-stdlib-0.7.14 lib/fedux_org_stdlib/versionable.rb