Permalink
Browse files

~

  • Loading branch information...
1 parent 6c34f50 commit 7ff774ceee905400df67139ffe216fa74dc1ca38 Andrew Zinenko committed Sep 22, 2012
Showing with 10 additions and 13 deletions.
  1. +2 −2 Gemfile.lock
  2. +1 −1 Rakefile
  3. +5 −7 lib/vk-ruby/core.rb
  4. +1 −1 lib/vk-ruby/middleware/response/vk_logger.rb
  5. +1 −2 vk-ruby.gemspec
View
@@ -5,7 +5,6 @@ PATH
faraday (~> 0.8.0)
faraday_middleware (~> 0.8.8)
multi_json (~> 1.3.6)
- multi_xml (~> 0.5.1)
transformer (~> 0.2.2)
unicode_utils (~> 1.3.0)
@@ -36,8 +35,8 @@ GEM
mime-types (1.19)
minitest (2.12.1)
multi_json (1.3.6)
- multi_xml (0.5.1)
multipart-post (1.1.5)
+ net-http-persistent (2.7)
oj (1.0.6)
patron (0.4.18)
rake (0.9.2.2)
@@ -60,6 +59,7 @@ DEPENDENCIES
eventmachine (~> 1.0.0)
json_pure (~> 1.7.4)
minitest (~> 2.8)
+ net-http-persistent (= 2.7)
oj (~> 1.0.6)
patron (~> 0.4.18)
rake (~> 0.9)
View
@@ -17,6 +17,6 @@ require 'rake/testtask'
task default: :test
Rake::TestTask.new do |test|
- test.pattern = 'tests/benchmarks.rb'
+ test.pattern = 'tests/*_test.rb'
test.verbose = true
end
View
@@ -16,7 +16,6 @@ module Core
attr_configurable :use_ssl, :verify, default: true
attr_configurable :verb, default: :post
- attr_configurable :attempts, default: 5
attr_configurable :timeout, default: 2
attr_configurable :open_timeout, default: 3
attr_configurable :adapter, default: Faraday.default_adapter
@@ -51,9 +50,9 @@ def faraday_middleware
faraday.request :url_encoded
faraday.response :json, content_type: /\bjson$/
- faraday.response :xml, content_type: /\bxml$/
- faraday.response :normalize_utf
- faraday.response :validate_utf
+
+ # faraday.response :normalize_utf
+ # faraday.response :validate_utf
# faraday.response :vk_logger, self.logger
faraday.adapter self.adapter
@@ -63,9 +62,7 @@ def faraday_middleware
private
def request(path, options = {})
- attempts = options.delete(:attempts) || self.attempts
-
- host = options.delete(:host) || 'https://api.vk.com'
+ host = options.delete(:host) || 'https://api.vk.com'
verb = (options.delete(:verb) || self.verb).downcase.to_sym
options[:access_token] ||= self.access_token if host == 'https://api.vk.com'
@@ -83,6 +80,7 @@ def http_params(verb, options)
params = {}
params[:timeout] = options.delete(:timeout) || self.timeout
+ params[:open_timeout] = options.delete(:open_timeout) || self.open_timeout
params[:proxy] = options.delete(:proxy) || self.proxy
params[:use_ssl] = options.delete(:use_ssl) || self.use_ssl
params[:verify] = options.delete(:verify) || self.verify
@@ -13,7 +13,7 @@ def initialize(app, logger = nil)
end
end
- def_delegators :@logger, :debug, :debug?, :info, :warn, :error, :fatal
+ def_delegators :@logger, :debug, :debug?, :error?, :info, :warn, :error, :fatal
def call(env)
if debug?
View
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'transformer', '~> 0.2.2'
gem.add_runtime_dependency 'multi_json', '~> 1.3.6'
- gem.add_runtime_dependency 'multi_xml', '~> 0.5.1'
gem.add_runtime_dependency 'faraday', '~> 0.8.0'
gem.add_runtime_dependency 'faraday_middleware', '~> 0.8.8'
gem.add_runtime_dependency 'unicode_utils', '~> 1.3.0'
@@ -35,7 +34,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'em-http-request', '~> 1.0.3'
gem.add_development_dependency 'patron', '~> 0.4.18'
gem.add_development_dependency 'typhoeus', '~> 0.4.2'
- gem.add_development_dependency ' net-http-persistent', '2.7'
+ gem.add_development_dependency 'net-http-persistent', '2.7'
gem.require_paths = ['lib']
gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')

0 comments on commit 7ff774c

Please sign in to comment.