Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

last time, quimby

  • Loading branch information...
commit 111c329e34062a38f25800309e7c9f79bae75a1c 1 parent ab601e2
@pierrevalade authored
View
113 vendor/plugins/quimby/README.md
@@ -0,0 +1,113 @@
+# Quimby
+
+### Formerly named after a pop star whose lawyers decided they didn't like us using his name.
+
+It's a Foursquare API wrapper. It uses objects instead of hashes, and tries to be smart about when to load things.
+
+## Installation
+
+Install it as a gem (in your `Gemfile`)
+
+ gem "quimby"
+
+## Usage
+
+Get a foursquare:
+
+ foursquare = Foursquare::Base.new("ACCESS_TOKEN")
+
+You can also user `client_id` and `client_secret`
+
+ foursquare = Foursquare::Base.new("CLIENT_ID", "CLIENT_SECRET")
+
+### Authentication
+
+First, you need to [register your application](https://foursquare.com/oauth).
+
+#### Web server application
+
+Get a foursquare with your `client_id` and `client_secret`
+
+ foursquare = Foursquare::Base.new("CLIENT_ID", "CLIENT_SECRET")
+
+Redirect users to the Foursquare authentication page. You need to pass your `callback_url`. Get the url to redirect to with:
+
+ foursquare.authorize_url("CALLBACK_SESSION_URL")
+
+Then Foursquare will redirect the user to your callback url with a code parameter in the url. Exchange this code for an access token using:
+
+ access_token = foursquare.access_token(params["code"], "CALLBACK_SESSION_URL")
+
+Now you can get a foursquare using only an access token and make requests on user's behalf:
+
+ foursquare = Foursquare::Base.new("ACCESS_TOKEN")
+
+### Users
+
+Find a user:
+
+ user = foursquare.users.find("USER_ID")
+
+Now we've got a `Foursquare::User` object. You can call sweet methods like `user.name` and even
+`user.last_checkin`. **In general, John Mayer's Foursquare object methods are just snake-cased
+versions of the attributes returned in the JSON.** Now let's accidentally that user's friends:
+
+ user.friends
+
+This will return an array of `Foursquare::User` objects. Don't worry about the fact that they're
+populated by limited JSON. Quimby will fetch the extra JSON if you need it. For example:
+
+ friend = user.friends.first
+ friend.name # Will not trigger a network call, since we already have it
+ friend.twitter # Will trigger a network to load the user's contact information
+
+### Checkins
+
+But wait, Foursquare isn't just users! It's checkins too! So let's find some checkins:
+
+ user.checkins
+
+Now we have an array of `Foursquare::Checkin` objects. We can also grab a specific checkin:
+
+ checkin = foursquare.checkins.find("CHECKIN_ID")
+
+You also have a convenient method if you want to get all the user checkins:
+
+ user.all_checkins
+
+### Venues
+
+We can get at a checkin's venue by calling `checkin.venue`. Pretty easy, RIGHT? Right. If you want to
+find a venue directly, here ya go:
+
+ foursquare.venues.find("VENUE_ID")
+
+You can also search venues:
+
+ foursquare.venues.search(:ll => "40.7236307,-73.9999479") # Returns all resulting groups
+ foursquare.venues.nearby(:ll => "40.7236307,-73.9999479") # Returns only nearby venues
+ foursquare.venues.trending(:ll => "40.7236307,-73.9999479") # Returns only trending venues
+ foursquare.venues.favorites(:ll => "40.7236307,-73.9999479") # Returns only favorite venues
+
+The `:ll` option is required for venue searches. You can also feel free to pass any of the other
+available Foursquare API options, as specified in the docs.
+
+### Logging
+
+If you want to see what's going on up in there, you can set `Foursquare.verbose` to `true`
+
+ Foursquare.verbose = true
+
+Right now it'll log to `STDOUT`. Maybe I'll add nicer logging later. If you're lucky. In the meantime,
+if you want to use your own logger, and you're kind of a jerk like me, you can do something like this:
+
+ Foursquare.verbose = true
+ def Foursquare.log(message)
+ Rails.logger.info("[foursquare] #{message}") # HAX, SORRY BRANDON
+ end
+
+## TODO
+
+* Creating checkins works, but it should really return notifications. Also, if the
+ checkin can't be created, it should return errors.
+* I don't know, so much other stuff.
View
48 vendor/plugins/quimby/lib/foursquare.rb
@@ -0,0 +1,48 @@
+$LOAD_PATH << File.dirname(__FILE__)
+
+require "rubygems"
+require "typhoeus"
+require "json"
+require "cgi"
+require "foursquare/base"
+require "foursquare/checkin_proxy"
+require "foursquare/checkin"
+require "foursquare/user_proxy"
+require "foursquare/user"
+require "foursquare/venue_proxy"
+require "foursquare/venue"
+require "foursquare/settings"
+require "foursquare/tip"
+require "foursquare/photo"
+require "foursquare/location"
+require "foursquare/category"
+
+module Foursquare
+ class Error < StandardError ; end
+ class InvalidAuth < Foursquare::Error; end
+ class ServiceUnavailable < Foursquare::Error; end
+
+ def self.verbose=(setting)
+ @verbose = setting
+ end
+
+ def self.verbose?
+ @verbose
+ end
+
+ def self.log(msg)
+ return unless verbose?
+ puts "[foursquare] #{msg}"
+ end
+
+ ERRORS = {
+ "invalid_auth" => "OAuth token was not provided or was invalid.",
+ "param_error" => "A required parameter was missing or a parameter was malformed. This is also used if the resource ID in the path is incorrect.",
+ "endpoint_error" => "The requested path does not exist.",
+ "not_authorized" => "Although authentication succeeded, the acting user is not allowed to see this information due to privacy restrictions.",
+ "rate_limit_exceeded" => "Rate limit for this hour exceeded.",
+ "deprecated" => "Something about this request is using deprecated functionality, or the response format may be about to change.",
+ "server_error" => "Server is currently experiencing issues. Check status.foursquare.com for udpates.",
+ "other" => "Some other type of error occurred."
+ }
+end
View
136 vendor/plugins/quimby/lib/foursquare/base.rb
@@ -0,0 +1,136 @@
+module Foursquare
+ class Base
+ API = "https://api.foursquare.com/v2/"
+
+ def initialize(*args)
+ case args.size
+ when 1
+ @access_token = args.first
+ when 2
+ @client_id, @client_secret = args
+ else
+ raise ArgumentError, "You need to pass either an access_token or client_id and client_secret"
+ end
+ end
+
+ def users
+ Foursquare::UserProxy.new(self)
+ end
+
+ def checkins
+ Foursquare::CheckinProxy.new(self)
+ end
+
+ def venues
+ Foursquare::VenueProxy.new(self)
+ end
+
+ def settings
+ @settings ||= Foursquare::Settings.new(self)
+ end
+
+ def get(path, params={})
+ params = camelize(params)
+ Foursquare.log("GET #{API + path}")
+ Foursquare.log("PARAMS: #{params.inspect}")
+ merge_auth_params(params)
+ response = JSON.parse(Typhoeus::Request.get(API + path, :params => params).body)
+ Foursquare.log(response.inspect)
+ error(response) || response["response"]
+ end
+
+ def post(path, params={})
+ params = camelize(params)
+ Foursquare.log("POST #{API + path}")
+ Foursquare.log("PARAMS: #{params.inspect}")
+ merge_auth_params(params)
+ response = JSON.parse(Typhoeus::Request.post(API + path, :params => params).body)
+ Foursquare.log(response.inspect)
+ error(response) || response["response"]
+ end
+
+ def authorize_url(redirect_uri)
+ # http://developer.foursquare.com/docs/oauth.html
+
+ # check params
+ raise "you need to define a client id before" if @client_id.blank?
+ raise "no callback url provided" if redirect_uri.blank?
+
+ # params
+ params = {}
+ params["client_id"] = @client_id
+ params["response_type"] = "code"
+ params["redirect_uri"] = redirect_uri
+
+ # url
+ oauth2_url('authenticate', params)
+ end
+
+ def access_token(code, redirect_uri)
+ # http://developer.foursquare.com/docs/oauth.html
+
+ # check params
+ raise "you need to define a client id before" if @client_id.blank?
+ raise "you need to define a client secret before" if @client_secret.blank?
+ raise "no code provided" if code.blank?
+ raise "no redirect_uri provided" if redirect_uri.blank?
+
+ # params
+ params = {}
+ params["client_id"] = @client_id
+ params["client_secret"] = @client_secret
+ params["grant_type"] = "authorization_code"
+ params["redirect_uri"] = redirect_uri
+ params["code"] = code
+
+ # url
+ url = oauth2_url('access_token', params)
+
+ # response
+ # http://developer.foursquare.com/docs/oauth.html
+ response = JSON.parse(Typhoeus::Request.get(url).body)
+ response["access_token"]
+ end
+
+ private
+
+ def oauth2_url(method_name, params)
+ "https://foursquare.com/oauth2/#{method_name}?#{params.to_query}"
+ end
+
+ def camelize(params)
+ params.inject({}) { |o, (k, v)|
+ o[k.to_s.gsub(/(_[a-z])/) { |m| m[1..1].upcase }] = v
+ o
+ }
+ end
+
+ def error(response)
+ case response["meta"]["errorType"]
+ when nil
+ # It's all good.
+ when "deprecated"
+ Foursquare.log(Foursquare::ERRORS[response['meta']['errorType']])
+ nil
+ else
+ error_type = response['meta']['errorType']
+ case error_type
+ when "invalid_auth"
+ raise Foursquare::InvalidAuth.new(Foursquare::ERRORS[error_type])
+ when "server_error"
+ raise Foursquare::ServiceUnavailable.new(Foursquare::ERRORS[error_type])
+ else
+ raise Foursquare::Error.new(Foursquare::ERRORS[error_type])
+ end
+ end
+ end
+
+ def merge_auth_params(params)
+ if @access_token
+ params.merge!(:oauth_token => @access_token)
+ else
+ params.merge!(:client_id => @client_id, :client_secret => @client_secret)
+ end
+ end
+ end
+end
View
35 vendor/plugins/quimby/lib/foursquare/category.rb
@@ -0,0 +1,35 @@
+module Foursquare
+ class Category
+
+ # this enabled the previous app to work with this new version where Category is now an object
+ def [](key)
+ @json[key]
+ end
+
+ def initialize(json)
+ @json = json
+ end
+
+ def name
+ @json["name"]
+ end
+
+ def plural_name
+ @json["pluralName"]
+ end
+
+ def icon
+ @json["icon"]
+ end
+
+ # array
+ def parents
+ @json["parents"]
+ end
+
+ def primary?
+ @json["primary"] == true
+ end
+
+ end
+end
View
56 vendor/plugins/quimby/lib/foursquare/checkin.rb
@@ -0,0 +1,56 @@
+module Foursquare
+ class Checkin
+ attr_reader :json
+
+ def initialize(foursquare, json)
+ @foursquare, @json = foursquare, json
+ end
+
+ def id
+ @json["id"]
+ end
+
+ def fetch
+ @json = @foursquare.get("checkins/#{id}")["checkin"]
+ self
+ end
+
+ def type
+ @json["type"]
+ end
+
+ def shout?
+ type == "shout"
+ end
+
+ def created_at
+ Time.at(@json["createdAt"].to_i)
+ end
+
+ def shout
+ @json["shout"]
+ end
+
+ def mayor?
+ @json["isMayor"]
+ end
+
+ def timezone
+ @json["timeZone"]
+ end
+
+ def venue
+ @json["venue"] && Foursquare::Venue.new(@foursquare, @json["venue"])
+ end
+
+ def user(full=false)
+ fetch unless @json["user"]
+
+ if full
+ @foursquare.users.find(@json["user"]["id"])
+ else
+ Foursquare::User.new(@foursquare, @json["user"])
+ end
+ end
+ end
+end
View
32 vendor/plugins/quimby/lib/foursquare/checkin_proxy.rb
@@ -0,0 +1,32 @@
+module Foursquare
+ class CheckinProxy
+ def initialize(foursquare)
+ @foursquare = foursquare
+ end
+
+ def find(id)
+ Foursquare::Checkin.new(@foursquare, @foursquare.get("checkins/#{id}")["checkin"])
+ end
+
+ def recent(options={})
+ @foursquare.get("checkins/recent", options)["recent"].map do |json|
+ Foursquare::Checkin.new(@foursquare, json)
+ end
+ end
+
+ def all(options={})
+ @foursquare.get("users/self/checkins", options)["checkins"]["items"].map do |json|
+ Foursquare::Checkin.new(@foursquare, json)
+ end
+ end
+
+ def create(options={})
+ if json = @foursquare.post("checkins/add", options)
+ Foursquare::Checkin.new(@foursquare, json["checkin"])
+ else
+ nil
+ end
+ end
+ alias_method :add, :create
+ end
+end
View
52 vendor/plugins/quimby/lib/foursquare/location.rb
@@ -0,0 +1,52 @@
+# https://developer.foursquare.com/docs/responses/venue.html
+
+module Foursquare
+ class Location
+
+ # this enabled the previous app to work with this new version where Location is now an object
+ def [](key)
+ @json[key]
+ end
+
+ def initialize(json)
+ @json = json
+ end
+
+ def address
+ @json["address"]
+ end
+
+ def cross_street
+ @json["crossStreet"]
+ end
+
+ def city
+ @json["city"]
+ end
+
+ def state
+ @json["state"]
+ end
+
+ def postal_code
+ @json["postalCode"]
+ end
+
+ def country
+ @json["country"]
+ end
+
+ def lat
+ @json["lat"]
+ end
+
+ def lng
+ @json["lng"]
+ end
+
+ def distance
+ @json["distance"]
+ end
+
+ end
+end
View
38 vendor/plugins/quimby/lib/foursquare/multi.rb
@@ -0,0 +1,38 @@
+# Here's how I want this to work:
+#
+# users, venues = foursquare.multi do |request|
+# request.users.search :twitter => "nakajima"
+# request.venues.search :ll => "12,-71"
+# end
+#
+# It's just difficult to implement. So it's not implemented yet.
+module Foursquare
+ class Multi
+ def initialize(foursquare, block)
+ @foursquare = foursquare
+ @requests = []
+ @responses = []
+ end
+
+ def get(path, options={})
+ @requests << path + query(params)
+ end
+
+ def perform
+ responses = @foursquare.get("multi", :requests => @requests.join(','))
+ end
+
+ private
+
+ def query(params)
+ camelized = params.inject({}) { |o, (k, v)|
+ o[k.to_s.gsub(/(_[a-z])/) { |m| m[1..1].upcase }] = v
+ o
+ }
+ camelized.inject([]) { |o, (k, v)|
+ o << CGI.escape(k) + "=" CGI.escape(v)
+ o
+ }.join('&')
+ end
+ end
+end
View
52 vendor/plugins/quimby/lib/foursquare/photo.rb
@@ -0,0 +1,52 @@
+module Foursquare
+ class Photo
+ def initialize(foursquare, json)
+ @foursquare, @json = foursquare, json
+ end
+
+ def id
+ @json["id"]
+ end
+
+ def name
+ @json["name"]
+ end
+
+ def created_at
+ @json["createdAt"]
+ end
+
+ def url
+ @json["url"]
+ end
+
+ def sizes
+ @json["sizes"]
+ end
+
+ def square_300
+ @square_300 ||= @json["sizes"]["items"].select { |i| i["width"] == 300 }.first
+ end
+
+ def square_300_url
+ square_300["url"]
+ end
+
+ def square_100
+ @square_100 ||= @json["sizes"]["items"].select { |i| i["width"] == 100 }.first
+ end
+
+ def square_100_url
+ square_100["url"]
+ end
+
+ def square_36
+ @square_36 ||= @json["sizes"]["items"].select { |i| i["width"] == 36 }.first
+ end
+
+ def square_36_url
+ square_36["url"]
+ end
+
+ end
+end
View
31 vendor/plugins/quimby/lib/foursquare/settings.rb
@@ -0,0 +1,31 @@
+module Foursquare
+ class Settings
+ def initialize(foursquare, json={})
+ @foursquare, @json = foursquare, json
+ end
+
+ def fetch
+ @json = @foursquare.get('settings/all')["settings"]
+ end
+
+ def receive_pings?
+ fetch unless @json.has_key?('receivePings')
+ @json['receivePings']
+ end
+
+ def receive_comment_pings?
+ fetch unless @json.has_key?('receiveCommentPings')
+ @json['receiveCommentPings']
+ end
+
+ def send_to_twitter?
+ fetch unless @json.has_key?('sendToTwitter')
+ @json['sendToTwitter']
+ end
+
+ def send_to_facebook?
+ fetch unless @json.has_key?('sendToFacebook')
+ @json['sendToFacebook']
+ end
+ end
+end
View
35 vendor/plugins/quimby/lib/foursquare/tip.rb
@@ -0,0 +1,35 @@
+module Foursquare
+ class Tip
+ def initialize(foursquare, json)
+ @foursquare, @json = foursquare, json
+ end
+
+ def id
+ @json["id"]
+ end
+
+ def text
+ @json["text"]
+ end
+
+ def created_at
+ @json["createdAt"]
+ end
+
+ def status
+ @json["status"]
+ end
+
+ def photo
+ @json["photo"]
+ end
+
+ def user
+ @json["user"] && Foursquare::User.new(@foursquare, @json["user"])
+ end
+
+ def venue
+ @json["venue"] && Foursquare::Venue.new(@foursquare, @json["venue"])
+ end
+ end
+end
View
136 vendor/plugins/quimby/lib/foursquare/user.rb
@@ -0,0 +1,136 @@
+module Foursquare
+ class User
+ attr_reader :json
+
+ def initialize(foursquare, json)
+ @foursquare, @json = foursquare, json
+ end
+
+ def fetch
+ @json = @foursquare.get("users/#{id}")["user"]
+ self
+ end
+
+ def id
+ @json["id"]
+ end
+
+ def name
+ [first_name, last_name].join(' ').strip
+ end
+
+ def first_name
+ @json["firstName"]
+ end
+
+ def last_name
+ @json["lastName"]
+ end
+
+ def photo
+ @json["photo"]
+ end
+
+ def gender
+ @json["gender"]
+ end
+
+ def home_city
+ @json["homeCity"]
+ end
+
+ def relationship
+ @json["relationship"]
+ end
+
+ def pings
+ fetch unless @json.has_key?("pings")
+ @json["pings"]
+ end
+
+ def contact
+ fetch unless @json.has_key?("contact")
+ @json["contact"]
+ end
+
+ def email
+ contact["email"]
+ end
+
+ def twitter
+ contact["twitter"]
+ end
+
+ def phone_number
+ contact["phone"]
+ end
+
+ def badge_count
+ fetch unless @json.has_key?("badges")
+ @json["badges"]["count"]
+ end
+
+ def mayorships
+ fetch unless @json.has_key?("mayorships")
+ @json["mayorships"]["items"]
+ end
+
+ # https://developer.foursquare.com/docs/users/checkins.html
+ # https://developer.foursquare.com/docs/explore.html#req=users/self/checkins
+ def checkins(options={})
+ @foursquare.get("users/#{id}/checkins", options)["checkins"]["items"].map do |item|
+ Foursquare::Checkin.new(@foursquare, item)
+ end
+ end
+
+ def all_checkins
+ count = 250
+ offset = 0
+ array = []
+ while count == 250
+ checkins = checkins(:limit => count, :offset => offset)
+ array += checkins
+ count = checkins.count
+ offset = offset + count
+ end
+ array
+ end
+
+ def checkin_count
+ fetch unless @json.has_key?("checkins")
+ @json["checkins"]["count"]
+ end
+
+ def last_checkin
+ fetch unless @json.has_key?("checkins")
+ return unless @json["checkins"]["items"]
+ item = @json["checkins"]["items"].last
+ Foursquare::Checkin.new(@foursquare, item)
+ end
+
+ def checkins_here
+ checkin_json = @foursquare.get("venues/#{last_checkin.venue.id}/herenow")
+ checkin_json["hereNow"]["items"].map do |item|
+ begin
+ next unless json = @foursquare.get("checkins/#{item["id"]}")
+ checkin = json["checkin"]
+ Foursquare::Checkin.new(@foursquare, checkin)
+ rescue Foursquare::Error
+ # We can't get checkin information for people who aren't our friends.
+ end
+ end.compact
+ end
+
+ def friends(options={})
+ @foursquare.get("users/#{id}/friends", options)["friends"]["items"].map do |item|
+ Foursquare::User.new(@foursquare, item)
+ end
+ end
+
+ def tips(options={})
+ @foursquare.get("users/#{id}/tips", options)["tips"]["items"].map do |item|
+ Foursquare::Tip.new(@foursquare, item)
+ end
+ end
+ end
+end
View
21 vendor/plugins/quimby/lib/foursquare/user_proxy.rb
@@ -0,0 +1,21 @@
+module Foursquare
+ class UserProxy
+ def initialize(foursquare)
+ @foursquare = foursquare
+ end
+
+ def self.search(foursquare, options={})
+
+ end
+
+ def find(id)
+ Foursquare::User.new(@foursquare, @foursquare.get("users/#{id}")["user"])
+ end
+
+ def search(options={})
+ @foursquare.get("users/search", options)["results"].map do |json|
+ Foursquare::User.new(@foursquare, json)
+ end
+ end
+ end
+end
View
81 vendor/plugins/quimby/lib/foursquare/venue.rb
@@ -0,0 +1,81 @@
+module Foursquare
+ class Venue
+ attr_reader :json
+
+ def initialize(foursquare, json)
+ @foursquare, @json = foursquare, json
+ end
+
+ def id
+ @json["id"]
+ end
+
+ def name
+ @json["name"]
+ end
+
+ def contact
+ @json["contact"]
+ end
+
+ def location
+ Foursquare::Location.new(@json["location"])
+ end
+
+ def categories
+ @categories ||= @json["categories"].map { |hash| Foursquare::Category.new(hash) }
+ end
+
+ def verified?
+ @json["verified"]
+ end
+
+ def checkins_count
+ @json["stats"]["checkinsCount"]
+ end
+
+ def users_count
+ @json["stats"]["usersCount"]
+ end
+
+ def todos_count
+ @json["todos"]["count"]
+ end
+
+ def stats
+ @json["stats"]
+ end
+
+ def primary_category
+ return nil if categories.blank?
+ @primary_category ||= categories.select { |category| category.primary? }.try(:first)
+ end
+
+ # return the url to the icon of the primary category
+ # if no primary is available, then return a default icon
+ def icon
+ primary_category ? primary_category["icon"] : "https://foursquare.com/img/categories/none.png"
+ end
+
+ def photos_count
+ @json["photos"]["count"]
+ end
+
+ # not all photos may be present here (but we try to avoid one extra API call)
+ # if you want to get all the photos, try all_photos
+ def photos
+ return all_photos if @json["photos"].blank?
+ @json["photos"]["groups"].select { |g| g["type"] == "venue" }.first["items"].map do |item|
+ Foursquare::Photo.new(@foursquare, item)
+ end
+ end
+
+ # https://developer.foursquare.com/docs/venues/photos.html
+ def all_photos(options={:group => "venue"})
+ @foursquare.get("venues/#{id}/photos", options)["photos"]["items"].map do |item|
+ Foursquare::Photo.new(@foursquare, item)
+ end
+ end
+
+ end
+end
View
44 vendor/plugins/quimby/lib/foursquare/venue_proxy.rb
@@ -0,0 +1,44 @@
+module Foursquare
+ class VenueProxy
+ def initialize(foursquare)
+ @foursquare = foursquare
+ end
+
+ def find(id)
+ Foursquare::Venue.new(@foursquare, @foursquare.get("venues/#{id}")["venue"])
+ end
+
+ def search(options={})
+ raise ArgumentError, "You must include :ll" unless options[:ll]
+ response = @foursquare.get('venues/search', options)["groups"].inject({}) do |venues, group|
+ venues[group["type"]] ||= []
+ venues[group["type"]] += group["items"].map do |json|
+ Foursquare::Venue.new(@foursquare, json)
+ end
+ venues
+ end
+ end
+
+ def trending(options={})
+ search_group("trending", options)
+ end
+
+ def favorites(options={})
+ search_group("favorites", options)
+ end
+
+ def nearby(options={})
+ search_group("nearby", options)
+ end
+
+ private
+
+ def search_group(name, options)
+ raise ArgumentError, "You must include :ll" unless options[:ll]
+ response = @foursquare.get('venues/search', options)["groups"].detect { |group| group["type"] == name }
+ response ? response["items"].map do |json|
+ Foursquare::Venue.new(@foursquare, json)
+ end : []
+ end
+ end
+end
View
1  vendor/plugins/quimby/lib/quimby.rb
@@ -0,0 +1 @@
+require File.join(File.dirname(__FILE__), "foursquare")
View
47 vendor/plugins/quimby/quimby.gemspec
@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{quimby}
+ s.version = "0.4.1"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Pat Nakajima"]
+ s.date = %q{2011-01-14}
+ s.email = %q{pat@groupme.com}
+ s.files = [
+ "README.md",
+ "lib/foursquare.rb",
+ "lib/foursquare/base.rb",
+ "lib/foursquare/settings.rb",
+ "lib/foursquare/tip.rb",
+ "lib/foursquare/multi.rb",
+ "lib/foursquare/checkin.rb",
+ "lib/foursquare/photo.rb",
+ "lib/foursquare/checkin_proxy.rb",
+ "lib/foursquare/user.rb",
+ "lib/foursquare/user_proxy.rb",
+ "lib/foursquare/venue.rb",
+ "lib/foursquare/venue_proxy.rb",
+ "spec/THERE_ARENT_ANY",
+ ]
+ s.homepage = %q{https://github.com/groupme/quimby}
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{A Foursquare API wrapper}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<typhoeus>, [">= 0"])
+ s.add_runtime_dependency(%q<json>, [">= 0"])
+ else
+ s.add_dependency(%q<typhoeus>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<typhoeus>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
+ end
+end
View
1  vendor/plugins/quimby/spec/THERE_ARENT_ANY
@@ -0,0 +1 @@
+My bad. Whatevz.
Please sign in to comment.
Something went wrong with that request. Please try again.