Sha256: d9609d77099f3a8454e16a54c02cdfb89ee42b2e9843e3fe70dbcbbaafdd781d

Contents?: true

Size: 1.37 KB

Versions: 38

Compression:

Stored size: 1.37 KB

Contents

$LOAD_PATH.push File.expand_path("../lib", File.dirname(__FILE__))

if defined?(Bundler)
  Bundler.require :default, :test
else
  require 'rubygems'
end

require 'pp'
require 'engineyard-serverside'
require File.expand_path('../support/integration', __FILE__)

module EY
  module Serverside
    def self.dna_json=(j)
      @dna_json = j
      @node = nil
    end

    module LoggedOutput
      def info(_) end

      def logged_system(cmd)
        output = `#{cmd} 2>&1`
        successful = ($? == 0)
        if ENV['VERBOSE']
          if successful
            $stdout.puts "#{cmd}\n#{output.strip}".chomp
          else
            $stderr.puts "\nCommand `#{cmd}` exited with status #{$?.exitstatus}: '#{output.strip}'"
          end
        end
        successful
      end
    end

    class Strategies::Git
      def short_log_message(_) "" end
    end
  end
end

FIXTURES_DIR = File.expand_path("../fixtures", __FILE__)
GITREPO_DIR = "#{FIXTURES_DIR}/gitrepo"

FileUtils.rm_rf GITREPO_DIR if File.exists? GITREPO_DIR
Kernel.system "tar xzf #{GITREPO_DIR}.tar.gz -C #{FIXTURES_DIR}"

Spec::Runner.configure do |config|
  `which npm 2>&1`
  $NPM_INSTALLED = ($? == 0)
  unless $NPM_INSTALLED
    $stderr.puts "npm not found; skipping Node.js specs."
  end

  config.before(:all) do
    $DISABLE_GEMFILE = false
    $DISABLE_LOCKFILE = false
    EY::Serverside.dna_json = {}.to_json
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
engineyard-serverside-1.5.23.ruby19.16 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.15 spec/spec_helper.rb
engineyard-serverside-1.5.25 spec/spec_helper.rb
engineyard-serverside-1.5.24 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.14 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.13 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.12 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.11 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.10 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.9 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.8 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.7 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.6 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.5 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.4 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.2 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19.1 spec/spec_helper.rb
engineyard-serverside-1.5.23.ruby19 spec/spec_helper.rb
engineyard-serverside-1.5.21 spec/spec_helper.rb
engineyard-serverside-1.5.20 spec/spec_helper.rb