Sha256: a6717497d7409c816e4e55e2e2a4563a2dd5a26768f4f57d2f3120a3ce49470f

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 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

2 entries across 2 versions & 1 rubygems

Version Path
checker-0.8.0.beta2 lib/checker/options.rb
checker-0.8.0.beta lib/checker/options.rb