Sha256: 041c8a051b65bed5f7f8915b0812d40463627afd03a869abb550800e27e44798

Contents?: true

Size: 895 Bytes

Versions: 35

Compression:

Stored size: 895 Bytes

Contents

# Copyright (c) 2012 National ICT Australia Limited (NICTA).
# This software may be used and distributed solely under the terms of the MIT license (License).
# You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT.
# By downloading or using this software you accept the terms and the liability disclaimer in the License.

module OmfCommon
  PROTOCOL_VERSION = "6.0"

  def self.version_of(name)
    git_tag  = `git describe --tags 2> /dev/null`.chomp
    git_root = `git rev-parse --show-toplevel 2> /dev/null`.chomp
    gem_v = Gem.loaded_specs[name].version.to_s rescue '0.0.0'

    # Not in a development environment or git not present
    if git_root != File.absolute_path("#{File.dirname(__FILE__)}/../../../") || git_tag.empty?
      gem_v
    else
      git_tag.gsub(/-/, '.').gsub(/^v/, '')
    end
  end

  VERSION = version_of('omf_common')
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
omf_common-6.2.3 lib/omf_common/version.rb
omf_common-6.2.2 lib/omf_common/version.rb
omf_common-6.2.1 lib/omf_common/version.rb
omf_common-6.2.0 lib/omf_common/version.rb
omf_common-6.2.0.pre.2 lib/omf_common/version.rb
omf_common-6.2.0.pre.1 lib/omf_common/version.rb
omf_common-6.1.14.pre.2 lib/omf_common/version.rb
omf_common-6.1.14.pre.1 lib/omf_common/version.rb
omf_common-6.1.12 lib/omf_common/version.rb
omf_common-6.1.11 lib/omf_common/version.rb
omf_common-6.1.10 lib/omf_common/version.rb
omf_common-6.1.9 lib/omf_common/version.rb
omf_common-6.1.9.pre.4 lib/omf_common/version.rb
omf_common-6.1.9.pre.3 lib/omf_common/version.rb
omf_common-6.1.9.pre.2 lib/omf_common/version.rb
omf_common-6.1.8 lib/omf_common/version.rb
omf_common-6.1.7 lib/omf_common/version.rb
omf_common-6.1.6 lib/omf_common/version.rb
omf_common-6.1.6.pre.2 lib/omf_common/version.rb
omf_common-6.1.6.pre.1 lib/omf_common/version.rb