remove better_errors from steam
arnaud sellenet
committed Apr 14, 2014
commit 6560e4b41da944439e4755f64c543a7ebefc02f7
Showing 5
changed files with
5 additions
and 78 deletions
locomotive/steam/initializers/better_errors.rb b/lib/locomotive/steam/initializers/better_errors.rb
+0
-73
| @@ | @@ -1,73 +0,0 @@ |
| - | # BetterErrors.application_root = reader.mounting_point.path |
| - | |
| - | # require 'better_errors' |
| - | # require 'ostruct' |
| - | |
| - | # module BetterErrors |
| - | # class MiddlewareWrapper |
| - | |
| - | # def initialize(app) |
| - | # @@middleware ||= BetterErrors::Middleware.new(app) |
| - | # @@middleware.instance_variable_set(:@app, app) |
| - | # end |
| - | |
| - | # def call(env) |
| - | # env['action_dispatch.request.parameters'] = Rack::Request.new(env).params |
| - | |
| - | # @@middleware.call(env) |
| - | # end |
| - | |
| - | # end |
| - | |
| - | # module FrameWithLiquidContext |
| - | |
| - | # extend ActiveSupport::Concern |
| - | |
| - | # included do |
| - | |
| - | # attr_accessor :liquid_context |
| - | |
| - | # alias_method_chain :local_variables, :liquid_context |
| - | |
| - | # class << self |
| - | |
| - | # alias_method_chain :from_exception, :liquid_context |
| - | |
| - | # end |
| - | # end |
| - | |
| - | # def local_variables_with_liquid_context |
| - | # if self.liquid_context |
| - | # scope = self.liquid_context.scopes.last.clone |
| - | |
| - | # scope.delete_if { |k, _| %w(models contents params session).include?(k) }.tap do |_scope| |
| - | # _scope['site'] = _scope['site'].send(:_source).to_hash |
| - | # _scope['page'] = _scope['page'].to_hash.delete_if { |k, _| %w(template).include?(k) } |
| - | # end |
| - | # else |
| - | # self.local_variables_without_liquid_context |
| - | # end |
| - | # rescue Exception => e |
| - | # puts "[BetterError] Fatal error: #{e.message}".red |
| - | # puts e.backtrace.join("\n") |
| - | # {} |
| - | # end |
| - | |
| - | # module ClassMethods |
| - | |
| - | # def from_exception_with_liquid_context(exception) |
| - | # from_exception_without_liquid_context(exception).tap do |list| |
| - | # if exception.respond_to?(:liquid_context) |
| - | # list.first.liquid_context = exception.liquid_context |
| - | # end |
| - | # end |
| - | # end |
| - | |
| - | # end |
| - | # end |
| - | |
| - | # class StackFrame |
| - | # include FrameWithLiquidContext |
| - | # end |
| - | |
| - | # end |
| \ No newline at end of file | |
locomotive/steam/middlewares/stack.rb b/lib/locomotive/steam/middlewares/stack.rb
+3
-0
| @@ | @@ -1,4 +1,7 @@ |
| require 'rack/session/moneta' | |
| + | require 'rack/builder' |
| + | require 'rack/lint' |
| + | require 'dragonfly/middleware' |
| module Locomotive | |
| module Steam | |
locomotive/steam/misc.rb b/lib/locomotive/steam/misc.rb
+1
-2
| @@ | @@ -7,5 +7,4 @@ require_relative 'initializers/will_paginate.rb' |
| require_relative 'monkey_patches/httparty.rb' | |
| require_relative 'monkey_patches/dragonfly.rb' | |
| require_relative 'monkey_patches/mounter.rb' | |
| - | require_relative 'monkey_patches/haml.rb' |
| - | require_relative 'monkey_patches/better_errors.rb' |
| \ No newline at end of file | |
| + | require_relative 'monkey_patches/haml.rb' |
| \ No newline at end of file | |
locomotive/steam/monkey_patches.rb b/lib/locomotive/steam/monkey_patches.rb
+1
-2
| @@ | @@ -1,5 +1,4 @@ |
| # require_relative 'monkey_patches/httparty.rb' | |
| # require_relative 'monkey_patches/dragonfly.rb' | |
| require_relative 'monkey_patches/mounter.rb' | |
| - | require_relative 'monkey_patches/haml.rb' |
| - | # require_relative 'monkey_patches/better_errors.rb' |
| \ No newline at end of file | |
| + | require_relative 'monkey_patches/haml.rb' |
| \ No newline at end of file | |
locomotivecms_steam.gemspec
+0
-1
| @@ | @@ -33,7 +33,6 @@ Gem::Specification.new do |spec| |
| spec.add_dependency 'moneta', '~> 0.7.20' | |
| spec.add_dependency 'sprockets', '~> 2.0' | |
| spec.add_dependency 'sprockets-sass', '~> 1.0' | |
| - | # spec.add_dependency 'better_errors', '~> 1.0' |
| spec.add_dependency 'dragonfly', '~> 1.0.3' | |
| spec.add_dependency 'activesupport', '~> 3.2' # TODO: upgrade to 4.x | |
| spec.add_dependency 'will_paginate', '~> 3.0' # TODO: move to kaminari | |