Browse files

Rename scheme -> protocol

  • Loading branch information...
1 parent dd9d671 commit 512fcdfc22b796d39dd07c2dcc712aa48131d7c6 @sferik committed Oct 13, 2010
Showing with 16 additions and 16 deletions.
  1. +4 −4 lib/twitter.rb
  2. +1 −1 lib/twitter/base.rb
  3. +1 −1 lib/twitter/geo.rb
  4. +1 −1 lib/twitter/search.rb
  5. +1 −1 lib/twitter/trends.rb
  6. +1 −1 lib/twitter/unauthenticated.rb
  7. +7 −7 test/twitter_test.rb
View
8 lib/twitter.rb
@@ -46,12 +46,12 @@ def self.format=(value)
@format = value
end
- def self.scheme
- @scheme ||= 'https'
+ def self.protocol
+ @protocol ||= 'https'
end
- def self.scheme=(value)
- @scheme = value
+ def self.protocol=(value)
+ @protocol = value
end
def self.api_endpoint
View
2 lib/twitter/base.rb
@@ -465,7 +465,7 @@ def connection_with_builders(builders)
builder.adapter(@adapter || Faraday.default_adapter)
builders.each do |b| builder.use b end
end
- @connection.scheme = Twitter.scheme
+ @connection.scheme = Twitter.protocol
@connection
end
View
2 lib/twitter/geo.rb
@@ -136,7 +136,7 @@ def connection
end
builder.use Faraday::Response::Mashify
end
- @connection.scheme = Twitter.scheme
+ @connection.scheme = Twitter.protocol
@connection
end
View
2 lib/twitter/search.rb
@@ -284,7 +284,7 @@ def connection
end
builder.use Faraday::Response::Mashify
end
- @connection.scheme = Twitter.scheme
+ @connection.scheme = Twitter.protocol
@connection
end
View
2 lib/twitter/trends.rb
@@ -110,7 +110,7 @@ def connection
end
builder.use Faraday::Response::Mashify
end
- @connection.scheme = Twitter.scheme
+ @connection.scheme = Twitter.protocol
@connection
end
View
2 lib/twitter/unauthenticated.rb
@@ -126,7 +126,7 @@ def connection_with_builders(builders)
builder.adapter(@adapter || Faraday.default_adapter)
builders.each do |b| builder.use b end
end
- @connection.scheme = Twitter.scheme
+ @connection.scheme = Twitter.protocol
@connection
end
View
14 test/twitter_test.rb
@@ -83,16 +83,16 @@ class TwitterTest < Test::Unit::TestCase
end
end
- should "default scheme to https" do
- assert_equal "https", Twitter.scheme
+ should "default protocol to https" do
+ assert_equal "https", Twitter.protocol
end
- context "when overriding scheme" do
- should "be able to specify scheme" do
- Twitter.scheme = "http"
- assert_equal "http", Twitter.scheme
+ context "when overriding protocol" do
+ should "be able to specify protocol" do
+ Twitter.protocol = "http"
+ assert_equal "http", Twitter.protocol
# Reset
- Twitter.scheme = "https"
+ Twitter.protocol = "https"
end
end

0 comments on commit 512fcdf

Please sign in to comment.