Permalink
Browse files

generator tweaks: add license, allow ambitious_blah directory name, n…

…o xxspecify
  • Loading branch information...
1 parent cf72362 commit 64c25d088451470ab2ca6da7a002e891354eb44d @defunkt committed Dec 23, 2007
View
@@ -5,6 +5,7 @@ app_generators/ambition_adapter/templates/lib/query.rb.erb
app_generators/ambition_adapter/templates/lib/select.rb.erb
app_generators/ambition_adapter/templates/lib/slice.rb.erb
app_generators/ambition_adapter/templates/lib/sort.rb.erb
+app_generators/ambition_adapter/templates/LICENSE
app_generators/ambition_adapter/templates/Rakefile
app_generators/ambition_adapter/templates/README
app_generators/ambition_adapter/templates/test/helper.rb.erb
@@ -8,6 +8,7 @@ def initialize(runtime_args, runtime_options = {})
super
usage if args.empty?
@destination_root = File.expand_path(args.shift)
+ base_name = self.base_name.sub(/ambitious(-|_)/,'')
@adapter_name = base_name
@adapter_module = base_name.split('_').map { |part| part[0] = part[0...1].upcase; part }.join
extract_options
@@ -1,4 +1,9 @@
-%w( rubygems test/spec mocha redgreen English ).each { |f| require f }
+%w( rubygems test/spec mocha English ).each { |f| require f }
+
+begin
+ require 'redgreen'
+rescue LoadError
+end
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
require 'ambition/adapters/<%= adapter_name %>'
@@ -31,7 +31,7 @@ context "<%= adapter_module %> Adapter :: Sort" do
string.should == "foo"
end
- xxspecify "reverse order with #reverse" do
+ xspecify "reverse order with #reverse" do
# TODO: not implemented
string = @block.sort_by { |m| m.age }.reverse.to_s
string.should == "foo"

0 comments on commit 64c25d0

Please sign in to comment.