Sha256: 706a0f09639939dceda0de1fb8169e0ca1acef07ac6aa0f3b6738152d2b81539

Contents?: true

Size: 569 Bytes

Versions: 19

Compression:

Stored size: 569 Bytes

Contents

module RSpec::Httpd
  module GemHelper
    extend self

    def version(name)
      spec = Gem.loaded_specs[name]
      return "unreleased" unless spec

      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 "rspec-httpd"
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rspec-httpd-0.3.8 lib/rspec/httpd/version.rb
rspec-httpd-0.3.7 lib/rspec/httpd/version.rb
rspec-httpd-0.3.6 lib/rspec/httpd/version.rb
rspec-httpd-0.3.5 lib/rspec/httpd/version.rb
rspec-httpd-0.3.4 lib/rspec/httpd/version.rb
rspec-httpd-0.3.2 lib/rspec/httpd/version.rb
rspec-httpd-0.3.1 lib/rspec/httpd/version.rb
rspec-httpd-0.3.0 lib/rspec/httpd/version.rb
rspec-httpd-0.1.0 lib/rspec/httpd/version.rb
rspec-httpd-0.0.17 lib/rspec/httpd/version.rb
rspec-httpd-0.0.15 lib/rspec/httpd/version.rb
rspec-httpd-0.0.14 lib/rspec/httpd/version.rb
rspec-httpd-0.0.12 lib/rspec/httpd/version.rb
rspec-httpd-0.0.11 lib/rspec/httpd/version.rb
rspec-httpd-0.0.10 lib/rspec/httpd/version.rb
rspec-httpd-0.0.9 lib/rspec/httpd/version.rb
rspec-httpd-0.0.8 lib/rspec/httpd/version.rb
rspec-httpd-0.0.7 lib/rspec/httpd/version.rb
rspec-httpd-0.0.5 lib/rspec/httpd/version.rb