Sha256: 9d01089d8bece0fdf6182ed6c8404adbb52018fe3c5f3718214194344be461ff

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/env ruby

if defined?(Gem)
  if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.1.0")
    warn "Warning: You're using Rubygems #{Gem::VERSION} with Spring. " \
         "Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better " \
         "startup performance."
  else
    stubs = Gem::Specification.stubs.grep(Gem::StubSpecification)

    # stubbed? method added in https://github.com/rubygems/rubygems/pull/694
    if Gem::Specification.stubs.first.respond_to?(:stubbed?)
      unstubbed = stubs.reject(&:stubbed?)
    else
      unstubbed = stubs.reject { |s| s.send(:data).is_a?(Gem::StubSpecification::StubLine) }
    end

    # `gem pristine --all` ignores default gems. it doesn't really matter,
    # as there are probably not many of them on the system.
    unstubbed.reject!(&:default_gem?)

    if unstubbed.any?
      warn "Warning: Running `gem pristine --all` to regenerate your installed gemspecs " \
           "will improve the startup performance of Spring."
    end
  end
end

$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require 'spring/client'
Spring::Client.run(ARGV)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spring-1.1.0.beta3 bin/spring
spring-1.1.0.beta2 bin/spring
spring-1.1.0.beta1 bin/spring
spring-1.0.0 bin/spring
spring-0.9.2 bin/spring
spring-0.9.1 bin/spring
spring-0.9.0 bin/spring