xanthus 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e366be3c9180e9788c19dfaa31e52222cd0782ce8cce0d99c3d05d6a509e8454
4
- data.tar.gz: d44b89c4285251a10c172bea19064607f63f9b79e84ed1c8ee814f4296ec43eb
3
+ metadata.gz: 0dd4bd2fb0748781719afb249fdf84fb6fe80c38717b7b897c1885ef5d6661a2
4
+ data.tar.gz: 13a198e8768ce0b75c2edbeea4c4f74ed493f3a0aba30b2a1632c8b0d7b7d1fa
5
5
  SHA512:
6
- metadata.gz: a16dd967a99ec4d5f20f949d42a803de47ca4e60265b7474e77bdef3bcfacced87da0d86d5b62371ff42b44b2f7c84a888e77bc08c738938098c002f61085561
7
- data.tar.gz: 385c29998fe84c0a5d3c3c1c0c401587ce9c940f6b7e84527d161632c934a20b3d7815e0eb1d0ce6c4d71f2240e1cb9b24d00cf6561bda4b3deb87361cbf920f
6
+ metadata.gz: 9b62820b6af9adc16bffdf9a0ff7074bcddd19517235cbdf71d0de8ae922df580cbfa653490e2da2f99e5222a79edefd930a423472405a7a081b31b1c4cad4b3
7
+ data.tar.gz: 3e6d5fc932a6007e94d5fa0b7d01e32b1e1a8f6818fbcbbe6650e60e751c19f6d189cc6458604ad92ead58b233bffce0b4351ec5a857a87a836fbd5dc2534dd0
@@ -11,7 +11,7 @@ sleep 20
11
11
 
12
12
  SPADE_START = %q{%{
13
13
  echo spade | sudo -H -u spade ../SPADE/bin/spade start
14
- sleep 1
14
+ sleep 20
15
15
  }}
16
16
 
17
17
  SPADE_STOP = %q{%{
@@ -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/audit_cmd.avro'}}
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|
@@ -1,5 +1,5 @@
1
1
  module Xanthus
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
 
4
4
  def self.version
5
5
  puts VERSION
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.0
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-05 00:00:00.000000000 Z
12
+ date: 2019-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler