lense 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +12 -1
- data/bin/lense +17 -2
- data/lense.gemspec +2 -3
- data/lib/lense.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c993d1ce47b9907ab8c5ac23e79d99dec6d5e27e
|
4
|
+
data.tar.gz: 46497b05673bc1e9c51407f175943461591fb099
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb37863ad7bc74d200f9f97d8483c41753866ef1bdb72f8e537533bb2f3d359377ec8c53c4a788cedfb0edb84493e96582d092bb1424c770c829b726e2cb36c
|
7
|
+
data.tar.gz: 50f5be19564b46cc8a3c344486ce68e3eac6d87cd5a7ac07411b68fa565b2b3cbaffe6e26bfc881797c0d920dfcd36067546d5f271013a91502e2385166c07eb
|
data/Rakefile
CHANGED
@@ -3,4 +3,15 @@ task :default => :test
|
|
3
3
|
desc 'run the tests'
|
4
4
|
task :test do
|
5
5
|
sh 'rspec spec'
|
6
|
-
end
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'build the gem'
|
9
|
+
task :build do
|
10
|
+
sh 'gem build lense.gemspec'
|
11
|
+
end
|
12
|
+
|
13
|
+
require_relative 'lib/lense'
|
14
|
+
desc 'publish gem to rubygems.org'
|
15
|
+
task :publish do
|
16
|
+
sh "gem push lense-#{LENSE::VERSION}.gem"
|
17
|
+
end
|
data/bin/lense
CHANGED
@@ -1,14 +1,29 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'gli'
|
4
|
+
require 'lense/helpers'
|
4
5
|
|
5
6
|
include GLI::App
|
6
7
|
|
7
8
|
program_desc 'A tool for creating, executing and managing LENSE courses.'
|
8
9
|
|
10
|
+
desc "turn off warning logs."
|
11
|
+
switch [:q,:quiet]
|
12
|
+
|
9
13
|
pre do |global_options,command,options,args|
|
10
|
-
|
11
|
-
|
14
|
+
found_docker = system_check('which docker')
|
15
|
+
docker_running = found_docker && system_check('docker version')
|
16
|
+
found_vagrant = system_check('which vagrant')
|
17
|
+
|
18
|
+
puts "WARNING: Docker not found. Unable to run courses that use Docker!" unless found_docker || global_options[:quiet]
|
19
|
+
puts "WARNING: Docker is not running. Unable to run courses that use Docker!" if (found_docker && !docker_running) && !global_options[:quiet]
|
20
|
+
puts "WARNING: Vagrant not found. Unable to run courses that use Vagrant!" unless found_vagrant || global_options[:quiet]
|
21
|
+
|
22
|
+
minimal_needed = found_docker || found_vagrant
|
23
|
+
puts global_options[:quiet]
|
24
|
+
puts "ERROR: Must have either Docker or Vagrant!" unless minimal_needed
|
25
|
+
|
26
|
+
minimal_needed
|
12
27
|
end
|
13
28
|
|
14
29
|
command :list do |c|
|
data/lense.gemspec
CHANGED
@@ -3,8 +3,7 @@ require './lib/lense'
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'lense'
|
5
5
|
s.version = LENSE::VERSION
|
6
|
-
s.summary = 'Commandline tools for creation, distribution, and execution of
|
7
|
-
Lightweight Environment for Network Security Education (LENSE)'
|
6
|
+
s.summary = 'Commandline tools for creation, distribution, and execution of Lightweight Environment for Network Security Education (LENSE)'
|
8
7
|
s.homepage = 'https://github.com/defunkt/gist'
|
9
8
|
s.email = ['mazubieta@gmail.com', 'lance.lacoste@gmail.com']
|
10
9
|
s.authors = ['Manuel Zubieta', 'Lance Lacoste']
|
@@ -15,4 +14,4 @@ Gem::Specification.new do |s|
|
|
15
14
|
|
16
15
|
s.add_development_dependency 'rake'
|
17
16
|
s.add_development_dependency 'rspec', '>3'
|
18
|
-
end
|
17
|
+
end
|
data/lib/lense.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lense
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Zubieta
|
@@ -79,6 +79,6 @@ rubyforge_project:
|
|
79
79
|
rubygems_version: 2.4.5
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
|
-
summary: Commandline tools for creation, distribution, and execution of
|
82
|
+
summary: Commandline tools for creation, distribution, and execution of Lightweight
|
83
83
|
Environment for Network Security Education (LENSE)
|
84
84
|
test_files: []
|