- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
| import sbt._ | |
| import Keys._ | |
| import Build.data | |
| object build extends Build { | |
| lazy val runAll = TaskKey[Unit]("run-all") | |
| lazy val standardSettings = Seq( | |
| runAllIn(Compile) | |
| ) |
| def screenshot | |
| require 'capybara/util/save_and_open_page' | |
| now = Time.now | |
| p = "/#{now.strftime('%Y-%m-%d-%H-%M-%S')}-#{rand}" | |
| Capybara.save_page body, "#{p}.html" | |
| path = Rails.root.join("#{Capybara.save_and_open_page_path}" "#{p}.png").to_s | |
| page.driver.render path | |
| Launchy.open path | |
| end |