Sha256: 66ae03ed20dcb12810c31508ab2842b6b0b10b7fecc6c1f0cb9a45ac5b761414

Contents?: true

Size: 529 Bytes

Versions: 5

Compression:

Stored size: 529 Bytes

Contents

module Checker
  class Options
    class << self
      def get_config(conf, default = nil)
        config = `git config checker.#{conf}`.chomp
        (config.empty? && !default.nil?) ? default : config
      end

      def modules_to_check
        get_config("check", "all").split(",").map(&:strip)
      end

      def prevent_commit_on_warning
        get_config("commit-on-warning", "true") == "false"
      end

      def use_rails_for_sass
        get_config("rails-for-sass", "true") == "true"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
checker-0.7.0 lib/checker/options.rb
checker-0.6.6 lib/checker/options.rb
checker-0.6.5 lib/checker/options.rb
checker-0.6.5.rc2 lib/checker/options.rb
checker-0.6.5.rc1 lib/checker/options.rb