lib/textlint/plugin.rb in danger-textlint-1.0.0 vs lib/textlint/plugin.rb in danger-textlint-1.1.0

- old
+ new

@@ -1,6 +1,6 @@ -require "mkmf" +# require "mkmf" require "json" module Danger # [Danger](http://danger.systems/ruby/) plugin for [textlint](https://textlint.github.io/). # @@ -38,10 +38,17 @@ private def textlint_path local = "./node_modules/.bin/textlint" - File.exist?(local) ? local : find_executable("textlint") + + # NOTE: Danger using method_missing hack for parse 'warn', 'fail' in Dangerfile. + # Same issue will occur 'message' when require 'mkmf'. Because 'mkmf' provide 'message' method. + # Then, disable find executable textlint until danger fix this issue. + + # File.exist?(local) ? local : find_executable("textlint") + raise "textlint not found in ./node_modules/.bin/textlint" unless File.exist?(local) + local end def textlint_command(bin, target_files) command = "#{bin} -f json" command << " -c #{config_file}" if config_file