From 93191523ba5e509da70cdc46fa951670cedc4212 Mon Sep 17 00:00:00 2001 From: Mark Burns Date: Sat, 3 Mar 2012 14:01:19 +0000 Subject: [PATCH] trailing whitespace --- Gemfile | 4 ++-- Rakefile | 16 ++++++++-------- .../draper/decorator/decorator_generator.rb | 4 ++-- .../draper/decorator/decorator_generator_spec.rb | 5 ++--- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 3425ca2..1fea0d6 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'actionpack', "~> 3.1.3", :require => 'action_view' gem 'ammeter', '~> 0.2.2', :require => 'ammeter/init' gem 'guard' gem 'guard-rspec' -gem 'launchy' +gem 'launchy' gem 'yard' -gemspec \ No newline at end of file +gemspec diff --git a/Rakefile b/Rakefile index e014087..f65d6e3 100644 --- a/Rakefile +++ b/Rakefile @@ -2,31 +2,31 @@ require 'bundler/gem_tasks' require 'rake' require 'rspec/core/rake_task' -RCOV = RUBY_VERSION.to_f == 1.8 +RCOV = RUBY_VERSION.to_f == 1.8 namespace :spec do - + RSpec::Core::RakeTask.new(:coverage) do |t| t.pattern = 'spec/**/*_spec.rb' - - if RCOV + + if RCOV t.rcov = true t.rcov_opts = '--exclude osx\/objc,spec,gems\/' end end - + RSpec::Core::RakeTask.new(:normal) do |t| t.pattern ='spec/**/*_spec.rb' t.rcov = false end - + namespace :coverage do desc "Cleanup coverage data" task :cleanup do rm_rf 'coverage.data' rm_rf 'coverage' end - + desc "Browse the code coverage report." task :report => ["spec:coverage:cleanup", "spec:coverage"] do if RCOV @@ -38,7 +38,7 @@ namespace :spec do end end end - + end desc "RSpec tests" diff --git a/lib/generators/draper/decorator/decorator_generator.rb b/lib/generators/draper/decorator/decorator_generator.rb index 5f9e9e1..518e17b 100644 --- a/lib/generators/draper/decorator/decorator_generator.rb +++ b/lib/generators/draper/decorator/decorator_generator.rb @@ -10,7 +10,7 @@ module Draper argument :resource_name, :type => :string class_option "test-framework", :type => :string, :default => "rspec", :aliases => "-t", :desc => "Test framework to be invoked" - + source_root File.expand_path('../templates', __FILE__) DECORATORS_ROOT = 'app/decorators/' @@ -18,7 +18,7 @@ module Draper def build_model_decorator template 'decorator.rb', "#{DECORATORS_ROOT}#{resource_name.singularize}_decorator.rb" end -# + def build_decorator_tests case options["test-framework"] when "rspec" diff --git a/spec/generators/draper/decorator/decorator_generator_spec.rb b/spec/generators/draper/decorator/decorator_generator_spec.rb index 4c79d3a..b110261 100644 --- a/spec/generators/draper/decorator/decorator_generator_spec.rb +++ b/spec/generators/draper/decorator/decorator_generator_spec.rb @@ -48,7 +48,6 @@ describe Draper::DecoratorGenerator do it { should contain "class ProductDecoratorTest < ActiveSupport::TestCase" } end end - end @@ -63,7 +62,7 @@ end end end - + context 'simple' do before { run_generator %w(products) } @@ -100,4 +99,4 @@ end it { should contain "describe ApplicationDecorator do" } end end -=end \ No newline at end of file +=end