norad_cli 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 3e3063cd4907e612894a79f1355b7fd550ecc25c
4
- data.tar.gz: 960742bba7ea52a70b425d9c46af4aa35ed5cad7
3
+ metadata.gz: 4ba8aa6c8eb43a079e47bef73c6749214ceb90c1
4
+ data.tar.gz: f990b54a475f7b626890b1054abd1f1de6a5db56
5
5
  SHA512:
6
- metadata.gz: 176111f240083608fcfa4e9906bf054d0d6de427c73d215752388aebc56eecc9284ec5025def2d7389abdb3d5180dcfad7b8eb0a7e04695d55f8592695ceeacc
7
- data.tar.gz: d8f0a0bc199330a03a43c39c0503a3939e90dede9b30747f8163b9d2128ba2d937f28c60964acd767b2a9740b52ba1eb7b22b2e21545ba7f6c4de4bcbb3eba77
6
+ metadata.gz: 985deb0174b0775c9d580ce4e6f7a81ba09750c6c8b8193478c51393b5798dfadc38b90aa0604f3d587d34ea2e8462b89f913b1f852c56e246cc670e593d38cd
7
+ data.tar.gz: b8419a2966677e96763fe08863e59e3cebe361562a91b7bbc825441c1d8eeb0a8e3b882bd914916c673c3d7b0048d7d2d60345ad051f39892c67177948c4979e
@@ -166,8 +166,8 @@ class Sectest < Thor
166
166
  option :debug, aliases: '-d', type: :boolean, default: true, desc: 'Turn on debugging messages (e.g. Docker build logs to stdout)'
167
167
  define_method 'build:specs' do |name|
168
168
  imgs_to_build = {}
169
- imgs_to_build["#{File.expand_path(File.dirname(__FILE__))}/../templates/spec/support/Dockerfile.testserver"] = 'docker-images-test-results-server:latest'
170
- imgs_to_build["#{File.expand_path(File.dirname(__FILE__))}/../templates/spec/support/Dockerfile.ubuntu_ssh"] = 'docker-images-test-ubuntu-ssh-server:latest'
169
+ imgs_to_build["#{__dir__}/../templates/spec/support/Dockerfile.testserver"] = 'docker-images-test-results-server:latest'
170
+ imgs_to_build["#{__dir__}/../templates/spec/support/Dockerfile.ubuntu_ssh"] = 'docker-images-test-ubuntu-ssh-server:latest'
171
171
 
172
172
  # Determine the Dockerfiles in the assessment spec dir
173
173
  Dir.glob("spec/#{name}/targets/Dockerfile.*[^~]").each do |entry|
@@ -177,7 +177,7 @@ class Sectest < Thor
177
177
 
178
178
  # Build the images
179
179
  Docker.options[:read_timeout] = 36_000
180
- imgs_to_build.keys.each do |img_dir|
180
+ imgs_to_build.each_key do |img_dir|
181
181
  say("Building image #{img_dir}...", :green)
182
182
  docker_file = img_dir.split('/')[-1]
183
183
  nocache = docker_file['no-cache'] ? true : false
@@ -35,7 +35,8 @@ describe Manifest do
35
35
  def manifest_name_check(manifest)
36
36
  testing_for 'valid name'
37
37
  expect(manifest.values['name']).to_not eq(nil)
38
- expect(manifest.values['name'] =~ %r{\A[A-Za-z][A-Za-z0-9_-]+\z}).to_not eq(nil)
38
+ expect(manifest.values['name']).to match(%r{\A[A-Za-z][A-Za-z0-9_-]+\z})
39
+ expect(manifest.values['name']).to match(/#{ENV['sectest_name']}/)
39
40
  end
40
41
 
41
42
  def manifest_version_check(manifest)
@@ -16,6 +16,7 @@ describe Readme do
16
16
  next if File.exist?("sectests/#{ENV['sectest_name']}/.parent_only")
17
17
  puts "Looking for README.md in: sectests/#{ENV['sectest_name']}..."
18
18
  readme = File.read "sectests/#{ENV['sectest_name']}/README.md"
19
+ expect(readme.lines[0].tr(' ', '-')).to match(/#{ENV['sectest_name']}/i)
19
20
  ok
20
21
 
21
22
  testing_for 'variant READMEs'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoradCli
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
data/lib/norad_cli.rb CHANGED
@@ -5,6 +5,6 @@ require 'norad_cli/cli/main'
5
5
 
6
6
  module NoradCli
7
7
  def self.ssh_key_path
8
- "#{File.expand_path(File.dirname(__FILE__))}/norad_cli/templates/spec/support/ssh_key"
8
+ "#{__dir__}/norad_cli/templates/spec/support/ssh_key"
9
9
  end
10
10
  end
data/norad_cli.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
3
  lib = File.expand_path('../lib', __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: norad_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hitchcock
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-18 00:00:00.000000000 Z
13
+ date: 2017-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: git