Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Created December 12, 2012 13:23
Show Gist options
  • Select an option

  • Save rodrigopinto/4267693 to your computer and use it in GitHub Desktop.

Select an option

Save rodrigopinto/4267693 to your computer and use it in GitHub Desktop.
def rows_msg(number)
(number >= 9000)? "already hit 9000 rows" : "has #{number} rows"
end
rows = `heroku pg:info --app managerbook|grep Rows`
result = rows.match(/(\d+)/)[1].to_i
puts "Your app 'managerbook' %s" % rows_msg(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment