lib/wire/resource/fig_adapter.rb
# checks if containers are up (using fig ps)
checks if containers are up (using fig ps)
checks if containers are up ( using fig ps )
def up?
        with_fig(%w(ps)) do |exec_obj|
          exec_obj.run
          re = Regexp.new "^#{@name}.*Up.*"
          num_up = 0
          exec_obj.stdout.split("\n").each do |line|
            next unless line.match(re)
            $log.debug "Matching fig ps output: #{line}"
            num_up += 1
          end
          $log.debug 'No containers found in fig ps output' if num_up == 0
          return (exec_obj.exitstatus == 0 && num_up > 0)
        end
      end
def up? with_fig ( %w( ps ) ) do | exec_obj | exec_obj . run re = Regexp . new "^#{@name}.*Up.*" num_up = 0 exec_obj . stdout . split ( "\n" ) . each do | line | next unless line . match ( re ) $log . debug "Matching fig ps output: #{line}" num_up += 1 end $log . debug 'No containers found in fig ps output' if num_up == 0 return ( exec_obj . exitstatus == 0 && num_up > 0 ) end end
checks if containers are up (using fig ps)
checks if containers are up ( using fig ps )
# parse stdout..