Class: Hashira::Report::Notices
- Inherits:
-
Object
- Object
- Hashira::Report::Notices
- Defined in:
- lib/hashira/report/notices.rb
Constant Summary collapse
- ISSUES =
"https://github.com/giacope/hashira/issues"
Instance Method Summary collapse
- #churn(label) ⇒ Object
- #crashed(error) ⇒ Object
- #finished(files, seconds) ⇒ Object
-
#initialize(io: $stderr) ⇒ Notices
constructor
A new instance of Notices.
- #rails ⇒ Object
- #scanning(files) ⇒ Object
- #unparsed(count, sample) ⇒ Object
Constructor Details
#initialize(io: $stderr) ⇒ Notices
Returns a new instance of Notices.
6 7 8 |
# File 'lib/hashira/report/notices.rb', line 6 def initialize(io: $stderr) @io = io end |
Instance Method Details
#churn(label) ⇒ Object
18 19 20 |
# File 'lib/hashira/report/notices.rb', line 18 def churn(label) @io.puts("hashira: no git history for #{label} — hotspots are ranked by cost alone") end |
#crashed(error) ⇒ Object
22 23 24 25 26 |
# File 'lib/hashira/report/notices.rb', line 22 def crashed(error) @io.puts("hashira: internal error — #{error.class}: #{error.}") @io.puts(" at #{error.backtrace.first}") @io.puts(" this is a bug in hashira — please report it at #{ISSUES}") end |
#finished(files, seconds) ⇒ Object
12 |
# File 'lib/hashira/report/notices.rb', line 12 def finished(files, seconds) = interactive { @io.puts("hashira: #{files} files in #{seconds}s") } |
#rails ⇒ Object
14 15 16 |
# File 'lib/hashira/report/notices.rb', line 14 def rails @io.puts("hashira: this looks like a Rails root — `hashira app` reads the application, not just lib/") end |
#scanning(files) ⇒ Object
10 |
# File 'lib/hashira/report/notices.rb', line 10 def scanning(files) = interactive { @io.puts("hashira: reading #{files} files…") } |
#unparsed(count, sample) ⇒ Object
28 29 30 |
# File 'lib/hashira/report/notices.rb', line 28 def unparsed(count, sample) @io.puts("hashira: #{count} of the files did not parse — #{sample}") end |