Sha256: a2c5e84e228da2dc083452d26d72c912ab3e5da4268cefa4bb7927e7d78ce959

Contents?: true

Size: 786 Bytes

Versions: 24

Compression:

Stored size: 786 Bytes

Contents

module Shuttle
  class Ruby < Shuttle::Strategy
    include Shuttle::Support::Bundler
    include Shuttle::Support::Thin

    def setup
      unless ruby_installed?
        error "Please install Ruby first"
      end
      
      unless bundle_installed?
        install_bundler 
      end

      super
    end

    def deploy
      setup
      update_code
      checkout_code
      bundle_install
      thin_restart
      link_shared_paths
      link_release
    end

    def link_shared_paths
      ssh.run("mkdir -p #{release_path('tmp')}")
      ssh.run("ln -s #{shared_path('pids')} #{release_path('tmp/pids')}")
      ssh.run("ln -s #{shared_path('log')} #{release_path('log')}")
    end

    private

    def ruby_installed?
      ssh.run("which ruby").success?
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
shuttle-deploy-0.4.0 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.3.3 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.3.2 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.3.1 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.3.0 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.3.0.beta1 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.3 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.2 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.1 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta16 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta15 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta14 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta13 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta12 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta11 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta10 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta9 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta7 lib/shuttle/deployment/ruby.rb
shuttle-deploy-0.2.0.beta6 lib/shuttle/deployment/ruby.rb