summaryrefslogtreecommitdiff
path: root/users/lib/webfinger/user_presenter.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2014-04-17 10:12:05 +0200
committerazul <azul@riseup.net>2014-04-17 10:12:05 +0200
commit3513ad74f950b113af1ba1e3d06bc6a55c48fde5 (patch)
treedb49ebd4428053d5c8d720275b77594a531a1ad1 /users/lib/webfinger/user_presenter.rb
parentcb6442c344d6bdaf52c3878b2de2fcf4d85f2648 (diff)
parent3d3688647fab7049e5b531c45b85c1e46a1d528f (diff)
Merge pull request #146 from azul/refactor/engines
Refactor/engines
Diffstat (limited to 'users/lib/webfinger/user_presenter.rb')
-rw-r--r--users/lib/webfinger/user_presenter.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/users/lib/webfinger/user_presenter.rb b/users/lib/webfinger/user_presenter.rb
deleted file mode 100644
index 329f477..0000000
--- a/users/lib/webfinger/user_presenter.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-class Webfinger::UserPresenter
- include Rails.application.routes.url_helpers
- attr_accessor :user
-
- def initialize(user, request)
- @user = user
- @request = request
- end
-
- def to_json(options = {})
- {
- subject: subject,
- links: links
- }.to_json(options)
- end
-
- def subject
- "acct:#{@user.email_address}"
- end
-
- def links
- links = {}
- links[:public_key] = { type: 'PGP', href: key } if key
- return links
- end
-
- protected
-
- def key
- if @user.public_key.present?
- Base64.encode64(@user.public_key.to_s)
- end
- end
-
-end