Enable frozen_string_literal pragma if possible

Close #862
This commit is contained in:
Takashi Kokubun 2017-04-19 03:10:10 +09:00
parent a6bb25529a
commit 8f207073c2
29 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'haml/version'
# The module that contains everything Haml-related:

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'haml/attribute_parser'
module Haml

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
begin
require 'ripper'
rescue LoadError

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# This class is used only internally. It holds the buffer of HTML that
# is eventually output as the resulting document.

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'haml/attribute_builder'
require 'haml/attribute_compiler'
require 'haml/temple_line_counter'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'forwardable'
require 'haml/parser'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# An exception raised by Haml code.
class Error < StandardError

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# Like Temple::Filters::Escapable, but with support for escaping by
# Haml::Herlpers.html_escape and Haml::Herlpers.escape_once.

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'optparse'
require 'rbconfig'
require 'pp'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require "tilt"
module Haml

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# Ruby code generator, which is a limited version of Temple::Generator.
# Limit methods since Haml doesn't need most of them.

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'erb'
module Haml

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
module Helpers
@@action_view_defined = true

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
module Helpers
module ActionViewMods

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module ActionView
module Helpers
module CaptureHelper

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'action_view'
module Haml

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'action_view'
module Haml
@ -28,4 +29,4 @@ module Haml
[super, '@output_buffer.to_s'].join("\n")
end
end
end
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
module Helpers
# This module overrides Haml helpers to work properly

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# This class encapsulates all of the configuration options that Haml
# understands. Please see the {file:REFERENCE.md#options Haml Reference} to

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'strscan'
module Haml

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# This module makes Haml work with Rails using the template handler API.

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'haml/template/options'
# check for a compatible Rails version when Haml is loaded

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
module Filters
# This is an extension of Sass::Rails's SassTemplate class that allows

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'haml/template/options'
if defined?(ActiveSupport)
ActiveSupport.on_load(:action_view) do

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
# We keep options in its own self-contained file
# so that we can load it independently in Rails 3,
# where the full template stuff is lazy-loaded.

View File

@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'temple'
require 'haml/escapable'
require 'haml/generator'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
# A module to count lines of expected code. This would be faster than actual code generation
# and counting newlines in it.

View File

@ -1,4 +1,4 @@
# encoding: utf-8
# frozen_string_literal: false
begin
require 'erubis/tiny'

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Haml
VERSION = "5.0.0.beta.2"
end