octool 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 776fce8b2089c05dcaf562c769ab2c65a81a3887977390a75e3fadda41c2ffe8
4
- data.tar.gz: 107d9de9a54bac2b28bac82f26f10be04a28786bce24673b8ddd3cc6fe5afadd
3
+ metadata.gz: f7ba13a2d5661f8cb124c8f76390bd475535b816d33a613ed5d3b77b807b1c30
4
+ data.tar.gz: fd7758b697928e0807727360f669e6bef91fa85935a1c040b8bbf63e35a111fc
5
5
  SHA512:
6
- metadata.gz: 1c864f87036e072690a9fe2645aa95eb0a50b3e51011bb23e3fc3c5e3cf4efd27b8b999098e2a1b2792af90aeaf35f88d79aaea3e2506cb970f89e167b196e23
7
- data.tar.gz: 5e99234200a87b85a7b4de20da9196f3c72814f520bdc0329e8fc47b670b2064e2e5a2b950a11f76954c9becf29ef4d737eb01dde1b29eee49dada9fb329d674
6
+ metadata.gz: f18379a0d61d2326066d788279f2f2466112441b84f2c120bc7e062bc98991913afcc84273b0cc868fa302eba5a43518a8a9889f1a424df4710975b3e33727f0
7
+ data.tar.gz: dcf36feada04da9dd6368dca3c5a80f5bd9a77c750afbef93bc7d70d55049333636fec95f552bbeb1fca5303b158933507a464eaabadc3c14307d415d6d29fc9
data/bin/octool CHANGED
@@ -48,7 +48,7 @@ class App
48
48
  config_file = find_config(args)
49
49
  system = OCTool::Parser.new(config_file).load_system
50
50
  Dir.chdir File.dirname(config_file) do
51
- OCTool::SSP.new(system, export_dir)
51
+ OCTool::SSP.new(system, export_dir).generate
52
52
  end
53
53
  end
54
54
  end
@@ -7,7 +7,6 @@ require 'tmpdir'
7
7
  # 3rd-party libs.
8
8
  require 'kwalify'
9
9
  require 'kwalify/util/hashlike'
10
- require 'paru/pandoc'
11
10
 
12
11
  # OCTool libs.
13
12
  require 'octool/constants'
@@ -63,9 +63,9 @@ module OCTool
63
63
 
64
64
  def schema_version
65
65
  @schema_version ||= Kwalify::Yaml.load_file(@config_file)['schema_version']
66
- rescue StandardError
67
- warn "Setting schema_version to #{LATEST_SCHEMA_VERSION}"
68
- LATEST_SCHEMA_VERSION
66
+ rescue StandarError
67
+ STDERR.puts '[FAIL] Unable to read schema_version'
68
+ exit(1)
69
69
  end
70
70
 
71
71
  # Check that all data files are valid.
@@ -6,6 +6,15 @@ module OCTool
6
6
  def initialize(system, output_dir)
7
7
  @system = system
8
8
  @output_dir = output_dir
9
+ # Load paru/pandoc late enough that help functions work
10
+ # and early enough to be confident that we catch the correct error.
11
+ require 'paru/pandoc'
12
+ rescue UncaughtThrowError => e
13
+ STDERR.puts '[FAIL] octool requires pandoc to generate the SSP. Is pandoc installed?'
14
+ exit(1)
15
+ end
16
+
17
+ def generate
9
18
  render_template
10
19
  write
11
20
  end
@@ -1,3 +1,3 @@
1
1
  module OCTool
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  == octool - Open Compliance Tool
2
2
 
3
- v0.0.1
3
+ v0.0.2
4
4
 
5
5
  === Global Options
6
6
  === --help
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Morgan