The privacy aware, personally controlled, do-it-all, open source social network.
TL;DR
| # Copyright (c) 2010, Diaspora Inc. This file is | |
| # licensed under the Affero General Public License version 3 or later. See | |
| # the COPYRIGHT file. | |
| load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
| Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
| load 'config/deploy' # remove this line to skip loading any of the default tasks |
| require 'rake' | |
| task :install do | |
| puts "this currently is untested, prepare for tragedy" | |
| BREW_INSTALLED = installed?('brew') | |
| CURL_INSTALLED = installed?('curl') | |
| MYSQL_INSTALLED = installed?('msql') | |
| REDIS_INSTALLED = installed?('redis-server') | |
| unless BREW_INSTALLED |
| Number of Commits to Diaspora, per author: | |
| 1435 Raphael | |
| 1238 maxwell | |
| 914 danielvincent | |
| 585 ilya | |
| 535 MrZYX | |
| 449 zhitomirskiyi | |
| 377 Raphael Sofaer | |
| 335 Sarah Mei | |
| 249 Alec Leamas |
| #tons take from sporkmonger's webfinger github | |
| require File.join(Rails.root, 'lib/webfinger/hcard') | |
| require File.join(Rails.root, 'lib/webfinger/webfinger_profile') | |
| require 'addressable/uri' | |
| require 'addressable/template' | |
| require 'xrd' | |
| class Webfinger | |
| def self.lookup(email) | |
| setup_faraday |
| ##register this class as an interceptor | |
| ##this should be in the message_bus_ruby_api gem, and needs to have configuration, and #map to action mailer in a less dumb way | |
| #also, can we prevent action mailer from continuing to do its default config? | |
| #no time to dig into it now. | |
| require 'message_bus_ruby_api' | |
| class MessageBusInterceptor | |
| def self.delivering_email(message) | |
| client = MessagebusRubyApi::Client.new(MESSAGE_BUS_API_KEY) |
| require 'rubygems' | |
| require 'faraday' | |
| $conn = Faraday.new(:url => 'http://localhost:3000') do |builder| | |
| builder.request :url_encoded | |
| builder.request :json | |
| builder.response :logger | |
| builder.adapter :net_http | |
| end |
| require 'rubygems' | |
| require 'faraday' | |
| $conn = Faraday.new(:url => 'http://localhost:3000') do |builder| | |
| builder.request :url_encoded | |
| builder.request :json | |
| builder.response :logger | |
| builder.adapter :net_http | |
| end |
| def person_href(person, opts={}) | |
| if opts[:absolute] | |
| link = "href='/" | |
| else | |
| link = "href=#{AppConfig.pod_url}" | |
| end | |
| if person.local? | |
| username = person.diaspora_handle.split('@')[0] | |
| unless username.include?('.') | |
| return link+"u/#{person.diaspora_handle.split('@')[0]}'" |