risu 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/Gemfile.ci +1 -3
  2. data/NEWS.markdown +17 -3
  3. data/README.markdown +24 -30
  4. data/Rakefile +17 -13
  5. data/bin/risu +4 -4
  6. data/lib/risu.rb +5 -5
  7. data/lib/risu/base.rb +3 -4
  8. data/lib/risu/base/schema.rb +4 -4
  9. data/lib/risu/base/template_base.rb +3 -3
  10. data/lib/risu/base/template_manager.rb +7 -7
  11. data/lib/risu/base/templater.rb +5 -4
  12. data/lib/risu/cli.rb +3 -3
  13. data/lib/risu/cli/application.rb +14 -8
  14. data/lib/risu/cli/banner.rb +4 -4
  15. data/lib/risu/exceptions.rb +3 -3
  16. data/lib/risu/exceptions/invaliddocument.rb +3 -3
  17. data/lib/risu/models.rb +3 -3
  18. data/lib/risu/models/familyselection.rb +3 -3
  19. data/lib/risu/models/host.rb +16 -16
  20. data/lib/risu/models/individualpluginselection.rb +3 -3
  21. data/lib/risu/models/item.rb +14 -5
  22. data/lib/risu/models/patch.rb +4 -4
  23. data/lib/risu/models/plugin.rb +5 -4
  24. data/lib/risu/models/pluginspreference.rb +3 -3
  25. data/lib/risu/models/policy.rb +3 -3
  26. data/lib/risu/models/reference.rb +15 -3
  27. data/lib/risu/models/report.rb +5 -5
  28. data/lib/risu/models/serverpreference.rb +3 -3
  29. data/lib/risu/models/servicedescription.rb +4 -4
  30. data/lib/risu/models/version.rb +4 -4
  31. data/lib/risu/parsers.rb +3 -3
  32. data/lib/risu/parsers/nessus/nessus_document.rb +7 -11
  33. data/lib/risu/parsers/nessus/nessus_sax_listener.rb +11 -12
  34. data/lib/risu/parsers/nexpose/nexpose_document.rb +3 -3
  35. data/lib/risu/parsers/nexpose/simple_nexpose.rb +6 -6
  36. data/lib/risu/renderers.rb +3 -3
  37. data/lib/risu/renderers/nilrenderer.rb +6 -6
  38. data/lib/risu/templates/assets.rb +4 -5
  39. data/lib/risu/templates/cover_sheet.rb +3 -3
  40. data/lib/risu/templates/exec_summary.rb +3 -3
  41. data/lib/risu/templates/executive_summary.rb +5 -8
  42. data/lib/risu/templates/finding_statistics.rb +3 -3
  43. data/lib/risu/templates/findings_summary.rb +3 -3
  44. data/lib/risu/templates/findings_summary_with_pluginid.rb +3 -4
  45. data/lib/risu/templates/graphs.rb +3 -3
  46. data/lib/risu/templates/host_summary.rb +3 -3
  47. data/lib/risu/templates/ms_patch_summary.rb +4 -6
  48. data/lib/risu/templates/ms_update_summary.rb +5 -5
  49. data/lib/risu/templates/ms_wsus_findings.rb +3 -3
  50. data/lib/risu/templates/notable.rb +5 -5
  51. data/lib/risu/templates/notable_detailed.rb +3 -3
  52. data/lib/risu/templates/pci_compliance.rb +5 -5
  53. data/lib/risu/templates/stig_findings_summary.rb +7 -7
  54. data/lib/risu/templates/technical_findings.rb +3 -3
  55. data/lib/risu/templates/template.rb +3 -3
  56. data/risu.gemspec +2 -2
  57. metadata +49 -54
  58. data/KNOWNISSUES.markdown +0 -51
  59. data/TODO.markdown +0 -194
  60. data/lib/risu/base/prawn_templater.rb +0 -65
@@ -1,65 +0,0 @@
1
- # Copyright (c) 2010-2012 Arxopia LLC.
2
- # All rights reserved.
3
-
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
6
-
7
- # * Redistributions of source code must retain the above copyright
8
- # notice, this list of conditions and the following disclaimer.
9
- # * Redistributions in binary form must reproduce the above copyright
10
- # notice, this list of conditions and the following disclaimer in the
11
- # documentation and/or other materials provided with the distribution.
12
- # * Neither the name of the Arxopia LLC nor the names of its contributors
13
- # may be used to endorse or promote products derived from this software
14
- # without specific prior written permission.
15
-
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- # DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
20
- # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
- # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22
- # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24
- #OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25
- #OF THE POSSIBILITY OF SUCH DAMAGE.
26
-
27
- module Risu
28
- module Base
29
-
30
- # Templater class for generating a report from a ERB template
31
- #
32
- class PrawnTemplater
33
- attr_accessor :template, :template_source, :findings, :output_file
34
-
35
- # Setups of the Templater class initializing all of the variables
36
- #
37
- # @return [PrawnTemplater] New Instance
38
- #
39
- def initialize(template, findings, output)
40
- @template = template
41
- @findings = findings
42
- @output_file = output
43
-
44
- @template_source = File.new(@template).read
45
- end
46
-
47
- # Generates a report based on the ERB template
48
- #
49
- # @return [String] HTML output of the ERB template
50
- #
51
- def generate
52
- begin
53
- source = @template_source
54
- template = @template
55
- Prawn::Document.generate(@output_file, :margin => [75, 50, 75, 50]) do
56
- font_size 12
57
- eval source
58
- end
59
- rescue => e
60
- puts "Error: #{e.message} \n #{e.backtrace.join("\n\t")}\n"
61
- end
62
- end
63
- end
64
- end
65
- end