Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Namespace generator templates

  • Loading branch information...
commit 3bb7e976938ce8960a2a9209fcbdaee2a999b3c7 1 parent e3ab6c2
@rf- authored
View
5 .yardopts
@@ -1 +1,4 @@
---markup markdown --no-private
+--markup markdown
+--no-private
+--exclude lib/generators
+--exclude keynote/testing
View
19 lib/generators/presenter_generator.rb
@@ -11,21 +11,21 @@ class PresenterGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
def create_presenter_file
- template 'presenter.rb',
+ template 'keynote_presenter.rb',
File.join('app/presenters', class_path, "#{file_name}_presenter.rb")
end
def create_test_file
case Rails.application.config.generators.rails[:test_framework]
when :rspec
- template 'rspec.rb', rspec_path
+ template 'keynote_rspec.rb', rspec_path
when :test_unit
- template 'test_unit.rb', test_unit_path
+ template 'keynote_test_unit.rb', test_unit_path
when :mini_test
if Rails.application.config.generators.mini_test[:spec]
- template 'mini_test_spec.rb', mini_test_path
+ template 'keynote_mini_test_spec.rb', mini_test_path
else
- template 'mini_test_unit.rb', mini_test_path
+ template 'keynote_mini_test_unit.rb', mini_test_path
end
end
end
@@ -33,15 +33,18 @@ def create_test_file
private
def rspec_path
- File.join('spec/presenters', class_path, "#{file_name}_presenter_spec.rb")
+ File.join(
+ 'spec/presenters', class_path, "#{file_name}_presenter_spec.rb")
end
def test_unit_path
- File.join('test/unit/presenters', class_path, "#{file_name}_presenter_test.rb")
+ File.join(
+ 'test/unit/presenters', class_path, "#{file_name}_presenter_test.rb")
end
def mini_test_path
- File.join('test/presenters', class_path, "#{file_name}_presenter_test.rb")
+ File.join(
+ 'test/presenters', class_path, "#{file_name}_presenter_test.rb")
end
def target_list
View
0  lib/generators/templates/mini_test_spec.rb → ...ators/templates/keynote_mini_test_spec.rb
File renamed without changes
View
0  lib/generators/templates/mini_test_unit.rb → ...ators/templates/keynote_mini_test_unit.rb
File renamed without changes
View
0  lib/generators/templates/presenter.rb → ...generators/templates/keynote_presenter.rb
File renamed without changes
View
0  lib/generators/templates/rspec.rb → lib/generators/templates/keynote_rspec.rb
File renamed without changes
View
0  lib/generators/templates/test_unit.rb → ...generators/templates/keynote_test_unit.rb
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.