diff --git a/.rubocop.yml b/.rubocop.yml
index 91f28fdb1..57d22e083 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -170,10 +170,6 @@ Layout/DotPosition:
### backward compatibility
-# only with ruby >= 2.3
-Style/FrozenStringLiteralComment:
- Enabled: false
-
# only with ruby >= 2.4
Performance/RegexpMatch:
Enabled: false
diff --git a/Changelog.md b/Changelog.md
index bb5fd190d..fd5652d33 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -18,6 +18,8 @@
* Remove auto detection of languages with highlightjs [#7591](https://github.com/diaspora/diaspora/pull/7591)
* Move enable/disable notification icon [#7592](https://github.com/diaspora/diaspora/pull/7592)
* Use Bootstrap 3 progress-bar for polls [#7600](https://github.com/diaspora/diaspora/pull/7600)
+* Enable frozen string literals [#7595](https://github.com/diaspora/diaspora/pull/7595)
+* Remove `rails_admin_histories` table [#7597](https://github.com/diaspora/diaspora/pull/7597)
## Bug fixes
* Fix displaying polls with long answers [#7579](https://github.com/diaspora/diaspora/pull/7579)
diff --git a/Gemfile b/Gemfile
index 33990ed82..9c8db039f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
source "https://rubygems.org"
gem "rails", "5.1.3"
diff --git a/Guardfile b/Guardfile
index a06f2dc33..2ecb276ed 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
guard :rspec, cmd: "bin/spring rspec", all_on_start: false, all_after_pass: false do
watch(/^spec\/.+_spec\.rb$/)
watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" }
diff --git a/Rakefile b/Rakefile
index 2c022e0b0..55c48de34 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/admin/admin_controller.rb b/app/controllers/admin/admin_controller.rb
index 24f08cdf0..8a5d0f599 100644
--- a/app/controllers/admin/admin_controller.rb
+++ b/app/controllers/admin/admin_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Admin
class AdminController < ApplicationController
before_action :authenticate_user!
diff --git a/app/controllers/admin/pods_controller.rb b/app/controllers/admin/pods_controller.rb
index 309ee3861..ed41d0669 100644
--- a/app/controllers/admin/pods_controller.rb
+++ b/app/controllers/admin/pods_controller.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
module Admin
class PodsController < AdminController
respond_to :html, :json, :mobile
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 2163c3630..376603b51 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Admin
class UsersController < AdminController
diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb
index dc0410391..f0fa8bb5c 100644
--- a/app/controllers/admins_controller.rb
+++ b/app/controllers/admins_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AdminsController < Admin::AdminController
include ApplicationHelper
diff --git a/app/controllers/api/openid_connect/authorizations_controller.rb b/app/controllers/api/openid_connect/authorizations_controller.rb
index 94f268010..bc35f11b9 100644
--- a/app/controllers/api/openid_connect/authorizations_controller.rb
+++ b/app/controllers/api/openid_connect/authorizations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class AuthorizationsController < ApplicationController
diff --git a/app/controllers/api/openid_connect/clients_controller.rb b/app/controllers/api/openid_connect/clients_controller.rb
index 210c77624..9bc6c2793 100644
--- a/app/controllers/api/openid_connect/clients_controller.rb
+++ b/app/controllers/api/openid_connect/clients_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class ClientsController < ApplicationController
diff --git a/app/controllers/api/openid_connect/discovery_controller.rb b/app/controllers/api/openid_connect/discovery_controller.rb
index f648e3566..ee93eb840 100644
--- a/app/controllers/api/openid_connect/discovery_controller.rb
+++ b/app/controllers/api/openid_connect/discovery_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/app/controllers/api/openid_connect/id_tokens_controller.rb b/app/controllers/api/openid_connect/id_tokens_controller.rb
index 26eb17bde..6290948c0 100644
--- a/app/controllers/api/openid_connect/id_tokens_controller.rb
+++ b/app/controllers/api/openid_connect/id_tokens_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/app/controllers/api/openid_connect/token_endpoint_controller.rb b/app/controllers/api/openid_connect/token_endpoint_controller.rb
index 378f0086b..10dbbc437 100644
--- a/app/controllers/api/openid_connect/token_endpoint_controller.rb
+++ b/app/controllers/api/openid_connect/token_endpoint_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class TokenEndpointController < ApplicationController
diff --git a/app/controllers/api/openid_connect/user_applications_controller.rb b/app/controllers/api/openid_connect/user_applications_controller.rb
index f25603a52..7cad1fe49 100644
--- a/app/controllers/api/openid_connect/user_applications_controller.rb
+++ b/app/controllers/api/openid_connect/user_applications_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class UserApplicationsController < ApplicationController
diff --git a/app/controllers/api/openid_connect/user_info_controller.rb b/app/controllers/api/openid_connect/user_info_controller.rb
index 666c2a48e..c6669ae4b 100644
--- a/app/controllers/api/openid_connect/user_info_controller.rb
+++ b/app/controllers/api/openid_connect/user_info_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class UserInfoController < ApplicationController
diff --git a/app/controllers/api/v0/base_controller.rb b/app/controllers/api/v0/base_controller.rb
index 39d331215..77805a591 100644
--- a/app/controllers/api/v0/base_controller.rb
+++ b/app/controllers/api/v0/base_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module V0
class BaseController < ApplicationController
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 27e793c1b..89411fb4e 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/aspect_memberships_controller.rb b/app/controllers/aspect_memberships_controller.rb
index 2bfd0c933..69fb4098f 100644
--- a/app/controllers/aspect_memberships_controller.rb
+++ b/app/controllers/aspect_memberships_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb
index 73bdf8cd2..4e0344cc3 100644
--- a/app/controllers/aspects_controller.rb
+++ b/app/controllers/aspects_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/blocks_controller.rb b/app/controllers/blocks_controller.rb
index 7ad4f2e1c..a9bcae865 100644
--- a/app/controllers/blocks_controller.rb
+++ b/app/controllers/blocks_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class BlocksController < ApplicationController
before_action :authenticate_user!
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index 5c4189f8c..647d42e35 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb
index ed5999f35..f62050734 100644
--- a/app/controllers/contacts_controller.rb
+++ b/app/controllers/contacts_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/conversation_visibilities_controller.rb b/app/controllers/conversation_visibilities_controller.rb
index 6d40eb3cb..2e03f6712 100644
--- a/app/controllers/conversation_visibilities_controller.rb
+++ b/app/controllers/conversation_visibilities_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/conversations_controller.rb b/app/controllers/conversations_controller.rb
index 7694cef79..122a0fbe1 100644
--- a/app/controllers/conversations_controller.rb
+++ b/app/controllers/conversations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ConversationsController < ApplicationController
before_action :authenticate_user!
respond_to :html, :mobile, :json, :js
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 4799488ae..2e7e501f2 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
class HelpController < ApplicationController
end
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 74c2b6532..feaddad14 100644
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/invitation_codes_controller.rb b/app/controllers/invitation_codes_controller.rb
index 0f4302953..318df1328 100644
--- a/app/controllers/invitation_codes_controller.rb
+++ b/app/controllers/invitation_codes_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class InvitationCodesController < ApplicationController
before_action :ensure_valid_invite_code
diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb
index 04927022c..c6a5f516c 100644
--- a/app/controllers/invitations_controller.rb
+++ b/app/controllers/invitations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/likes_controller.rb b/app/controllers/likes_controller.rb
index 3cdff2a74..bdc43809f 100644
--- a/app/controllers/likes_controller.rb
+++ b/app/controllers/likes_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index a217aab87..7a20863f5 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/node_info_controller.rb b/app/controllers/node_info_controller.rb
index aaf9b68d8..cb831a595 100644
--- a/app/controllers/node_info_controller.rb
+++ b/app/controllers/node_info_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class NodeInfoController < ApplicationController
def jrd
render json: NodeInfo.jrd(CGI.unescape(node_info_url("123.123").sub("123.123", "%{version}")))
diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb
index c1f714778..62a3d44a7 100644
--- a/app/controllers/notifications_controller.rb
+++ b/app/controllers/notifications_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/participations_controller.rb b/app/controllers/participations_controller.rb
index 1cb9b7b40..e2d686e5d 100644
--- a/app/controllers/participations_controller.rb
+++ b/app/controllers/participations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ParticipationsController < ApplicationController
before_action :authenticate_user!
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index f42a4d908..e6123d378 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb
index a95fdb420..8ebc0908c 100644
--- a/app/controllers/photos_controller.rb
+++ b/app/controllers/photos_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/poll_participations_controller.rb b/app/controllers/poll_participations_controller.rb
index a8b874fca..555d53168 100644
--- a/app/controllers/poll_participations_controller.rb
+++ b/app/controllers/poll_participations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PollParticipationsController < ApplicationController
before_action :authenticate_user!
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
index 3194c1b59..0ec36f736 100644
--- a/app/controllers/posts_controller.rb
+++ b/app/controllers/posts_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 9daa4640d..83f8fd86b 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 561c52ea0..1224160fd 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb
index f51d2d043..b6016e081 100644
--- a/app/controllers/report_controller.rb
+++ b/app/controllers/report_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/reshares_controller.rb b/app/controllers/reshares_controller.rb
index dfd921d4a..d98487dbc 100644
--- a/app/controllers/reshares_controller.rb
+++ b/app/controllers/reshares_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ResharesController < ApplicationController
before_action :authenticate_user!, except: :index
respond_to :json
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index e1f754a43..0e47bcb03 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class SearchController < ApplicationController
before_action :authenticate_user!
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb
index 68a1ba853..6cadc49c7 100644
--- a/app/controllers/services_controller.rb
+++ b/app/controllers/services_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 74fd1f818..0f3bd1c46 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/share_visibilities_controller.rb b/app/controllers/share_visibilities_controller.rb
index bf1ea1f10..1cc33c11b 100644
--- a/app/controllers/share_visibilities_controller.rb
+++ b/app/controllers/share_visibilities_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/social_relay_controller.rb b/app/controllers/social_relay_controller.rb
index 28cf5065a..29cea8b40 100644
--- a/app/controllers/social_relay_controller.rb
+++ b/app/controllers/social_relay_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class SocialRelayController < ApplicationController
respond_to :json
diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb
index 58ae46536..77a4bdf38 100644
--- a/app/controllers/status_messages_controller.rb
+++ b/app/controllers/status_messages_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/streams_controller.rb b/app/controllers/streams_controller.rb
index 18ec1837f..5e638e80d 100644
--- a/app/controllers/streams_controller.rb
+++ b/app/controllers/streams_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/tag_followings_controller.rb b/app/controllers/tag_followings_controller.rb
index a82d16dd9..a6bedd113 100644
--- a/app/controllers/tag_followings_controller.rb
+++ b/app/controllers/tag_followings_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index d201fd905..5f5995801 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/terms_controller.rb b/app/controllers/terms_controller.rb
index bf2e5da28..d8fd057f9 100644
--- a/app/controllers/terms_controller.rb
+++ b/app/controllers/terms_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index e6dbb3449..1f10ebfc2 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/activity_streams_helper.rb b/app/helpers/activity_streams_helper.rb
index b08514404..c51d1c082 100644
--- a/app/helpers/activity_streams_helper.rb
+++ b/app/helpers/activity_streams_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ActivityStreamsHelper
def add_activitystreams_author(target, person)
target.author do |author|
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b46b27203..f262b288a 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
@@ -15,8 +17,9 @@ module ApplicationHelper
return AppConfig.settings.changelog_url.get if AppConfig.settings.changelog_url.present?
url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md"
- url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_revision.present?
- url
+ return url if AppConfig.git_revision.blank?
+
+ url.sub("/master/", "/#{AppConfig.git_revision}/")
end
def source_url
diff --git a/app/helpers/aspect_global_helper.rb b/app/helpers/aspect_global_helper.rb
index aa8e052c8..49ce5bab4 100644
--- a/app/helpers/aspect_global_helper.rb
+++ b/app/helpers/aspect_global_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/contacts_helper.rb b/app/helpers/contacts_helper.rb
index 3f25d326b..0192e359e 100644
--- a/app/helpers/contacts_helper.rb
+++ b/app/helpers/contacts_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ContactsHelper
def start_a_conversation_link(aspect, contacts_size)
conv_opts = { class: "conversation_button contacts_button"}
diff --git a/app/helpers/conversations_helper.rb b/app/helpers/conversations_helper.rb
index 3c00a2b9d..beac7dc4f 100644
--- a/app/helpers/conversations_helper.rb
+++ b/app/helpers/conversations_helper.rb
@@ -1,9 +1,10 @@
+# frozen_string_literal: true
+
module ConversationsHelper
def conversation_class(conversation, unread_count, selected_conversation_id)
- conv_class = unread_count > 0 ? "unread " : ""
- if selected_conversation_id && conversation.id == selected_conversation_id
- conv_class << "selected"
- end
- conv_class
+ conv_class = unread_count > 0 ? "unread" : ""
+ return conv_class unless selected_conversation_id && conversation.id == selected_conversation_id
+
+ "#{conv_class} selected"
end
end
diff --git a/app/helpers/error_messages_helper.rb b/app/helpers/error_messages_helper.rb
index 73b1cab9d..b47a0b667 100644
--- a/app/helpers/error_messages_helper.rb
+++ b/app/helpers/error_messages_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/getting_started_helper.rb b/app/helpers/getting_started_helper.rb
index fcb8fbc69..4db7f8e64 100644
--- a/app/helpers/getting_started_helper.rb
+++ b/app/helpers/getting_started_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/gon_helper.rb b/app/helpers/gon_helper.rb
index f4bb9689d..66d753c46 100644
--- a/app/helpers/gon_helper.rb
+++ b/app/helpers/gon_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module GonHelper
def gon_load_contact(contact)
Gon.preloads[:contacts] ||= []
diff --git a/app/helpers/interim_stream_hackiness_helper.rb b/app/helpers/interim_stream_hackiness_helper.rb
index 4283a8126..888155b00 100644
--- a/app/helpers/interim_stream_hackiness_helper.rb
+++ b/app/helpers/interim_stream_hackiness_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module InterimStreamHackinessHelper
def commenting_disabled?(post)
return true unless user_signed_in?
diff --git a/app/helpers/invitation_codes_helper.rb b/app/helpers/invitation_codes_helper.rb
index 991cb826c..0f211a9cf 100644
--- a/app/helpers/invitation_codes_helper.rb
+++ b/app/helpers/invitation_codes_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module InvitationCodesHelper
def invite_hidden_tag(invite)
if invite.present?
diff --git a/app/helpers/jsxc_helper.rb b/app/helpers/jsxc_helper.rb
index 9c07dcd6a..d94597d55 100644
--- a/app/helpers/jsxc_helper.rb
+++ b/app/helpers/jsxc_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module JsxcHelper
def get_bosh_endpoint
proto = AppConfig.chat.server.bosh.proto
diff --git a/app/helpers/language_helper.rb b/app/helpers/language_helper.rb
index 1b890ad34..3c742c2f4 100644
--- a/app/helpers/language_helper.rb
+++ b/app/helpers/language_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module LanguageHelper
include ApplicationHelper
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb
index 954933804..fc55d50bb 100644
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/meta_data_helper.rb b/app/helpers/meta_data_helper.rb
index 7fbe86ab8..03758ed62 100644
--- a/app/helpers/meta_data_helper.rb
+++ b/app/helpers/meta_data_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module MetaDataHelper
include ActionView::Helpers::AssetUrlHelper
include ActionView::Helpers::TagHelper
diff --git a/app/helpers/mobile_helper.rb b/app/helpers/mobile_helper.rb
index 6d8f008dc..bdc92d7e6 100644
--- a/app/helpers/mobile_helper.rb
+++ b/app/helpers/mobile_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module MobileHelper
def mobile_reshare_icon(post)
if (post.public? || reshare?(post)) && (user_signed_in? && post.author != current_user.person)
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb
index a8c1a533f..15f04a327 100644
--- a/app/helpers/notifications_helper.rb
+++ b/app/helpers/notifications_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationsHelper
include PeopleHelper
include PostsHelper
diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb
index 7cbb2c4dc..eaf1ff597 100644
--- a/app/helpers/notifier_helper.rb
+++ b/app/helpers/notifier_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotifierHelper
# @param post [Post] The post object.
diff --git a/app/helpers/o_embed_helper.rb b/app/helpers/o_embed_helper.rb
index f30f36bfe..10aead568 100644
--- a/app/helpers/o_embed_helper.rb
+++ b/app/helpers/o_embed_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module OEmbedHelper
def o_embed_html(cache)
data = cache.data
diff --git a/app/helpers/open_graph_helper.rb b/app/helpers/open_graph_helper.rb
index b33761645..ace0990c8 100644
--- a/app/helpers/open_graph_helper.rb
+++ b/app/helpers/open_graph_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module OpenGraphHelper
def og_html(cache)
"" +
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index 18461351e..40c79bb43 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
@@ -24,11 +26,9 @@ module PeopleHelper
end
def person_link(person, opts={})
- opts[:class] ||= ""
- opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
- opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
+ css_class = person_link_class(person, opts[:class])
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
- ""\
+ ""\
"#{html_escape_once(opts[:display_name] || person.name)}"\
.html_safe
end
@@ -44,11 +44,9 @@ module PeopleHelper
if opts[:to] == :photos
link_to person_image_tag(person, opts[:size]), person_photos_path(person)
else
- opts[:class] ||= ""
- opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
- opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
+ css_class = person_link_class(person, opts[:class])
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
- "
+ "
#{person_image_tag(person, opts[:size])}
".html_safe
end
@@ -77,4 +75,14 @@ module PeopleHelper
return Rails.application.routes.url_helpers.person_path(person, opts)
end
end
+
+ private
+
+ def person_link_class(person, css_class)
+ return css_class unless defined?(user_signed_in?) && user_signed_in?
+
+ return "#{css_class} self" if current_user.person == person
+
+ "#{css_class} hovercardable"
+ end
end
diff --git a/app/helpers/posts_helper.rb b/app/helpers/posts_helper.rb
index 59c12ded6..c8eb3954e 100644
--- a/app/helpers/posts_helper.rb
+++ b/app/helpers/posts_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb
index 20351d620..76666c327 100644
--- a/app/helpers/profile_helper.rb
+++ b/app/helpers/profile_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/publisher_helper.rb b/app/helpers/publisher_helper.rb
index 472f29685..905d216c7 100644
--- a/app/helpers/publisher_helper.rb
+++ b/app/helpers/publisher_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/report_helper.rb b/app/helpers/report_helper.rb
index 248587d94..9fbcb0a20 100644
--- a/app/helpers/report_helper.rb
+++ b/app/helpers/report_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb
index 9fbe7bd29..8a2c1247a 100644
--- a/app/helpers/services_helper.rb
+++ b/app/helpers/services_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ServicesHelper
def contact_proxy(friend)
friend.contact || contact_proxy_template.dup.tap {|c| c.person = friend.person }
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
index 716b12fed..5d2de6259 100644
--- a/app/helpers/sessions_helper.rb
+++ b/app/helpers/sessions_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module SessionsHelper
def prefilled_username
uri = Addressable::URI.parse(session["user_return_to"])
diff --git a/app/helpers/statistics_helper.rb b/app/helpers/statistics_helper.rb
index 1cbe5aff3..f3f73b117 100644
--- a/app/helpers/statistics_helper.rb
+++ b/app/helpers/statistics_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/stream_helper.rb b/app/helpers/stream_helper.rb
index fc30a0457..cada31f8b 100644
--- a/app/helpers/stream_helper.rb
+++ b/app/helpers/stream_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb
index 28f46f719..e6f739620 100644
--- a/app/helpers/tags_helper.rb
+++ b/app/helpers/tags_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module TagsHelper
def looking_for_tag_link
return if search_query.include?('@') || normalize_tag_name(search_query).blank?
diff --git a/app/helpers/user_applications_helper.rb b/app/helpers/user_applications_helper.rb
index 190c43580..8d301d851 100644
--- a/app/helpers/user_applications_helper.rb
+++ b/app/helpers/user_applications_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module UserApplicationsHelper
def user_application_name(app)
if app.name?
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 5d181ea9c..3b71c0d66 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module UsersHelper
def owner_image_tag(size=nil)
person_image_tag(current_user.person, size)
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb
index e5ed1ffd0..557a14818 100644
--- a/app/mailers/application_mailer.rb
+++ b/app/mailers/application_mailer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ApplicationMailer < ActionMailer::Base
default from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>"
end
diff --git a/app/mailers/diaspora_devise_mailer.rb b/app/mailers/diaspora_devise_mailer.rb
index 069b488b5..7538e3f40 100644
--- a/app/mailers/diaspora_devise_mailer.rb
+++ b/app/mailers/diaspora_devise_mailer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class DiasporaDeviseMailer < Devise::Mailer
default from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>"
diff --git a/app/mailers/export_mailer.rb b/app/mailers/export_mailer.rb
index 5139be734..da4af5f30 100644
--- a/app/mailers/export_mailer.rb
+++ b/app/mailers/export_mailer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ExportMailer < ApplicationMailer
def export_complete_for(user)
@user = user
diff --git a/app/mailers/maintenance.rb b/app/mailers/maintenance.rb
index 185b4f949..1ff5d4ac3 100644
--- a/app/mailers/maintenance.rb
+++ b/app/mailers/maintenance.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Maintenance < ApplicationMailer
def account_removal_warning(user)
@user = user
diff --git a/app/mailers/notification_mailers/also_commented.rb b/app/mailers/notification_mailers/also_commented.rb
index c6c4da8de..ecab38feb 100644
--- a/app/mailers/notification_mailers/also_commented.rb
+++ b/app/mailers/notification_mailers/also_commented.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class AlsoCommented < NotificationMailers::Base
attr_accessor :comment
diff --git a/app/mailers/notification_mailers/base.rb b/app/mailers/notification_mailers/base.rb
index a8496df47..8aa3d28c6 100644
--- a/app/mailers/notification_mailers/base.rb
+++ b/app/mailers/notification_mailers/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class Base
include Diaspora::Logging
@@ -52,7 +54,7 @@ module NotificationMailers
def log_mail(recipient_id, sender_id, type)
log_string = "event=mail mail_type=#{type} recipient_id=#{recipient_id} sender_id=#{sender_id} " \
" recipient_handle=#{@recipient.diaspora_handle}"
- log_string << " sender_handle=#{@sender.diaspora_handle}" if sender_id.present?
+ log_string = "#{log_string} sender_handle=#{@sender.diaspora_handle}" if sender_id.present?
logger.info log_string
end
diff --git a/app/mailers/notification_mailers/comment_on_post.rb b/app/mailers/notification_mailers/comment_on_post.rb
index c9957e86f..34b8b8a30 100644
--- a/app/mailers/notification_mailers/comment_on_post.rb
+++ b/app/mailers/notification_mailers/comment_on_post.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class CommentOnPost < NotificationMailers::Base
attr_accessor :comment
diff --git a/app/mailers/notification_mailers/confirm_email.rb b/app/mailers/notification_mailers/confirm_email.rb
index 3a6256f73..15e2b29b0 100644
--- a/app/mailers/notification_mailers/confirm_email.rb
+++ b/app/mailers/notification_mailers/confirm_email.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class ConfirmEmail < NotificationMailers::Base
def set_headers
diff --git a/app/mailers/notification_mailers/csrf_token_fail.rb b/app/mailers/notification_mailers/csrf_token_fail.rb
index 435f9d87b..f97a9995d 100644
--- a/app/mailers/notification_mailers/csrf_token_fail.rb
+++ b/app/mailers/notification_mailers/csrf_token_fail.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class CsrfTokenFail < NotificationMailers::Base
def set_headers
diff --git a/app/mailers/notification_mailers/liked.rb b/app/mailers/notification_mailers/liked.rb
index c9067bf74..00fd55e3b 100644
--- a/app/mailers/notification_mailers/liked.rb
+++ b/app/mailers/notification_mailers/liked.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class Liked < NotificationMailers::Base
attr_accessor :like
diff --git a/app/mailers/notification_mailers/mentioned.rb b/app/mailers/notification_mailers/mentioned.rb
index e72c2074d..2342a04ef 100644
--- a/app/mailers/notification_mailers/mentioned.rb
+++ b/app/mailers/notification_mailers/mentioned.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class Mentioned < NotificationMailers::Base
attr_accessor :post
diff --git a/app/mailers/notification_mailers/mentioned_in_comment.rb b/app/mailers/notification_mailers/mentioned_in_comment.rb
index 0e9a51bba..cdfa74fa1 100644
--- a/app/mailers/notification_mailers/mentioned_in_comment.rb
+++ b/app/mailers/notification_mailers/mentioned_in_comment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class MentionedInComment < NotificationMailers::Base
attr_reader :comment
diff --git a/app/mailers/notification_mailers/private_message.rb b/app/mailers/notification_mailers/private_message.rb
index 60a5013e8..7c3ac47dc 100644
--- a/app/mailers/notification_mailers/private_message.rb
+++ b/app/mailers/notification_mailers/private_message.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class PrivateMessage < NotificationMailers::Base
attr_accessor :message, :conversation, :participants
diff --git a/app/mailers/notification_mailers/reshared.rb b/app/mailers/notification_mailers/reshared.rb
index e98b986ab..1b30017a0 100644
--- a/app/mailers/notification_mailers/reshared.rb
+++ b/app/mailers/notification_mailers/reshared.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class Reshared < NotificationMailers::Base
attr_accessor :reshare
diff --git a/app/mailers/notification_mailers/started_sharing.rb b/app/mailers/notification_mailers/started_sharing.rb
index bc4a8dd44..d3d9db164 100644
--- a/app/mailers/notification_mailers/started_sharing.rb
+++ b/app/mailers/notification_mailers/started_sharing.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NotificationMailers
class StartedSharing < NotificationMailers::Base
def set_headers(*_args) # rubocop:disable Style/AccessorMethodName
diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb
index ae710fa10..47c3b71bf 100644
--- a/app/mailers/notifier.rb
+++ b/app/mailers/notifier.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Notifier < ApplicationMailer
helper :application
helper :notifier
diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb
index 0ac76892f..507e02600 100644
--- a/app/mailers/report_mailer.rb
+++ b/app/mailers/report_mailer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ReportMailer < ApplicationMailer
def self.new_report(report_id)
report = Report.find_by_id(report_id)
diff --git a/app/models/account_deletion.rb b/app/models/account_deletion.rb
index b929279bb..31b4683d8 100644
--- a/app/models/account_deletion.rb
+++ b/app/models/account_deletion.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/account_migration.rb b/app/models/account_migration.rb
index 9d2f451d5..266ab521e 100644
--- a/app/models/account_migration.rb
+++ b/app/models/account_migration.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AccountMigration < ApplicationRecord
include Diaspora::Federated::Base
diff --git a/app/models/acts_as_taggable_on-tag.rb b/app/models/acts_as_taggable_on-tag.rb
index 669a3f618..dc5ece4cc 100644
--- a/app/models/acts_as_taggable_on-tag.rb
+++ b/app/models/acts_as_taggable_on-tag.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ActsAsTaggableOn
class Tag
diff --git a/app/models/api/openid_connect/authorization.rb b/app/models/api/openid_connect/authorization.rb
index a57231552..597c815f7 100644
--- a/app/models/api/openid_connect/authorization.rb
+++ b/app/models/api/openid_connect/authorization.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/app/models/authorization.rb
module Api
diff --git a/app/models/api/openid_connect/o_auth_access_token.rb b/app/models/api/openid_connect/o_auth_access_token.rb
index e2089fff8..fb9f95f81 100644
--- a/app/models/api/openid_connect/o_auth_access_token.rb
+++ b/app/models/api/openid_connect/o_auth_access_token.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/app/models/api/openid_connect/o_auth_application.rb b/app/models/api/openid_connect/o_auth_application.rb
index acf2817e4..ee53b6daf 100644
--- a/app/models/api/openid_connect/o_auth_application.rb
+++ b/app/models/api/openid_connect/o_auth_application.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/app/models/api/openid_connect/pairwise_pseudonymous_identifier.rb b/app/models/api/openid_connect/pairwise_pseudonymous_identifier.rb
index 520bc782c..5fa3c7db1 100644
--- a/app/models/api/openid_connect/pairwise_pseudonymous_identifier.rb
+++ b/app/models/api/openid_connect/pairwise_pseudonymous_identifier.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/app/models/application_record.rb b/app/models/application_record.rb
index 10a4cba84..71fbba5b3 100644
--- a/app/models/application_record.rb
+++ b/app/models/application_record.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
diff --git a/app/models/aspect.rb b/app/models/aspect.rb
index 4f6054dce..f4e33cfa7 100644
--- a/app/models/aspect.rb
+++ b/app/models/aspect.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/aspect_membership.rb b/app/models/aspect_membership.rb
index 8901f16a2..f7d042a99 100644
--- a/app/models/aspect_membership.rb
+++ b/app/models/aspect_membership.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/aspect_visibility.rb b/app/models/aspect_visibility.rb
index be36323cb..650bd84ff 100644
--- a/app/models/aspect_visibility.rb
+++ b/app/models/aspect_visibility.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/block.rb b/app/models/block.rb
index 57b470e58..f0e79b22b 100644
--- a/app/models/block.rb
+++ b/app/models/block.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Block < ApplicationRecord
belongs_to :person
belongs_to :user
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 45603e420..e165b09ff 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/comment_signature.rb b/app/models/comment_signature.rb
index 9e7aa9270..d05567636 100644
--- a/app/models/comment_signature.rb
+++ b/app/models/comment_signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CommentSignature < ApplicationRecord
include Diaspora::Signature
diff --git a/app/models/contact.rb b/app/models/contact.rb
index 666815d47..2f3dd4e73 100644
--- a/app/models/contact.rb
+++ b/app/models/contact.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/conversation.rb b/app/models/conversation.rb
index 43f37f4c1..5197ebd71 100644
--- a/app/models/conversation.rb
+++ b/app/models/conversation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Conversation < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/conversation_visibility.rb b/app/models/conversation_visibility.rb
index 39e7e66cd..8501a0917 100644
--- a/app/models/conversation_visibility.rb
+++ b/app/models/conversation_visibility.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ConversationVisibility < ApplicationRecord
belongs_to :conversation
diff --git a/app/models/invitation_code.rb b/app/models/invitation_code.rb
index 1dd565871..428096756 100644
--- a/app/models/invitation_code.rb
+++ b/app/models/invitation_code.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class InvitationCode < ApplicationRecord
belongs_to :user
diff --git a/app/models/like.rb b/app/models/like.rb
index 09776aa8b..70f2745cf 100644
--- a/app/models/like.rb
+++ b/app/models/like.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/like_signature.rb b/app/models/like_signature.rb
index bc21533d4..c0ae04aa5 100644
--- a/app/models/like_signature.rb
+++ b/app/models/like_signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class LikeSignature < ApplicationRecord
include Diaspora::Signature
diff --git a/app/models/location.rb b/app/models/location.rb
index 37132f147..e55944271 100644
--- a/app/models/location.rb
+++ b/app/models/location.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Location < ApplicationRecord
before_validation :split_coords, on: :create
validates_presence_of :lat, :lng
diff --git a/app/models/mention.rb b/app/models/mention.rb
index c5bb859e5..f882e727c 100644
--- a/app/models/mention.rb
+++ b/app/models/mention.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/message.rb b/app/models/message.rb
index 07e952fff..7e1857fe9 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Message < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/notification.rb b/app/models/notification.rb
index f1adf5325..f2dd7df9e 100644
--- a/app/models/notification.rb
+++ b/app/models/notification.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/notification_actor.rb b/app/models/notification_actor.rb
index beaeefbb6..6bdfe48bd 100644
--- a/app/models/notification_actor.rb
+++ b/app/models/notification_actor.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/notifications/also_commented.rb b/app/models/notifications/also_commented.rb
index cc28c047c..35ca33eae 100644
--- a/app/models/notifications/also_commented.rb
+++ b/app/models/notifications/also_commented.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class AlsoCommented < Notification
include Notifications::Commented
diff --git a/app/models/notifications/comment_on_post.rb b/app/models/notifications/comment_on_post.rb
index ee3320e39..002ea5beb 100644
--- a/app/models/notifications/comment_on_post.rb
+++ b/app/models/notifications/comment_on_post.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class CommentOnPost < Notification
include Notifications::Commented
diff --git a/app/models/notifications/commented.rb b/app/models/notifications/commented.rb
index e5b1b7d48..5754ac76a 100644
--- a/app/models/notifications/commented.rb
+++ b/app/models/notifications/commented.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
module Commented
extend ActiveSupport::Concern
diff --git a/app/models/notifications/liked.rb b/app/models/notifications/liked.rb
index 00b33113a..b7033a890 100644
--- a/app/models/notifications/liked.rb
+++ b/app/models/notifications/liked.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class Liked < Notification
def mail_job
diff --git a/app/models/notifications/mentioned.rb b/app/models/notifications/mentioned.rb
index b128791bb..d49b384d7 100644
--- a/app/models/notifications/mentioned.rb
+++ b/app/models/notifications/mentioned.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
module Mentioned
extend ActiveSupport::Concern
diff --git a/app/models/notifications/mentioned_in_comment.rb b/app/models/notifications/mentioned_in_comment.rb
index 35ef9b61a..844ffe76e 100644
--- a/app/models/notifications/mentioned_in_comment.rb
+++ b/app/models/notifications/mentioned_in_comment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class MentionedInComment < Notification
include Notifications::Mentioned
diff --git a/app/models/notifications/mentioned_in_post.rb b/app/models/notifications/mentioned_in_post.rb
index 35ec36c45..e14d23d64 100644
--- a/app/models/notifications/mentioned_in_post.rb
+++ b/app/models/notifications/mentioned_in_post.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class MentionedInPost < Notification
include Notifications::Mentioned
diff --git a/app/models/notifications/private_message.rb b/app/models/notifications/private_message.rb
index 89bf0d5fd..db2216808 100644
--- a/app/models/notifications/private_message.rb
+++ b/app/models/notifications/private_message.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class PrivateMessage < Notification
def mail_job
diff --git a/app/models/notifications/reshared.rb b/app/models/notifications/reshared.rb
index 0b438a483..6ad766209 100644
--- a/app/models/notifications/reshared.rb
+++ b/app/models/notifications/reshared.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class Reshared < Notification
def mail_job
diff --git a/app/models/notifications/started_sharing.rb b/app/models/notifications/started_sharing.rb
index dfe6dfd55..acf0a3703 100644
--- a/app/models/notifications/started_sharing.rb
+++ b/app/models/notifications/started_sharing.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Notifications
class StartedSharing < Notification
def mail_job
diff --git a/app/models/o_embed_cache.rb b/app/models/o_embed_cache.rb
index 30967d1bd..a6ca9e7d4 100644
--- a/app/models/o_embed_cache.rb
+++ b/app/models/o_embed_cache.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class OEmbedCache < ApplicationRecord
serialize :data
validates :data, :presence => true
diff --git a/app/models/open_graph_cache.rb b/app/models/open_graph_cache.rb
index 0aa0a2fe6..dc297f25b 100644
--- a/app/models/open_graph_cache.rb
+++ b/app/models/open_graph_cache.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class OpenGraphCache < ApplicationRecord
validates :title, :presence => true
validates :ob_type, :presence => true
diff --git a/app/models/participation.rb b/app/models/participation.rb
index 4bdda1a92..575ad5c52 100644
--- a/app/models/participation.rb
+++ b/app/models/participation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Participation < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/person.rb b/app/models/person.rb
index ca7210d52..8745a1179 100644
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
@@ -102,7 +104,7 @@ class Person < ApplicationRecord
# @param [String] search substring
# @return [Person::ActiveRecord_Relation]
scope :find_by_substring, ->(search_str) {
- search_str.strip!
+ search_str = search_str.strip
if search_str.blank? || search_str.size < 2
none
else
diff --git a/app/models/photo.rb b/app/models/photo.rb
index 7fa0c3871..df16ecf4c 100644
--- a/app/models/photo.rb
+++ b/app/models/photo.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2009, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/pod.rb b/app/models/pod.rb
index b88c76cde..c64bf4ce2 100644
--- a/app/models/pod.rb
+++ b/app/models/pod.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Pod < ApplicationRecord
enum status: %i(
unchecked
diff --git a/app/models/poll.rb b/app/models/poll.rb
index 05f8635d1..3a72b88b3 100644
--- a/app/models/poll.rb
+++ b/app/models/poll.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Poll < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/poll_answer.rb b/app/models/poll_answer.rb
index d91c4e13a..0c05fdc39 100644
--- a/app/models/poll_answer.rb
+++ b/app/models/poll_answer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PollAnswer < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/poll_participation.rb b/app/models/poll_participation.rb
index 24f99f9ef..6b2eb823f 100644
--- a/app/models/poll_participation.rb
+++ b/app/models/poll_participation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PollParticipation < ApplicationRecord
include Diaspora::Federated::Base
include Diaspora::Fields::Guid
diff --git a/app/models/poll_participation_signature.rb b/app/models/poll_participation_signature.rb
index a32b8653e..535d145ce 100644
--- a/app/models/poll_participation_signature.rb
+++ b/app/models/poll_participation_signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PollParticipationSignature < ApplicationRecord
include Diaspora::Signature
diff --git a/app/models/post.rb b/app/models/post.rb
index 53157702f..6c62cd137 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/profile.rb b/app/models/profile.rb
index 949cf8f78..45b74e225 100644
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/report.rb b/app/models/report.rb
index 2f28cfc4c..ab169e7f1 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Report < ApplicationRecord
validates :user_id, presence: true
validates :item_id, presence: true
diff --git a/app/models/reshare.rb b/app/models/reshare.rb
index eda417410..ecbd64971 100644
--- a/app/models/reshare.rb
+++ b/app/models/reshare.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/role.rb b/app/models/role.rb
index 98601bb7b..199381d28 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# NOTE add the person object you want to attach role to...
class Role < ApplicationRecord
diff --git a/app/models/service.rb b/app/models/service.rb
index 835e92e4c..590ceed48 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/services/facebook.rb b/app/models/services/facebook.rb
index cb6c83aa6..6414a96fb 100644
--- a/app/models/services/facebook.rb
+++ b/app/models/services/facebook.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Services::Facebook < Service
include Rails.application.routes.url_helpers
diff --git a/app/models/services/tumblr.rb b/app/models/services/tumblr.rb
index 675fe5799..59f93ef79 100644
--- a/app/models/services/tumblr.rb
+++ b/app/models/services/tumblr.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Services::Tumblr < Service
MAX_CHARACTERS = 1000
@@ -35,12 +37,11 @@ class Services::Tumblr < Service
end
def tumblr_template(post, url)
- html = ''
- post.photos.each do |photo|
- html << "})\n\n"
- end
- html << post.message.html(mentioned_people: [])
- html << "\n\n[original post](#{url})"
+ photo_html = post.photos.map {|photo|
+ "})\n\n"
+ }.join
+
+ "#{photo_html}#{post.message.html(mentioned_people: [])}\n\n[original post](#{url})"
end
def post_opts(post)
diff --git a/app/models/services/twitter.rb b/app/models/services/twitter.rb
index 9e9b10863..b14791736 100644
--- a/app/models/services/twitter.rb
+++ b/app/models/services/twitter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Services::Twitter < Service
include Rails.application.routes.url_helpers
diff --git a/app/models/services/wordpress.rb b/app/models/services/wordpress.rb
index 503c79507..6dd29f6a9 100644
--- a/app/models/services/wordpress.rb
+++ b/app/models/services/wordpress.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Services
class Wordpress < Service
MAX_CHARACTERS = 1000
diff --git a/app/models/share_visibility.rb b/app/models/share_visibility.rb
index 18c920a53..6bb6f7de9 100644
--- a/app/models/share_visibility.rb
+++ b/app/models/share_visibility.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/signature_order.rb b/app/models/signature_order.rb
index e65d0fae3..d9b94545c 100644
--- a/app/models/signature_order.rb
+++ b/app/models/signature_order.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class SignatureOrder < ApplicationRecord
validates :order, presence: true, uniqueness: true
end
diff --git a/app/models/status_message.rb b/app/models/status_message.rb
index a0c9d727b..8ea4bbeba 100644
--- a/app/models/status_message.rb
+++ b/app/models/status_message.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/tag_following.rb b/app/models/tag_following.rb
index bd1cb62d2..6a1647922 100644
--- a/app/models/tag_following.rb
+++ b/app/models/tag_following.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class TagFollowing < ApplicationRecord
belongs_to :user
belongs_to :tag, :class_name => "ActsAsTaggableOn::Tag"
diff --git a/app/models/user.rb b/app/models/user.rb
index f57c1626a..308048dfb 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/user/authentication_token.rb b/app/models/user/authentication_token.rb
index ca72950b4..7cee047c5 100644
--- a/app/models/user/authentication_token.rb
+++ b/app/models/user/authentication_token.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class User
module AuthenticationToken
extend ActiveSupport::Concern
diff --git a/app/models/user/connecting.rb b/app/models/user/connecting.rb
index 161fb429a..8b9da90d0 100644
--- a/app/models/user/connecting.rb
+++ b/app/models/user/connecting.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/user/querying.rb b/app/models/user/querying.rb
index 11a3e186c..66dce96ac 100644
--- a/app/models/user/querying.rb
+++ b/app/models/user/querying.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/models/user/social_actions.rb b/app/models/user/social_actions.rb
index d110a81c7..7a5b41f0a 100644
--- a/app/models/user/social_actions.rb
+++ b/app/models/user/social_actions.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module User::SocialActions
def comment!(target, text, opts={})
Comment::Generator.new(self, target, text).create!(opts).tap do
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index 11ba7038d..ef29de6a1 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class UserPreference < ApplicationRecord
belongs_to :user
diff --git a/app/presenters/aspect_membership_presenter.rb b/app/presenters/aspect_membership_presenter.rb
index 28a96e38f..6d19a9099 100644
--- a/app/presenters/aspect_membership_presenter.rb
+++ b/app/presenters/aspect_membership_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AspectMembershipPresenter < BasePresenter
def initialize(membership)
@membership = membership
diff --git a/app/presenters/aspect_presenter.rb b/app/presenters/aspect_presenter.rb
index 881be4b3a..5f2af2050 100644
--- a/app/presenters/aspect_presenter.rb
+++ b/app/presenters/aspect_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AspectPresenter < BasePresenter
def initialize(aspect)
@aspect = aspect
diff --git a/app/presenters/avatar_presenter.rb b/app/presenters/avatar_presenter.rb
index c342769e8..c5ae32b01 100644
--- a/app/presenters/avatar_presenter.rb
+++ b/app/presenters/avatar_presenter.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
class AvatarPresenter < BasePresenter
DEFAULT_IMAGE = ActionController::Base.helpers.image_path("user/default.png")
diff --git a/app/presenters/base_presenter.rb b/app/presenters/base_presenter.rb
index 3c79290e3..5a55d147f 100644
--- a/app/presenters/base_presenter.rb
+++ b/app/presenters/base_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class BasePresenter
attr_reader :current_user
include Rails.application.routes.url_helpers
diff --git a/app/presenters/block_presenter.rb b/app/presenters/block_presenter.rb
index 937d057b6..05af1f44a 100644
--- a/app/presenters/block_presenter.rb
+++ b/app/presenters/block_presenter.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
class BlockPresenter < BasePresenter
def base_hash
{ id: id }
diff --git a/app/presenters/comment_presenter.rb b/app/presenters/comment_presenter.rb
index f687ba7b8..c77f64a34 100644
--- a/app/presenters/comment_presenter.rb
+++ b/app/presenters/comment_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CommentPresenter < BasePresenter
def initialize(comment)
@comment = comment
diff --git a/app/presenters/contact_presenter.rb b/app/presenters/contact_presenter.rb
index ae448bbe9..dba67bf20 100644
--- a/app/presenters/contact_presenter.rb
+++ b/app/presenters/contact_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ContactPresenter < BasePresenter
def base_hash
{ id: id,
diff --git a/app/presenters/last_three_comments_decorator.rb b/app/presenters/last_three_comments_decorator.rb
index 04e1c91b3..9812d11d5 100644
--- a/app/presenters/last_three_comments_decorator.rb
+++ b/app/presenters/last_three_comments_decorator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class LastThreeCommentsDecorator
def initialize(presenter)
@presenter = presenter
diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb
index 1167ab5ea..7b7dcf0b0 100644
--- a/app/presenters/node_info_presenter.rb
+++ b/app/presenters/node_info_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class NodeInfoPresenter
delegate :as_json, :content_type, to: :document
diff --git a/app/presenters/o_embed_presenter.rb b/app/presenters/o_embed_presenter.rb
index 4fe98761d..5e8961460 100644
--- a/app/presenters/o_embed_presenter.rb
+++ b/app/presenters/o_embed_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class OEmbedPresenter
include PostsHelper
diff --git a/app/presenters/person_presenter.rb b/app/presenters/person_presenter.rb
index 1c1cc88a0..bb415cbf7 100644
--- a/app/presenters/person_presenter.rb
+++ b/app/presenters/person_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PersonPresenter < BasePresenter
def base_hash
{
diff --git a/app/presenters/photo_presenter.rb b/app/presenters/photo_presenter.rb
index defed1d9b..b67168ace 100644
--- a/app/presenters/photo_presenter.rb
+++ b/app/presenters/photo_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PhotoPresenter < BasePresenter
def base_hash
{ id: id,
diff --git a/app/presenters/pod_presenter.rb b/app/presenters/pod_presenter.rb
index 7f08b3770..a29859dc7 100644
--- a/app/presenters/pod_presenter.rb
+++ b/app/presenters/pod_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PodPresenter < BasePresenter
def base_hash(*_arg)
{
diff --git a/app/presenters/post_interaction_presenter.rb b/app/presenters/post_interaction_presenter.rb
index 12c999feb..e27f24d3a 100644
--- a/app/presenters/post_interaction_presenter.rb
+++ b/app/presenters/post_interaction_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PostInteractionPresenter
def initialize(post, current_user)
@post = post
diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb
index 7ed18afd3..3aada8fab 100644
--- a/app/presenters/post_presenter.rb
+++ b/app/presenters/post_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PostPresenter < BasePresenter
include PostsHelper
include MetaDataHelper
diff --git a/app/presenters/profile_presenter.rb b/app/presenters/profile_presenter.rb
index d4e38884d..5ee690e4c 100644
--- a/app/presenters/profile_presenter.rb
+++ b/app/presenters/profile_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ProfilePresenter < BasePresenter
include PeopleHelper
diff --git a/app/presenters/service_presenter.rb b/app/presenters/service_presenter.rb
index f44ad8eb7..6a39795c8 100644
--- a/app/presenters/service_presenter.rb
+++ b/app/presenters/service_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ServicePresenter < BasePresenter
def initialize(service)
@service = service
diff --git a/app/presenters/social_relay_presenter.rb b/app/presenters/social_relay_presenter.rb
index 43af94cd1..5b6bf4746 100644
--- a/app/presenters/social_relay_presenter.rb
+++ b/app/presenters/social_relay_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class SocialRelayPresenter
def as_json(*)
{
diff --git a/app/presenters/tag_stream_presenter.rb b/app/presenters/tag_stream_presenter.rb
index 2a3dea229..0f78f01e0 100644
--- a/app/presenters/tag_stream_presenter.rb
+++ b/app/presenters/tag_stream_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class TagStreamPresenter < BasePresenter
def title
@presentable.display_tag_name
diff --git a/app/presenters/user_application_presenter.rb b/app/presenters/user_application_presenter.rb
index 0bc2ea9d4..ee0d170ea 100644
--- a/app/presenters/user_application_presenter.rb
+++ b/app/presenters/user_application_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class UserApplicationPresenter
attr_reader :scopes
diff --git a/app/presenters/user_applications_presenter.rb b/app/presenters/user_applications_presenter.rb
index f04b97394..18855cbbb 100644
--- a/app/presenters/user_applications_presenter.rb
+++ b/app/presenters/user_applications_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class UserApplicationsPresenter
def initialize(user)
@user = user
diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb
index 076734d96..e9b2053a1 100644
--- a/app/presenters/user_presenter.rb
+++ b/app/presenters/user_presenter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class UserPresenter
attr_accessor :user, :aspects_ids
diff --git a/app/serializers/export/aspect_serializer.rb b/app/serializers/export/aspect_serializer.rb
index 5507e516a..ceeef754c 100644
--- a/app/serializers/export/aspect_serializer.rb
+++ b/app/serializers/export/aspect_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
class AspectSerializer < ActiveModel::Serializer
attributes :name,
diff --git a/app/serializers/export/contact_serializer.rb b/app/serializers/export/contact_serializer.rb
index 871486777..d078e0122 100644
--- a/app/serializers/export/contact_serializer.rb
+++ b/app/serializers/export/contact_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
class ContactSerializer < ActiveModel::Serializer
attributes :sharing,
diff --git a/app/serializers/export/others_data_serializer.rb b/app/serializers/export/others_data_serializer.rb
index 96a819c38..fe53579e1 100644
--- a/app/serializers/export/others_data_serializer.rb
+++ b/app/serializers/export/others_data_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
class OthersDataSerializer < ActiveModel::Serializer
# Relayables of other people in the archive: comments, likes, participations, poll participations where author is
diff --git a/app/serializers/export/own_post_serializer.rb b/app/serializers/export/own_post_serializer.rb
index 150ecd427..bea797aaa 100644
--- a/app/serializers/export/own_post_serializer.rb
+++ b/app/serializers/export/own_post_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
# This is a serializer for the user's own posts
class OwnPostSerializer < FederationEntitySerializer
diff --git a/app/serializers/export/own_relayables_serializer.rb b/app/serializers/export/own_relayables_serializer.rb
index a38f83ccf..5f4033aa5 100644
--- a/app/serializers/export/own_relayables_serializer.rb
+++ b/app/serializers/export/own_relayables_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
# This is a serializer for the user's own relayables. We remove signature from the own relayables since it isn't
# useful and takes space.
diff --git a/app/serializers/export/person_metadata_serializer.rb b/app/serializers/export/person_metadata_serializer.rb
index 911062e39..b309a7d12 100644
--- a/app/serializers/export/person_metadata_serializer.rb
+++ b/app/serializers/export/person_metadata_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
class PersonMetadataSerializer < ActiveModel::Serializer
attributes :guid,
diff --git a/app/serializers/export/user_serializer.rb b/app/serializers/export/user_serializer.rb
index 09f26d3bd..c571bdf47 100644
--- a/app/serializers/export/user_serializer.rb
+++ b/app/serializers/export/user_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Export
class UserSerializer < ActiveModel::Serializer
attributes :username,
diff --git a/app/serializers/federation_entity_serializer.rb b/app/serializers/federation_entity_serializer.rb
index 0458fc73b..5bc620171 100644
--- a/app/serializers/federation_entity_serializer.rb
+++ b/app/serializers/federation_entity_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# This is an ActiveModel::Serializer based class which uses DiasporaFederation::Entity JSON serialization
# features in order to serialize local DB objects. To determine a type of entity class to use the same routines
# are used as for federation messages generation.
diff --git a/app/serializers/notification_serializer.rb b/app/serializers/notification_serializer.rb
index c873a9e70..f96a3c164 100644
--- a/app/serializers/notification_serializer.rb
+++ b/app/serializers/notification_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class NotificationSerializer < ActiveModel::Serializer
attributes :id,
:target_type,
diff --git a/app/serializers/serializer_post_processing.rb b/app/serializers/serializer_post_processing.rb
index ea865be8a..c737503f1 100644
--- a/app/serializers/serializer_post_processing.rb
+++ b/app/serializers/serializer_post_processing.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# This module encapsulates knowledge about the way AMS works with the serializable object.
# The main responsibility of this module is to allow changing resulting object just before the
# JSON serialization happens.
diff --git a/app/serializers/user_info_serializer.rb b/app/serializers/user_info_serializer.rb
index 4ef29f3b7..7410d60cf 100644
--- a/app/serializers/user_info_serializer.rb
+++ b/app/serializers/user_info_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class UserInfoSerializer < ActiveModel::Serializer
attributes :sub, :name, :nickname, :profile, :picture
diff --git a/app/services/comment_service.rb b/app/services/comment_service.rb
index 4ec3b8835..4872d9068 100644
--- a/app/services/comment_service.rb
+++ b/app/services/comment_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CommentService
def initialize(user=nil)
@user = user
diff --git a/app/services/like_service.rb b/app/services/like_service.rb
index 411440475..b5623a048 100644
--- a/app/services/like_service.rb
+++ b/app/services/like_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class LikeService
def initialize(user=nil)
@user = user
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index b481f1b4c..92fd979e8 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class NotificationService
NOTIFICATION_TYPES = {
Comment => [Notifications::MentionedInComment, Notifications::CommentOnPost, Notifications::AlsoCommented],
diff --git a/app/services/post_service.rb b/app/services/post_service.rb
index 6d35a385d..a16523125 100644
--- a/app/services/post_service.rb
+++ b/app/services/post_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PostService
def initialize(user=nil)
@user = user
diff --git a/app/services/reshare_service.rb b/app/services/reshare_service.rb
index 01d725647..c4bd94ff6 100644
--- a/app/services/reshare_service.rb
+++ b/app/services/reshare_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ReshareService
def initialize(user=nil)
@user = user
diff --git a/app/services/status_message_creation_service.rb b/app/services/status_message_creation_service.rb
index a262d2e54..a0601d07b 100644
--- a/app/services/status_message_creation_service.rb
+++ b/app/services/status_message_creation_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class StatusMessageCreationService
include Rails.application.routes.url_helpers
diff --git a/app/uploaders/exported_photos.rb b/app/uploaders/exported_photos.rb
index 0e4465cdd..ed46e0667 100644
--- a/app/uploaders/exported_photos.rb
+++ b/app/uploaders/exported_photos.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/uploaders/exported_user.rb b/app/uploaders/exported_user.rb
index f2d309c2b..116a34110 100644
--- a/app/uploaders/exported_user.rb
+++ b/app/uploaders/exported_user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/uploaders/processed_image.rb b/app/uploaders/processed_image.rb
index c75e67bb3..a9cae6216 100644
--- a/app/uploaders/processed_image.rb
+++ b/app/uploaders/processed_image.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/uploaders/secure_uploader.rb b/app/uploaders/secure_uploader.rb
index 08bbed1c7..d5e62e77b 100644
--- a/app/uploaders/secure_uploader.rb
+++ b/app/uploaders/secure_uploader.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class SecureUploader < CarrierWave::Uploader::Base
protected
def secure_token(bytes = 16)
diff --git a/app/uploaders/unprocessed_image.rb b/app/uploaders/unprocessed_image.rb
index 10186dd9b..b662f3b40 100644
--- a/app/uploaders/unprocessed_image.rb
+++ b/app/uploaders/unprocessed_image.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/views/users/public.atom.builder b/app/views/users/public.atom.builder
index 790f6f21a..a8b1d7a99 100644
--- a/app/views/users/public.atom.builder
+++ b/app/views/users/public.atom.builder
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
atom_feed("xmlns:thr" => "http://purl.org/syndication/thread/1.0",
"xmlns:georss" => "http://www.georss.org/georss",
"xmlns:activity" => "http://activitystrea.ms/spec/1.0/",
diff --git a/app/workers/base.rb b/app/workers/base.rb
index 874261e23..5d83392ca 100644
--- a/app/workers/base.rb
+++ b/app/workers/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/clean_cached_files.rb b/app/workers/clean_cached_files.rb
index ddf2e93d3..585aee30c 100644
--- a/app/workers/clean_cached_files.rb
+++ b/app/workers/clean_cached_files.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class CleanCachedFiles < Base
sidekiq_options queue: :low
diff --git a/app/workers/deferred_dispatch.rb b/app/workers/deferred_dispatch.rb
index 3c60ade93..24d2eb108 100644
--- a/app/workers/deferred_dispatch.rb
+++ b/app/workers/deferred_dispatch.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/deferred_retraction.rb b/app/workers/deferred_retraction.rb
index 85ee2c1ab..d8a3220fd 100644
--- a/app/workers/deferred_retraction.rb
+++ b/app/workers/deferred_retraction.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/delete_account.rb b/app/workers/delete_account.rb
index e3aa95eff..677e14561 100644
--- a/app/workers/delete_account.rb
+++ b/app/workers/delete_account.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/delete_post_from_service.rb b/app/workers/delete_post_from_service.rb
index 33b841f6a..c97a7c077 100644
--- a/app/workers/delete_post_from_service.rb
+++ b/app/workers/delete_post_from_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/export_photos.rb b/app/workers/export_photos.rb
index 3d036462a..2fe4c007f 100644
--- a/app/workers/export_photos.rb
+++ b/app/workers/export_photos.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/export_user.rb b/app/workers/export_user.rb
index 26fadc1fb..b73535d17 100644
--- a/app/workers/export_user.rb
+++ b/app/workers/export_user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/fetch_profile_photo.rb b/app/workers/fetch_profile_photo.rb
index 8eb370ecb..2a5fc0ba9 100644
--- a/app/workers/fetch_profile_photo.rb
+++ b/app/workers/fetch_profile_photo.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/fetch_public_posts.rb b/app/workers/fetch_public_posts.rb
index 228efe81e..c7cb888b6 100644
--- a/app/workers/fetch_public_posts.rb
+++ b/app/workers/fetch_public_posts.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/fetch_webfinger.rb b/app/workers/fetch_webfinger.rb
index 182304ef8..d2f00b0dc 100644
--- a/app/workers/fetch_webfinger.rb
+++ b/app/workers/fetch_webfinger.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/gather_o_embed_data.rb b/app/workers/gather_o_embed_data.rb
index e6eb695b2..3ddfd350b 100644
--- a/app/workers/gather_o_embed_data.rb
+++ b/app/workers/gather_o_embed_data.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/gather_open_graph_data.rb b/app/workers/gather_open_graph_data.rb
index f962e0411..a82802beb 100644
--- a/app/workers/gather_open_graph_data.rb
+++ b/app/workers/gather_open_graph_data.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/mail/also_commented.rb b/app/workers/mail/also_commented.rb
index 05a1ef105..25b88d602 100644
--- a/app/workers/mail/also_commented.rb
+++ b/app/workers/mail/also_commented.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class AlsoCommented < NotifierBase
diff --git a/app/workers/mail/comment_on_post.rb b/app/workers/mail/comment_on_post.rb
index 168b75237..47d371ccd 100644
--- a/app/workers/mail/comment_on_post.rb
+++ b/app/workers/mail/comment_on_post.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class CommentOnPost < NotifierBase
diff --git a/app/workers/mail/confirm_email.rb b/app/workers/mail/confirm_email.rb
index efa9fb64e..a69518853 100644
--- a/app/workers/mail/confirm_email.rb
+++ b/app/workers/mail/confirm_email.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class ConfirmEmail < NotifierBase
diff --git a/app/workers/mail/csrf_token_fail.rb b/app/workers/mail/csrf_token_fail.rb
index f9679b8c3..2512f1c64 100644
--- a/app/workers/mail/csrf_token_fail.rb
+++ b/app/workers/mail/csrf_token_fail.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class CsrfTokenFail < NotifierBase
diff --git a/app/workers/mail/invite_email.rb b/app/workers/mail/invite_email.rb
index 0b18841d9..698d16b26 100644
--- a/app/workers/mail/invite_email.rb
+++ b/app/workers/mail/invite_email.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/mail/liked.rb b/app/workers/mail/liked.rb
index 16471a542..8d5ca0db2 100644
--- a/app/workers/mail/liked.rb
+++ b/app/workers/mail/liked.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class Liked < NotifierBase
diff --git a/app/workers/mail/mentioned.rb b/app/workers/mail/mentioned.rb
index 4ae477d54..0f12831f2 100644
--- a/app/workers/mail/mentioned.rb
+++ b/app/workers/mail/mentioned.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/mail/mentioned_in_comment.rb b/app/workers/mail/mentioned_in_comment.rb
index 5e8d7f91f..fa352c0df 100644
--- a/app/workers/mail/mentioned_in_comment.rb
+++ b/app/workers/mail/mentioned_in_comment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class MentionedInComment < NotifierBase
diff --git a/app/workers/mail/notifier_base.rb b/app/workers/mail/notifier_base.rb
index 72cb4acb8..8e9924a0f 100644
--- a/app/workers/mail/notifier_base.rb
+++ b/app/workers/mail/notifier_base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class NotifierBase < Base
diff --git a/app/workers/mail/private_message.rb b/app/workers/mail/private_message.rb
index b851bfed0..dd9db64a1 100644
--- a/app/workers/mail/private_message.rb
+++ b/app/workers/mail/private_message.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/mail/report_worker.rb b/app/workers/mail/report_worker.rb
index 8139266e6..101a3b2b8 100644
--- a/app/workers/mail/report_worker.rb
+++ b/app/workers/mail/report_worker.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class ReportWorker < Base
diff --git a/app/workers/mail/reshared.rb b/app/workers/mail/reshared.rb
index 7e434788d..4ddff8329 100644
--- a/app/workers/mail/reshared.rb
+++ b/app/workers/mail/reshared.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
module Mail
class Reshared < NotifierBase
diff --git a/app/workers/mail/started_sharing.rb b/app/workers/mail/started_sharing.rb
index ef101060c..d0a4c9d9d 100644
--- a/app/workers/mail/started_sharing.rb
+++ b/app/workers/mail/started_sharing.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/post_to_service.rb b/app/workers/post_to_service.rb
index 933913663..8b3d84507 100644
--- a/app/workers/post_to_service.rb
+++ b/app/workers/post_to_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/process_photo.rb b/app/workers/process_photo.rb
index 1686c5202..41ef597d2 100644
--- a/app/workers/process_photo.rb
+++ b/app/workers/process_photo.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/publish_to_hub.rb b/app/workers/publish_to_hub.rb
index 7d33daeba..d3fcff747 100644
--- a/app/workers/publish_to_hub.rb
+++ b/app/workers/publish_to_hub.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/queue_users_for_removal.rb b/app/workers/queue_users_for_removal.rb
index 87c720b30..9df013966 100644
--- a/app/workers/queue_users_for_removal.rb
+++ b/app/workers/queue_users_for_removal.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/receive_base.rb b/app/workers/receive_base.rb
index c49dd7c8c..4654c28a9 100644
--- a/app/workers/receive_base.rb
+++ b/app/workers/receive_base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class ReceiveBase < Base
sidekiq_options queue: :urgent
diff --git a/app/workers/receive_local.rb b/app/workers/receive_local.rb
index a93332979..6bc9c7a56 100644
--- a/app/workers/receive_local.rb
+++ b/app/workers/receive_local.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class ReceiveLocal < Base
sidekiq_options queue: :high
diff --git a/app/workers/receive_private.rb b/app/workers/receive_private.rb
index bd78b06b5..18534d6f9 100644
--- a/app/workers/receive_private.rb
+++ b/app/workers/receive_private.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/receive_public.rb b/app/workers/receive_public.rb
index 3ec918d2d..23c1f72c2 100644
--- a/app/workers/receive_public.rb
+++ b/app/workers/receive_public.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/recheck_scheduled_pods.rb b/app/workers/recheck_scheduled_pods.rb
index 8ca2be921..7156c8669 100644
--- a/app/workers/recheck_scheduled_pods.rb
+++ b/app/workers/recheck_scheduled_pods.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class RecheckScheduledPods < Base
sidekiq_options queue: :low
diff --git a/app/workers/recurring_pod_check.rb b/app/workers/recurring_pod_check.rb
index f6ed65700..90551eae6 100644
--- a/app/workers/recurring_pod_check.rb
+++ b/app/workers/recurring_pod_check.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class RecurringPodCheck < Base
sidekiq_options queue: :low
diff --git a/app/workers/remove_old_user.rb b/app/workers/remove_old_user.rb
index 444857ec2..825ff16a7 100644
--- a/app/workers/remove_old_user.rb
+++ b/app/workers/remove_old_user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/app/workers/reset_password.rb b/app/workers/reset_password.rb
index 9fdd06bbb..71042de50 100644
--- a/app/workers/reset_password.rb
+++ b/app/workers/reset_password.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class ResetPassword < Base
sidekiq_options queue: :urgent
diff --git a/app/workers/send_base.rb b/app/workers/send_base.rb
index 9da921e37..4e292de9b 100644
--- a/app/workers/send_base.rb
+++ b/app/workers/send_base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class SendBase < Base
sidekiq_options queue: :medium, retry: 0
diff --git a/app/workers/send_private.rb b/app/workers/send_private.rb
index 8f87d6b51..1b886b006 100644
--- a/app/workers/send_private.rb
+++ b/app/workers/send_private.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class SendPrivate < SendBase
def perform(sender_id, obj_str, targets, retry_count=0)
diff --git a/app/workers/send_public.rb b/app/workers/send_public.rb
index 5022eac6f..e93a41f59 100644
--- a/app/workers/send_public.rb
+++ b/app/workers/send_public.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Workers
class SendPublic < SendBase
def perform(sender_id, obj_str, urls, xml, retry_count=0)
diff --git a/config.ru b/config.ru
index a43a2f394..adee85194 100644
--- a/config.ru
+++ b/config.ru
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/application.rb b/config/application.rb
index fc7d90232..f40f6b369 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require_relative 'boot'
require 'rails/all'
diff --git a/config/asset_sync.rb b/config/asset_sync.rb
index ecfa36dae..533a1de97 100644
--- a/config/asset_sync.rb
+++ b/config/asset_sync.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if AppConfig.environment.assets.upload? && AppConfig.environment.s3.enable?
# Monkey patch to make Rails.root available early
require 'pathname'
diff --git a/config/boot.rb b/config/boot.rb
index e9f0721fe..dcd2d28d5 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup" # Set up gems listed in the Gemfile.
diff --git a/config/environment.rb b/config/environment.rb
index 426333bb4..d5abe5580 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Load the Rails application.
require_relative 'application'
diff --git a/config/environments/development.rb b/config/environments/development.rb
index f422f016e..ea9b17981 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
diff --git a/config/environments/integration.rb b/config/environments/integration.rb
index 0fc42e916..1d9e034e2 100644
--- a/config/environments/integration.rb
+++ b/config/environments/integration.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('config', 'environment', 'development')
Diaspora::Application.configure do
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 65d1bc1de..ba2422b29 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
diff --git a/config/environments/test.rb b/config/environments/test.rb
index d9d87dbd0..988cf7044 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
diff --git a/config/eye.rb b/config/eye.rb
index fbc166709..a7d54e308 100644
--- a/config/eye.rb
+++ b/config/eye.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require_relative "load_config"
rails_env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
diff --git a/config/initializers/acts_as_taggable_on.rb b/config/initializers/acts_as_taggable_on.rb
index 5248c33ef..de8bfc5aa 100644
--- a/config/initializers/acts_as_taggable_on.rb
+++ b/config/initializers/acts_as_taggable_on.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
require 'models/acts_as_taggable_on-tag'
ActsAsTaggableOn.force_lowercase = true
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb
index 51639b67a..315ac48a9 100644
--- a/config/initializers/application_controller_renderer.rb
+++ b/config/initializers/application_controller_renderer.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
diff --git a/config/initializers/asset_sync.rb b/config/initializers/asset_sync.rb
index 5686d12e2..cd681ed63 100644
--- a/config/initializers/asset_sync.rb
+++ b/config/initializers/asset_sync.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if defined? AssetSync
AssetSync.configure do |config|
config.enabled = true
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index 33e369e29..0874787e3 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
# bootstrap-markdown plugin relies on rails-assets-bootstrap gem but we use
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
index 59385cdf3..d0f0d3b5d 100644
--- a/config/initializers/backtrace_silencers.rb
+++ b/config/initializers/backtrace_silencers.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index dd63980ae..3b0119590 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/color_themes.rb b/config/initializers/color_themes.rb
index ae4757610..7cabdba64 100644
--- a/config/initializers/color_themes.rb
+++ b/config/initializers/color_themes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Generate the path to the .yml file with the available color themes.
color_themes_file = Rails.root.join("config/color_themes.yml")
# Check in case config/color_themes.yml does not exist.
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index 1389e86a3..20a704ae1 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb
index 0fccba3fe..7330c5903 100644
--- a/config/initializers/cors.rb
+++ b/config/initializers/cors.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
# Avoid CORS issues when API is called from the frontend app.
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 3698e2373..bdd334b26 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/diaspora_federation.rb b/config/initializers/diaspora_federation.rb
index e9270d469..cc0c9f215 100644
--- a/config/initializers/diaspora_federation.rb
+++ b/config/initializers/diaspora_federation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# configure the federation engine
DiasporaFederation.configure do |config|
# the pod url
diff --git a/config/initializers/enforce_ssl.rb b/config/initializers/enforce_ssl.rb
index 65a9951c1..cb306a2a5 100644
--- a/config/initializers/enforce_ssl.rb
+++ b/config/initializers/enforce_ssl.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/entypo.rb b/config/initializers/entypo.rb
index 0c99a40ee..1a0fa5221 100644
--- a/config/initializers/entypo.rb
+++ b/config/initializers/entypo.rb
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
Entypo.css_prefix = "entypo"
diff --git a/config/initializers/faraday.rb b/config/initializers/faraday.rb
index a1f57bb21..a54963221 100644
--- a/config/initializers/faraday.rb
+++ b/config/initializers/faraday.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
index 9d07a384f..2a915d470 100644
--- a/config/initializers/filter_parameter_logging.rb
+++ b/config/initializers/filter_parameter_logging.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
diff --git a/config/initializers/haml.rb b/config/initializers/haml.rb
index 0eacbe0d5..5bfe329b0 100644
--- a/config/initializers/haml.rb
+++ b/config/initializers/haml.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
Hamlit::Engine.options[:format] = :html
Hamlit::Engine.options[:escape_html] = true
diff --git a/config/initializers/handlebars_assets.rb b/config/initializers/handlebars_assets.rb
index 94bf58554..a25783311 100644
--- a/config/initializers/handlebars_assets.rb
+++ b/config/initializers/handlebars_assets.rb
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
HandlebarsAssets::Config.options = {preventIndent: true}
diff --git a/config/initializers/ignore_ssl_in_development.rb b/config/initializers/ignore_ssl_in_development.rb
index 9ec8a2d9c..fb4501e2f 100644
--- a/config/initializers/ignore_ssl_in_development.rb
+++ b/config/initializers/ignore_ssl_in_development.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index ac033bf9d..aa7435fbc 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
diff --git a/config/initializers/json_escape.rb b/config/initializers/json_escape.rb
index 0a5ee2b6e..3570c7273 100644
--- a/config/initializers/json_escape.rb
+++ b/config/initializers/json_escape.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# From http://jfire.io/blog/2012/04/30/how-to-securely-bootstrap-json-in-a-rails-view/
# Remove on Rails 4.1 update
diff --git a/config/initializers/jsroutes.rb b/config/initializers/jsroutes.rb
index 64ee94599..e82bf7125 100644
--- a/config/initializers/jsroutes.rb
+++ b/config/initializers/jsroutes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
JsRoutes.setup do |config|
config.camel_case = true
config.compact = true
diff --git a/config/initializers/load_analyitics.rb b/config/initializers/load_analyitics.rb
index 5663b0901..602560675 100644
--- a/config/initializers/load_analyitics.rb
+++ b/config/initializers/load_analyitics.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/load_libraries.rb b/config/initializers/load_libraries.rb
index 315ac3dab..b83fd863b 100644
--- a/config/initializers/load_libraries.rb
+++ b/config/initializers/load_libraries.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Stdlib
require 'cgi'
require 'uri'
diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb
index 725de6f71..cbc3641e3 100644
--- a/config/initializers/locale.rb
+++ b/config/initializers/locale.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/mailer_config.rb b/config/initializers/mailer_config.rb
index 8cfb5e9b3..e2335075b 100644
--- a/config/initializers/mailer_config.rb
+++ b/config/initializers/mailer_config.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/maintenance.rb b/config/initializers/maintenance.rb
index 76bc58aae..824d65ab7 100644
--- a/config/initializers/maintenance.rb
+++ b/config/initializers/maintenance.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/markerb.rb b/config/initializers/markerb.rb
index a7cccced2..a39d0cbee 100644
--- a/config/initializers/markerb.rb
+++ b/config/initializers/markerb.rb
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
Rails.application.config.markerb.renderer = Diaspora::Markdownify::Email
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index dc1899682..6e1d16f02 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
diff --git a/config/initializers/oembed.rb b/config/initializers/oembed.rb
index e8334cdad..8edff537a 100644
--- a/config/initializers/oembed.rb
+++ b/config/initializers/oembed.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'oembed'
require 'uri'
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index 3321cf370..8555c0e82 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/open_graph_reader.rb b/config/initializers/open_graph_reader.rb
index 182dd4bdb..27da867b2 100644
--- a/config/initializers/open_graph_reader.rb
+++ b/config/initializers/open_graph_reader.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
OpenGraphReader.configure do |config|
config.synthesize_title = true
config.synthesize_url = true
diff --git a/config/initializers/patch_openssl_pkey.rb b/config/initializers/patch_openssl_pkey.rb
index 22c190ba4..9e1d2be05 100644
--- a/config/initializers/patch_openssl_pkey.rb
+++ b/config/initializers/patch_openssl_pkey.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/prosody.rb b/config/initializers/prosody.rb
index 093dd4924..df179e5c0 100644
--- a/config/initializers/prosody.rb
+++ b/config/initializers/prosody.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if AppConfig.chat.enabled? && AppConfig.chat.server.enabled?
db = Rails.application.config
.database_configuration[Rails.env]
diff --git a/config/initializers/rspec_generator.rb b/config/initializers/rspec_generator.rb
index d1f1a5322..68f73e27b 100644
--- a/config/initializers/rspec_generator.rb
+++ b/config/initializers/rspec_generator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb
index d2b44fb9f..cf3edbb70 100644
--- a/config/initializers/secure_headers.rb
+++ b/config/initializers/secure_headers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
SecureHeaders::Configuration.default do |config|
config.hsts = SecureHeaders::OPT_OUT # added by Rack::SSL
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index 06360f9d2..fd4d660e2 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
Diaspora::Application.config.session_store :cookie_store, key: "_diaspora_session", httponly: true
diff --git a/config/initializers/set_session_secret.rb b/config/initializers/set_session_secret.rb
index 1896d44be..57304735f 100644
--- a/config/initializers/set_session_secret.rb
+++ b/config/initializers/set_session_secret.rb
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
Rails.application.config.secret_token = AppConfig.secret_token
diff --git a/config/initializers/set_up_image_redirects.rb b/config/initializers/set_up_image_redirects.rb
index 9da80f009..be4d77a43 100644
--- a/config/initializers/set_up_image_redirects.rb
+++ b/config/initializers/set_up_image_redirects.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if AppConfig.environment.image_redirect_url.present?
require 'rack-rewrite'
diff --git a/config/initializers/setup_simple_captcha.rb b/config/initializers/setup_simple_captcha.rb
index a79b48d45..61f17f6c3 100644
--- a/config/initializers/setup_simple_captcha.rb
+++ b/config/initializers/setup_simple_captcha.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
SimpleCaptcha.setup do |sc|
sc.image_size = AppConfig.settings.captcha.image_size
sc.length = [1, [AppConfig.settings.captcha.captcha_length.to_i, 12].min].max
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index fa5ed372d..50e2e07da 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'sidekiq_middlewares'
require 'sidekiq/middleware/i18n'
diff --git a/config/initializers/version_header.rb b/config/initializers/version_header.rb
index 9d3eaf294..62e653f69 100644
--- a/config/initializers/version_header.rb
+++ b/config/initializers/version_header.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/initializers/will_paginate.rb b/config/initializers/will_paginate.rb
index 8922b88b2..f48c76cbd 100644
--- a/config/initializers/will_paginate.rb
+++ b/config/initializers/will_paginate.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'will_paginate/array'
# Optional for Bootstrap :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
index c72a96765..8447298ad 100644
--- a/config/initializers/wrap_parameters.rb
+++ b/config/initializers/wrap_parameters.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
diff --git a/config/load_config.rb b/config/load_config.rb
index e02deb90d..aa9c37f0a 100644
--- a/config/load_config.rb
+++ b/config/load_config.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "pathname"
require "bundler/setup"
require "configurate"
diff --git a/config/locales/cldr/plurals.rb b/config/locales/cldr/plurals.rb
index 6bb223c68..009b14d97 100644
--- a/config/locales/cldr/plurals.rb
+++ b/config/locales/cldr/plurals.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
{
:ar => {:i18n => {:plural => {:keys => [:zero, :one, :two, :few, :many, :other],:rule => ->(input) { to_num = ->(str) { str.include?('.') ? str.to_f : str.to_i }; _n = ->(str) { str.gsub(/(-)(.*)/, '\2') }; _i = ->(str) { _n.(str).gsub(/([\d]+)(\..*)/, '\1') }; _f = ->(str) { _n.(str).gsub(/([\d]+\.?)(.*)/, '\2') }; _t = ->(str) { _f.(str).gsub(/([0]+\z)/, '') }; _v = ->(str) { _f.(str).length.to_s }; _w = ->(str) { _t.(str).length.to_s }; __n = ->(str) { to_num.(str.include?('.') ? _n.(str).gsub(/([0]+\z)/, '').chomp('.') : _n.(str)) }; __i = ->(str) { to_num.(_i.(str)) }; __f = ->(str) { to_num.(_f.(str)) }; __t = ->(str) { to_num.(_t.(str)) }; __v = ->(str) { to_num.(_v.(str)) }; __w = ->(str) { to_num.(_w.(str)) }; num = input.to_s; n = __n.(num); i = __i.(num); v = __v.(num); w = __w.(num); f = __f.(num); t = __t.(num); (n == 0 ? :zero : (n == 1 ? :one : (n == 2 ? :two : ((3..10).include?(n % 100) ? :few : ((11..99).include?(n % 100) ? :many : :other))))) },:js_rule => "(function(input) { var runtime = (function(){return this.buildArgsFor=function(t){return[this.n(t),this.i(t),this.f(t),this.t(t),this.v(t),this.w(t)]},this.n=function(t){return this.toNum(t.indexOf(\".\")>-1?this._n(t).replace(/([0]+\\.$)/,\"\"):this._n(t))},this.i=function(t){return this.toNum(this._i(t))},this.f=function(t){return this.toNum(this._f(t))},this.t=function(t){return this.toNum(this._t(t))},this.v=function(t){return this.toNum(this._v(t))},this.w=function(t){return this.toNum(this._w(t))},this.toNum=function(t){return 0==t.length?0:t.indexOf(\".\")>-1?parseFloat(t):parseInt(t)},this._n=function(t){return/(-)?(.*)/.exec(t)[2]},this._i=function(t){return/([\\d]+)(\\..*)?/.exec(this._n(t))[1]},this._f=function(t){return/([\\d]+\\.?)(.*)/.exec(this._n(t))[2]},this._t=function(t){return this._f(t).replace(/([0]+$)/,\"\")},this._v=function(t){return this._f(t).length.toString()},this._w=function(t){return this._t(t).length.toString()},this}).call({}); var num = input.toString(); var n = runtime.n(num); var i = runtime.i(num); var v = runtime.v(num); var w = runtime.w(num); var f = runtime.f(num); var t = runtime.t(num); return (n == 0 ? 'zero' : (n == 1 ? 'one' : (n == 2 ? 'two' : (((n % 100 >= 3) && (n % 100 <= 10)) ? 'few' : (((n % 100 >= 11) && (n % 100 <= 99)) ? 'many' : 'other'))))); })"}}},
:bg => {:i18n => {:plural => {:keys => [:one, :other],:rule => ->(input) { to_num = ->(str) { str.include?('.') ? str.to_f : str.to_i }; _n = ->(str) { str.gsub(/(-)(.*)/, '\2') }; _i = ->(str) { _n.(str).gsub(/([\d]+)(\..*)/, '\1') }; _f = ->(str) { _n.(str).gsub(/([\d]+\.?)(.*)/, '\2') }; _t = ->(str) { _f.(str).gsub(/([0]+\z)/, '') }; _v = ->(str) { _f.(str).length.to_s }; _w = ->(str) { _t.(str).length.to_s }; __n = ->(str) { to_num.(str.include?('.') ? _n.(str).gsub(/([0]+\z)/, '').chomp('.') : _n.(str)) }; __i = ->(str) { to_num.(_i.(str)) }; __f = ->(str) { to_num.(_f.(str)) }; __t = ->(str) { to_num.(_t.(str)) }; __v = ->(str) { to_num.(_v.(str)) }; __w = ->(str) { to_num.(_w.(str)) }; num = input.to_s; n = __n.(num); i = __i.(num); v = __v.(num); w = __w.(num); f = __f.(num); t = __t.(num); (n == 1 ? :one : :other) },:js_rule => "(function(input) { var runtime = (function(){return this.buildArgsFor=function(t){return[this.n(t),this.i(t),this.f(t),this.t(t),this.v(t),this.w(t)]},this.n=function(t){return this.toNum(t.indexOf(\".\")>-1?this._n(t).replace(/([0]+\\.$)/,\"\"):this._n(t))},this.i=function(t){return this.toNum(this._i(t))},this.f=function(t){return this.toNum(this._f(t))},this.t=function(t){return this.toNum(this._t(t))},this.v=function(t){return this.toNum(this._v(t))},this.w=function(t){return this.toNum(this._w(t))},this.toNum=function(t){return 0==t.length?0:t.indexOf(\".\")>-1?parseFloat(t):parseInt(t)},this._n=function(t){return/(-)?(.*)/.exec(t)[2]},this._i=function(t){return/([\\d]+)(\\..*)?/.exec(this._n(t))[1]},this._f=function(t){return/([\\d]+\\.?)(.*)/.exec(this._n(t))[2]},this._t=function(t){return this._f(t).replace(/([0]+$)/,\"\")},this._v=function(t){return this._f(t).length.toString()},this._w=function(t){return this._t(t).length.toString()},this}).call({}); var num = input.toString(); var n = runtime.n(num); var i = runtime.i(num); var v = runtime.v(num); var w = runtime.w(num); var f = runtime.f(num); var t = runtime.t(num); return (n == 1 ? 'one' : 'other'); })"}}},
diff --git a/config/logging.rb b/config/logging.rb
index 230ea8117..60ab999df 100644
--- a/config/logging.rb
+++ b/config/logging.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Logging::Rails.configure do |config|
# Configure the Logging framework with the default log levels
Logging.init %w(debug info warn error fatal)
diff --git a/config/routes.rb b/config/routes.rb
index 82d9afc91..28ca010f6 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/config/spring.rb b/config/spring.rb
index 0598e88c3..650a73ca0 100644
--- a/config/spring.rb
+++ b/config/spring.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
%w[
.ruby-version
.rbenv-vars
diff --git a/config/unicorn.rb b/config/unicorn.rb
index 078797201..57c038546 100644
--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require_relative "load_config"
port = ENV["PORT"]
diff --git a/db/migrate/0000_create_schema.rb b/db/migrate/0000_create_schema.rb
index a151b508d..e73953360 100644
--- a/db/migrate/0000_create_schema.rb
+++ b/db/migrate/0000_create_schema.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CreateSchema < ActiveRecord::Migration[4.2]
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/LineLength, Layout/ExtraSpacing
def up
diff --git a/db/migrate/20160829170244_add_post_default_to_aspects.rb b/db/migrate/20160829170244_add_post_default_to_aspects.rb
index e86193346..364c48a54 100644
--- a/db/migrate/20160829170244_add_post_default_to_aspects.rb
+++ b/db/migrate/20160829170244_add_post_default_to_aspects.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AddPostDefaultToAspects < ActiveRecord::Migration[4.2]
def change
add_column :aspects, :post_default, :boolean, default: true
diff --git a/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb b/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb
index eb123a6b3..382891aa8 100644
--- a/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb
+++ b/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AddVideoUrlToOpenGraphCache < ActiveRecord::Migration[4.2]
def change
add_column :open_graph_caches, :video_url, :text
diff --git a/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb b/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb
index 27a7feecf..5bd31acd5 100644
--- a/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb
+++ b/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RemoveInvalidUnconfirmedEmails < ActiveRecord::Migration[4.2]
class User < ApplicationRecord
end
diff --git a/db/migrate/20160906225138_fix_photos_share_visibilities.rb b/db/migrate/20160906225138_fix_photos_share_visibilities.rb
index ff382a7d5..6bfb39fc9 100644
--- a/db/migrate/20160906225138_fix_photos_share_visibilities.rb
+++ b/db/migrate/20160906225138_fix_photos_share_visibilities.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class FixPhotosShareVisibilities < ActiveRecord::Migration[4.2]
class Photo < ApplicationRecord
end
diff --git a/db/migrate/20161015174300_remove_empty_pod.rb b/db/migrate/20161015174300_remove_empty_pod.rb
index ba7369bc1..a76dbb0bd 100644
--- a/db/migrate/20161015174300_remove_empty_pod.rb
+++ b/db/migrate/20161015174300_remove_empty_pod.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RemoveEmptyPod < ActiveRecord::Migration[4.2]
def up
Pod.where("host IS NULL").delete_all
diff --git a/db/migrate/20161024231443_add_scheduled_check_to_pod.rb b/db/migrate/20161024231443_add_scheduled_check_to_pod.rb
index b080564b7..578541107 100644
--- a/db/migrate/20161024231443_add_scheduled_check_to_pod.rb
+++ b/db/migrate/20161024231443_add_scheduled_check_to_pod.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AddScheduledCheckToPod < ActiveRecord::Migration[4.2]
def change
add_column :pods, :scheduled_check, :boolean, default: false, null: false
diff --git a/db/migrate/20161107100840_polymorphic_mentions.rb b/db/migrate/20161107100840_polymorphic_mentions.rb
index 99f65d822..01729ffac 100644
--- a/db/migrate/20161107100840_polymorphic_mentions.rb
+++ b/db/migrate/20161107100840_polymorphic_mentions.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PolymorphicMentions < ActiveRecord::Migration[4.2]
def change
remove_index :mentions, column: %i(post_id)
diff --git a/db/migrate/20170430022507_remove_message_signature.rb b/db/migrate/20170430022507_remove_message_signature.rb
index a8e65c2e0..17df78836 100644
--- a/db/migrate/20170430022507_remove_message_signature.rb
+++ b/db/migrate/20170430022507_remove_message_signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RemoveMessageSignature < ActiveRecord::Migration[4.2]
def change
remove_column :messages, :author_signature, :text
diff --git a/db/migrate/20170730154117_create_account_migrations.rb b/db/migrate/20170730154117_create_account_migrations.rb
index b01eadbc6..7b430d6a1 100644
--- a/db/migrate/20170730154117_create_account_migrations.rb
+++ b/db/migrate/20170730154117_create_account_migrations.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CreateAccountMigrations < ActiveRecord::Migration[5.1]
def change
create_table :account_migrations do |t|
diff --git a/db/migrate/20170813141631_cleanup_account_deletions_and_add_unique_index.rb b/db/migrate/20170813141631_cleanup_account_deletions_and_add_unique_index.rb
index 6d188278d..619cff1b7 100644
--- a/db/migrate/20170813141631_cleanup_account_deletions_and_add_unique_index.rb
+++ b/db/migrate/20170813141631_cleanup_account_deletions_and_add_unique_index.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CleanupAccountDeletionsAndAddUniqueIndex < ActiveRecord::Migration[5.1]
def up
remove_column :account_deletions, :diaspora_handle
diff --git a/db/migrate/20170813153048_add_missing_indexes.rb b/db/migrate/20170813153048_add_missing_indexes.rb
index 9da177a30..f43c8f46e 100644
--- a/db/migrate/20170813153048_add_missing_indexes.rb
+++ b/db/migrate/20170813153048_add_missing_indexes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AddMissingIndexes < ActiveRecord::Migration[5.1]
def change
add_index :photos, :author_id
diff --git a/db/migrate/20170813160104_cleanup_aspects_and_add_unique_index.rb b/db/migrate/20170813160104_cleanup_aspects_and_add_unique_index.rb
index 324f43a09..1d8c7325a 100644
--- a/db/migrate/20170813160104_cleanup_aspects_and_add_unique_index.rb
+++ b/db/migrate/20170813160104_cleanup_aspects_and_add_unique_index.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CleanupAspectsAndAddUniqueIndex < ActiveRecord::Migration[5.1]
class Aspect < ApplicationRecord
end
diff --git a/db/migrate/20170813164435_add_missing_unique_indexes.rb b/db/migrate/20170813164435_add_missing_unique_indexes.rb
index 4c853fbf1..7626bac5e 100644
--- a/db/migrate/20170813164435_add_missing_unique_indexes.rb
+++ b/db/migrate/20170813164435_add_missing_unique_indexes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class AddMissingUniqueIndexes < ActiveRecord::Migration[5.1]
def up
cleanup
diff --git a/db/migrate/20170813222333_reset_export_states.rb b/db/migrate/20170813222333_reset_export_states.rb
index 12a7e5789..122861d3a 100644
--- a/db/migrate/20170813222333_reset_export_states.rb
+++ b/db/migrate/20170813222333_reset_export_states.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ResetExportStates < ActiveRecord::Migration[5.1]
class User < ApplicationRecord
end
diff --git a/db/migrate/20170824202628_cleanup_root_guids_from_reshares.rb b/db/migrate/20170824202628_cleanup_root_guids_from_reshares.rb
index 7a93cca9d..bc0ff10a7 100644
--- a/db/migrate/20170824202628_cleanup_root_guids_from_reshares.rb
+++ b/db/migrate/20170824202628_cleanup_root_guids_from_reshares.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class CleanupRootGuidsFromReshares < ActiveRecord::Migration[5.1]
def up
# rubocop:disable Rails/SkipsModelValidations
diff --git a/db/migrate/20170827222357_remove_rails_admin_histories.rb b/db/migrate/20170827222357_remove_rails_admin_histories.rb
new file mode 100644
index 000000000..7c914cb8b
--- /dev/null
+++ b/db/migrate/20170827222357_remove_rails_admin_histories.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class RemoveRailsAdminHistories < ActiveRecord::Migration[5.1]
+ def up
+ drop_table :rails_admin_histories
+ end
+
+ def down
+ create_table :rails_admin_histories do |t|
+ t.text :message
+ t.string :username
+ t.integer :item
+ t.string :table
+ t.integer :month, limit: 2
+ t.integer :year, limit: 8
+ t.datetime :created_at, null: false
+ t.datetime :updated_at, null: false
+ end
+
+ add_index :rails_admin_histories, %i[item table month year], name: :index_rails_admin_histories,
+ length: {table: 188}
+ end
+end
diff --git a/features/step_definitions/aspects_steps.rb b/features/step_definitions/aspects_steps.rb
index d7c981479..a5a61b3b3 100644
--- a/features/step_definitions/aspects_steps.rb
+++ b/features/step_definitions/aspects_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module AspectCukeHelpers
def click_aspect_dropdown
find(".aspect-dropdown .dropdown-toggle").trigger "click"
diff --git a/features/step_definitions/auth_code_steps.rb b/features/step_definitions/auth_code_steps.rb
index 0e3cb9616..723b913cb 100644
--- a/features/step_definitions/auth_code_steps.rb
+++ b/features/step_definitions/auth_code_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
O_AUTH_QUERY_PARAMS_WITH_CODE = {
redirect_uri: "http://example.org/",
response_type: "code",
diff --git a/features/step_definitions/comment_steps.rb b/features/step_definitions/comment_steps.rb
index cc79cae7b..9a8ad9eeb 100644
--- a/features/step_definitions/comment_steps.rb
+++ b/features/step_definitions/comment_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I focus the comment field$/ do
focus_comment_box
end
diff --git a/features/step_definitions/conversations_steps.rb b/features/step_definitions/conversations_steps.rb
index ea076b30e..ac4f5e08c 100644
--- a/features/step_definitions/conversations_steps.rb
+++ b/features/step_definitions/conversations_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^"([^"]*)" should be part of active conversation$/ do |name|
within(".conversation-participants") do
find("img.avatar[title^='#{name}']").should_not be_nil
diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb
index 41e4f80eb..041afe439 100644
--- a/features/step_definitions/custom_web_steps.rb
+++ b/features/step_definitions/custom_web_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ScreenshotCukeHelpers
def set_screenshot_location(path)
diff --git a/features/step_definitions/debug_steps.rb b/features/step_definitions/debug_steps.rb
index 59cab887a..814302433 100644
--- a/features/step_definitions/debug_steps.rb
+++ b/features/step_definitions/debug_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module DebuggingCukeHelpers
def start_debugging
require 'pry'
diff --git a/features/step_definitions/drawer_steps.rb b/features/step_definitions/drawer_steps.rb
index 7f7359366..13c674c72 100644
--- a/features/step_definitions/drawer_steps.rb
+++ b/features/step_definitions/drawer_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
And /^I click on "([^"]*)" in the drawer$/ do |txt|
within("#drawer") do
find_link(txt).trigger "click"
diff --git a/features/step_definitions/gallery_steps.rb b/features/step_definitions/gallery_steps.rb
index 2dc5e262f..a008556d6 100644
--- a/features/step_definitions/gallery_steps.rb
+++ b/features/step_definitions/gallery_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then "I should see the photo lightbox" do
step %(I should see a "#blueimp-gallery" within "body")
end
diff --git a/features/step_definitions/hovercard_steps.rb b/features/step_definitions/hovercard_steps.rb
index cfe38cecf..832dcc307 100644
--- a/features/step_definitions/hovercard_steps.rb
+++ b/features/step_definitions/hovercard_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When(/^I activate the first hovercard$/) do
page.execute_script("$('.hovercardable').first().trigger('mouseenter');")
end
diff --git a/features/step_definitions/implicit_flow_steps.rb b/features/step_definitions/implicit_flow_steps.rb
index d8b9b1d69..316ecfa74 100644
--- a/features/step_definitions/implicit_flow_steps.rb
+++ b/features/step_definitions/implicit_flow_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
O_AUTH_QUERY_PARAMS = {
redirect_uri: "http://example.org/",
response_type: "id_token token",
diff --git a/features/step_definitions/keyboard_navigation_steps.rb b/features/step_definitions/keyboard_navigation_steps.rb
index c7e9e3813..042e56b31 100644
--- a/features/step_definitions/keyboard_navigation_steps.rb
+++ b/features/step_definitions/keyboard_navigation_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I press the "([^\"]*)" key somewhere$/ do |key|
within("#main-stream") do
find("div.stream-element", match: :first).native.send_keys(key)
diff --git a/features/step_definitions/like_steps.rb b/features/step_definitions/like_steps.rb
index e0670e7c8..12e68f34a 100644
--- a/features/step_definitions/like_steps.rb
+++ b/features/step_definitions/like_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Given /^"([^"]*)" has liked the post "([^"]*)"$/ do |email, post_text|
user = User.find_by(email: email)
post = StatusMessage.find_by(text: post_text)
diff --git a/features/step_definitions/location_steps.rb b/features/step_definitions/location_steps.rb
index cfd41f0e7..d4dac90ab 100644
--- a/features/step_definitions/location_steps.rb
+++ b/features/step_definitions/location_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I allow geolocation$/ do
page.execute_script <<-JS
window.navigator = {
diff --git a/features/step_definitions/mention_steps.rb b/features/step_definitions/mention_steps.rb
index 7f2ce1256..2b65b049b 100644
--- a/features/step_definitions/mention_steps.rb
+++ b/features/step_definitions/mention_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
And /^Alice has a post mentioning Bob$/ do
alice = User.find_by_email "alice@alice.alice"
bob = User.find_by_email "bob@bob.bob"
diff --git a/features/step_definitions/message_steps.rb b/features/step_definitions/message_steps.rb
index a85c1bd9d..631b5437e 100644
--- a/features/step_definitions/message_steps.rb
+++ b/features/step_definitions/message_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^I should see the "(.*)" message$/ do |message|
text = case message
when "alice is excited"
diff --git a/features/step_definitions/mobile_steps.rb b/features/step_definitions/mobile_steps.rb
index 28a966e3a..abb121444 100644
--- a/features/step_definitions/mobile_steps.rb
+++ b/features/step_definitions/mobile_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I toggle the mobile view$/ do
visit("/mobile/toggle")
end
diff --git a/features/step_definitions/modal_steps.rb b/features/step_definitions/modal_steps.rb
index ad74522eb..ceea1f667 100644
--- a/features/step_definitions/modal_steps.rb
+++ b/features/step_definitions/modal_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^I should see a modal$/ do
step %{I should see a ".modal.in"}
end
diff --git a/features/step_definitions/notifications_steps.rb b/features/step_definitions/notifications_steps.rb
index 6fbfde51f..11cb5efa7 100644
--- a/features/step_definitions/notifications_steps.rb
+++ b/features/step_definitions/notifications_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When "I filter notifications by likes" do
step %(I follow "Liked" within "#notifications_container .list-group")
end
diff --git a/features/step_definitions/oembed_steps.rb b/features/step_definitions/oembed_steps.rb
index d09465b0a..6d30b7272 100644
--- a/features/step_definitions/oembed_steps.rb
+++ b/features/step_definitions/oembed_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Given /^I have several oEmbed data in cache$/ do
scenarios = {
"photo" => {
diff --git a/features/step_definitions/oidc_common_steps.rb b/features/step_definitions/oidc_common_steps.rb
index 0f7ae95a8..971f7c2e0 100644
--- a/features/step_definitions/oidc_common_steps.rb
+++ b/features/step_definitions/oidc_common_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Given /^a client with a provided picture exists for user "([^\"]*)"$/ do |email|
app = FactoryGirl.create(:o_auth_application, logo_uri: "/assets/user/default.png")
user = User.find_by(email: email)
diff --git a/features/step_definitions/post_preview_steps.rb b/features/step_definitions/post_preview_steps.rb
index f79b4e32e..288db43d1 100644
--- a/features/step_definitions/post_preview_steps.rb
+++ b/features/step_definitions/post_preview_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
And /^I edit the post$/ do
with_scope(".publisher-textarea-wrapper") do
find(".md-write-tab").click
diff --git a/features/step_definitions/post_with_poll_steps.rb b/features/step_definitions/post_with_poll_steps.rb
index 7e9182841..6ab1e1640 100644
--- a/features/step_definitions/post_with_poll_steps.rb
+++ b/features/step_definitions/post_with_poll_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^I should see ([1-9]+) options?$/ do |number|
find("#poll_creator_container").all(".poll-answer").count.should eql(number.to_i)
end
diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb
index 7065f9083..7f8c93466 100644
--- a/features/step_definitions/posts_steps.rb
+++ b/features/step_definitions/posts_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^the post should be collapsed$/ do
first_post_collapsed?
end
diff --git a/features/step_definitions/profile_steps.rb b/features/step_definitions/profile_steps.rb
index af9949d93..5c38a3aa5 100644
--- a/features/step_definitions/profile_steps.rb
+++ b/features/step_definitions/profile_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
And /^I mark myself as not safe for work$/ do
check('profile[nsfw]')
end
diff --git a/features/step_definitions/search_steps.rb b/features/step_definitions/search_steps.rb
index 35fd296fa..0db421cb4 100644
--- a/features/step_definitions/search_steps.rb
+++ b/features/step_definitions/search_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I enter "([^"]*)" in the search input$/ do |search_term|
find("input#q").native.send_keys(search_term)
end
diff --git a/features/step_definitions/session_steps.rb b/features/step_definitions/session_steps.rb
index 03f5bd3ed..a31de421f 100644
--- a/features/step_definitions/session_steps.rb
+++ b/features/step_definitions/session_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Given /^I am signed in( on the mobile website)?$/ do |mobile|
automatic_login
confirm_login mobile
diff --git a/features/step_definitions/single_post_view_steps.rb b/features/step_definitions/single_post_view_steps.rb
index 07eba83bd..cd6d6026a 100644
--- a/features/step_definitions/single_post_view_steps.rb
+++ b/features/step_definitions/single_post_view_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
And /^I click to hide the post/ do
find('.hide_post').click
end
diff --git a/features/step_definitions/stream_steps.rb b/features/step_definitions/stream_steps.rb
index 22c285439..5d241eaa0 100644
--- a/features/step_definitions/stream_steps.rb
+++ b/features/step_definitions/stream_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When /^I (?:like|unlike) the post "([^"]*)" in the stream$/ do |post_text|
like_stream_post(post_text)
end
diff --git a/features/step_definitions/tag_steps.rb b/features/step_definitions/tag_steps.rb
index 7ea491c4e..d7d104b9c 100644
--- a/features/step_definitions/tag_steps.rb
+++ b/features/step_definitions/tag_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
When(/^I unfollow the "(.*?)" tag$/) do |tag|
accept_alert do
within("#tags_list") do
diff --git a/features/step_definitions/user_applications_steps.rb b/features/step_definitions/user_applications_steps.rb
index 7cef79050..4fc3755ac 100644
--- a/features/step_definitions/user_applications_steps.rb
+++ b/features/step_definitions/user_applications_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Then /^I should see (\d+) authorized applications$/ do |num|
expect(page).to have_selector(".applications-page", count: 1)
expect(page).to have_selector(".authorized-application", count: num.to_i)
diff --git a/features/step_definitions/user_steps.rb b/features/step_definitions/user_steps.rb
index 62af8aee7..e50102961 100644
--- a/features/step_definitions/user_steps.rb
+++ b/features/step_definitions/user_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username, password|
@me ||= FactoryGirl.create(:user, :username => username, :password => password,
:password_confirmation => password, :getting_started => false)
diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb
index 2ffdd4829..38f7d0ab4 100644
--- a/features/step_definitions/web_steps.rb
+++ b/features/step_definitions/web_steps.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
diff --git a/features/support/application_cuke_helpers.rb b/features/support/application_cuke_helpers.rb
index 082c05b1a..7d1f92cc9 100644
--- a/features/support/application_cuke_helpers.rb
+++ b/features/support/application_cuke_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ApplicationCukeHelpers
def flash_message_success?
flash_message(selector: "success").visible?
diff --git a/features/support/env.rb b/features/support/env.rb
index f8ebb4a00..7ee2f0e9d 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rubygems"
ENV["RAILS_ENV"] ||= "test"
diff --git a/features/support/integration_sessions_controller.rb b/features/support/integration_sessions_controller.rb
index c34f87237..1d6bccbe8 100644
--- a/features/support/integration_sessions_controller.rb
+++ b/features/support/integration_sessions_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class IntegrationSessionsController < ActionController::Base
def new
@user_id = params[:user_id]
diff --git a/features/support/matchers.rb b/features/support/matchers.rb
index f38e8935d..d87247046 100644
--- a/features/support/matchers.rb
+++ b/features/support/matchers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :have_path do |expected|
match do |actual|
await_condition { actual.current_path == expected }
diff --git a/features/support/paths.rb b/features/support/paths.rb
index ae9f0d404..a486ef245 100644
--- a/features/support/paths.rb
+++ b/features/support/paths.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module NavigationHelpers
def path_to(page_name)
case page_name
diff --git a/features/support/poor_mans_webmock.rb b/features/support/poor_mans_webmock.rb
index 061441a8f..fd722c756 100644
--- a/features/support/poor_mans_webmock.rb
+++ b/features/support/poor_mans_webmock.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb
index e4963b221..13ed9834c 100644
--- a/features/support/publishing_cuke_helpers.rb
+++ b/features/support/publishing_cuke_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module PublishingCukeHelpers
def write_in_publisher(txt)
fill_in "status_message_text", with: txt
diff --git a/features/support/user_cuke_helpers.rb b/features/support/user_cuke_helpers.rb
index b7014b0ac..1b24eb5b2 100644
--- a/features/support/user_cuke_helpers.rb
+++ b/features/support/user_cuke_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module UserCukeHelpers
# creates a new user object from the factory with some default attributes
diff --git a/features/support/webmock.rb b/features/support/webmock.rb
index 372d81803..f6d4726bf 100644
--- a/features/support/webmock.rb
+++ b/features/support/webmock.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "webmock/cucumber"
WebMock.disable_net_connect!(allow_localhost: true)
diff --git a/lib/account_deleter.rb b/lib/account_deleter.rb
index 95a5c9130..d7ca63d1d 100644
--- a/lib/account_deleter.rb
+++ b/lib/account_deleter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/api/openid_connect/authorization_point/endpoint.rb b/lib/api/openid_connect/authorization_point/endpoint.rb
index 8f3392bd9..c88a43a09 100644
--- a/lib/api/openid_connect/authorization_point/endpoint.rb
+++ b/lib/api/openid_connect/authorization_point/endpoint.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
module AuthorizationPoint
diff --git a/lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb b/lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb
index 08e99b25d..9c4eadeea 100644
--- a/lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb
+++ b/lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
module AuthorizationPoint
diff --git a/lib/api/openid_connect/authorization_point/endpoint_start_point.rb b/lib/api/openid_connect/authorization_point/endpoint_start_point.rb
index 007a2c592..7ce6b6b5d 100644
--- a/lib/api/openid_connect/authorization_point/endpoint_start_point.rb
+++ b/lib/api/openid_connect/authorization_point/endpoint_start_point.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
module AuthorizationPoint
diff --git a/lib/api/openid_connect/error.rb b/lib/api/openid_connect/error.rb
index 56059ad59..5619ae3c3 100644
--- a/lib/api/openid_connect/error.rb
+++ b/lib/api/openid_connect/error.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
module Error
diff --git a/lib/api/openid_connect/id_token.rb b/lib/api/openid_connect/id_token.rb
index 328e9c636..44b957790 100644
--- a/lib/api/openid_connect/id_token.rb
+++ b/lib/api/openid_connect/id_token.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lib/api/openid_connect/id_token_config.rb b/lib/api/openid_connect/id_token_config.rb
index f76fa0961..a38c7215a 100644
--- a/lib/api/openid_connect/id_token_config.rb
+++ b/lib/api/openid_connect/id_token_config.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
class IdTokenConfig
diff --git a/lib/api/openid_connect/protected_resource_endpoint.rb b/lib/api/openid_connect/protected_resource_endpoint.rb
index 540b69d1d..b75513183 100644
--- a/lib/api/openid_connect/protected_resource_endpoint.rb
+++ b/lib/api/openid_connect/protected_resource_endpoint.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011 nov matake
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lib/api/openid_connect/subject_identifier_creator.rb b/lib/api/openid_connect/subject_identifier_creator.rb
index b6a771fa0..7e86b10f6 100644
--- a/lib/api/openid_connect/subject_identifier_creator.rb
+++ b/lib/api/openid_connect/subject_identifier_creator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Api
module OpenidConnect
module SubjectIdentifierCreator
diff --git a/lib/api/openid_connect/token_endpoint.rb b/lib/api/openid_connect/token_endpoint.rb
index 7bde221a9..b9b9d39e9 100644
--- a/lib/api/openid_connect/token_endpoint.rb
+++ b/lib/api/openid_connect/token_endpoint.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/lib/token_endpoint.rb
module Api
diff --git a/lib/bookmarklet_renderer.rb b/lib/bookmarklet_renderer.rb
index 0ecc9cf48..75b2b51f1 100644
--- a/lib/bookmarklet_renderer.rb
+++ b/lib/bookmarklet_renderer.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
class BookmarkletRenderer
class << self
def cached_name
diff --git a/lib/configuration_methods.rb b/lib/configuration_methods.rb
index d9546dce7..add11a016 100644
--- a/lib/configuration_methods.rb
+++ b/lib/configuration_methods.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Configuration
KNOWN_SERVICES = [:twitter, :tumblr, :facebook, :wordpress].freeze
@@ -70,7 +72,7 @@ module Configuration
def version_string
return @version_string unless @version_string.nil?
@version_string = version.number.to_s
- @version_string << "-p#{git_revision[0..7]}" if git_available?
+ @version_string = "#{@version_string}-p#{git_revision[0..7]}" if git_available?
@version_string
end
diff --git a/lib/connection_tester.rb b/lib/connection_tester.rb
index 6619250e5..5bc58d75b 100644
--- a/lib/connection_tester.rb
+++ b/lib/connection_tester.rb
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
class ConnectionTester
include Diaspora::Logging
- NODEINFO_SCHEMA = "http://nodeinfo.diaspora.software/ns/schema/1.0".freeze
- NODEINFO_FRAGMENT = "/.well-known/nodeinfo".freeze
+ NODEINFO_SCHEMA = "http://nodeinfo.diaspora.software/ns/schema/1.0"
+ NODEINFO_FRAGMENT = "/.well-known/nodeinfo"
class << self
# Test the reachability of a server by the given HTTP/S URL.
diff --git a/lib/diaspora.rb b/lib/diaspora.rb
index f1785738e..7040eb4e9 100644
--- a/lib/diaspora.rb
+++ b/lib/diaspora.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/camo.rb b/lib/diaspora/camo.rb
index 389aa48a5..e2ecf587e 100644
--- a/lib/diaspora/camo.rb
+++ b/lib/diaspora/camo.rb
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
# implicitly requires OpenSSL
module Diaspora
module Camo
def self.from_markdown(markdown_text)
return unless markdown_text
- markdown_text.gsub!(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/m) do |link|
+ markdown_text = markdown_text.gsub(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/m) do |link|
link.gsub($4, self.image_url($4))
end
markdown_text.gsub(/src=(['"])(.+?)\1/m) do |link|
diff --git a/lib/diaspora/commentable.rb b/lib/diaspora/commentable.rb
index 0e5e06b44..e9e04faf4 100644
--- a/lib/diaspora/commentable.rb
+++ b/lib/diaspora/commentable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/exceptions.rb b/lib/diaspora/exceptions.rb
index f17689e31..8999ba3d1 100644
--- a/lib/diaspora/exceptions.rb
+++ b/lib/diaspora/exceptions.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/exporter.rb b/lib/diaspora/exporter.rb
index 2c9e27909..cbdecc10d 100644
--- a/lib/diaspora/exporter.rb
+++ b/lib/diaspora/exporter.rb
@@ -1,12 +1,12 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Diaspora
-
class Exporter
-
- SERIALIZED_VERSION = "2.0".freeze
+ SERIALIZED_VERSION = "2.0"
def initialize(user)
@user = user
@@ -24,5 +24,4 @@ module Diaspora
.merge(Export::OthersDataSerializer.new(@user).as_json)
end
end
-
end
diff --git a/lib/diaspora/exporter/non_contact_authors.rb b/lib/diaspora/exporter/non_contact_authors.rb
index f3cfc4801..1c89f8d8d 100644
--- a/lib/diaspora/exporter/non_contact_authors.rb
+++ b/lib/diaspora/exporter/non_contact_authors.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
class Exporter
# This class is capable of quering a list of people from authors of given posts that are non-contacts of a given
diff --git a/lib/diaspora/exporter/others_relayables.rb b/lib/diaspora/exporter/others_relayables.rb
index 5876c52cd..db537b1dc 100644
--- a/lib/diaspora/exporter/others_relayables.rb
+++ b/lib/diaspora/exporter/others_relayables.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
class Exporter
# This class implements methods that allow to query relayables (comments, likes, participations,
diff --git a/lib/diaspora/exporter/posts_with_activity.rb b/lib/diaspora/exporter/posts_with_activity.rb
index 00461c55b..9ebafa759 100644
--- a/lib/diaspora/exporter/posts_with_activity.rb
+++ b/lib/diaspora/exporter/posts_with_activity.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
class Exporter
# This class allows to query posts where a person made any activity (submitted comments,
diff --git a/lib/diaspora/federated.rb b/lib/diaspora/federated.rb
index e00fbd86a..a50a93d66 100644
--- a/lib/diaspora/federated.rb
+++ b/lib/diaspora/federated.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/federated/base.rb b/lib/diaspora/federated/base.rb
index ebceec3fa..b492309c0 100644
--- a/lib/diaspora/federated/base.rb
+++ b/lib/diaspora/federated/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/federated/contact_retraction.rb b/lib/diaspora/federated/contact_retraction.rb
index 7ff7cc6f5..57efd2f45 100644
--- a/lib/diaspora/federated/contact_retraction.rb
+++ b/lib/diaspora/federated/contact_retraction.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class ContactRetraction < Retraction
def self.entity_class
DiasporaFederation::Entities::Contact
diff --git a/lib/diaspora/federated/generator.rb b/lib/diaspora/federated/generator.rb
index deebe80cc..870ec8c3c 100644
--- a/lib/diaspora/federated/generator.rb
+++ b/lib/diaspora/federated/generator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federated
class Generator
diff --git a/lib/diaspora/federated/retraction.rb b/lib/diaspora/federated/retraction.rb
index d6343c6fc..b0ea20dbc 100644
--- a/lib/diaspora/federated/retraction.rb
+++ b/lib/diaspora/federated/retraction.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/federation.rb b/lib/diaspora/federation.rb
index d43e2b4f0..1a1bd96b9 100644
--- a/lib/diaspora/federation.rb
+++ b/lib/diaspora/federation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
# Raised, if author is ignored by the relayable parent author
diff --git a/lib/diaspora/federation/dispatcher.rb b/lib/diaspora/federation/dispatcher.rb
index 64b16dae7..4e03e725f 100644
--- a/lib/diaspora/federation/dispatcher.rb
+++ b/lib/diaspora/federation/dispatcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
class Dispatcher
diff --git a/lib/diaspora/federation/dispatcher/private.rb b/lib/diaspora/federation/dispatcher/private.rb
index 456e1dcec..864c87180 100644
--- a/lib/diaspora/federation/dispatcher/private.rb
+++ b/lib/diaspora/federation/dispatcher/private.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
class Dispatcher
diff --git a/lib/diaspora/federation/dispatcher/public.rb b/lib/diaspora/federation/dispatcher/public.rb
index b8ad30bff..51b7b5454 100644
--- a/lib/diaspora/federation/dispatcher/public.rb
+++ b/lib/diaspora/federation/dispatcher/public.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
class Dispatcher
diff --git a/lib/diaspora/federation/entities.rb b/lib/diaspora/federation/entities.rb
index 0a9bd8af4..b560263dc 100644
--- a/lib/diaspora/federation/entities.rb
+++ b/lib/diaspora/federation/entities.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
module Entities
diff --git a/lib/diaspora/federation/mappings.rb b/lib/diaspora/federation/mappings.rb
index ec344cab2..91ccefee6 100644
--- a/lib/diaspora/federation/mappings.rb
+++ b/lib/diaspora/federation/mappings.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
module Mappings
diff --git a/lib/diaspora/federation/receive.rb b/lib/diaspora/federation/receive.rb
index d130cab68..43fc399c2 100644
--- a/lib/diaspora/federation/receive.rb
+++ b/lib/diaspora/federation/receive.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Federation
module Receive
diff --git a/lib/diaspora/fetcher.rb b/lib/diaspora/fetcher.rb
index adb82e552..6fb16ee20 100644
--- a/lib/diaspora/fetcher.rb
+++ b/lib/diaspora/fetcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Fetcher
require 'diaspora/fetcher/public'
diff --git a/lib/diaspora/fetcher/public.rb b/lib/diaspora/fetcher/public.rb
index 1a7fbd7ee..03530167a 100644
--- a/lib/diaspora/fetcher/public.rb
+++ b/lib/diaspora/fetcher/public.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/fields/author.rb b/lib/diaspora/fields/author.rb
index 29bf5204d..7c88842af 100644
--- a/lib/diaspora/fields/author.rb
+++ b/lib/diaspora/fields/author.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Fields
module Author
diff --git a/lib/diaspora/fields/guid.rb b/lib/diaspora/fields/guid.rb
index 16876c9aa..12f591fcc 100644
--- a/lib/diaspora/fields/guid.rb
+++ b/lib/diaspora/fields/guid.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Fields
module Guid
diff --git a/lib/diaspora/fields/target.rb b/lib/diaspora/fields/target.rb
index 7120c2a84..f40f361fa 100644
--- a/lib/diaspora/fields/target.rb
+++ b/lib/diaspora/fields/target.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Fields
module Target
diff --git a/lib/diaspora/likeable.rb b/lib/diaspora/likeable.rb
index bbb84d2ce..95f7fdd51 100644
--- a/lib/diaspora/likeable.rb
+++ b/lib/diaspora/likeable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/logging.rb b/lib/diaspora/logging.rb
index 4fe8c04ac..9e85628bc 100644
--- a/lib/diaspora/logging.rb
+++ b/lib/diaspora/logging.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# a logging mixin providing the logger
module Diaspora
module Logging
diff --git a/lib/diaspora/markdownify.rb b/lib/diaspora/markdownify.rb
index 4a2d06686..0dddf89e4 100644
--- a/lib/diaspora/markdownify.rb
+++ b/lib/diaspora/markdownify.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Markdownify
require 'diaspora/markdownify/html'
diff --git a/lib/diaspora/markdownify/email.rb b/lib/diaspora/markdownify/email.rb
index f5d2dd290..8016b25e1 100644
--- a/lib/diaspora/markdownify/email.rb
+++ b/lib/diaspora/markdownify/email.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Markdownify
class Email < Redcarpet::Render::HTML
diff --git a/lib/diaspora/markdownify/html.rb b/lib/diaspora/markdownify/html.rb
index a9c516869..19d4dd649 100644
--- a/lib/diaspora/markdownify/html.rb
+++ b/lib/diaspora/markdownify/html.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Markdownify
class HTML < Redcarpet::Render::HTML
diff --git a/lib/diaspora/mentionable.rb b/lib/diaspora/mentionable.rb
index fb6117a45..81ade53b7 100644
--- a/lib/diaspora/mentionable.rb
+++ b/lib/diaspora/mentionable.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
module Diaspora::Mentionable
# regex for finding mention markup in plain text:
diff --git a/lib/diaspora/mentions_container.rb b/lib/diaspora/mentions_container.rb
index 68e8b425c..b02dddb20 100644
--- a/lib/diaspora/mentions_container.rb
+++ b/lib/diaspora/mentions_container.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module MentionsContainer
extend ActiveSupport::Concern
diff --git a/lib/diaspora/message_renderer.rb b/lib/diaspora/message_renderer.rb
index 9540db631..bf36efde2 100644
--- a/lib/diaspora/message_renderer.rb
+++ b/lib/diaspora/message_renderer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
# Takes a raw message text and converts it to
# various desired target formats, respecting
diff --git a/lib/diaspora/relayable.rb b/lib/diaspora/relayable.rb
index 5753674d4..b8cb9da91 100644
--- a/lib/diaspora/relayable.rb
+++ b/lib/diaspora/relayable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/shareable.rb b/lib/diaspora/shareable.rb
index 97078dd6a..41e07972e 100644
--- a/lib/diaspora/shareable.rb
+++ b/lib/diaspora/shareable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/diaspora/signature.rb b/lib/diaspora/signature.rb
index fb571b3cc..821c68c4a 100644
--- a/lib/diaspora/signature.rb
+++ b/lib/diaspora/signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Diaspora
module Signature
def self.included(model)
diff --git a/lib/diaspora/taggable.rb b/lib/diaspora/taggable.rb
index 88d4f3290..ec9f9e6d8 100644
--- a/lib/diaspora/taggable.rb
+++ b/lib/diaspora/taggable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/direction_detector.rb b/lib/direction_detector.rb
index c7ffd055a..e7ed020cb 100644
--- a/lib/direction_detector.rb
+++ b/lib/direction_detector.rb
@@ -1,4 +1,6 @@
# coding: utf-8
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/email_inviter.rb b/lib/email_inviter.rb
index e1fc3e22a..dee190c7c 100644
--- a/lib/email_inviter.rb
+++ b/lib/email_inviter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class EmailInviter
attr_accessor :emails, :inviter, :locale
diff --git a/lib/error_page_renderer.rb b/lib/error_page_renderer.rb
index dae92f419..65bd09dbc 100644
--- a/lib/error_page_renderer.rb
+++ b/lib/error_page_renderer.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
# Inspired by https://github.com/route/errgent/blob/master/lib/errgent/renderer.rb
class ErrorPageRenderer
def initialize options={}
diff --git a/lib/evil_query.rb b/lib/evil_query.rb
index 782833a92..4ac15b34e 100644
--- a/lib/evil_query.rb
+++ b/lib/evil_query.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module EvilQuery
class Base
include Diaspora::Logging
diff --git a/lib/i18n_interpolation_fallbacks.rb b/lib/i18n_interpolation_fallbacks.rb
index d379a965e..0cfbf6bfa 100644
--- a/lib/i18n_interpolation_fallbacks.rb
+++ b/lib/i18n_interpolation_fallbacks.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module I18n
module Backend
module InterpolationFallbacks
diff --git a/lib/node_info.rb b/lib/node_info.rb
index 789bdd64d..f2118af26 100644
--- a/lib/node_info.rb
+++ b/lib/node_info.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "pathname"
require "json-schema"
diff --git a/lib/photo_exporter.rb b/lib/photo_exporter.rb
index 99c25ab98..88e04d6f7 100644
--- a/lib/photo_exporter.rb
+++ b/lib/photo_exporter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class PhotoExporter
attr_reader :user
diff --git a/lib/publisher.rb b/lib/publisher.rb
index 677afb89f..a6c6ab069 100644
--- a/lib/publisher.rb
+++ b/lib/publisher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Publisher
attr_accessor :user, :open, :prefill, :public
diff --git a/lib/pubsubhubbub.rb b/lib/pubsubhubbub.rb
index deed195da..66f899ba6 100644
--- a/lib/pubsubhubbub.rb
+++ b/lib/pubsubhubbub.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/share_visibility_converter.rb b/lib/share_visibility_converter.rb
index 82b9e2d23..7faa1ecad 100644
--- a/lib/share_visibility_converter.rb
+++ b/lib/share_visibility_converter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#we dont have the environment, and it is not carring over from the migration
unless defined?(Person)
class Person < ApplicationRecord
diff --git a/lib/sidekiq_middlewares.rb b/lib/sidekiq_middlewares.rb
index 6190cff4a..55aeb304f 100644
--- a/lib/sidekiq_middlewares.rb
+++ b/lib/sidekiq_middlewares.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module SidekiqMiddlewares
class CleanAndShortBacktraces
def call(worker, item, queue)
diff --git a/lib/stream.rb b/lib/stream.rb
index ae5c98f26..27cb67e25 100644
--- a/lib/stream.rb
+++ b/lib/stream.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Stream
require 'stream/activity'
require 'stream/aspect'
diff --git a/lib/stream/activity.rb b/lib/stream/activity.rb
index 4a4b06f82..2d0cd1f50 100644
--- a/lib/stream/activity.rb
+++ b/lib/stream/activity.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Stream::Activity < Stream::Base
def link(opts={})
Rails.application.routes.url_helpers.activity_streams_path(opts)
diff --git a/lib/stream/aspect.rb b/lib/stream/aspect.rb
index 0891ebde1..6800310b0 100644
--- a/lib/stream/aspect.rb
+++ b/lib/stream/aspect.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/base.rb b/lib/stream/base.rb
index 72dad18d2..9e45666e3 100644
--- a/lib/stream/base.rb
+++ b/lib/stream/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Stream::Base
TYPES_OF_POST_IN_STREAM = ['StatusMessage', 'Reshare']
diff --git a/lib/stream/comments.rb b/lib/stream/comments.rb
index e4c8ee45b..26c27d9e9 100644
--- a/lib/stream/comments.rb
+++ b/lib/stream/comments.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/followed_tag.rb b/lib/stream/followed_tag.rb
index ab1513bfb..b4ad5767e 100644
--- a/lib/stream/followed_tag.rb
+++ b/lib/stream/followed_tag.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/likes.rb b/lib/stream/likes.rb
index f534d1cd9..aff782ff3 100644
--- a/lib/stream/likes.rb
+++ b/lib/stream/likes.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/mention.rb b/lib/stream/mention.rb
index a1afe8ff4..c003f234a 100644
--- a/lib/stream/mention.rb
+++ b/lib/stream/mention.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/multi.rb b/lib/stream/multi.rb
index 7a7d6cc2a..3ca27a262 100644
--- a/lib/stream/multi.rb
+++ b/lib/stream/multi.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Stream::Multi < Stream::Base
# @return [String] URL
diff --git a/lib/stream/person.rb b/lib/stream/person.rb
index 1a1123d71..b7c11baac 100644
--- a/lib/stream/person.rb
+++ b/lib/stream/person.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/public.rb b/lib/stream/public.rb
index b0285f4a8..de6484b0e 100644
--- a/lib/stream/public.rb
+++ b/lib/stream/public.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/stream/tag.rb b/lib/stream/tag.rb
index 53372ba57..bec10d341 100644
--- a/lib/stream/tag.rb
+++ b/lib/stream/tag.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 39083eea3..38101d7b3 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
namespace :assets do
desc "Generate error pages"
task :generate_error_pages => :environment do
diff --git a/lib/tasks/cucumber.rake b/lib/tasks/cucumber.rake
index 83f79471e..b572086e3 100644
--- a/lib/tasks/cucumber.rake
+++ b/lib/tasks/cucumber.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index defd67ce7..2a4bda1c9 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/tasks/default.rake b/lib/tasks/default.rake
index 6ec0e55cd..980cf702d 100644
--- a/lib/tasks/default.rake
+++ b/lib/tasks/default.rake
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
task :default => [:spec, :cucumber, :'jasmine:ci']
diff --git a/lib/tasks/generate_session_secret.rake b/lib/tasks/generate_session_secret.rake
index cab226177..01e6c2944 100644
--- a/lib/tasks/generate_session_secret.rake
+++ b/lib/tasks/generate_session_secret.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
namespace :generate do
desc 'Generates a Session Secret Token'
task :secret_token do
diff --git a/lib/tasks/linter.rake b/lib/tasks/linter.rake
index 31ff91957..f80d074d2 100644
--- a/lib/tasks/linter.rake
+++ b/lib/tasks/linter.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
begin
require "eslintrb/eslinttask"
Eslintrb::EslintTask.new :eslint do |t|
diff --git a/lib/tasks/maintenance.rake b/lib/tasks/maintenance.rake
index 042d78b58..493d20897 100644
--- a/lib/tasks/maintenance.rake
+++ b/lib/tasks/maintenance.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/tasks/migrations.rake b/lib/tasks/migrations.rake
index b55e493e8..6951b3ffc 100644
--- a/lib/tasks/migrations.rake
+++ b/lib/tasks/migrations.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/lib/tasks/podmin.rake b/lib/tasks/podmin.rake
index dc5289cbd..ccfbfe737 100644
--- a/lib/tasks/podmin.rake
+++ b/lib/tasks/podmin.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
namespace :podmin do
desc "Send an email to users as admin"
diff --git a/lib/tasks/screenshots.rake b/lib/tasks/screenshots.rake
index 0b2c17859..42282488c 100644
--- a/lib/tasks/screenshots.rake
+++ b/lib/tasks/screenshots.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if defined? Cucumber
namespace :screenshots do
diff --git a/lib/tasks/tests.rake b/lib/tasks/tests.rake
index b6e2bcfcf..30c0eec48 100644
--- a/lib/tasks/tests.rake
+++ b/lib/tasks/tests.rake
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
namespace :ci do
namespace :travis do
task prepare_db: %w[db:create db:migrate]
diff --git a/script/cucumber b/script/cucumber
deleted file mode 100755
index 7fa5c9208..000000000
--- a/script/cucumber
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-
-vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
-if vendored_cucumber_bin
- load File.expand_path(vendored_cucumber_bin)
-else
- require 'rubygems' unless ENV['NO_RUBYGEMS']
- require 'cucumber'
- load Cucumber::BINARY
-end
diff --git a/script/get_config.rb b/script/get_config.rb
index a9197096d..da8bb55db 100755
--- a/script/get_config.rb
+++ b/script/get_config.rb
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/script/i18n/xmltoyml.rb b/script/i18n/xmltoyml.rb
index e3fde7da1..f7eeee935 100755
--- a/script/i18n/xmltoyml.rb
+++ b/script/i18n/xmltoyml.rb
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/script/i18n/ymltoxml.rb b/script/i18n/ymltoxml.rb
index ff32ca405..16c21b91e 100755
--- a/script/i18n/ymltoxml.rb
+++ b/script/i18n/ymltoxml.rb
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/script/rails b/script/rails
deleted file mode 100755
index f8da2cffd..000000000
--- a/script/rails
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env ruby
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
-
-APP_PATH = File.expand_path('../../config/application', __FILE__)
-require File.expand_path('../../config/boot', __FILE__)
-require 'rails/commands'
diff --git a/spec/configuration_methods_spec.rb b/spec/configuration_methods_spec.rb
index f3b4595cf..e358e17a4 100644
--- a/spec/configuration_methods_spec.rb
+++ b/spec/configuration_methods_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "ensure configuration effects" do
it "sets the captcha length as required" do
expect(SimpleCaptcha.length).to eq(AppConfig.settings.captcha.captcha_length.to_i)
diff --git a/spec/controllers/admin/pods_controller_spec.rb b/spec/controllers/admin/pods_controller_spec.rb
index 784e29c6e..02085a180 100644
--- a/spec/controllers/admin/pods_controller_spec.rb
+++ b/spec/controllers/admin/pods_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Admin::PodsController, type: :controller do
before do
@user = FactoryGirl.create :user
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb
index 7293ffab2..751d05114 100644
--- a/spec/controllers/admin/users_controller_spec.rb
+++ b/spec/controllers/admin/users_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Admin::UsersController, :type => :controller do
before do
@user = FactoryGirl.create :user
diff --git a/spec/controllers/admins_controller_spec.rb b/spec/controllers/admins_controller_spec.rb
index e9580a5d2..a9e61eb6a 100644
--- a/spec/controllers/admins_controller_spec.rb
+++ b/spec/controllers/admins_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/api/openid_connect/authorizations_controller_spec.rb b/spec/controllers/api/openid_connect/authorizations_controller_spec.rb
index 54435e0b3..ebe4f1ef0 100644
--- a/spec/controllers/api/openid_connect/authorizations_controller_spec.rb
+++ b/spec/controllers/api/openid_connect/authorizations_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::AuthorizationsController, type: :request do
let!(:client) { FactoryGirl.create(:o_auth_application) }
diff --git a/spec/controllers/api/openid_connect/clients_controller_spec.rb b/spec/controllers/api/openid_connect/clients_controller_spec.rb
index 33776fdfb..1a2c0eb4d 100644
--- a/spec/controllers/api/openid_connect/clients_controller_spec.rb
+++ b/spec/controllers/api/openid_connect/clients_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf_verification: :none do
describe "#create" do
context "when valid parameters are passed" do
diff --git a/spec/controllers/api/openid_connect/discovery_controller_spec.rb b/spec/controllers/api/openid_connect/discovery_controller_spec.rb
index 73d6e51fd..a67463f9d 100644
--- a/spec/controllers/api/openid_connect/discovery_controller_spec.rb
+++ b/spec/controllers/api/openid_connect/discovery_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::DiscoveryController, type: :controller do
describe "#configuration" do
before do
diff --git a/spec/controllers/api/openid_connect/id_tokens_controller_spec.rb b/spec/controllers/api/openid_connect/id_tokens_controller_spec.rb
index eb7bccefa..cbbce0e31 100644
--- a/spec/controllers/api/openid_connect/id_tokens_controller_spec.rb
+++ b/spec/controllers/api/openid_connect/id_tokens_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::IdTokensController, type: :controller do
describe "#jwks" do
before do
diff --git a/spec/controllers/api/openid_connect/token_endpoint_controller_spec.rb b/spec/controllers/api/openid_connect/token_endpoint_controller_spec.rb
index 766a3c806..20cf9ba44 100644
--- a/spec/controllers/api/openid_connect/token_endpoint_controller_spec.rb
+++ b/spec/controllers/api/openid_connect/token_endpoint_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::TokenEndpointController, type: :controller, suppress_csrf_verification: :none do
let(:auth) { FactoryGirl.create(:auth_with_read) }
diff --git a/spec/controllers/api/openid_connect/user_applications_spec.rb b/spec/controllers/api/openid_connect/user_applications_spec.rb
index 3a94d830e..ec119eb70 100644
--- a/spec/controllers/api/openid_connect/user_applications_spec.rb
+++ b/spec/controllers/api/openid_connect/user_applications_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::UserApplicationsController, type: :controller do
before do
@app = FactoryGirl.create(:o_auth_application_with_xss)
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index faacf265f..c0b1c87cd 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/aspect_memberships_controller_spec.rb b/spec/controllers/aspect_memberships_controller_spec.rb
index a577a613a..903e732ef 100644
--- a/spec/controllers/aspect_memberships_controller_spec.rb
+++ b/spec/controllers/aspect_memberships_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb
index 1f39d7312..d763f4a83 100644
--- a/spec/controllers/aspects_controller_spec.rb
+++ b/spec/controllers/aspects_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/blocks_controller_spec.rb b/spec/controllers/blocks_controller_spec.rb
index 0a774da3a..b3d7b1567 100644
--- a/spec/controllers/blocks_controller_spec.rb
+++ b/spec/controllers/blocks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe BlocksController, :type => :controller do
before do
sign_in alice
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb
index 420da9ed5..597205268 100644
--- a/spec/controllers/comments_controller_spec.rb
+++ b/spec/controllers/comments_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/contacts_controller_spec.rb b/spec/controllers/contacts_controller_spec.rb
index c50243264..608d664e8 100644
--- a/spec/controllers/contacts_controller_spec.rb
+++ b/spec/controllers/contacts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/conversation_visibilities_controller_spec.rb b/spec/controllers/conversation_visibilities_controller_spec.rb
index 973873e48..9c936fb86 100644
--- a/spec/controllers/conversation_visibilities_controller_spec.rb
+++ b/spec/controllers/conversation_visibilities_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/conversations_controller_spec.rb b/spec/controllers/conversations_controller_spec.rb
index a2d2e1d49..aaf81076c 100644
--- a/spec/controllers/conversations_controller_spec.rb
+++ b/spec/controllers/conversations_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
index a9c3b0a1a..11feab03b 100644
--- a/spec/controllers/help_controller_spec.rb
+++ b/spec/controllers/help_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe HelpController, type: :controller do
describe "#faq" do
it "succeeds" do
diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb
index 2e5a9b3a8..82cc10711 100644
--- a/spec/controllers/home_controller_spec.rb
+++ b/spec/controllers/home_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/invitation_codes_controller_spec.rb b/spec/controllers/invitation_codes_controller_spec.rb
index afc317f99..b6f604ec1 100644
--- a/spec/controllers/invitation_codes_controller_spec.rb
+++ b/spec/controllers/invitation_codes_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe InvitationCodesController, type: :controller do
describe "#show" do
it "redirects to the root page if the invitation code is invalid" do
diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb
index 9ca17c125..7919b6a8b 100644
--- a/spec/controllers/invitations_controller_spec.rb
+++ b/spec/controllers/invitations_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/admins_spec.rb b/spec/controllers/jasmine_fixtures/admins_spec.rb
index 23a448ed8..62bfd77a2 100644
--- a/spec/controllers/jasmine_fixtures/admins_spec.rb
+++ b/spec/controllers/jasmine_fixtures/admins_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe AdminsController, type: :controller do
describe "#dashboard" do
before do
diff --git a/spec/controllers/jasmine_fixtures/aspects_spec.rb b/spec/controllers/jasmine_fixtures/aspects_spec.rb
index b82fbc2de..cd2c39c6c 100644
--- a/spec/controllers/jasmine_fixtures/aspects_spec.rb
+++ b/spec/controllers/jasmine_fixtures/aspects_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/contacts_spec.rb b/spec/controllers/jasmine_fixtures/contacts_spec.rb
index 06262aed2..35e756660 100644
--- a/spec/controllers/jasmine_fixtures/contacts_spec.rb
+++ b/spec/controllers/jasmine_fixtures/contacts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/conversations_spec.rb b/spec/controllers/jasmine_fixtures/conversations_spec.rb
index a35993c0b..f6585b6ab 100644
--- a/spec/controllers/jasmine_fixtures/conversations_spec.rb
+++ b/spec/controllers/jasmine_fixtures/conversations_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ConversationsController, :type => :controller do
describe '#index' do
before do
diff --git a/spec/controllers/jasmine_fixtures/notifications_spec.rb b/spec/controllers/jasmine_fixtures/notifications_spec.rb
index 687bc2523..26dd262e9 100644
--- a/spec/controllers/jasmine_fixtures/notifications_spec.rb
+++ b/spec/controllers/jasmine_fixtures/notifications_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NotificationsController, :type => :controller do
describe '#index' do
before do
diff --git a/spec/controllers/jasmine_fixtures/people_spec.rb b/spec/controllers/jasmine_fixtures/people_spec.rb
index 77ec78424..0d48f2ff7 100644
--- a/spec/controllers/jasmine_fixtures/people_spec.rb
+++ b/spec/controllers/jasmine_fixtures/people_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/photos_spec.rb b/spec/controllers/jasmine_fixtures/photos_spec.rb
index 3dabe5e53..08badf72a 100644
--- a/spec/controllers/jasmine_fixtures/photos_spec.rb
+++ b/spec/controllers/jasmine_fixtures/photos_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/posts_spec.rb b/spec/controllers/jasmine_fixtures/posts_spec.rb
index aed5d118a..6af6f4e5f 100644
--- a/spec/controllers/jasmine_fixtures/posts_spec.rb
+++ b/spec/controllers/jasmine_fixtures/posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "spec_helper"
describe PostsController, type: :controller do
diff --git a/spec/controllers/jasmine_fixtures/status_messages_spec.rb b/spec/controllers/jasmine_fixtures/status_messages_spec.rb
index 6964f1d5b..a09a2e5a6 100644
--- a/spec/controllers/jasmine_fixtures/status_messages_spec.rb
+++ b/spec/controllers/jasmine_fixtures/status_messages_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/streams_spec.rb b/spec/controllers/jasmine_fixtures/streams_spec.rb
index 0e815439a..ea58bf176 100644
--- a/spec/controllers/jasmine_fixtures/streams_spec.rb
+++ b/spec/controllers/jasmine_fixtures/streams_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/jasmine_fixtures/users_spec.rb b/spec/controllers/jasmine_fixtures/users_spec.rb
index 54d624a77..dedebceae 100644
--- a/spec/controllers/jasmine_fixtures/users_spec.rb
+++ b/spec/controllers/jasmine_fixtures/users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe UsersController, type: :controller do
before do
sign_in alice, scope: :user
diff --git a/spec/controllers/likes_controller_spec.rb b/spec/controllers/likes_controller_spec.rb
index 9b58fc9c9..26ed8c6f1 100644
--- a/spec/controllers/likes_controller_spec.rb
+++ b/spec/controllers/likes_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/messages_controller_spec.rb b/spec/controllers/messages_controller_spec.rb
index 596ca084e..4fd9bd4f3 100644
--- a/spec/controllers/messages_controller_spec.rb
+++ b/spec/controllers/messages_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/node_info_controller_spec.rb b/spec/controllers/node_info_controller_spec.rb
index 3108ca4cf..80cae293a 100644
--- a/spec/controllers/node_info_controller_spec.rb
+++ b/spec/controllers/node_info_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NodeInfoController do
describe "#jrd" do
it "responds to JSON" do
diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb
index 505786eb7..1788182a3 100644
--- a/spec/controllers/notifications_controller_spec.rb
+++ b/spec/controllers/notifications_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/participations_controller_spec.rb b/spec/controllers/participations_controller_spec.rb
index 9c2fc1e2c..d38e7bc69 100644
--- a/spec/controllers/participations_controller_spec.rb
+++ b/spec/controllers/participations_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ParticipationsController, :type => :controller do
before do
allow(@controller).to receive(:current_user).and_return(alice)
diff --git a/spec/controllers/passwords_controller_spec.rb b/spec/controllers/passwords_controller_spec.rb
index 378e3a111..870907904 100644
--- a/spec/controllers/passwords_controller_spec.rb
+++ b/spec/controllers/passwords_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb
index bb450b88c..740744525 100644
--- a/spec/controllers/people_controller_spec.rb
+++ b/spec/controllers/people_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb
index 11b52914a..424eeb235 100644
--- a/spec/controllers/photos_controller_spec.rb
+++ b/spec/controllers/photos_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb
index 2c5f72f92..9e69b569e 100644
--- a/spec/controllers/posts_controller_spec.rb
+++ b/spec/controllers/posts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb
index 405b2902b..b5b635796 100644
--- a/spec/controllers/profiles_controller_spec.rb
+++ b/spec/controllers/profiles_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index 91cf4603d..c7063e728 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/report_controller_spec.rb b/spec/controllers/report_controller_spec.rb
index 176a1d4f8..be7b6ffd1 100644
--- a/spec/controllers/report_controller_spec.rb
+++ b/spec/controllers/report_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/reshares_controller_spec.rb b/spec/controllers/reshares_controller_spec.rb
index e5d053f0d..d266c4b71 100644
--- a/spec/controllers/reshares_controller_spec.rb
+++ b/spec/controllers/reshares_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ResharesController, :type => :controller do
describe '#create' do
let(:post_request!) {
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
index 655cb86d4..680554cc8 100644
--- a/spec/controllers/search_controller_spec.rb
+++ b/spec/controllers/search_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe SearchController, :type => :controller do
before do
@user = alice
diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb
index 9ad8e36aa..a1c333915 100644
--- a/spec/controllers/services_controller_spec.rb
+++ b/spec/controllers/services_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index 69bbf510c..ff00c6a5b 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/share_visibilities_controller_spec.rb b/spec/controllers/share_visibilities_controller_spec.rb
index f70a50ea3..6f0716558 100644
--- a/spec/controllers/share_visibilities_controller_spec.rb
+++ b/spec/controllers/share_visibilities_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/social_relay_controller_spec.rb b/spec/controllers/social_relay_controller_spec.rb
index 1949eb0c7..5754dc305 100644
--- a/spec/controllers/social_relay_controller_spec.rb
+++ b/spec/controllers/social_relay_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe SocialRelayController, type: :controller do
describe "#well_known" do
it "responds to format json" do
diff --git a/spec/controllers/status_messages_controller_spec.rb b/spec/controllers/status_messages_controller_spec.rb
index 9ae3a76d2..c954ce4c6 100644
--- a/spec/controllers/status_messages_controller_spec.rb
+++ b/spec/controllers/status_messages_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/streams_controller_spec.rb b/spec/controllers/streams_controller_spec.rb
index e7114cb1f..40f9fdf46 100644
--- a/spec/controllers/streams_controller_spec.rb
+++ b/spec/controllers/streams_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/tag_followings_controller_spec.rb b/spec/controllers/tag_followings_controller_spec.rb
index 6ee1b138b..c5c6dd8eb 100644
--- a/spec/controllers/tag_followings_controller_spec.rb
+++ b/spec/controllers/tag_followings_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe TagFollowingsController, type: :controller do
describe "#manage" do
context "not signed in" do
diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb
index b62adc5b0..c537e49a5 100644
--- a/spec/controllers/tags_controller_spec.rb
+++ b/spec/controllers/tags_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/controllers/terms_controller_spec.rb b/spec/controllers/terms_controller_spec.rb
index ea948a153..ea22bbc94 100644
--- a/spec/controllers/terms_controller_spec.rb
+++ b/spec/controllers/terms_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe TermsController, type: :controller do
describe "#index" do
it "succeeds" do
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index c18d918d9..0351a7d3e 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/factories.rb b/spec/factories.rb
index 32a322933..cd5a4bc30 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora In This file is
# licensed under the Affero General Public License version 3 or late See
# the COPYRIGHT file.
diff --git a/spec/federation_callbacks_spec.rb b/spec/federation_callbacks_spec.rb
index 7a5ddb58e..ce5be23d5 100644
--- a/spec/federation_callbacks_spec.rb
+++ b/spec/federation_callbacks_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "diaspora_federation/test"
describe "diaspora federation callbacks" do
diff --git a/spec/helper_methods.rb b/spec/helper_methods.rb
index 720f28058..957f757d6 100644
--- a/spec/helper_methods.rb
+++ b/spec/helper_methods.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
require Rails.root.join("spec", "support", "inlined_jobs")
module HelperMethods
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index c7564c5be..569360e94 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/conversations_helper_spec.rb b/spec/helpers/conversations_helper_spec.rb
index 24768fe7a..a1613bbaa 100644
--- a/spec/helpers/conversations_helper_spec.rb
+++ b/spec/helpers/conversations_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ConversationsHelper, :type => :helper do
before do
@conversation = FactoryGirl.create(:conversation)
diff --git a/spec/helpers/getting_started_helper_spec.rb b/spec/helpers/getting_started_helper_spec.rb
index 7b89fbe24..a2a8fe2fe 100644
--- a/spec/helpers/getting_started_helper_spec.rb
+++ b/spec/helpers/getting_started_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/gon_helper_spec.rb b/spec/helpers/gon_helper_spec.rb
index e09712242..5b21b1d44 100644
--- a/spec/helpers/gon_helper_spec.rb
+++ b/spec/helpers/gon_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe GonHelper, type: :helper do
include_context :gon
diff --git a/spec/helpers/interim_stream_hackiness_helper_spec.rb b/spec/helpers/interim_stream_hackiness_helper_spec.rb
index fe6b787b2..890e6e842 100644
--- a/spec/helpers/interim_stream_hackiness_helper_spec.rb
+++ b/spec/helpers/interim_stream_hackiness_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe InterimStreamHackinessHelper, type: :helper do
describe "commenting_disabled?" do
include Devise::Test::ControllerHelpers
diff --git a/spec/helpers/jsxc_helper_spec.rb b/spec/helpers/jsxc_helper_spec.rb
index 18bdb4daa..0d80218c2 100644
--- a/spec/helpers/jsxc_helper_spec.rb
+++ b/spec/helpers/jsxc_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe JsxcHelper, :type => :helper do
before do
AppConfig.chat.server.bosh.port = 1234
diff --git a/spec/helpers/language_helper_spec.rb b/spec/helpers/language_helper_spec.rb
index 3b0e9431a..5e4c1dce5 100644
--- a/spec/helpers/language_helper_spec.rb
+++ b/spec/helpers/language_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe LanguageHelper, type: :helper do
describe "#get_javascript_strings_for" do
it "generates a jasmine fixture", fixture: true do
diff --git a/spec/helpers/layout_helper_spec.rb b/spec/helpers/layout_helper_spec.rb
index 153797769..f3bdfa329 100644
--- a/spec/helpers/layout_helper_spec.rb
+++ b/spec/helpers/layout_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/meta_data_helper_spec.rb b/spec/helpers/meta_data_helper_spec.rb
index 998d35721..8e9feb5a6 100644
--- a/spec/helpers/meta_data_helper_spec.rb
+++ b/spec/helpers/meta_data_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe MetaDataHelper, type: :helper do
describe "#meta_tag" do
it "returns an empty string if passed an empty hash" do
diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb
index 1aa84d6a9..356092b18 100644
--- a/spec/helpers/notifications_helper_spec.rb
+++ b/spec/helpers/notifications_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NotificationsHelper, type: :helper do
include ApplicationHelper
diff --git a/spec/helpers/notifier_helper_spec.rb b/spec/helpers/notifier_helper_spec.rb
index 654fcd6d4..5e2499001 100644
--- a/spec/helpers/notifier_helper_spec.rb
+++ b/spec/helpers/notifier_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/o_embed_helper_spec.rb b/spec/helpers/o_embed_helper_spec.rb
index c36759026..17394acda 100644
--- a/spec/helpers/o_embed_helper_spec.rb
+++ b/spec/helpers/o_embed_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe OEmbedHelper, :type => :helper do
describe 'o_embed_html' do
scenarios = {
diff --git a/spec/helpers/open_graph_helper_spec.rb b/spec/helpers/open_graph_helper_spec.rb
index 7962781e7..c6b10188a 100644
--- a/spec/helpers/open_graph_helper_spec.rb
+++ b/spec/helpers/open_graph_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe OpenGraphHelper, :type => :helper do
describe 'og_html' do
diff --git a/spec/helpers/people_helper_spec.rb b/spec/helpers/people_helper_spec.rb
index 866b56fd0..4b4140918 100644
--- a/spec/helpers/people_helper_spec.rb
+++ b/spec/helpers/people_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/posts_helper_spec.rb b/spec/helpers/posts_helper_spec.rb
index 1b5f1f182..90b73c273 100644
--- a/spec/helpers/posts_helper_spec.rb
+++ b/spec/helpers/posts_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/publisher_helper_spec.rb b/spec/helpers/publisher_helper_spec.rb
index e4a20368c..34dcad051 100644
--- a/spec/helpers/publisher_helper_spec.rb
+++ b/spec/helpers/publisher_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PublisherHelper, type: :helper do
describe "#public_selected?" do
it "returns true when the selected_aspects contains 'public'" do
diff --git a/spec/helpers/report_helper_spec.rb b/spec/helpers/report_helper_spec.rb
index f044c0364..60346dbc5 100644
--- a/spec/helpers/report_helper_spec.rb
+++ b/spec/helpers/report_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ReportHelper, type: :helper do
before do
@user = bob
diff --git a/spec/helpers/stream_helper_spec.rb b/spec/helpers/stream_helper_spec.rb
index 05d975321..dac0196cb 100644
--- a/spec/helpers/stream_helper_spec.rb
+++ b/spec/helpers/stream_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/helpers/tags_helper_spec.rb b/spec/helpers/tags_helper_spec.rb
index 7667ea1bf..5880136f0 100644
--- a/spec/helpers/tags_helper_spec.rb
+++ b/spec/helpers/tags_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe TagsHelper, :type => :helper do
describe '#looking_for_tag_link' do
it 'returns nil if there is a @ in the query' do
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb
index aa5a83a5f..4d00317b7 100644
--- a/spec/helpers/users_helper_spec.rb
+++ b/spec/helpers/users_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe UsersHelper, type: :helper do
include Devise::Test::ControllerHelpers
diff --git a/spec/integration/account_deletion_spec.rb b/spec/integration/account_deletion_spec.rb
index b6cca15cf..d09b5d564 100644
--- a/spec/integration/account_deletion_spec.rb
+++ b/spec/integration/account_deletion_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "deleteing account", type: :request do
def account_removal_method
AccountDeleter.new(person).perform!
diff --git a/spec/integration/account_migration_spec.rb b/spec/integration/account_migration_spec.rb
index b7559259e..35597edad 100644
--- a/spec/integration/account_migration_spec.rb
+++ b/spec/integration/account_migration_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "integration/federation/federation_helper"
def create_remote_contact(user, pod_host)
diff --git a/spec/integration/api/user_info_controller_spec.rb b/spec/integration/api/user_info_controller_spec.rb
index 2c692a100..334059d9c 100644
--- a/spec/integration/api/user_info_controller_spec.rb
+++ b/spec/integration/api/user_info_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::UserInfoController do
let!(:auth_with_read_and_ppid) { FactoryGirl.create(:auth_with_read_and_ppid) }
let!(:access_token_with_read) { auth_with_read_and_ppid.create_access_token.to_s }
diff --git a/spec/integration/application_spec.rb b/spec/integration/application_spec.rb
index 2c4e78fd5..7cba50af5 100644
--- a/spec/integration/application_spec.rb
+++ b/spec/integration/application_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ApplicationController, type: :request do
describe "csrf token validation" do
context "without a current user" do
diff --git a/spec/integration/contact_deleting_spec.rb b/spec/integration/contact_deleting_spec.rb
index a08ead841..cc9e860d3 100644
--- a/spec/integration/contact_deleting_spec.rb
+++ b/spec/integration/contact_deleting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/integration/contacts_spec.rb b/spec/integration/contacts_spec.rb
index 1af6ae508..00436ccae 100644
--- a/spec/integration/contacts_spec.rb
+++ b/spec/integration/contacts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ContactsController, type: :request do
describe "/contacts" do
context "user is signed in" do
diff --git a/spec/integration/dispatching_spec.rb b/spec/integration/dispatching_spec.rb
index 58124de3a..30ab378b9 100644
--- a/spec/integration/dispatching_spec.rb
+++ b/spec/integration/dispatching_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "Dispatching", type: :request do
context "a comment retraction on a public post" do
it "triggers a public dispatch" do
diff --git a/spec/integration/exporter_spec.rb b/spec/integration/exporter_spec.rb
index 8cea5501a..930a8a57e 100644
--- a/spec/integration/exporter_spec.rb
+++ b/spec/integration/exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/integration/federation/attack_vectors_spec.rb b/spec/integration/federation/attack_vectors_spec.rb
index b88d4883c..4810c8203 100644
--- a/spec/integration/federation/attack_vectors_spec.rb
+++ b/spec/integration/federation/attack_vectors_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/integration/federation/federation_helper.rb b/spec/integration/federation/federation_helper.rb
index f2da9812b..311fd85df 100644
--- a/spec/integration/federation/federation_helper.rb
+++ b/spec/integration/federation/federation_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
def remote_user_on_pod_b
@remote_on_b ||= create_remote_user("remote-b.net")
end
diff --git a/spec/integration/federation/receive_federation_messages_spec.rb b/spec/integration/federation/receive_federation_messages_spec.rb
index 8ddb917cc..5ab47dbcc 100644
--- a/spec/integration/federation/receive_federation_messages_spec.rb
+++ b/spec/integration/federation/receive_federation_messages_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "integration/federation/federation_helper"
require "integration/federation/shared_receive_relayable"
require "integration/federation/shared_receive_retraction"
diff --git a/spec/integration/federation/shared_receive_relayable.rb b/spec/integration/federation/shared_receive_relayable.rb
index 4fc8f7de1..5ceb78ef2 100644
--- a/spec/integration/federation/shared_receive_relayable.rb
+++ b/spec/integration/federation/shared_receive_relayable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "it deals correctly with a relayable" do
context "local" do
let(:entity) { create_relayable_entity(entity_name, local_parent, sender_id) }
diff --git a/spec/integration/federation/shared_receive_retraction.rb b/spec/integration/federation/shared_receive_retraction.rb
index adc8112c0..c7ef41c53 100644
--- a/spec/integration/federation/shared_receive_retraction.rb
+++ b/spec/integration/federation/shared_receive_retraction.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
def retraction_entity(target_object, sender)
Fabricate(
:retraction_entity,
diff --git a/spec/integration/federation/shared_receive_stream_items.rb b/spec/integration/federation/shared_receive_stream_items.rb
index 86cb4125b..347848e35 100644
--- a/spec/integration/federation/shared_receive_stream_items.rb
+++ b/spec/integration/federation/shared_receive_stream_items.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# by "stream items" we mean everything that could appear in the stream - post, comment, like, poll, etc and therefore
# could be send either publicly or privately
shared_examples_for "messages which are indifferent about sharing fact" do
diff --git a/spec/integration/mentioning_spec.rb b/spec/integration/mentioning_spec.rb
index 41a231d3e..7e3006912 100644
--- a/spec/integration/mentioning_spec.rb
+++ b/spec/integration/mentioning_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module MentioningSpecHelpers
def notifications_about_mentioning(user, object)
table = object.class.table_name
diff --git a/spec/integration/mobile_posts_spec.rb b/spec/integration/mobile_posts_spec.rb
index 1b5e53509..f12f9cf07 100644
--- a/spec/integration/mobile_posts_spec.rb
+++ b/spec/integration/mobile_posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PostsController, type: :request do
context "with a poll" do
let(:sm) { FactoryGirl.build(:status_message_with_poll, public: true) }
diff --git a/spec/integration/profile_spec.rb b/spec/integration/profile_spec.rb
index e756bbfc4..25cd0e7f4 100644
--- a/spec/integration/profile_spec.rb
+++ b/spec/integration/profile_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PeopleController, type: :request do
context "for the current user" do
before do
diff --git a/spec/integration/receiving_spec.rb b/spec/integration/receiving_spec.rb
index faa8ffb20..e7a44cfbc 100644
--- a/spec/integration/receiving_spec.rb
+++ b/spec/integration/receiving_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/integration/tag_people_spec.rb b/spec/integration/tag_people_spec.rb
index 22b07d851..ea8174e05 100644
--- a/spec/integration/tag_people_spec.rb
+++ b/spec/integration/tag_people_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe TagsController, type: :request do
describe 'will_paginate people on the tag page' do
let(:people) { (1..2).map { FactoryGirl.create(:person) } }
diff --git a/spec/javascripts/support/jasmine_runner.rb b/spec/javascripts/support/jasmine_runner.rb
index 2add1b9f9..bb049f9d1 100644
--- a/spec/javascripts/support/jasmine_runner.rb
+++ b/spec/javascripts/support/jasmine_runner.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
$:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes
ENV["JASMINE_BROWSER"] = "firefox"
diff --git a/spec/lib/account_deleter_spec.rb b/spec/lib/account_deleter_spec.rb
index 01552e3ab..a82bbe578 100644
--- a/spec/lib/account_deleter_spec.rb
+++ b/spec/lib/account_deleter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/api/openid_connect/protected_resource_endpoint_spec.rb b/spec/lib/api/openid_connect/protected_resource_endpoint_spec.rb
index fc2f4cb11..a77da83a0 100644
--- a/spec/lib/api/openid_connect/protected_resource_endpoint_spec.rb
+++ b/spec/lib/api/openid_connect/protected_resource_endpoint_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::ProtectedResourceEndpoint, type: :request do
let(:auth_with_read) { FactoryGirl.create(:auth_with_read) }
let!(:access_token_with_read) { auth_with_read.create_access_token.to_s }
diff --git a/spec/lib/api/openid_connect/token_endpoint_spec.rb b/spec/lib/api/openid_connect/token_endpoint_spec.rb
index 440d8132a..c27770f33 100644
--- a/spec/lib/api/openid_connect/token_endpoint_spec.rb
+++ b/spec/lib/api/openid_connect/token_endpoint_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::TokenEndpoint, type: :request do
let!(:client) { FactoryGirl.create(:o_auth_application_with_ppid) }
let!(:auth) {
diff --git a/spec/lib/configuration_methods_spec.rb b/spec/lib/configuration_methods_spec.rb
index 76fb4a9ab..eeb963185 100644
--- a/spec/lib/configuration_methods_spec.rb
+++ b/spec/lib/configuration_methods_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Configuration::Methods do
before(:all) do
@settings = Configurate::Settings.create do
diff --git a/spec/lib/connection_tester_spec.rb b/spec/lib/connection_tester_spec.rb
index 6f2fcaaf5..01acd20f4 100644
--- a/spec/lib/connection_tester_spec.rb
+++ b/spec/lib/connection_tester_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ConnectionTester do
let(:url) { "https://pod.example.com" }
let(:result) { ConnectionTester::Result.new }
diff --git a/spec/lib/diaspora/camo_spec.rb b/spec/lib/diaspora/camo_spec.rb
index 6c72fce08..161c1640d 100644
--- a/spec/lib/diaspora/camo_spec.rb
+++ b/spec/lib/diaspora/camo_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/diaspora/exporter/non_contact_authors_spec.rb b/spec/lib/diaspora/exporter/non_contact_authors_spec.rb
index cac8c3ca0..766fce62a 100644
--- a/spec/lib/diaspora/exporter/non_contact_authors_spec.rb
+++ b/spec/lib/diaspora/exporter/non_contact_authors_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Exporter::NonContactAuthors do
describe "#query" do
let(:user) { FactoryGirl.create(:user_with_aspect) }
diff --git a/spec/lib/diaspora/exporter/others_relayables_spec.rb b/spec/lib/diaspora/exporter/others_relayables_spec.rb
index 95595739f..5f1bc7f4c 100644
--- a/spec/lib/diaspora/exporter/others_relayables_spec.rb
+++ b/spec/lib/diaspora/exporter/others_relayables_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Exporter::OthersRelayables do
let(:status_message) { FactoryGirl.create(:status_message) }
let(:person) { status_message.author }
diff --git a/spec/lib/diaspora/exporter/posts_with_activity_spec.rb b/spec/lib/diaspora/exporter/posts_with_activity_spec.rb
index 4dc27495c..f3c2e83ce 100644
--- a/spec/lib/diaspora/exporter/posts_with_activity_spec.rb
+++ b/spec/lib/diaspora/exporter/posts_with_activity_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Exporter::PostsWithActivity do
let(:user) { FactoryGirl.create(:user) }
let(:instance) { Diaspora::Exporter::PostsWithActivity.new(user) }
diff --git a/spec/lib/diaspora/exporter_spec.rb b/spec/lib/diaspora/exporter_spec.rb
index 7db86e82f..63c4c9c37 100644
--- a/spec/lib/diaspora/exporter_spec.rb
+++ b/spec/lib/diaspora/exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Exporter do
describe "#execute" do
it "calls exporters and forms JSON" do
diff --git a/spec/lib/diaspora/federated/base_spec.rb b/spec/lib/diaspora/federated/base_spec.rb
index 706abb7b3..8da2c370e 100644
--- a/spec/lib/diaspora/federated/base_spec.rb
+++ b/spec/lib/diaspora/federated/base_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/diaspora/federated/contact_retraction_spec.rb b/spec/lib/diaspora/federated/contact_retraction_spec.rb
index bd5c7c3dd..04e19ea1c 100644
--- a/spec/lib/diaspora/federated/contact_retraction_spec.rb
+++ b/spec/lib/diaspora/federated/contact_retraction_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ContactRetraction do
let(:contact) { FactoryGirl.build(:contact, sharing: true, receiving: true) }
let(:retraction) { ContactRetraction.for(contact) }
diff --git a/spec/lib/diaspora/federated/retraction_spec.rb b/spec/lib/diaspora/federated/retraction_spec.rb
index 565f22387..1fe6b9d56 100644
--- a/spec/lib/diaspora/federated/retraction_spec.rb
+++ b/spec/lib/diaspora/federated/retraction_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/diaspora/federation/dispatcher/private_spec.rb b/spec/lib/diaspora/federation/dispatcher/private_spec.rb
index b1fd867a6..4a1e8a90d 100644
--- a/spec/lib/diaspora/federation/dispatcher/private_spec.rb
+++ b/spec/lib/diaspora/federation/dispatcher/private_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Federation::Dispatcher::Private do
let(:post) { FactoryGirl.create(:status_message, author: alice.person, text: "hello", public: false) }
let(:comment) { FactoryGirl.create(:comment, author: alice.person, post: post) }
diff --git a/spec/lib/diaspora/federation/dispatcher/public_spec.rb b/spec/lib/diaspora/federation/dispatcher/public_spec.rb
index f893c7a57..6efc8716f 100644
--- a/spec/lib/diaspora/federation/dispatcher/public_spec.rb
+++ b/spec/lib/diaspora/federation/dispatcher/public_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Federation::Dispatcher::Public do
let(:post) { FactoryGirl.create(:status_message, author: alice.person, text: "hello", public: true) }
let(:comment) { FactoryGirl.create(:comment, author: alice.person, post: post) }
diff --git a/spec/lib/diaspora/federation/dispatcher_spec.rb b/spec/lib/diaspora/federation/dispatcher_spec.rb
index d4baadade..a4faa0ab9 100644
--- a/spec/lib/diaspora/federation/dispatcher_spec.rb
+++ b/spec/lib/diaspora/federation/dispatcher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Federation::Dispatcher do
let(:post) { FactoryGirl.create(:status_message, author: alice.person, text: "hello", public: true) }
let(:opts) { {service_types: "Services::Twitter"} }
diff --git a/spec/lib/diaspora/federation/entities_spec.rb b/spec/lib/diaspora/federation/entities_spec.rb
index 82bad8fb0..69e342539 100644
--- a/spec/lib/diaspora/federation/entities_spec.rb
+++ b/spec/lib/diaspora/federation/entities_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Federation::Entities do
describe ".build" do
it "builds an account deletion" do
diff --git a/spec/lib/diaspora/federation/receive_spec.rb b/spec/lib/diaspora/federation/receive_spec.rb
index a28dacf7f..9a7a8ca21 100644
--- a/spec/lib/diaspora/federation/receive_spec.rb
+++ b/spec/lib/diaspora/federation/receive_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Federation::Receive do
let(:sender) { FactoryGirl.create(:person) }
let(:post) { FactoryGirl.create(:status_message, text: "hello", public: true, author: alice.person) }
diff --git a/spec/lib/diaspora/fetcher/public_spec.rb b/spec/lib/diaspora/fetcher/public_spec.rb
index 08468d105..58f751ef7 100644
--- a/spec/lib/diaspora/fetcher/public_spec.rb
+++ b/spec/lib/diaspora/fetcher/public_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/diaspora/markdownify_email_spec.rb b/spec/lib/diaspora/markdownify_email_spec.rb
index bac2de175..5ed08677f 100644
--- a/spec/lib/diaspora/markdownify_email_spec.rb
+++ b/spec/lib/diaspora/markdownify_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Markdownify::Email do
include Rails.application.routes.url_helpers
diff --git a/spec/lib/diaspora/markdownify_spec.rb b/spec/lib/diaspora/markdownify_spec.rb
index 10ac97a8b..44fdb70a7 100644
--- a/spec/lib/diaspora/markdownify_spec.rb
+++ b/spec/lib/diaspora/markdownify_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Markdownify::HTML do
describe "#autolink" do
before do
diff --git a/spec/lib/diaspora/mentionable_spec.rb b/spec/lib/diaspora/mentionable_spec.rb
index 477e6837b..aef3e12f4 100644
--- a/spec/lib/diaspora/mentionable_spec.rb
+++ b/spec/lib/diaspora/mentionable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Mentionable do
include PeopleHelper
diff --git a/spec/lib/diaspora/message_renderer_spec.rb b/spec/lib/diaspora/message_renderer_spec.rb
index f72adc240..700e3c348 100644
--- a/spec/lib/diaspora/message_renderer_spec.rb
+++ b/spec/lib/diaspora/message_renderer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::MessageRenderer do
MESSAGE_NORMALIZTIONS = {
"\u202a#\u200eUSA\u202c" => "#USA",
diff --git a/spec/lib/diaspora/shareable_spec.rb b/spec/lib/diaspora/shareable_spec.rb
index 716373a4d..f1609d967 100644
--- a/spec/lib/diaspora/shareable_spec.rb
+++ b/spec/lib/diaspora/shareable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Shareable do
describe "scopes" do
context "having multiple objects with equal db IDs" do
diff --git a/spec/lib/diaspora/taggable_spec.rb b/spec/lib/diaspora/taggable_spec.rb
index f3b03f0e5..5008bf1d5 100644
--- a/spec/lib/diaspora/taggable_spec.rb
+++ b/spec/lib/diaspora/taggable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Diaspora::Taggable do
include Rails.application.routes.url_helpers
diff --git a/spec/lib/direction_detector_spec.rb b/spec/lib/direction_detector_spec.rb
index 50c924b8a..3c809ca5b 100644
--- a/spec/lib/direction_detector_spec.rb
+++ b/spec/lib/direction_detector_spec.rb
@@ -1,4 +1,6 @@
# coding: utf-8
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/email_inviter_spec.rb b/spec/lib/email_inviter_spec.rb
index 6db9617ae..3a957cb1b 100644
--- a/spec/lib/email_inviter_spec.rb
+++ b/spec/lib/email_inviter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe EmailInviter do
before do
@user = double(invitation_code: "coolcodebro", present?: true, email: "foo@bar.com")
diff --git a/spec/lib/evil_query_spec.rb b/spec/lib/evil_query_spec.rb
index dbaaf3b02..d83f8cbc8 100644
--- a/spec/lib/evil_query_spec.rb
+++ b/spec/lib/evil_query_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe EvilQuery::MultiStream do
let(:evil_query) { EvilQuery::MultiStream.new(alice, "created_at", Time.zone.now, true) }
diff --git a/spec/lib/i18n_interpolation_fallbacks_spec.rb b/spec/lib/i18n_interpolation_fallbacks_spec.rb
index 5c306849d..c44e60552 100644
--- a/spec/lib/i18n_interpolation_fallbacks_spec.rb
+++ b/spec/lib/i18n_interpolation_fallbacks_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/publisher_spec.rb b/spec/lib/publisher_spec.rb
index f8479d884..55d9fdea8 100644
--- a/spec/lib/publisher_spec.rb
+++ b/spec/lib/publisher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Publisher do
before do
@publisher = Publisher.new(alice)
diff --git a/spec/lib/pubsubhubbub_spec.rb b/spec/lib/pubsubhubbub_spec.rb
index 0292c6472..25e5b26a4 100644
--- a/spec/lib/pubsubhubbub_spec.rb
+++ b/spec/lib/pubsubhubbub_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/stream/activity_spec.rb b/spec/lib/stream/activity_spec.rb
index a57cce580..ad6e01d3f 100644
--- a/spec/lib/stream/activity_spec.rb
+++ b/spec/lib/stream/activity_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Activity do
diff --git a/spec/lib/stream/aspect_spec.rb b/spec/lib/stream/aspect_spec.rb
index 6b5003f3a..21f8ec7b7 100644
--- a/spec/lib/stream/aspect_spec.rb
+++ b/spec/lib/stream/aspect_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/lib/stream/base_spec.rb b/spec/lib/stream/base_spec.rb
index 76ddcd1ba..08fa3d89c 100644
--- a/spec/lib/stream/base_spec.rb
+++ b/spec/lib/stream/base_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Base do
diff --git a/spec/lib/stream/comments_spec.rb b/spec/lib/stream/comments_spec.rb
index 8cc926870..0d43b8ab3 100644
--- a/spec/lib/stream/comments_spec.rb
+++ b/spec/lib/stream/comments_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Comments do
diff --git a/spec/lib/stream/followed_tag_spec.rb b/spec/lib/stream/followed_tag_spec.rb
index 61569d7c4..dad0b2a69 100644
--- a/spec/lib/stream/followed_tag_spec.rb
+++ b/spec/lib/stream/followed_tag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::FollowedTag do
diff --git a/spec/lib/stream/likes_spec.rb b/spec/lib/stream/likes_spec.rb
index f8d1b2503..b12204f16 100644
--- a/spec/lib/stream/likes_spec.rb
+++ b/spec/lib/stream/likes_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Likes do
diff --git a/spec/lib/stream/mention_spec.rb b/spec/lib/stream/mention_spec.rb
index bf292dccd..518191d6d 100644
--- a/spec/lib/stream/mention_spec.rb
+++ b/spec/lib/stream/mention_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Mention do
diff --git a/spec/lib/stream/multi_spec.rb b/spec/lib/stream/multi_spec.rb
index c5c222546..04dbd153d 100644
--- a/spec/lib/stream/multi_spec.rb
+++ b/spec/lib/stream/multi_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Multi do
diff --git a/spec/lib/stream/person_spec.rb b/spec/lib/stream/person_spec.rb
index 2c44377bc..bd1056e81 100644
--- a/spec/lib/stream/person_spec.rb
+++ b/spec/lib/stream/person_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Person do
diff --git a/spec/lib/stream/public_spec.rb b/spec/lib/stream/public_spec.rb
index f6fbe8b5c..7492d8e48 100644
--- a/spec/lib/stream/public_spec.rb
+++ b/spec/lib/stream/public_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Public do
diff --git a/spec/lib/stream/tag_spec.rb b/spec/lib/stream/tag_spec.rb
index afde047f9..c126e7d83 100644
--- a/spec/lib/stream/tag_spec.rb
+++ b/spec/lib/stream/tag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/locale_spec.rb b/spec/locale_spec.rb
index 9aae0dc13..735aea78d 100644
--- a/spec/locale_spec.rb
+++ b/spec/locale_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe 'locale files' do
describe "cldr/plurals.rb" do
AVAILABLE_LANGUAGE_CODES.each do |locale|
diff --git a/spec/mailers/export_spec.rb b/spec/mailers/export_spec.rb
index 0c1e7a9ca..f52202640 100644
--- a/spec/mailers/export_spec.rb
+++ b/spec/mailers/export_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/mailers/maintenance_spec.rb b/spec/mailers/maintenance_spec.rb
index 4b997833b..71955bbb7 100644
--- a/spec/mailers/maintenance_spec.rb
+++ b/spec/mailers/maintenance_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb
index 8e748b32b..ea8ad573e 100644
--- a/spec/mailers/notifier_spec.rb
+++ b/spec/mailers/notifier_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Notifier, type: :mailer do
let(:person) { FactoryGirl.create(:person) }
let(:pod_name) { AppConfig.settings.pod_name }
diff --git a/spec/mailers/report_spec.rb b/spec/mailers/report_spec.rb
index 96699f562..4770a8000 100644
--- a/spec/mailers/report_spec.rb
+++ b/spec/mailers/report_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/account_deletion_spec.rb b/spec/models/account_deletion_spec.rb
index 7fc069984..996eb29ef 100644
--- a/spec/models/account_deletion_spec.rb
+++ b/spec/models/account_deletion_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/account_migration_spec.rb b/spec/models/account_migration_spec.rb
index 0f62a4d8b..02b79dde5 100644
--- a/spec/models/account_migration_spec.rb
+++ b/spec/models/account_migration_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "integration/federation/federation_helper"
describe AccountMigration, type: :model do
diff --git a/spec/models/acts_as_taggable_on_tag_spec.rb b/spec/models/acts_as_taggable_on_tag_spec.rb
index c5d341224..880eebdf0 100644
--- a/spec/models/acts_as_taggable_on_tag_spec.rb
+++ b/spec/models/acts_as_taggable_on_tag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ActsAsTaggableOn::Tag, :type => :model do
subject(:tag) { ActsAsTaggableOn::Tag }
diff --git a/spec/models/api/openid_connect/id_token_spec.rb b/spec/models/api/openid_connect/id_token_spec.rb
index 154bbd90f..22efb08be 100644
--- a/spec/models/api/openid_connect/id_token_spec.rb
+++ b/spec/models/api/openid_connect/id_token_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Api::OpenidConnect::IdToken, type: :model do
describe "#to_jwt" do
let(:auth) { FactoryGirl.create(:auth_with_read) }
diff --git a/spec/models/aspect_membership_spec.rb b/spec/models/aspect_membership_spec.rb
index 6bfda4551..d9585c554 100644
--- a/spec/models/aspect_membership_spec.rb
+++ b/spec/models/aspect_membership_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/aspect_spec.rb b/spec/models/aspect_spec.rb
index 4899a2f40..c5426bf7c 100644
--- a/spec/models/aspect_spec.rb
+++ b/spec/models/aspect_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/aspect_visibility_spec.rb b/spec/models/aspect_visibility_spec.rb
index 61b9aa28b..7689799bc 100644
--- a/spec/models/aspect_visibility_spec.rb
+++ b/spec/models/aspect_visibility_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe AspectVisibility, type: :model do
let(:status_message) { FactoryGirl.create(:status_message) }
let(:aspect) { FactoryGirl.create(:aspect) }
diff --git a/spec/models/block_spec.rb b/spec/models/block_spec.rb
index e85ea6600..e3ee01c42 100644
--- a/spec/models/block_spec.rb
+++ b/spec/models/block_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Block, :type => :model do
describe "validations" do
it "doesnt allow you to block yourself" do
diff --git a/spec/models/comment_signature_spec.rb b/spec/models/comment_signature_spec.rb
index c669786d3..1220a645e 100644
--- a/spec/models/comment_signature_spec.rb
+++ b/spec/models/comment_signature_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb
index 82d46566c..8e84dca2f 100644
--- a/spec/models/comment_spec.rb
+++ b/spec/models/comment_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/contact_spec.rb b/spec/models/contact_spec.rb
index aabad41dc..dd5f5b27c 100644
--- a/spec/models/contact_spec.rb
+++ b/spec/models/contact_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/conversation_spec.rb b/spec/models/conversation_spec.rb
index 4ec3f6140..76dadafcf 100644
--- a/spec/models/conversation_spec.rb
+++ b/spec/models/conversation_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/conversation_visibilities_spec.rb b/spec/models/conversation_visibilities_spec.rb
index 4c968622c..99b4adfc8 100644
--- a/spec/models/conversation_visibilities_spec.rb
+++ b/spec/models/conversation_visibilities_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/invitation_code_spec.rb b/spec/models/invitation_code_spec.rb
index 2912c1415..3525b3a96 100644
--- a/spec/models/invitation_code_spec.rb
+++ b/spec/models/invitation_code_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe InvitationCode, :type => :model do
it 'has a valid factory' do
expect(FactoryGirl.build(:invitation_code)).to be_valid
diff --git a/spec/models/like_signature_spec.rb b/spec/models/like_signature_spec.rb
index 79b5228d4..ff57b76e1 100644
--- a/spec/models/like_signature_spec.rb
+++ b/spec/models/like_signature_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/like_spec.rb b/spec/models/like_spec.rb
index 6236924b1..2701d88dc 100644
--- a/spec/models/like_spec.rb
+++ b/spec/models/like_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/location_spec.rb b/spec/models/location_spec.rb
index 0742ffa50..ba7ab17fd 100644
--- a/spec/models/location_spec.rb
+++ b/spec/models/location_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Location, type: :model do
describe "before validation" do
let(:status) { FactoryGirl.create(:status_message) }
diff --git a/spec/models/mention_spec.rb b/spec/models/mention_spec.rb
index 6fe5ecdb5..5e5e95642 100644
--- a/spec/models/mention_spec.rb
+++ b/spec/models/mention_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/message_spec.rb b/spec/models/message_spec.rb
index e2588a502..6127c008f 100644
--- a/spec/models/message_spec.rb
+++ b/spec/models/message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb
index 392fc3940..14f5d9b4b 100644
--- a/spec/models/notification_spec.rb
+++ b/spec/models/notification_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/notifications/also_commented_spec.rb b/spec/models/notifications/also_commented_spec.rb
index ba57068f7..dd4039285 100644
--- a/spec/models/notifications/also_commented_spec.rb
+++ b/spec/models/notifications/also_commented_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/notifications/mentioned_in_post_spec.rb b/spec/models/notifications/mentioned_in_post_spec.rb
index 90c5b007d..bbf6b02b8 100644
--- a/spec/models/notifications/mentioned_in_post_spec.rb
+++ b/spec/models/notifications/mentioned_in_post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Notifications::MentionedInPost, type: :model do
let(:sm) {
FactoryGirl.create(:status_message, author: alice.person, text: "hi @{bob; #{bob.diaspora_handle}}", public: true)
diff --git a/spec/models/notifications/mentioned_spec.rb b/spec/models/notifications/mentioned_spec.rb
index 2256a35a8..90e112aa3 100644
--- a/spec/models/notifications/mentioned_spec.rb
+++ b/spec/models/notifications/mentioned_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Notifications::Mentioned do
class TestNotification < Notification
include Notifications::Mentioned
diff --git a/spec/models/notifications/private_message_spec.rb b/spec/models/notifications/private_message_spec.rb
index 327312ff6..0879a1cb2 100644
--- a/spec/models/notifications/private_message_spec.rb
+++ b/spec/models/notifications/private_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/notifications/reshared_spec.rb b/spec/models/notifications/reshared_spec.rb
index 6a9cb82ab..739fd79e4 100644
--- a/spec/models/notifications/reshared_spec.rb
+++ b/spec/models/notifications/reshared_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/notifications/started_sharing_spec.rb b/spec/models/notifications/started_sharing_spec.rb
index 4c5a094b8..9239767a3 100644
--- a/spec/models/notifications/started_sharing_spec.rb
+++ b/spec/models/notifications/started_sharing_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Notifications::StartedSharing, type: :model do
let(:contact) { alice.contact_for(bob.person) }
let(:started_sharing_notification) { Notifications::StartedSharing.new(recipient: alice) }
diff --git a/spec/models/open_graph_cache_spec.rb b/spec/models/open_graph_cache_spec.rb
index 8edd764c6..40d7eebd8 100644
--- a/spec/models/open_graph_cache_spec.rb
+++ b/spec/models/open_graph_cache_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/participation_spec.rb b/spec/models/participation_spec.rb
index 7ee4d189b..8ce158f1e 100644
--- a/spec/models/participation_spec.rb
+++ b/spec/models/participation_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Participation, type: :model do
let(:status) { bob.post(:status_message, text: "hello", to: bob.aspects.first.id) }
diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb
index 7cfe69ab9..8087506d8 100644
--- a/spec/models/person_spec.rb
+++ b/spec/models/person_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb
index 31d4afff6..225d609a8 100644
--- a/spec/models/photo_spec.rb
+++ b/spec/models/photo_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/pod_spec.rb b/spec/models/pod_spec.rb
index 99e860c0b..a8001d3a8 100644
--- a/spec/models/pod_spec.rb
+++ b/spec/models/pod_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pod, type: :model do
describe ".find_or_create_by" do
it "takes a url, and makes one by host" do
diff --git a/spec/models/poll_answer_spec.rb b/spec/models/poll_answer_spec.rb
index 780f2b7b3..b670cb09d 100644
--- a/spec/models/poll_answer_spec.rb
+++ b/spec/models/poll_answer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PollAnswer, :type => :model do
before do
@status = FactoryGirl.create(:status_message_with_poll)
diff --git a/spec/models/poll_participation_signature_spec.rb b/spec/models/poll_participation_signature_spec.rb
index 181b4d94f..52c774ff1 100644
--- a/spec/models/poll_participation_signature_spec.rb
+++ b/spec/models/poll_participation_signature_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/poll_participation_spec.rb b/spec/models/poll_participation_spec.rb
index 677da69f0..581be0663 100644
--- a/spec/models/poll_participation_spec.rb
+++ b/spec/models/poll_participation_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PollParticipation, type: :model do
let(:status) { bob.post(:status_message, text: "hello", to: bob.aspects.first.id) }
let(:poll) { Poll.new(question: "Who is in charge?") }
diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb
index 8a8add824..382fae7f7 100644
--- a/spec/models/poll_spec.rb
+++ b/spec/models/poll_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Poll, type: :model do
let(:status) { FactoryGirl.create(:status_message) }
let(:poll) { Poll.new(question: "What do you think about apples?", status_message: status) }
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb
index db63c2e26..98f38ff6f 100644
--- a/spec/models/post_spec.rb
+++ b/spec/models/post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb
index 678dc677c..a6d941d1d 100644
--- a/spec/models/profile_spec.rb
+++ b/spec/models/profile_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb
index 12b843656..662768f4f 100644
--- a/spec/models/report_spec.rb
+++ b/spec/models/report_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/reshare_spec.rb b/spec/models/reshare_spec.rb
index de2f652ce..39cbbcbf2 100644
--- a/spec/models/reshare_spec.rb
+++ b/spec/models/reshare_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Reshare, type: :model do
it "has a valid Factory" do
expect(FactoryGirl.build(:reshare)).to be_valid
diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb
index dad31a04d..051f63b67 100644
--- a/spec/models/role_spec.rb
+++ b/spec/models/role_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Role do
let!(:person) { create(:person) }
let!(:admin) { create(:person) }
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
index b15287a38..57223b981 100644
--- a/spec/models/service_spec.rb
+++ b/spec/models/service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Service, :type => :model do
before do
@post = alice.post(:status_message, :text => "hello", :to => alice.aspects.first.id)
diff --git a/spec/models/services/facebook_spec.rb b/spec/models/services/facebook_spec.rb
index ec5176b4c..b0ba24605 100644
--- a/spec/models/services/facebook_spec.rb
+++ b/spec/models/services/facebook_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Services::Facebook, :type => :model do
before do
@user = alice
diff --git a/spec/models/services/tumblr_spec.rb b/spec/models/services/tumblr_spec.rb
index 43113a590..0da20eb37 100644
--- a/spec/models/services/tumblr_spec.rb
+++ b/spec/models/services/tumblr_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Services::Tumblr, type: :model do
let(:user) { alice }
let(:post) { user.post(:status_message, text: "hello", to: user.aspects.first.id) }
diff --git a/spec/models/services/twitter_spec.rb b/spec/models/services/twitter_spec.rb
index 79469a8c1..a2b10c617 100644
--- a/spec/models/services/twitter_spec.rb
+++ b/spec/models/services/twitter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Services::Twitter, :type => :model do
before do
@user = alice
diff --git a/spec/models/services/wordpress_spec.rb b/spec/models/services/wordpress_spec.rb
index 4b52ae34a..82e971539 100644
--- a/spec/models/services/wordpress_spec.rb
+++ b/spec/models/services/wordpress_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Services::Wordpress, type: :model do
before do
@user = alice
diff --git a/spec/models/share_visibility_spec.rb b/spec/models/share_visibility_spec.rb
index a4ba6f361..0efc50820 100644
--- a/spec/models/share_visibility_spec.rb
+++ b/spec/models/share_visibility_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/signature_order_spec.rb b/spec/models/signature_order_spec.rb
index e3d207281..795c6b57d 100644
--- a/spec/models/signature_order_spec.rb
+++ b/spec/models/signature_order_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb
index d7632958e..531a602e6 100644
--- a/spec/models/status_message_spec.rb
+++ b/spec/models/status_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/tag_following_spec.rb b/spec/models/tag_following_spec.rb
index cc159a255..ee5fa80b0 100644
--- a/spec/models/tag_following_spec.rb
+++ b/spec/models/tag_following_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe TagFollowing, :type => :model do
before do
@tag = FactoryGirl.build(:tag)
diff --git a/spec/models/user/authentication_token_spec.rb b/spec/models/user/authentication_token_spec.rb
index f43a41557..73cce8fc3 100644
--- a/spec/models/user/authentication_token_spec.rb
+++ b/spec/models/user/authentication_token_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe User::AuthenticationToken, type: :model do
describe "#reset_authentication_token!" do
it "sets the authentication token" do
diff --git a/spec/models/user/connecting_spec.rb b/spec/models/user/connecting_spec.rb
index 2d6d53f9d..be4125cc4 100644
--- a/spec/models/user/connecting_spec.rb
+++ b/spec/models/user/connecting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb
index dd24509ed..4998d48dc 100644
--- a/spec/models/user/posting_spec.rb
+++ b/spec/models/user/posting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/user/querying_spec.rb b/spec/models/user/querying_spec.rb
index 18ea07dfd..53843a7bc 100644
--- a/spec/models/user/querying_spec.rb
+++ b/spec/models/user/querying_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/models/user/social_actions_spec.rb b/spec/models/user/social_actions_spec.rb
index 3f4ff57b3..43065ef62 100644
--- a/spec/models/user/social_actions_spec.rb
+++ b/spec/models/user/social_actions_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe User::SocialActions, type: :model do
let(:status) { FactoryGirl.create(:status_message, public: true, author: bob.person) }
diff --git a/spec/models/user_preference_spec.rb b/spec/models/user_preference_spec.rb
index 3f1ced13c..761dafaa4 100644
--- a/spec/models/user_preference_spec.rb
+++ b/spec/models/user_preference_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe UserPreference, :type => :model do
it 'should only allow valid email types to exist' do
pref = alice.user_preferences.new(:email_type => 'not_valid')
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index c74969c0e..0304d432d 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/presenters/aspect_membership_presenter_spec.rb b/spec/presenters/aspect_membership_presenter_spec.rb
index 971fdb9e4..4ee5ea206 100644
--- a/spec/presenters/aspect_membership_presenter_spec.rb
+++ b/spec/presenters/aspect_membership_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe AspectMembershipPresenter do
before do
@am = alice.aspects.where(:name => "generic").first.aspect_memberships.first
diff --git a/spec/presenters/aspect_presenter_spec.rb b/spec/presenters/aspect_presenter_spec.rb
index 74dd52a41..fd4d52830 100644
--- a/spec/presenters/aspect_presenter_spec.rb
+++ b/spec/presenters/aspect_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe AspectPresenter do
before do
@presenter = AspectPresenter.new(bob.aspects.first)
diff --git a/spec/presenters/avatar_presenter_spec.rb b/spec/presenters/avatar_presenter_spec.rb
index f51b4ef83..c025d0f6d 100644
--- a/spec/presenters/avatar_presenter_spec.rb
+++ b/spec/presenters/avatar_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe AvatarPresenter do
describe "#base_hash" do
it "calls image_url() for the avatars" do
diff --git a/spec/presenters/base_presenter_spec.rb b/spec/presenters/base_presenter_spec.rb
index 108594c01..8ee2ba5d8 100644
--- a/spec/presenters/base_presenter_spec.rb
+++ b/spec/presenters/base_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe BasePresenter do
it "falls back to nil" do
p = BasePresenter.new(nil)
diff --git a/spec/presenters/contact_presenter_spec.rb b/spec/presenters/contact_presenter_spec.rb
index dc24a0b3a..feaa204e4 100644
--- a/spec/presenters/contact_presenter_spec.rb
+++ b/spec/presenters/contact_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ContactPresenter do
before do
@presenter = ContactPresenter.new(alice.contact_for(bob.person), alice)
diff --git a/spec/presenters/node_info_presenter_spec.rb b/spec/presenters/node_info_presenter_spec.rb
index 737ee07f7..958a67df2 100644
--- a/spec/presenters/node_info_presenter_spec.rb
+++ b/spec/presenters/node_info_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NodeInfoPresenter do
let(:presenter) { NodeInfoPresenter.new("1.0") }
let(:hash) { presenter.as_json.as_json }
diff --git a/spec/presenters/o_embed_presenter_spec.rb b/spec/presenters/o_embed_presenter_spec.rb
index 55c19a80e..355598a71 100644
--- a/spec/presenters/o_embed_presenter_spec.rb
+++ b/spec/presenters/o_embed_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe OEmbedPresenter do
before do
@oembed = OEmbedPresenter.new(FactoryGirl.create(:status_message))
diff --git a/spec/presenters/person_presenter_spec.rb b/spec/presenters/person_presenter_spec.rb
index c21965f9b..e2a6da75a 100644
--- a/spec/presenters/person_presenter_spec.rb
+++ b/spec/presenters/person_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PersonPresenter do
let(:profile_user) { FactoryGirl.create(:user_with_aspect) }
let(:person) { profile_user.person }
diff --git a/spec/presenters/post_interaction_presenter_spec.rb b/spec/presenters/post_interaction_presenter_spec.rb
index c7306a37a..4623493fd 100644
--- a/spec/presenters/post_interaction_presenter_spec.rb
+++ b/spec/presenters/post_interaction_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PostInteractionPresenter do
let(:status_message_without_participation) {
FactoryGirl.create(:status_message_without_participation)
diff --git a/spec/presenters/post_presenter_spec.rb b/spec/presenters/post_presenter_spec.rb
index d3bbd6cd0..14974d073 100644
--- a/spec/presenters/post_presenter_spec.rb
+++ b/spec/presenters/post_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PostPresenter do
let(:status_message) { FactoryGirl.create(:status_message, public: true) }
let(:status_message_with_poll) { FactoryGirl.create(:status_message_with_poll, public: true) }
diff --git a/spec/presenters/profile_presenter_spec.rb b/spec/presenters/profile_presenter_spec.rb
index 8084490e6..44167a150 100644
--- a/spec/presenters/profile_presenter_spec.rb
+++ b/spec/presenters/profile_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ProfilePresenter do
let(:profile) { FactoryGirl.create(:profile_with_image_url, person: alice.person) }
diff --git a/spec/presenters/service_presenter_spec.rb b/spec/presenters/service_presenter_spec.rb
index 997952795..f9d13cb92 100644
--- a/spec/presenters/service_presenter_spec.rb
+++ b/spec/presenters/service_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ServicePresenter do
describe '#as_json' do
it 'includes the provider name of the json' do
diff --git a/spec/presenters/social_relay_presenter_spec.rb b/spec/presenters/social_relay_presenter_spec.rb
index 61a80edf8..3e8215f9c 100644
--- a/spec/presenters/social_relay_presenter_spec.rb
+++ b/spec/presenters/social_relay_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe SocialRelayPresenter do
before do
@presenter = SocialRelayPresenter.new
diff --git a/spec/presenters/user_presenter_spec.rb b/spec/presenters/user_presenter_spec.rb
index eeb463316..9c08820bb 100644
--- a/spec/presenters/user_presenter_spec.rb
+++ b/spec/presenters/user_presenter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe UserPresenter do
before do
@presenter = UserPresenter.new(bob, [])
diff --git a/spec/serializers/export/aspect_serializer_spec.rb b/spec/serializers/export/aspect_serializer_spec.rb
index bc3399757..bd13b7b2b 100644
--- a/spec/serializers/export/aspect_serializer_spec.rb
+++ b/spec/serializers/export/aspect_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::AspectSerializer do
let(:aspect) { FactoryGirl.create(:aspect) }
let(:serializer) { Export::AspectSerializer.new(aspect) }
diff --git a/spec/serializers/export/contact_serializer_spec.rb b/spec/serializers/export/contact_serializer_spec.rb
index c2578e647..53be08f27 100644
--- a/spec/serializers/export/contact_serializer_spec.rb
+++ b/spec/serializers/export/contact_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::ContactSerializer do
let(:contact) { FactoryGirl.create(:contact) }
let(:serializer) { Export::ContactSerializer.new(contact) }
diff --git a/spec/serializers/export/others_data_serializer_spec.rb b/spec/serializers/export/others_data_serializer_spec.rb
index 81d9be478..3c06563aa 100644
--- a/spec/serializers/export/others_data_serializer_spec.rb
+++ b/spec/serializers/export/others_data_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::OthersDataSerializer do
let(:user) { FactoryGirl.create(:user) }
let(:serializer) { Export::OthersDataSerializer.new(user) }
diff --git a/spec/serializers/export/own_post_serializer_spec.rb b/spec/serializers/export/own_post_serializer_spec.rb
index 91228ccf8..b9580785f 100644
--- a/spec/serializers/export/own_post_serializer_spec.rb
+++ b/spec/serializers/export/own_post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::OwnPostSerializer do
let(:author) { FactoryGirl.create(:user_with_aspect).person }
diff --git a/spec/serializers/export/own_relayables_serializer_spec.rb b/spec/serializers/export/own_relayables_serializer_spec.rb
index 9906cdf9b..d11dee61d 100644
--- a/spec/serializers/export/own_relayables_serializer_spec.rb
+++ b/spec/serializers/export/own_relayables_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::OwnRelayablesSerializer do
let(:comment) { FactoryGirl.create(:comment) }
let!(:signature) { FactoryGirl.create(:comment_signature, comment: comment) }
diff --git a/spec/serializers/export/person_metadata_serializer_spec.rb b/spec/serializers/export/person_metadata_serializer_spec.rb
index d284c303e..8a278da78 100644
--- a/spec/serializers/export/person_metadata_serializer_spec.rb
+++ b/spec/serializers/export/person_metadata_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::PersonMetadataSerializer do
let(:person) { FactoryGirl.create(:person) }
let(:serializer) { Export::PersonMetadataSerializer.new(person) }
diff --git a/spec/serializers/export/user_serializer_spec.rb b/spec/serializers/export/user_serializer_spec.rb
index e5022e5fd..0340b696c 100644
--- a/spec/serializers/export/user_serializer_spec.rb
+++ b/spec/serializers/export/user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Export::UserSerializer do
let(:user) { FactoryGirl.create(:user) }
let(:serializer) { Export::UserSerializer.new(user, root: false) }
diff --git a/spec/serializers/federation_entity_serializer_spec.rb b/spec/serializers/federation_entity_serializer_spec.rb
index 7dcbd3bdf..88a3a8d3c 100644
--- a/spec/serializers/federation_entity_serializer_spec.rb
+++ b/spec/serializers/federation_entity_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe FederationEntitySerializer do
class TestEntity < DiasporaFederation::Entity
property :test, :string
diff --git a/spec/serializers/notification_serializer_spec.rb b/spec/serializers/notification_serializer_spec.rb
index 156dc5ee5..3a5b5f914 100644
--- a/spec/serializers/notification_serializer_spec.rb
+++ b/spec/serializers/notification_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NotificationSerializer do
let(:notifications_controller) { NotificationsController.new }
diff --git a/spec/serializers/serializer_post_processing_spec.rb b/spec/serializers/serializer_post_processing_spec.rb
index 8cb140fd6..3880aca53 100644
--- a/spec/serializers/serializer_post_processing_spec.rb
+++ b/spec/serializers/serializer_post_processing_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe SerializerPostProcessing do
describe "#modify_serializable_object" do
it "allows to modify serializable object of ActiveModel::Serializer ancestor" do
diff --git a/spec/services/comment_service_spec.rb b/spec/services/comment_service_spec.rb
index 9ec6facff..c04002cdc 100644
--- a/spec/services/comment_service_spec.rb
+++ b/spec/services/comment_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe CommentService do
let(:post) { alice.post(:status_message, text: "hello", to: alice.aspects.first) }
diff --git a/spec/services/like_service_spec.rb b/spec/services/like_service_spec.rb
index 2d711b612..59d890fe0 100644
--- a/spec/services/like_service_spec.rb
+++ b/spec/services/like_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe LikeService do
let(:post) { alice.post(:status_message, text: "hello", to: alice.aspects.first) }
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 8ef4bec5d..e690b8de8 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe NotificationService do
describe "notification interrelation" do
context "with mention in comment" do
diff --git a/spec/services/post_service_spec.rb b/spec/services/post_service_spec.rb
index 2ee820ec1..21fdf7a24 100644
--- a/spec/services/post_service_spec.rb
+++ b/spec/services/post_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe PostService do
let(:post) { alice.post(:status_message, text: "ohai", to: alice.aspects.first) }
let(:public) { alice.post(:status_message, text: "hey", public: true) }
diff --git a/spec/services/reshare_service.rb b/spec/services/reshare_service.rb
index 4541b64e2..efff50386 100644
--- a/spec/services/reshare_service.rb
+++ b/spec/services/reshare_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe ReshareService do
let(:post) { alice.post(:status_message, text: "hello", public: true) }
diff --git a/spec/services/status_message_creation_service_spec.rb b/spec/services/status_message_creation_service_spec.rb
index 47838d172..a7b9f05c3 100644
--- a/spec/services/status_message_creation_service_spec.rb
+++ b/spec/services/status_message_creation_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe StatusMessageCreationService do
describe "#create" do
let(:aspect) { alice.aspects.first }
diff --git a/spec/shared_behaviors/account_deletion.rb b/spec/shared_behaviors/account_deletion.rb
index 2f7b8f8d9..d4019937a 100644
--- a/spec/shared_behaviors/account_deletion.rb
+++ b/spec/shared_behaviors/account_deletion.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/shared_behaviors/account_migration.rb b/spec/shared_behaviors/account_migration.rb
index 5da2f3b62..7187c44c3 100644
--- a/spec/shared_behaviors/account_migration.rb
+++ b/spec/shared_behaviors/account_migration.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_context "with local old user" do
let(:old_user) { FactoryGirl.create(:user) }
let(:old_person) { old_user.person }
diff --git a/spec/shared_behaviors/dispatcher.rb b/spec/shared_behaviors/dispatcher.rb
index b168465d8..2b42dec00 100644
--- a/spec/shared_behaviors/dispatcher.rb
+++ b/spec/shared_behaviors/dispatcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples "a dispatcher" do
describe "#dispatch" do
context "deliver to user services" do
diff --git a/spec/shared_behaviors/federation_entity_serializer.rb b/spec/shared_behaviors/federation_entity_serializer.rb
index ef1505fc4..f8f103d4f 100644
--- a/spec/shared_behaviors/federation_entity_serializer.rb
+++ b/spec/shared_behaviors/federation_entity_serializer.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "a federation entity serializer" do
describe "#to_json" do
it "contains JSON serialized entity object" do
diff --git a/spec/shared_behaviors/mentions_container.rb b/spec/shared_behaviors/mentions_container.rb
index 50e4efdc9..1378be9d3 100644
--- a/spec/shared_behaviors/mentions_container.rb
+++ b/spec/shared_behaviors/mentions_container.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "it is mentions container" do
let(:people) { [alice, bob, eve].map(&:person) }
let(:test_string) {
diff --git a/spec/shared_behaviors/receiving.rb b/spec/shared_behaviors/receiving.rb
index 999147427..930d71aea 100644
--- a/spec/shared_behaviors/receiving.rb
+++ b/spec/shared_behaviors/receiving.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "it ignores existing object received twice" do |klass|
it "return nil if the #{klass} already exists" do
expect(Diaspora::Federation::Receive.perform(entity)).not_to be_nil
diff --git a/spec/shared_behaviors/relayable.rb b/spec/shared_behaviors/relayable.rb
index e50ab1161..a80476c28 100644
--- a/spec/shared_behaviors/relayable.rb
+++ b/spec/shared_behaviors/relayable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/shared_behaviors/shareable.rb b/spec/shared_behaviors/shareable.rb
index a857ab5a7..fba7aaeae 100644
--- a/spec/shared_behaviors/shareable.rb
+++ b/spec/shared_behaviors/shareable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "a shareable" do
describe "#subscribed_pods_uris" do
let(:pods) { Array.new(3) { FactoryGirl.create(:pod) } }
diff --git a/spec/shared_behaviors/signature.rb b/spec/shared_behaviors/signature.rb
index 389cf2838..61b1d87d5 100644
--- a/spec/shared_behaviors/signature.rb
+++ b/spec/shared_behaviors/signature.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "signature data" do
let(:relayable) { FactoryGirl.create(relayable_type) }
let(:signature) {
diff --git a/spec/shared_behaviors/stream.rb b/spec/shared_behaviors/stream.rb
index 91d00d513..3b07486f2 100644
--- a/spec/shared_behaviors/stream.rb
+++ b/spec/shared_behaviors/stream.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for 'it is a stream' do
context 'required methods for display' do
it '#title' do
diff --git a/spec/shared_behaviors/taggable.rb b/spec/shared_behaviors/taggable.rb
index d6accd6a4..6652d0766 100644
--- a/spec/shared_behaviors/taggable.rb
+++ b/spec/shared_behaviors/taggable.rb
@@ -1,4 +1,6 @@
# coding: utf-8
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/spec-doc.rb b/spec/spec-doc.rb
deleted file mode 100644
index d1e778b12..000000000
--- a/spec/spec-doc.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-class SpecDoc
- def initialize(response)
- @html = Nokogiri::HTML(response.body)
- end
-
- def method_missing(method, *args)
- @html.send method, *args
- end
-
- def has_content?(string)
- escaped = string.gsub("'", "\\'")
- @html.xpath("//*[contains(text(), '#{escaped}')]").any?
- end
- def has_no_content?(string)
- ! has_content?(string)
- end
-
- def has_link?(text)
- @html.xpath("//a[text()='#{text}']").any?
- end
-end
-
-def doc
- SpecDoc.new response
-end
diff --git a/spec/spec/data_generator_spec.rb b/spec/spec/data_generator_spec.rb
index 1e2800245..5c6b46db6 100644
--- a/spec/spec/data_generator_spec.rb
+++ b/spec/spec/data_generator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :have_subscribers do
match do |posts|
posts.map(&:subscribers).delete_if(&:empty?).any?
diff --git a/spec/spec/misc_spec.rb b/spec/spec/misc_spec.rb
index 494e8a91d..3690af955 100644
--- a/spec/spec/misc_spec.rb
+++ b/spec/spec/misc_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 493ee8b36..3be837537 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
@@ -9,7 +11,6 @@ Coveralls.wear!('rails')
require File.join(File.dirname(__FILE__), "..", "config", "environment")
require Rails.root.join("spec", "helper_methods")
-require Rails.root.join("spec", "spec-doc")
require "rspec/rails"
require "webmock/rspec"
require "factory_girl"
diff --git a/spec/support/account_matchers.rb b/spec/support/account_matchers.rb
index 758e2b583..7be32e7b5 100644
--- a/spec/support/account_matchers.rb
+++ b/spec/support/account_matchers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :be_a_discovered_person do
match do |person|
!Person.by_account_identifier(person.diaspora_handle).nil?
diff --git a/spec/support/data_generator.rb b/spec/support/data_generator.rb
index 77194201d..a2849a6f9 100644
--- a/spec/support/data_generator.rb
+++ b/spec/support/data_generator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# This is a helper class for tests that is capable of generating different sets of data, which are possibly
# interrelated.
class DataGenerator
diff --git a/spec/support/fake_http_request.rb b/spec/support/fake_http_request.rb
index f4f56e868..be71ba5d5 100644
--- a/spec/support/fake_http_request.rb
+++ b/spec/support/fake_http_request.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class FakeHttpRequest
def initialize(callback_wanted)
@callback = callback_wanted
diff --git a/spec/support/fixture_builder.rb b/spec/support/fixture_builder.rb
index 7d8eb3a09..b88c24953 100644
--- a/spec/support/fixture_builder.rb
+++ b/spec/support/fixture_builder.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
FixtureBuilder.configure do |fbuilder|
# rebuild fixtures automatically when these files change:
diff --git a/spec/support/fixture_generation.rb b/spec/support/fixture_generation.rb
index 3f3496c42..27f92512f 100644
--- a/spec/support/fixture_generation.rb
+++ b/spec/support/fixture_generation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module JasmineFixtureGeneration
# Saves the markup to a fixture file using the given name
def save_fixture(markup, name, fixture_path=nil )
diff --git a/spec/support/gon.rb b/spec/support/gon.rb
index 418c755b6..552e1aba7 100644
--- a/spec/support/gon.rb
+++ b/spec/support/gon.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_context :gon do
let(:gon) { RequestStore.store[:gon].gon }
end
diff --git a/spec/support/inlined_jobs.rb b/spec/support/inlined_jobs.rb
index 96af22d09..daef7e15b 100644
--- a/spec/support/inlined_jobs.rb
+++ b/spec/support/inlined_jobs.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module HelperMethods
def inlined_jobs
Sidekiq::Worker.clear_all
diff --git a/spec/support/serializer_matchers.rb b/spec/support/serializer_matchers.rb
index 0d9ec4382..0a1eff813 100644
--- a/spec/support/serializer_matchers.rb
+++ b/spec/support/serializer_matchers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# This file contains custom RSpec matchers for AMS.
# NOTE: It was developed for AMS v0.9 and the API might be changed in future, so that should be examined when moving
# between stable versions of AMS (e.g. 0.9 to 0.10, or 0.9 to a possible 1.0).
diff --git a/spec/support/user_methods.rb b/spec/support/user_methods.rb
index 48fec7aba..7e37e1251 100644
--- a/spec/support/user_methods.rb
+++ b/spec/support/user_methods.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class User
alias_method :share_with_original, :share_with
diff --git a/spec/workers/deferred_dispatch_spec.rb b/spec/workers/deferred_dispatch_spec.rb
index f39a1ac98..803a5e83a 100644
--- a/spec/workers/deferred_dispatch_spec.rb
+++ b/spec/workers/deferred_dispatch_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::DeferredDispatch do
it "handles non existing records gracefully" do
expect {
diff --git a/spec/workers/delete_account_spec.rb b/spec/workers/delete_account_spec.rb
index 8c6fbff89..374564895 100644
--- a/spec/workers/delete_account_spec.rb
+++ b/spec/workers/delete_account_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/delete_post_from_service_spec.rb b/spec/workers/delete_post_from_service_spec.rb
index 4aee4aef7..48a9b85c1 100644
--- a/spec/workers/delete_post_from_service_spec.rb
+++ b/spec/workers/delete_post_from_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::DeletePostFromService do
it "calls service#delete_from_service with given opts" do
service = double
diff --git a/spec/workers/export_photos_spec.rb b/spec/workers/export_photos_spec.rb
index e5ee4c47d..8fb79617b 100644
--- a/spec/workers/export_photos_spec.rb
+++ b/spec/workers/export_photos_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ExportPhotos do
before do
allow(User).to receive(:find).with(alice.id).and_return(alice)
diff --git a/spec/workers/export_user_spec.rb b/spec/workers/export_user_spec.rb
index 65ebfb356..72b0c341f 100644
--- a/spec/workers/export_user_spec.rb
+++ b/spec/workers/export_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ExportUser do
before do
allow(User).to receive(:find).with(alice.id).and_return(alice)
diff --git a/spec/workers/fetch_profile_photo_spec.rb b/spec/workers/fetch_profile_photo_spec.rb
index 66106b278..ab99e6b20 100644
--- a/spec/workers/fetch_profile_photo_spec.rb
+++ b/spec/workers/fetch_profile_photo_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::FetchProfilePhoto do
before do
@user = alice
diff --git a/spec/workers/fetch_webfinger_spec.rb b/spec/workers/fetch_webfinger_spec.rb
index 7a3b667fb..234c7d215 100644
--- a/spec/workers/fetch_webfinger_spec.rb
+++ b/spec/workers/fetch_webfinger_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::FetchWebfinger do
it "should webfinger and queue a job to fetch public posts" do
@person = FactoryGirl.create(:person)
diff --git a/spec/workers/gather_o_embed_data_spec.rb b/spec/workers/gather_o_embed_data_spec.rb
index 6d9fe1484..298fd4585 100644
--- a/spec/workers/gather_o_embed_data_spec.rb
+++ b/spec/workers/gather_o_embed_data_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::GatherOEmbedData do
before do
@flickr_oembed_data = {
diff --git a/spec/workers/gather_open_graph_data_spec.rb b/spec/workers/gather_open_graph_data_spec.rb
index 74aefe548..c5a91c058 100644
--- a/spec/workers/gather_open_graph_data_spec.rb
+++ b/spec/workers/gather_open_graph_data_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::GatherOpenGraphData do
before do
@ogsite_title = 'Homepage'
diff --git a/spec/workers/mail/csrf_token_fail_spec.rb b/spec/workers/mail/csrf_token_fail_spec.rb
index 8c94f8663..010d7474e 100644
--- a/spec/workers/mail/csrf_token_fail_spec.rb
+++ b/spec/workers/mail/csrf_token_fail_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/mail/invite_email_spec.rb b/spec/workers/mail/invite_email_spec.rb
index 70ad6a2c9..44e0cef79 100644
--- a/spec/workers/mail/invite_email_spec.rb
+++ b/spec/workers/mail/invite_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::Mail::InviteEmail do
let(:emails) { ['foo@bar.com', 'baz@bar.com'] }
let(:message) { 'get over here!' }
diff --git a/spec/workers/mail/liked_spec.rb b/spec/workers/mail/liked_spec.rb
index 7ab94586a..565305937 100644
--- a/spec/workers/mail/liked_spec.rb
+++ b/spec/workers/mail/liked_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::Mail::Liked do
describe "#perform" do
it "should call .deliver_now on the notifier object" do
diff --git a/spec/workers/mail/mentioned_spec.rb b/spec/workers/mail/mentioned_spec.rb
index cc06f5d58..a96c6b966 100644
--- a/spec/workers/mail/mentioned_spec.rb
+++ b/spec/workers/mail/mentioned_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/mail/private_message_spec.rb b/spec/workers/mail/private_message_spec.rb
index 7b8401986..623897150 100644
--- a/spec/workers/mail/private_message_spec.rb
+++ b/spec/workers/mail/private_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/mail/reshared_spec.rb b/spec/workers/mail/reshared_spec.rb
index d1ebd9908..595f1b78b 100644
--- a/spec/workers/mail/reshared_spec.rb
+++ b/spec/workers/mail/reshared_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/post_to_service_spec.rb b/spec/workers/post_to_service_spec.rb
index 1a4370b81..8c3fe0ef6 100644
--- a/spec/workers/post_to_service_spec.rb
+++ b/spec/workers/post_to_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::PostToService do
it 'calls service#post with the given service' do
user = alice
diff --git a/spec/workers/process_photo_spec.rb b/spec/workers/process_photo_spec.rb
index e7bfc5312..e9c7e645e 100644
--- a/spec/workers/process_photo_spec.rb
+++ b/spec/workers/process_photo_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ProcessPhoto do
before do
@user = alice
diff --git a/spec/workers/publish_to_hub_spec.rb b/spec/workers/publish_to_hub_spec.rb
index 62656d4de..a98d035c4 100644
--- a/spec/workers/publish_to_hub_spec.rb
+++ b/spec/workers/publish_to_hub_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
diff --git a/spec/workers/queue_users_for_removal_spec.rb b/spec/workers/queue_users_for_removal_spec.rb
index 19c25cc0a..a87d4664f 100644
--- a/spec/workers/queue_users_for_removal_spec.rb
+++ b/spec/workers/queue_users_for_removal_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::QueueUsersForRemoval do
describe 'remove_old_users is active' do
before do
diff --git a/spec/workers/receive_private_spec.rb b/spec/workers/receive_private_spec.rb
index b4089e51c..288db75e3 100644
--- a/spec/workers/receive_private_spec.rb
+++ b/spec/workers/receive_private_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ReceivePrivate do
let(:data) { "" }
diff --git a/spec/workers/receive_public_spec.rb b/spec/workers/receive_public_spec.rb
index 62e6a5632..2b97dbd20 100644
--- a/spec/workers/receive_public_spec.rb
+++ b/spec/workers/receive_public_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ReceivePublic do
let(:data) { "" }
diff --git a/spec/workers/recheck_offline_pods_spec.rb b/spec/workers/recheck_offline_pods_spec.rb
index 6dc59b0e5..cd1ab90b0 100644
--- a/spec/workers/recheck_offline_pods_spec.rb
+++ b/spec/workers/recheck_offline_pods_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::RecheckScheduledPods do
it "performs a connection test on all scheduled pods" do
(0..4).map { FactoryGirl.create(:pod) }
diff --git a/spec/workers/recurring_pod_check_spec.rb b/spec/workers/recurring_pod_check_spec.rb
index cba3c0543..f5ed5e65a 100644
--- a/spec/workers/recurring_pod_check_spec.rb
+++ b/spec/workers/recurring_pod_check_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::RecurringPodCheck do
before do
@pods = (0..4).map do
diff --git a/spec/workers/remove_old_user_spec.rb b/spec/workers/remove_old_user_spec.rb
index 91c3efa9e..d1b76b6ce 100644
--- a/spec/workers/remove_old_user_spec.rb
+++ b/spec/workers/remove_old_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::RemoveOldUser do
describe 'remove_old_users is active' do
before do
diff --git a/spec/workers/reset_password_spec.rb b/spec/workers/reset_password_spec.rb
index faf829e69..c57cf52d3 100644
--- a/spec/workers/reset_password_spec.rb
+++ b/spec/workers/reset_password_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::ResetPassword do
describe "#perform" do
it "given a user id it sends the reset password instructions for that user" do
diff --git a/spec/workers/send_base_spec.rb b/spec/workers/send_base_spec.rb
index 5c0bb6610..c7961451b 100644
--- a/spec/workers/send_base_spec.rb
+++ b/spec/workers/send_base_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::SendBase do
it "retries first time after at least 256 seconds" do
retry_delay = Workers::SendBase.new.send(:seconds_to_delay, 1)
diff --git a/spec/workers/send_private_spec.rb b/spec/workers/send_private_spec.rb
index e3d9a99bc..622c1e93e 100644
--- a/spec/workers/send_private_spec.rb
+++ b/spec/workers/send_private_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::SendPrivate do
let(:sender_id) { "any_user@example.org" }
let(:obj_str) { "status_message@guid" }
diff --git a/spec/workers/send_public_spec.rb b/spec/workers/send_public_spec.rb
index 4f87ddb33..cd53b581e 100644
--- a/spec/workers/send_public_spec.rb
+++ b/spec/workers/send_public_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Workers::SendPublic do
let(:sender_id) { "any_user@example.org" }
let(:obj_str) { "status_message@guid" }