Sha256: da3bdbdfd7cd915df4791d6576e4274649602660c95b89e6ef5ef431e3f0c8b4

Contents?: true

Size: 686 Bytes

Versions: 6

Compression:

Stored size: 686 Bytes

Contents

module ORS::Commands
  class Check < Base
    def execute
      timestamps = app_servers.map do |server|
        [
         "[#{server}] ",
         execute_command(server, prepare_environment, %(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.10 lib/ors/commands/check.rb
ors-0.2.9 lib/ors/commands/check.rb
ors-0.2.8 lib/ors/commands/check.rb
ors-0.2.7 lib/ors/commands/check.rb
ors-0.2.6 lib/ors/commands/check.rb
ors-0.2.5 lib/ors/commands/check.rb