Permalink
Browse files

* create executable bin

* bootstrap app_generator
  • Loading branch information...
xdite committed Oct 7, 2012
1 parent 33e2a58 commit e2557fc858edcd349d4d598637b481f7d255b9a2
Showing with 26 additions and 1 deletion.
  1. +8 −0 bin/bootstrapers
  2. +1 −1 bootstrapers.gemspec
  3. +17 −0 lib/bootstrapers/generators/app_generator.rb
View
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+require File.expand_path(File.join('..', 'lib', 'bootstrapers', 'generators', 'app_generator'), File.dirname(__FILE__))
+templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
+
+Bootstrapers::AppGenerator.source_root templates_root
+Bootstrapers::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
+Bootstrapers::AppGenerator.start
View
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
gem.homepage = ""
gem.files = `git ls-files`.split($/)
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
end
@@ -0,0 +1,17 @@
+require 'rails/generators'
+require 'rails/generators/rails/app/app_generator'
+
+
+module Bootstrapers
+ class AppGenerator < Rails::Generators::AppGenerator
+
+ def finish_template
+ invoke :bootstrapers_customization
+ super
+ end
+
+ def bootstrapers_customization
+ end
+
+ end
+end

0 comments on commit e2557fc

Please sign in to comment.