Sha256: 541a467f097c5ca8b1523b09053f05966a0c2cc56e33ba7f8f5914061d376341

Contents?: true

Size: 767 Bytes

Versions: 6

Compression:

Stored size: 767 Bytes

Contents

module ORS::Commands
  class Check < Base
    def execute
      timestamps = app_servers.map do |server|
        [
         "[#{server}] ",
         execute_command(server,
                         %(cd #{deploy_directory}),
                         %(cat restart.timestamp),
                         :capture => true)
        ].join
      end.join("\n")

      puts timestamps unless pretending
    end

    def help
      puts <<-END
Usage: ./ors check [environment=production] [options]

=== Description
Prints out contents of restart.timestamp on the app servers

=== Options
--pretend    (or -p)   Don't execute anything, just show me what you're going to do
--no-gateway (or -ng)  Don't use a gateway (if you're inside the firewall)
      END
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ors-0.2.4 lib/ors/commands/check.rb
ors-0.2.3 lib/ors/commands/check.rb
ors-0.2.2 lib/ors/commands/check.rb
ors-0.2.1 lib/ors/commands/check.rb
ors-0.2.0 lib/ors/commands/check.rb
ors-0.1.8 lib/ors/commands/check.rb