Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fixed #6 #7

Merged
merged 4 commits into from over 1 year ago

2 participants

Alex Forey Matt Biddulph
Alex Forey
alfo commented

Fixes the bytesize undefined error while authenticating by updating to most recent versions of Faraday and Faraday Middleware and making sure support for raw POST data is included in the initialiser.

Matt Biddulph mattb merged commit b367551 into from
Matt Biddulph mattb closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. +3 3 instapaper_full.gemspec
  2. +3 2 lib/instapaper_full.rb
6 instapaper_full.gemspec
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
19 19 s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20 20 s.require_paths = ["lib"]
21 21
22   - s.add_dependency("faraday", "~> 0.7.5")
23   - s.add_dependency("faraday_middleware", "~> 0.7.0")
  22 + s.add_dependency("faraday")
  23 + s.add_dependency("faraday_middleware")
24 24 s.add_dependency("simple_oauth", "~> 0.1")
25   - s.add_dependency("multi_json", "~> 1.0.4")
  25 + s.add_dependency("multi_json")
26 26 s.add_dependency("yajl-ruby", "~> 1.1.0")
27 27
28 28 s.add_development_dependency("rake")
5 lib/instapaper_full.rb
... ... @@ -1,7 +1,7 @@
1 1 require 'errors'
2 2 require 'json'
3   -require 'faraday/request/oauth'
4   -require 'faraday/response/parse_json'
  3 +require 'faraday'
  4 +require 'faraday_middleware'
5 5
6 6 module InstapaperFull
7 7 class API
@@ -28,6 +28,7 @@ def connection(options = {})
28 28 end
29 29
30 30 Faraday.new(options) do |builder|
  31 + builder.use Faraday::Request::Multipart
31 32 builder.use Faraday::Request::OAuth, oauth_params
32 33 builder.use Faraday::Request::UrlEncoded
33 34 builder.adapter Faraday.default_adapter

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.