Module: ErrbitTracPlugin

Defined in:
lib/errbit_trac_plugin.rb,
lib/errbit_trac_plugin/error.rb,
lib/errbit_trac_plugin/rails.rb,
lib/errbit_trac_plugin/version.rb,
lib/errbit_trac_plugin/issue_tracker.rb

Defined Under Namespace

Classes: AuthenticationError, IssueTracker, RailsEngine

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.pretty_hash(hash, nesting = 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/errbit_trac_plugin.rb', line 11

def self.pretty_hash(hash, nesting = 0)
  tab_size = 2
  nesting += 1

  pretty  = "{"
  sorted_keys = hash.keys.sort
  sorted_keys.each do |key|
    val = hash[key].is_a?(Hash) ? pretty_hash(hash[key], nesting) : hash[key].inspect
    pretty += "\n#{' '*nesting*tab_size}"
    pretty += "#{key.inspect} => #{val}"
    pretty += "," unless key == sorted_keys.last

  end
  nesting -= 1
  pretty += "\n#{' '*nesting*tab_size}}"
end

.rootObject



7
8
9
# File 'lib/errbit_trac_plugin.rb', line 7

def self.root
  File.expand_path '../..', __FILE__
end