Blog (git)

@fredwu 11 years ago | 1 min read | no comments
The other day a colleague asked whether or not it’s possible to have SimpleCov return a group that only contains uncommitted changes. The answer is yes! After some digging around, we found the following way: # in spec_helper.rb SimpleCov.start 'rails' do add_group 'Changed' do |source_file| `git ls-files --exclude-standard --others \ && git diff --name-only \ && git diff --name-only --cached`.split("\n").detect do |filename| source_file.filena...
@fredwu 14 years ago | 3 min read | no comments
The Rails deployment flow is really smooth thanks to the powerful (and easy to use) Capistrano. Capistrano not only works with Rails and other Ruby code bases, but also code bases in any programming languages, such as PHP! Here is an overview of what I did to get one of our PHP production sites up and running with Capistrano. If you don’t already have Ruby and Rubygems installed, install them! After you got ruby and rubygems, install Capistrano and its related gems - gem install capistra...