Skip to content

Instantly share code, notes, and snippets.

View jm's full-sized avatar
💫
Livin' life. Or something.

Jeremy McAnally jm

💫
Livin' life. Or something.
View GitHub Profile
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
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
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
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
~/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
template(:awesome) do
puts "this is fantastic"
end
module ActionController
module Routing
class RouteSet
attr_accessor :routes, :recognizer
def initialize
@routes = []
@route_structure = {}
end
/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_
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
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"