Skip to content

Commit

Permalink
Add # frozen_string_literal: true to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Sep 17, 2017
1 parent 44ebc73 commit e826909
Show file tree
Hide file tree
Showing 738 changed files with 1,470 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .rubocop.yml
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Gemfile
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "rails", "5.1.3"
Expand Down
2 changes: 2 additions & 0 deletions 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" }
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/admin/admin_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Admin
class AdminController < ApplicationController
before_action :authenticate_user!
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/admin/pods_controller.rb
@@ -1,4 +1,6 @@

# frozen_string_literal: true

module Admin
class PodsController < AdminController
respond_to :html, :json, :mobile
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/admin/users_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Admin
class UsersController < AdminController

Expand Down
2 changes: 2 additions & 0 deletions app/controllers/admins_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class AdminsController < Admin::AdminController
include ApplicationHelper

Expand Down
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module OpenidConnect
class AuthorizationsController < ApplicationController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/openid_connect/clients_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module OpenidConnect
class ClientsController < ApplicationController
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module OpenidConnect
class TokenEndpointController < ApplicationController
Expand Down
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module OpenidConnect
class UserApplicationsController < ApplicationController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/openid_connect/user_info_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module OpenidConnect
class UserInfoController < ApplicationController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/v0/base_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Api
module V0
class BaseController < ApplicationController
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/blocks_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class BlocksController < ApplicationController
before_action :authenticate_user!

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/help_controller.rb
@@ -1,2 +1,4 @@
# frozen_string_literal: true

class HelpController < ApplicationController
end
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/invitation_codes_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class InvitationCodesController < ApplicationController
before_action :ensure_valid_invite_code

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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}")))
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/participations_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class ParticipationsController < ApplicationController
before_action :authenticate_user!

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/poll_participations_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class PollParticipationsController < ApplicationController
before_action :authenticate_user!

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/search_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class SearchController < ApplicationController
before_action :authenticate_user!

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/social_relay_controller.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class SocialRelayController < ApplicationController
respond_to :json

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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|
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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"}
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/conversations_helper.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ConversationsHelper
def conversation_class(conversation, unread_count, selected_conversation_id)
conv_class = unread_count > 0 ? "unread " : ""
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/gon_helper.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module GonHelper
def gon_load_contact(contact)
Gon.preloads[:contacts] ||= []
Expand Down
2 changes: 2 additions & 0 deletions 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?
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/invitation_codes_helper.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module InvitationCodesHelper
def invite_hidden_tag(invite)
if invite.present?
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/language_helper.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module LanguageHelper
include ApplicationHelper

Expand Down
2 changes: 2 additions & 0 deletions 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.
Expand Down

0 comments on commit e826909

Please sign in to comment.