Skip to content

Commit

Permalink
Keeping compatibility with the http_timeout configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlyfunctional committed Mar 12, 2015
1 parent cc7b822 commit da50c14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/link_thumbnailer/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class Configuration
:graders, :description_min_length, :positive_regex, :negative_regex,
:image_limit, :image_stats

alias_method :http_timeout, :http_open_timeout
alias_method :http_timeout=, :http_open_timeout=

# Create a new instance.
#
# @return [LinkThumbnailer::Configuration]
Expand Down
5 changes: 5 additions & 0 deletions spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
it { expect(instance.image_limit).to eq(5) }
it { expect(instance.image_stats).to eq(true) }

describe "#http_timeout" do
it { expect(instance.method(:http_timeout)).to eq(instance.method(:http_open_timeout)) }
it { expect(instance.method(:http_timeout=)).to eq(instance.method(:http_open_timeout=)) }
end

describe '.config' do

it { expect(LinkThumbnailer.config).to be_a(described_class) }
Expand Down
1 change: 0 additions & 1 deletion spec/processor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'spec_helper'
require 'pry'

describe LinkThumbnailer::Processor do

Expand Down

0 comments on commit da50c14

Please sign in to comment.