This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Tuneup | |
| module Bootstrap | |
| module Utils | |
| private | |
| def build_dir | |
| 'tuneup-bootstrap' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Technique: | |
| http://www.pragprog.com/the-pragmatic-programmer | |
| Ruby: | |
| http://www.pragprog.com/titles/ruby/programming-ruby | |
| Rails: | |
| http://www.pragprog.com/titles/rails2/agile-web-development-with-rails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'erb' | |
| require 'find' | |
| require 'open3' | |
| require 'rubygems' | |
| begin | |
| require 'colorize' | |
| rescue LoadError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'cucumber/rake/task' | |
| cucumber_options = proc do |t| | |
| t.binary = Merb.root / 'bin' / 'cucumber' | |
| t.cucumber_opts = "--format pretty" | |
| end | |
| Cucumber::Rake::Task.new(:features, &cucumber_options) | |
| Cucumber::Rake::FeatureTask.new(:feature, &cucumber_options) | |
| namespace :merb_cucumber do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Fiveruns::Tuneup.step "Name of this step", :controller do | |
| # call your code here | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'randexp' | |
| branch = /bruce-\d{6,7}-\w{4,8}-\w{10,18}/.gen | |
| `git checkout -b #{branch} && git push origin #{branch}:#{branch}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bruce@rimal ~/bin % timer | |
| Insufficient arguments | |
| timer projects | |
| OR: timer start|stop|status|info|total PROJECT [OPTIONS] | |
| -t, --time TIME Specify a time (start/stop) | |
| -d, --describe DESCRIPTION Specify a description for this period (start/stop) | |
| -r, --rate RATE Include total to invoice using RATE (total) | |
| -w, --within DATETIMES Within DATETIMES (total/info) | |
| -s, --since DATETIME Since DATETIME (total/info) | |
| -u, --until DATETIME Until DATETIME (total/info) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Playing with it in irb: | |
| >> (class << Widget; self; end).ancestors | |
| => [BazWrapper, BarWrapper, FooWrapper, Class, Module, Object, Kernel] | |
| >> widget = Widget.new | |
| => #<Widget:0x11771f8> | |
| >> (class << widget; self; end).ancestors | |
| => [BazWrapper::WrappingB, BazWrapper::WrappingA, BarWrapper::Wrapping, FooWrapper::Wrapping, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $:.unshift(File.dirname(__FILE__) << '/../lib') | |
| require 'clingwrap' | |
| class Widget | |
| def do_something | |
| sleep 0.12 | |
| puts "Did something!" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Widget metaclass ancestors... | |
| [Wrapper, Class, Module, Object, Kernel] | |
| The 2 `new' methods get invoked... | |
| Invoked Widget::new | |
| Invoked Wrapper's new | |
| The 2 `render_on' methods get invoked... | |
| Invoked Wrapping's render_on | |
| Invoked Widget#render_on |
OlderNewer