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
DIR=/(.*)\.(.*)/ | |
Dir.entries(Dir.pwd).each do |e| | |
next unless e.match(/[a-z]/) | |
puts 'moving ' + e + ' to ' + e.gsub(DIR, '\1') | |
`mkdir #{e.gsub(DIR, '\1')}` | |
`mv #{e} #{e.gsub(/(.*)\.(.*)/, '\1')}/` | |
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 'faker' | |
define_models do | |
model Site do | |
20.times do | |
# Fairly sure this isn't the right Faker syntax but oh well | |
stub :title => Faker::Company::Name | |
end | |
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
template(:entp) do | |
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git' | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git' | |
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git' | |
gem 'will-paginate', :git => 'git://github.com/mislav/will_paginate.git' | |
gem 'ruby-openid' | |
task "thing" 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
template(:entp) do | |
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git' | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git' | |
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git' | |
gem 'will-paginate', :git => 'git://github.com/mislav/will_paginate.git' | |
gem 'ruby-openid' | |
task "thing" 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
~/code/rg > ruby bin/rg hey -d mysql -t thoughtbot | |
generating app | |
applying template | |
vendoring gem mislav-will_paginate | |
vendoring gem RedCloth | |
vendoring gem mocha | |
vendoring gem thoughtbot-factory_girl | |
vendoring gem thoughtbot-shoulda | |
vendoring gem quietbacktrace | |
installing plugin squirrel |
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
template(:awesome) do | |
puts "this is fantastic" | |
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
module ActionController | |
module Routing | |
class RouteSet | |
attr_accessor :routes, :recognizer | |
def initialize | |
@routes = [] | |
@route_structure = {} | |
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
/Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:571:in `to_constant_name': Anonymous modules have no name to be referenced by (ArgumentError) | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:383:in `qualified_name_for' | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/dependencies.rb:101:in `const_missing' | |
from /Users/jeremymcanally/code/modular/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks' | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call' | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method' | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call' | |
from /Users/jeremymcanally/code/modular/vendor/rails/activesupport/lib/active_ |
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 File.dirname(__FILE__) + '/scm/scm' | |
require File.dirname(__FILE__) + '/scm/git' | |
require File.dirname(__FILE__) + '/scm/svn' | |
require 'open-uri' | |
require 'fileutils' | |
module Rails | |
class TemplateRunner | |
attr_reader :behavior, :description, :root |
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
Add "-m/--template" option to Rails generator to apply template to generated application. For example: | |
# Install plugins from git or svn | |
plugin "will-paginate", :git => "git://github.com/mislav/will_paginate.git" | |
plugin "old-restful-auth", :svn => "http://svn.techno-weenie.net/projects/plugins/restful_authentication/" | |
# Install gems | |
gem "jeremymcanally-context" | |
gem "bluecloth" | |
OlderNewer