Class: Danger::DangerTailor
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerTailor
- Defined in:
- lib/tailor/plugin.rb
Overview
Shows the build errors, warnings and violations generated from Tailor. You need [Tailor](tailor.sh) installed and generating a json file to use this plugin
Instance Attribute Summary collapse
-
#ignored_files ⇒ [String]
A globbed string or array of strings which should match the files that you want to ignore warnings on.
-
#project_root ⇒ String
The project root, which will be used to make the paths relative.
-
#sticky_summary ⇒ Boolean
Defines if the test summary will be sticky or not.
Instance Method Summary collapse
-
#report(file_path) ⇒ void
Reads a file with JSON Xcode summary and reports it.
Instance Attribute Details
#ignored_files ⇒ [String]
A globbed string or array of strings which should match the files that you want to ignore warnings on. Defaults to nil. An example would be ‘’/Pods/‘` to ignore warnings in Pods that your project uses.
31 32 33 |
# File 'lib/tailor/plugin.rb', line 31 def ignored_files @ignored_files end |
#project_root ⇒ String
The project root, which will be used to make the paths relative. Defaults to ‘pwd`.
23 24 25 |
# File 'lib/tailor/plugin.rb', line 23 def project_root @project_root end |
#sticky_summary ⇒ Boolean
Defines if the test summary will be sticky or not. Defaults to ‘false`.
36 37 38 |
# File 'lib/tailor/plugin.rb', line 36 def sticky_summary @sticky_summary end |
Instance Method Details
#report(file_path) ⇒ void
This method returns an undefined value.
Reads a file with JSON Xcode summary and reports it.
56 57 58 59 60 |
# File 'lib/tailor/plugin.rb', line 56 def report(file_path) raise 'Summary file not found' unless File.file?(file_path) tailor_summary = JSON.parse(File.read(file_path), symbolize_names: true) run_summary(tailor_summary) end |