Skip to content

Commit

Permalink
Removing without_thor_debug
Browse files Browse the repository at this point in the history
a1d0c0f

as bundler 1.5.2 is out now
  • Loading branch information
arunagw committed Jan 11, 2014
1 parent caa981d commit b4f9377
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions railties/lib/rails/generators/testing/behaviour.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ def destination(path)
# You can provide a configuration hash as second argument. This method returns the output
# printed by the generator.
def run_generator(args=self.default_arguments, config={})
without_thor_debug do
capture(:stdout) do
args += ['--skip-bundle'] unless args.include? '--dev'
self.generator_class.start(args, config.reverse_merge(destination_root: destination_root))
end
capture(:stdout) do
args += ['--skip-bundle'] unless args.include? '--dev'
self.generator_class.start(args, config.reverse_merge(destination_root: destination_root))
end
end

Expand Down Expand Up @@ -102,14 +100,6 @@ def migration_file_name(relative) # :nodoc:
dirname, file_name = File.dirname(absolute), File.basename(absolute).sub(/\.rb$/, '')
Dir.glob("#{dirname}/[0-9]*_*.rb").grep(/\d+_#{file_name}.rb$/).first
end

# TODO: remove this once Bundler 1.5.2 is released
def without_thor_debug # :nodoc:
thor_debug, ENV['THOR_DEBUG'] = ENV['THOR_DEBUG'], nil
yield
ensure
ENV['THOR_DEBUG'] = thor_debug
end
end
end
end
Expand Down

0 comments on commit b4f9377

Please sign in to comment.