Module: Capistrano::DontDeployDebug

Defined in:
lib/capistrano/dont_deploy_debug.rb

Instance Method Summary collapse

Instance Method Details

#contains_ruby_breakpoint?(ruby_code) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'lib/capistrano/dont_deploy_debug.rb', line 5

def contains_ruby_breakpoint?(ruby_code)
  ruby_code = ruby_code.split('#').first.strip
  return false if ruby_code.size < 1
  fetch(:ruby_breakpoint_patterns).each do |pattern|
    return true if ruby_code =~ pattern
  end
  false
end

#exclude_from_ruby_breakpint_check?(file_path) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
# File 'lib/capistrano/dont_deploy_debug.rb', line 14

def exclude_from_ruby_breakpint_check?(file_path)
  fetch(:exclude_from_ruby_breakpoint_check).each do |pattern|
    return true if file_path =~ pattern
  end
  false
end