Permalink
Browse files

move module_name into install generators

  • Loading branch information...
1 parent 9b196aa commit d938b09536bad316c4cdc250cb54f434c81904bf @drnic committed Sep 10, 2008
@@ -25,7 +25,7 @@ def manifest
BASEDIRS.each { |path| m.directory path }
# Create stubs
- m.file_copy_each ["Rakefile"]
+ m.template_copy_each ["Rakefile"]
m.file "dot_autotest", ".autotest"
# Selecting a test framework
@@ -47,7 +47,7 @@ namespace :objc do
FileUtils.mkdir_p "build/bundles"
FileUtils.rm Dir["build/bundles/#{bundle_name}.bundle"]
sh "gcc -o build/bundles/#{bundle_name}.bundle #{dot_o_files.join(" ")} -bundle " +
- "#{make_options '-framework', req_frameworks} " +
+ "#{make_options '-framework ', req_frameworks} " +
"#{make_options '-l', req_libraries} " +
"#{make_options '-I', src_paths}"
end
@@ -1,7 +1,7 @@
module RbIphoneTest
module VERSION #:nodoc:
MAJOR = 0
- MINOR = 3
+ MINOR = 4
TINY = 0
STRING = [MAJOR, MINOR, TINY].join('.')
@@ -2,12 +2,13 @@ class InstallRspecGenerator < RubiGen::Base
default_options :author => nil
- attr_reader :name
+ attr_reader :name, :module_name
def initialize(runtime_args, runtime_options = {})
super
usage if args.empty?
@name = args.shift
+ @module_name = File.basename(destination_root).gsub("-", "_").camelize
extract_options
end
@@ -17,7 +18,7 @@ def manifest
m.directory 'spec'
m.directory 'tasks'
- m.file_copy_each ["spec/spec_helper.rb"]
+ m.template_copy_each ["spec/spec_helper.rb"]
m.file_copy_each ["tasks/rspec.rake"]
end
end
@@ -2,12 +2,13 @@ class InstallTestUnitGenerator < RubiGen::Base
default_options :author => nil
- attr_reader :name
+ attr_reader :name, :module_name
def initialize(runtime_args, runtime_options = {})
super
usage if args.empty?
@name = args.shift
+ @module_name = File.basename(destination_root).gsub("-", "_").camelize
extract_options
end
@@ -17,7 +18,7 @@ def manifest
m.directory 'test'
m.directory 'tasks'
- m.file_copy_each ["test/test_helper.rb"]
+ m.template_copy_each ["test/test_helper.rb"]
m.file_copy_each ["tasks/test_unit.rake"]
end
@@ -2,14 +2,13 @@ class ModelRspecGenerator < RubiGen::Base
default_options :author => nil
- attr_reader :name, :class_name, :module_name
+ attr_reader :name, :class_name
def initialize(runtime_args, runtime_options = {})
super
usage if args.empty?
@name = args.shift.underscore
@class_name = @name.camelcase
- @module_name = File.basename(destination_root).gsub("-", "_").camelize
extract_options
end
@@ -2,14 +2,13 @@ class ModelTestUnitGenerator < RubiGen::Base
default_options :author => nil
- attr_reader :name, :class_name, :module_name
+ attr_reader :name, :class_name
def initialize(runtime_args, runtime_options = {})
super
usage if args.empty?
@name = args.shift.underscore
@class_name = @name.camelcase
- @module_name = File.basename(destination_root).gsub("-", "_").camelize
extract_options
end

0 comments on commit d938b09

Please sign in to comment.