Sha256: 8ae13ba12be296c1065e5b0c29838e19ebed426743c4259ef13ec9183d3bee83

Contents?: true

Size: 575 Bytes

Versions: 7

Compression:

Stored size: 575 Bytes

Contents

module Simple
  module SQL
    module GemHelper
      extend self

      def version(name)
        spec = Gem.loaded_specs[name]
        version = spec.version.to_s
        version += "+unreleased" if 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 "simple-sql"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
simple-sql-0.5.31 lib/simple/sql/version.rb
simple-sql-0.5.30 lib/simple/sql/version.rb
simple-sql-0.5.29 lib/simple/sql/version.rb
simple-sql-0.5.28 lib/simple/sql/version.rb
simple-sql-0.5.27 lib/simple/sql/version.rb
simple-sql-0.5.26 lib/simple/sql/version.rb
simple-sql-0.5.25 lib/simple/sql/version.rb