Skip to content

Commit

Permalink
Add frozen_string_literal comment to relevant source files
Browse files Browse the repository at this point in the history
This should reduce some memory usage when using Ruby >= 2.3
  • Loading branch information
tvdeyen committed Aug 14, 2017
1 parent 41acc37 commit 7780184
Show file tree
Hide file tree
Showing 139 changed files with 277 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/attachments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class AttachmentsController < ResourcesController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/base_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class BaseController < Alchemy::BaseController
Expand Down
1 change: 1 addition & 0 deletions app/controllers/alchemy/admin/clipboard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true


module Alchemy
module Admin
class ClipboardController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/contents_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class ContentsController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/dashboard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'net/http'
require 'alchemy/version'

Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/elements_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class ElementsController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/essence_files_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class EssenceFilesController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/essence_pictures_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class EssencePicturesController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/languages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class LanguagesController < ResourcesController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/layoutpages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class LayoutpagesController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/legacy_page_urls_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class Admin::LegacyPageUrlsController < Alchemy::Admin::ResourcesController
before_action :load_page
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class PagesController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/pictures_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class PicturesController < Alchemy::Admin::ResourcesController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/resources_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'csv'
require 'alchemy/resource'
require 'alchemy/resources_helper'
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/sites_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class SitesController < ResourcesController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/tags_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class TagsController < ResourcesController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/admin/trash_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
class TrashController < Alchemy::Admin::BaseController
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/api/base_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class Api::BaseController < Alchemy::BaseController
layout false
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/api/contents_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class Api::ContentsController < Api::BaseController
# Returns all contents as json object
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/api/elements_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class Api::ElementsController < Api::BaseController
# Returns all elements as json object
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/api/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class Api::PagesController < Api::BaseController
before_action :load_page, only: [:show]
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/attachments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class AttachmentsController < BaseController
before_action :load_attachment
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/base_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This is the main Alchemy controller all other controllers inherit from.
#
module Alchemy
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/elements_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class ElementsController < Alchemy::BaseController
load_and_authorize_resource
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/messages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
#
# == Sending Messages:
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/alchemy/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class PagesController < Alchemy::BaseController
include OnPageLayout::CallbacksRunner
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/alchemy/admin/uploader_responses.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module UploaderResponses
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/alchemy/legacy_page_redirects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Handles Legacy page redirects
#
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/alchemy/locale_redirects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Handles locale redirects
#
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/alchemy/page_redirects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Handles page redirect urls
#
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/alchemy/site_redirects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module SiteRedirects
extend ActiveSupport::Concern
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/attachments_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module AttachmentsHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/base_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
# This module contains helper methods for rendering dialogs, toolbar buttons and confirmation windows.
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/contents_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module ContentsHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/elements_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module ElementsHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/essences_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module EssencesHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/form_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module FormHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/navigation_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
# This module contains helper methods for rendering the admin navigation.
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/pages_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module PagesHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/pictures_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module PicturesHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/admin/tags_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Admin
module TagsHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/base_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module BaseHelper
def _t(key, *args)
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/deprecated_pages_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module DeprecatedPagesHelper
# All these helper methods are deprecated.
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/elements_block_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Provides a collection of block-level helpers, allowing for a much more
# concise way of writing element view/editor partials.
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/elements_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# This helpers are useful to render elements from pages.
#
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/essences_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# This helper contains methods to render the +essence+ from an +Element+ +Content+.
#
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/pages_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module PagesHelper
include Alchemy::BaseHelper
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/alchemy/url_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Alchemy url helpers
#
# This helper is included within alchemy/pages_helper
Expand Down
2 changes: 2 additions & 0 deletions app/mailers/alchemy/base_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
begin
base_class = Object.const_get('::ApplicationMailer')
Expand Down
2 changes: 2 additions & 0 deletions app/mailers/alchemy/messages_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class MessagesMailer < BaseMailer
def contact_form_mail(message, mail_to, mail_from, subject)
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
def self.table_name_prefix
'alchemy_'
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/attachment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_attachments
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/cell.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_cells
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/content.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_contents
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/content/factory.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Holds everything concerning the building and creating of contents and the related essence object.
#
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_elements
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element/definitions.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Module concerning element definitions
#
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element/element_contents.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Methods concerning contents for elements
#
module Alchemy
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element/element_essences.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
module Element::ElementEssences
# Returns the contents essence value (aka. ingredient) for passed content name.
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element/presenters.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
# Methods used for presenting an Alchemy Element.
#
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/element_to_page.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Alchemy
class ElementToPage
def self.table_name
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/essence_boolean.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_booleans
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/essence_date.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_dates
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/essence_file.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_files
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/essence_html.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_htmls
Expand Down
2 changes: 2 additions & 0 deletions app/models/alchemy/essence_link.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_links
Expand Down
Loading

0 comments on commit 7780184

Please sign in to comment.