Sha256: f1b6bb0595046a1bbd53a8ed4034493825b2efbe9ce203f02cb88b3f83d4184c

Contents?: true

Size: 803 Bytes

Versions: 2

Compression:

Stored size: 803 Bytes

Contents

module Checker
  module Modules
    class Pry < Base

      private
      def check_one file
        [check_for_binding_pry(file), check_for_binding_remote_pry(file)].all_true?
      end

      def check_for_binding_pry(file)
        result = `grep -n "binding\\.pry" #{file}`.chomp

        unless result.empty?
          puts " pry -> FAIL, ".red
          puts result
        else
          print " pry -> OK, ".green
        end

        result.empty?
      end

      def check_for_binding_remote_pry(file)
        result = `grep -n "binding\\.remote_pry" #{file}`.chomp

        unless result.empty?
          puts " remote_pry -> FAIL".red
          puts result
        else
          print " remote_pry -> OK".green
        end
        puts ""

        result.empty?
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
checker-0.0.5 lib/checker/modules/pry.rb
checker-0.0.4.2 lib/checker/modules/pry.rb