Permalink
Browse files

deps

  • Loading branch information...
0 parents commit 281dc750398e98c752859f2d10f1771452cc717a @mattb committed Feb 14, 2011
Showing with 63 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +4 −0 Gemfile
  3. +2 −0 Rakefile
  4. +25 −0 instapaper_full.gemspec
  5. +22 −0 lib/faraday/oauth.rb
  6. +4 −0 lib/instapaper_full.rb
  7. +3 −0 lib/instapaper_full/version.rb
@@ -0,0 +1,3 @@
+pkg/*
+*.gem
+.bundle
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in instapaper_full.gemspec
+gemspec
@@ -0,0 +1,2 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "instapaper_full/version"
+
+Gem::Specification.new do |s|
+ s.name = "instapaper_full"
+ s.version = InstapaperFull::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Matt Biddulph"]
+ s.email = ["mb@hackdiary.com"]
+ s.homepage = ""
+ s.summary = %q{Wrapper for the Instapaper Full Developer API}
+ s.description = %q{See http://www.instapaper.com/api/full}
+
+ s.rubyforge_project = "instapaper_full"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_dependency("faraday", ">=0.5.5")
+ s.add_dependency("simple_oauth", ">=0.1.4")
+ s.add_dependency("yajl-ruby",">=0.8.1")
+end
@@ -0,0 +1,22 @@
+require 'faraday'
+require 'simple_oauth'
+
+# @private
+module Faraday
+ # @private
+ class Request::OAuth < Faraday::Middleware
+ def call(env)
+ params = env[:body].is_a?(Hash) ? env[:body] : {}
+ signature_params = params.reject{|k,v| v.respond_to?(:content_type) }
+ header = SimpleOAuth::Header.new(env[:method], env[:url], signature_params, @options)
+
+ env[:request_headers]['Authorization'] = header.to_s
+
+ @app.call(env)
+ end
+
+ def initialize(app, options)
+ @app, @options = app, options
+ end
+ end
+end
@@ -0,0 +1,4 @@
+require 'faraday/oauth'
+
+module InstapaperFull
+end
@@ -0,0 +1,3 @@
+module InstapaperFull
+ VERSION = "0.0.1"
+end

0 comments on commit 281dc75

Please sign in to comment.