Sha256: c6e827805218edf56cc62769d138533fef8b2059cdaf4d5c1dd8ab56dd1ba350

Contents?: true

Size: 552 Bytes

Versions: 9

Compression:

Stored size: 552 Bytes

Contents

class Simple::Httpd
  module GemHelper
    extend self

    def version(name)
      spec = Gem.loaded_specs[name]
      version = spec ? spec.version.to_s : "0.0.0"
      version += "+unreleased" if !spec || unreleased?(spec)
      version
    end

    private

    def unreleased?(spec)
      return false unless defined?(Bundler::Source::Gemspec)
      return true if spec.source.is_a?(::Bundler::Source::Gemspec)
      return true if spec.source.is_a?(::Bundler::Source::Path)

      false
    end
  end

  VERSION = GemHelper.version "postjob"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple-httpd-0.4.3 lib/simple/httpd/version.rb
simple-httpd-0.4.2 lib/simple/httpd/version.rb
simple-httpd-0.4.1 lib/simple/httpd/version.rb
simple-httpd-0.4.0 lib/simple/httpd/version.rb
simple-httpd-0.3.5 lib/simple/httpd/version.rb
simple-httpd-0.3.4 lib/simple/httpd/version.rb
simple-httpd-0.3.3 lib/simple/httpd/version.rb
simple-httpd-0.3.1 lib/simple/httpd/version.rb
simple-httpd-0.3.0 lib/simple/httpd/version.rb