aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli.rb1
-rw-r--r--lib/leap_cli/commands/pre.rb8
-rw-r--r--lib/leap_cli/requirements.rb11
3 files changed, 20 insertions, 0 deletions
diff --git a/lib/leap_cli.rb b/lib/leap_cli.rb
index 5ed5033..cc9ec69 100644
--- a/lib/leap_cli.rb
+++ b/lib/leap_cli.rb
@@ -1,6 +1,7 @@
module LeapCli; end
require 'leap_cli/version.rb'
+require 'leap_cli/requirements.rb'
require 'core_ext/hash'
require 'core_ext/boolean'
require 'core_ext/nil'
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb
index a15a628..b1df5cd 100644
--- a/lib/leap_cli/commands/pre.rb
+++ b/lib/leap_cli/commands/pre.rb
@@ -40,6 +40,14 @@ module LeapCli
else
bail!("Could not find the root directory. Change current working directory or try --root")
end
+
+ #
+ # check requirements
+ #
+ REQUIREMENTS.each do |key|
+ assert_config! key
+ end
+
end
end
diff --git a/lib/leap_cli/requirements.rb b/lib/leap_cli/requirements.rb
new file mode 100644
index 0000000..ad4fb21
--- /dev/null
+++ b/lib/leap_cli/requirements.rb
@@ -0,0 +1,11 @@
+# run 'rake update-requirements' to generate this file.
+module LeapCli
+ REQUIREMENTS = [
+ "provider.ca.name",
+ "provider.ca.bit_size",
+ "provider.ca.life_span",
+ "provider.ca.server_certificates.bit_size",
+ "provider.ca.server_certificates.life_span",
+ "provider.vagrant.network"
+ ]
+end