Sha256: f850ba787dd6a6d17bc9330fa54b0fc63798892731106bd402799cac531ffa71

Contents?: true

Size: 716 Bytes

Versions: 4

Compression:

Stored size: 716 Bytes

Contents

module Wukong
  module Deploy
    module IntegrationHelper

      def root
        @root ||= Pathname.new(File.expand_path('../../..', __FILE__))
      end

      def lib_dir *args
        root.join('lib', *args)
      end

      def bin_dir *args
        root.join('bin', *args)
      end
      
      def examples_dir *args
        root.join('examples', *args)
      end

      def integration_env
        {
          "PATH"    => [bin_dir.to_s, ENV["PATH"]].compact.join(':'),
          "RUBYLIB" => [lib_dir.to_s, ENV["RUBYLIB"]].compact.join(':')
        }
      end

      def integration_cwd
        root.to_s
      end

      def example_script *args
        examples_dir(*args)
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wukong-deploy-0.2.0 spec/support/integration_helper.rb
wukong-deploy-0.1.1 spec/support/integration_helper.rb
wukong-deploy-0.1.0 spec/support/integration_helper.rb
wukong-deploy-0.0.2 spec/support/integration_helper.rb