Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* create executable bin

* bootstrap app_generator
  • Loading branch information...
commit e2557fc858edcd349d4d598637b481f7d255b9a2 1 parent 33e2a58
@xdite authored
View
8 bin/bootstrapers
@@ -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
2  bootstrapers.gemspec
@@ -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
View
17 lib/bootstrapers/generators/app_generator.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.