vigilant 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.md +19 -0
- data/README.md +35 -0
- data/bin/vigilant +11 -2
- data/lib/vigilant.rb +1 -1
- data/lib/vigilant/cli.rb +2 -2
- data/vigilant.gemspec +2 -1
- metadata +16 -3
data/LICENSE.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2012 Michael Willams
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Vigilant
|
2
|
+
|
3
|
+
Vigilant is a simple unit test generator for C/C++. It generates a single compilable file based off of a directory of .tests. Tests are hierarchical, so use folders to represent test suites.
|
4
|
+
|
5
|
+
# Usage
|
6
|
+
|
7
|
+
Make sure you have a vigilant.options file in the root of the directory that looks something like this:
|
8
|
+
|
9
|
+
{
|
10
|
+
"output": "run_tests.cc",
|
11
|
+
"includes": "bt/foundation.h"
|
12
|
+
}
|
13
|
+
|
14
|
+
Run the `vigilant` binary and pass it your .tests directory:
|
15
|
+
|
16
|
+
$ vigilant gen tests
|
17
|
+
Generating tests...
|
18
|
+
tests/foundation/array/resize.test
|
19
|
+
tests/foundation/array/iterator.test
|
20
|
+
tests/foundation/array/swap.test
|
21
|
+
---
|
22
|
+
tests/foundation/byte_buffer/read_and_write.test
|
23
|
+
Generated 23 tests.
|
24
|
+
|
25
|
+
# Installing
|
26
|
+
|
27
|
+
$ gem install vigilant
|
28
|
+
|
29
|
+
# Contributing
|
30
|
+
|
31
|
+
Just fork, branch `feature-name`, and send a pull-request.
|
32
|
+
|
33
|
+
# License
|
34
|
+
|
35
|
+
MIT, see LICENSE.md for more info.
|
data/bin/vigilant
CHANGED
@@ -6,7 +6,8 @@ require "gli"
|
|
6
6
|
require "vigilant"
|
7
7
|
require "vigilant/cli"
|
8
8
|
|
9
|
-
|
9
|
+
include GLI::App
|
10
|
+
version Vigilant::VERSION
|
10
11
|
|
11
12
|
desc "Generate unit test file"
|
12
13
|
long_desc "Generate C/C++ unit testing file from a Vigilant config file"
|
@@ -17,6 +18,14 @@ command :gen do |c|
|
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
21
|
+
desc "Generate a vigilant.options file"
|
22
|
+
long_desc "Generate a template vigilant.options file"
|
23
|
+
command :template do |c|
|
24
|
+
c.action do |global_options, options, args|
|
25
|
+
Vigilant::CLI.template("vigilant.options")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
20
29
|
pre { |global, command, options, args| true }
|
21
30
|
post {|global, command, options, args| true }
|
22
31
|
|
@@ -25,4 +34,4 @@ on_error do |exception|
|
|
25
34
|
puts exception.backtrace
|
26
35
|
end
|
27
36
|
|
28
|
-
exit
|
37
|
+
exit run(ARGV)
|
data/lib/vigilant.rb
CHANGED
data/lib/vigilant/cli.rb
CHANGED
data/vigilant.gemspec
CHANGED
@@ -13,7 +13,8 @@ Gem::Specification.new do |spec|
|
|
13
13
|
|
14
14
|
spec.rubyforge_project = "vigilant"
|
15
15
|
|
16
|
-
spec.
|
16
|
+
spec.add_dependency "gli", "~> 2.5.2"
|
17
|
+
spec.add_development_dependency "bundler", "~> 1.0"
|
17
18
|
|
18
19
|
spec.files = `git ls-files`.split("\n")
|
19
20
|
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vigilant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,9 +11,20 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: gli
|
16
|
+
requirement: &25249332 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.5.2
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *25249332
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: bundler
|
16
|
-
requirement: &
|
27
|
+
requirement: &25248852 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ~>
|
@@ -21,7 +32,7 @@ dependencies:
|
|
21
32
|
version: '1.0'
|
22
33
|
type: :development
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *25248852
|
25
36
|
description: A simple C/C++ unit test generator.
|
26
37
|
email:
|
27
38
|
- devbug@bitbyte.ca
|
@@ -31,6 +42,8 @@ extensions: []
|
|
31
42
|
extra_rdoc_files: []
|
32
43
|
files:
|
33
44
|
- .gitignore
|
45
|
+
- LICENSE.md
|
46
|
+
- README.md
|
34
47
|
- bin/vigilant
|
35
48
|
- lib/vigilant.rb
|
36
49
|
- lib/vigilant/cli.rb
|