diff --git a/lib/haml.rb b/lib/haml.rb index 2cd78e5d..0fb995e4 100644 --- a/lib/haml.rb +++ b/lib/haml.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'haml/version' # The module that contains everything Haml-related: diff --git a/lib/haml/attribute_compiler.rb b/lib/haml/attribute_compiler.rb index 347011b3..248280ca 100644 --- a/lib/haml/attribute_compiler.rb +++ b/lib/haml/attribute_compiler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'haml/attribute_parser' module Haml diff --git a/lib/haml/attribute_parser.rb b/lib/haml/attribute_parser.rb index 1373b9da..3a89ca45 100644 --- a/lib/haml/attribute_parser.rb +++ b/lib/haml/attribute_parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require 'ripper' rescue LoadError diff --git a/lib/haml/buffer.rb b/lib/haml/buffer.rb index 8ee4b6b0..beb0d471 100644 --- a/lib/haml/buffer.rb +++ b/lib/haml/buffer.rb @@ -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. diff --git a/lib/haml/compiler.rb b/lib/haml/compiler.rb index 0b5f5595..97edc0d1 100644 --- a/lib/haml/compiler.rb +++ b/lib/haml/compiler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'haml/attribute_builder' require 'haml/attribute_compiler' require 'haml/temple_line_counter' diff --git a/lib/haml/engine.rb b/lib/haml/engine.rb index 547bcd57..953dd0e2 100644 --- a/lib/haml/engine.rb +++ b/lib/haml/engine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'forwardable' require 'haml/parser' diff --git a/lib/haml/error.rb b/lib/haml/error.rb index d614e4a9..95b3ca67 100644 --- a/lib/haml/error.rb +++ b/lib/haml/error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml # An exception raised by Haml code. class Error < StandardError diff --git a/lib/haml/escapable.rb b/lib/haml/escapable.rb index 18a3c72d..08db5f47 100644 --- a/lib/haml/escapable.rb +++ b/lib/haml/escapable.rb @@ -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. diff --git a/lib/haml/exec.rb b/lib/haml/exec.rb index a29f1fdb..82657f68 100644 --- a/lib/haml/exec.rb +++ b/lib/haml/exec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'optparse' require 'rbconfig' require 'pp' diff --git a/lib/haml/filters.rb b/lib/haml/filters.rb index f065af4e..7ee72ee8 100644 --- a/lib/haml/filters.rb +++ b/lib/haml/filters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "tilt" module Haml diff --git a/lib/haml/generator.rb b/lib/haml/generator.rb index 4bd9d1e0..19df4a21 100644 --- a/lib/haml/generator.rb +++ b/lib/haml/generator.rb @@ -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. diff --git a/lib/haml/helpers.rb b/lib/haml/helpers.rb index 8ced0db6..df837b60 100644 --- a/lib/haml/helpers.rb +++ b/lib/haml/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'erb' module Haml diff --git a/lib/haml/helpers/action_view_extensions.rb b/lib/haml/helpers/action_view_extensions.rb index fa82c710..a1c50a43 100644 --- a/lib/haml/helpers/action_view_extensions.rb +++ b/lib/haml/helpers/action_view_extensions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml module Helpers @@action_view_defined = true diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb index 0330c505..82a83b4b 100644 --- a/lib/haml/helpers/action_view_mods.rb +++ b/lib/haml/helpers/action_view_mods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml module Helpers module ActionViewMods diff --git a/lib/haml/helpers/action_view_xss_mods.rb b/lib/haml/helpers/action_view_xss_mods.rb index 33d69f60..f18199d0 100644 --- a/lib/haml/helpers/action_view_xss_mods.rb +++ b/lib/haml/helpers/action_view_xss_mods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module CaptureHelper diff --git a/lib/haml/helpers/safe_erubi_template.rb b/lib/haml/helpers/safe_erubi_template.rb index 4a315d91..b58b2be0 100644 --- a/lib/haml/helpers/safe_erubi_template.rb +++ b/lib/haml/helpers/safe_erubi_template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'action_view' module Haml diff --git a/lib/haml/helpers/safe_erubis_template.rb b/lib/haml/helpers/safe_erubis_template.rb index 4e044086..df3025af 100644 --- a/lib/haml/helpers/safe_erubis_template.rb +++ b/lib/haml/helpers/safe_erubis_template.rb @@ -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 \ No newline at end of file +end diff --git a/lib/haml/helpers/xss_mods.rb b/lib/haml/helpers/xss_mods.rb index da075d95..0af7cd54 100644 --- a/lib/haml/helpers/xss_mods.rb +++ b/lib/haml/helpers/xss_mods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml module Helpers # This module overrides Haml helpers to work properly diff --git a/lib/haml/options.rb b/lib/haml/options.rb index e2f66206..854807b4 100644 --- a/lib/haml/options.rb +++ b/lib/haml/options.rb @@ -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 diff --git a/lib/haml/parser.rb b/lib/haml/parser.rb index 035e7117..939ca2d2 100644 --- a/lib/haml/parser.rb +++ b/lib/haml/parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'strscan' module Haml diff --git a/lib/haml/plugin.rb b/lib/haml/plugin.rb index 74e869a7..81e47706 100644 --- a/lib/haml/plugin.rb +++ b/lib/haml/plugin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml # This module makes Haml work with Rails using the template handler API. diff --git a/lib/haml/railtie.rb b/lib/haml/railtie.rb index b12a1a4c..1a044e19 100644 --- a/lib/haml/railtie.rb +++ b/lib/haml/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'haml/template/options' # check for a compatible Rails version when Haml is loaded diff --git a/lib/haml/sass_rails_filter.rb b/lib/haml/sass_rails_filter.rb index ca3bc990..26847804 100644 --- a/lib/haml/sass_rails_filter.rb +++ b/lib/haml/sass_rails_filter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml module Filters # This is an extension of Sass::Rails's SassTemplate class that allows diff --git a/lib/haml/template.rb b/lib/haml/template.rb index 4189be32..34740c48 100644 --- a/lib/haml/template.rb +++ b/lib/haml/template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'haml/template/options' if defined?(ActiveSupport) ActiveSupport.on_load(:action_view) do diff --git a/lib/haml/template/options.rb b/lib/haml/template/options.rb index 87782501..546657d6 100644 --- a/lib/haml/template/options.rb +++ b/lib/haml/template/options.rb @@ -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. diff --git a/lib/haml/temple_engine.rb b/lib/haml/temple_engine.rb index 34c07835..9c7bee03 100644 --- a/lib/haml/temple_engine.rb +++ b/lib/haml/temple_engine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'temple' require 'haml/escapable' require 'haml/generator' diff --git a/lib/haml/temple_line_counter.rb b/lib/haml/temple_line_counter.rb index a4cd13fd..41d14540 100644 --- a/lib/haml/temple_line_counter.rb +++ b/lib/haml/temple_line_counter.rb @@ -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. diff --git a/lib/haml/util.rb b/lib/haml/util.rb index a1b2d100..3098c967 100644 --- a/lib/haml/util.rb +++ b/lib/haml/util.rb @@ -1,4 +1,4 @@ -# encoding: utf-8 +# frozen_string_literal: false begin require 'erubis/tiny' diff --git a/lib/haml/version.rb b/lib/haml/version.rb index f7db8009..736808ef 100644 --- a/lib/haml/version.rb +++ b/lib/haml/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Haml VERSION = "5.0.0.beta.2" end