Skip to content

Commit

Permalink
Merge pull request #1448 from yob/remove-activesupport
Browse files Browse the repository at this point in the history
Drop activesupport dependency from sinatra-contrib
  • Loading branch information
namusyaka committed Oct 27, 2018
2 parents b6790a0 + 7989a78 commit e0aa37d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions sinatra-contrib/lib/sinatra/capture.rb
@@ -1,6 +1,5 @@
require 'sinatra/base'
require 'sinatra/engine_tracking'
require 'active_support/core_ext/object/try.rb'

module Sinatra
#
Expand Down Expand Up @@ -106,12 +105,12 @@ def capture(*args, &block)
dummy = DUMMIES.fetch(current_engine)
options = { :layout => false, :locals => {:args => args, :block => block }}

buffer.try :clear
buffer.clear unless buffer.nil?
result = render(current_engine, dummy, options, &block)
end
result.strip.empty? && @capture ? @capture : result
ensure
buffer.try :replace, old_buffer
buffer.replace(old_buffer) unless buffer.nil?
end

def capture_later(&block)
Expand Down
1 change: 0 additions & 1 deletion sinatra-contrib/sinatra-contrib.gemspec
Expand Up @@ -39,7 +39,6 @@ EOF
s.add_dependency "sinatra", version
s.add_dependency "mustermann", "~> 1.0"
s.add_dependency "backports", ">= 2.8.2"
s.add_dependency "activesupport", ">= 4.0.0"
s.add_dependency "tilt", ">= 1.3", "< 3"
s.add_dependency "rack-protection", version
s.add_dependency "multi_json"
Expand Down

0 comments on commit e0aa37d

Please sign in to comment.