lib/annotate_rb/model_annotator/constants.rb in annotaterb-4.0.0 vs lib/annotate_rb/model_annotator/constants.rb in annotaterb-4.1.0

- old
+ new

@@ -1,10 +1,8 @@ module AnnotateRb module ModelAnnotator module Constants - TRUE_RE = /^(true|t|yes|y|1)$/i.freeze - ## # The set of available options to customize the behavior of Annotate. # POSITION_OPTIONS = ::AnnotateRb::Options::POSITION_OPTION_KEYS @@ -15,8 +13,10 @@ PATH_OPTIONS = ::AnnotateRb::Options::PATH_OPTION_KEYS ALL_ANNOTATE_OPTIONS = ::AnnotateRb::Options::ALL_OPTION_KEYS SKIP_ANNOTATION_PREFIX = '# -\*- SkipSchemaAnnotations'.freeze + + MAGIC_COMMENT_MATCHER = Regexp.new(/(^#\s*encoding:.*(?:\n|r\n))|(^# coding:.*(?:\n|\r\n))|(^# -\*- coding:.*(?:\n|\r\n))|(^# -\*- encoding\s?:.*(?:\n|\r\n))|(^#\s*frozen_string_literal:.+(?:\n|\r\n))|(^# -\*- frozen_string_literal\s*:.+-\*-(?:\n|\r\n))/).freeze end end end