xanthus 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xanthus/default.rb +1 -1
- data/lib/xanthus/github.rb +14 -0
- data/lib/xanthus/init.rb +1 -1
- data/lib/xanthus/job.rb +4 -0
- data/lib/xanthus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dd4bd2fb0748781719afb249fdf84fb6fe80c38717b7b897c1885ef5d6661a2
|
4
|
+
data.tar.gz: 13a198e8768ce0b75c2edbeea4c4f74ed493f3a0aba30b2a1632c8b0d7b7d1fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b62820b6af9adc16bffdf9a0ff7074bcddd19517235cbdf71d0de8ae922df580cbfa653490e2da2f99e5222a79edefd930a423472405a7a081b31b1c4cad4b3
|
7
|
+
data.tar.gz: 3e6d5fc932a6007e94d5fa0b7d01e32b1e1a8f6818fbcbbe6650e60e751c19f6d189cc6458604ad92ead58b233bffce0b4351ec5a857a87a836fbd5dc2534dd0
|
data/lib/xanthus/default.rb
CHANGED
data/lib/xanthus/github.rb
CHANGED
@@ -42,6 +42,19 @@ module Xanthus
|
|
42
42
|
system('git', 'push', "https://#{@token}@github.com/#{@repo}", 'master')
|
43
43
|
end
|
44
44
|
|
45
|
+
def inputs_file config
|
46
|
+
config.jobs.each do |name,job|
|
47
|
+
job.inputs.each do |k, files|
|
48
|
+
files.each do |file|
|
49
|
+
system('cp', '-f', "../../#{file}", "#{file}")
|
50
|
+
system('git', 'add', "#{file}")
|
51
|
+
system('git', 'commit', '-m', "[Xanthus] :horse: pushed #{@folder}/#{file} :horse:")
|
52
|
+
system('git', 'push', "https://#{@token}@github.com/#{@repo}", 'master')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
45
58
|
def init config
|
46
59
|
system('git', 'clone', "https://#{@token}@github.com/#{@repo}", 'repo')
|
47
60
|
Dir.chdir 'repo' do
|
@@ -50,6 +63,7 @@ module Xanthus
|
|
50
63
|
Dir.chdir @folder do
|
51
64
|
self.xanthus_file
|
52
65
|
self.readme_file config
|
66
|
+
self.inputs_file config
|
53
67
|
end
|
54
68
|
end
|
55
69
|
end
|
data/lib/xanthus/init.rb
CHANGED
@@ -116,7 +116,7 @@ It is very cool and interesting!
|
|
116
116
|
config.job :attack_spade do |job|
|
117
117
|
job.iterations = 2
|
118
118
|
job.tasks = {server: [:server], spade: [:pre, :spade_start, :attack, :spade_stop, :post]}
|
119
|
-
job.outputs = {spade: {trace: '/tmp/
|
119
|
+
job.outputs = {spade: {trace: '/tmp/audit_cdm.avro'}}
|
120
120
|
end
|
121
121
|
|
122
122
|
config.github do |github|
|
data/lib/xanthus/job.rb
CHANGED
@@ -6,6 +6,7 @@ module Xanthus
|
|
6
6
|
attr_accessor :iterations
|
7
7
|
attr_accessor :tasks
|
8
8
|
attr_accessor :outputs
|
9
|
+
attr_accessor :inputs
|
9
10
|
|
10
11
|
def initialize
|
11
12
|
@iterations = 0
|
@@ -45,6 +46,9 @@ module Xanthus
|
|
45
46
|
|
46
47
|
FileUtils.mkdir_p machine.to_s
|
47
48
|
Dir.chdir machine.to_s do
|
49
|
+
@inputs[machine].each do |name|
|
50
|
+
system('cp', '-f', "../../#{name}", "#{name}")
|
51
|
+
end
|
48
52
|
FileUtils.mkdir_p 'output'
|
49
53
|
puts 'Creating provision files...'
|
50
54
|
File.open('Vagrantfile', 'w+') do |f|
|
data/lib/xanthus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xanthus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Pasquier
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-03-
|
12
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|