reviser 0.0.3.1 → 0.0.3.3
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 +4 -4
- data/README.md +12 -11
- data/lib/reviser/component.rb +8 -8
- data/lib/reviser/components/archiver.rb +2 -1
- data/lib/reviser/components/checker.rb +10 -10
- data/lib/reviser/components/extractors.rb +1 -1
- data/lib/reviser/components/generator.rb +6 -1
- data/lib/reviser/components/generators.rb +1 -1
- data/lib/reviser/components/organiser.rb +12 -16
- data/lib/reviser/config.rb +18 -11
- data/lib/reviser/criteria/code_analysis.rb +5 -5
- data/lib/reviser/criteria/compilation.rb +7 -7
- data/lib/reviser/criteria/execution.rb +8 -8
- data/lib/reviser/exec.rb +15 -15
- data/lib/reviser/helpers/criteria.rb +4 -8
- data/lib/reviser/helpers/project.rb +7 -8
- data/lib/reviser/helpers/system.rb +5 -6
- data/lib/reviser/result.rb +7 -7
- data/lib/reviser.rb +13 -13
- data/res/example/labfich11.txt +19 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce478a2f380a88e5c081cf86228f34bd8d627ec7
|
4
|
+
data.tar.gz: f0220a06d2b6875f68cf57d44f4c73a1d856fd2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0f697cab681a1e9850ade6eec9a96f1945320a50fad9559c3002cdaed84d0acb35044b7058ff387c98822faed0f0da774b773d86757bf2e5b69fcebc7040317
|
7
|
+
data.tar.gz: f8bd54b314d3390cda11409e1da27b9abe7d2fc43560aa2661802fa7af069fba225b8f210698e5a261ef7f13f3637b28d4f4cde4b2ce3c5336f07dd45acb6fec
|
data/README.md
CHANGED
@@ -61,11 +61,12 @@ Lives in *config.yml*.
|
|
61
61
|
|*src*|Path to the archive containing projects|||
|
62
62
|
|*dest*|Path to a directory where projects will be extracted|||
|
63
63
|
|*projects_names*|Naming convention for projects|`^GROUP_NAME_NAME` `^GROUP_NAME(_NAME)*` `^TP_NAME_FIRSTN`||
|
64
|
+
|*create_git_repo*|Whether to create a git repository for each project or not (requires *git* gem)|Default `false`||
|
64
65
|
|*type*|The type of the project|`my_project` (*type/my_project.yml* must exist)||
|
65
66
|
|*criteria*|The criteria you want for analysis|`all_files` `src_files` `lines_count` `comments_count` `compile` `execute`||
|
66
67
|
|*extensions*|The list of extensions you want for analysis|See below||
|
67
68
|
|*out*|The name of the analysis output file|Default *results*||
|
68
|
-
|*out_format*|The formats that will be generated|Default `html` `xls`
|
69
|
+
|*out_format*|The formats that will be generated|Default `csv` `html` (`xls` also available with *spreadsheet* gem)||
|
69
70
|
|*options*|A hash to set options|`:verbose` `:log_dir` `:log_mode`||
|
70
71
|
|
71
72
|
###Project configuration
|
@@ -81,7 +82,7 @@ Lives in *type/my_project.yml*.
|
|
81
82
|
|*program_prefix*|The program prefix|`pkg.` for Java||
|
82
83
|
|*program_name*|The name of the program|`a.out` `Main`||
|
83
84
|
|*execution_count*|The amount of times to execute the program|Default *1*||
|
84
|
-
|*execution_value*|The optional parameter to pass to the program when executing|A list of values whose length shall be
|
85
|
+
|*execution_value*|The optional parameter to pass to the program when executing|A list of values whose length shall be *execution_count* or *1*. It can contains paths for files located in resources folder|||
|
85
86
|
|
86
87
|
###Labels configuration
|
87
88
|
|
@@ -104,7 +105,7 @@ As of now, there are 2 extensions:
|
|
104
105
|
|Extension|Description|Add it to your workspace extensions|
|
105
106
|
|------------|--------------|----------------------------------------------|
|
106
107
|
|Valgrind|Runs a memcheck through system call to valgrind|`memleaks`|
|
107
|
-
|WebValidators|Validates HTML and CSS through W3C API calls|`validate_web
|
108
|
+
|WebValidators|Validates HTML and CSS through W3C API calls|`validate_web`|
|
108
109
|
|
109
110
|
###Working on your own
|
110
111
|
|
@@ -114,8 +115,8 @@ You'll then need to load your components at the right time, and register your ex
|
|
114
115
|
####Custom components
|
115
116
|
|
116
117
|
*example/my_component.rb*
|
117
|
-
|
118
|
-
|
118
|
+
|
119
|
+
``` ruby
|
119
120
|
require 'json'
|
120
121
|
require 'reviser'
|
121
122
|
|
@@ -153,8 +154,8 @@ end
|
|
153
154
|
####Custom extensions
|
154
155
|
|
155
156
|
*example/my_extension.rb*
|
156
|
-
|
157
|
-
|
157
|
+
|
158
|
+
``` ruby
|
158
159
|
#
|
159
160
|
# A custom criteria for reviser
|
160
161
|
#
|
@@ -206,15 +207,15 @@ end
|
|
206
207
|
|
207
208
|
### Putting it together
|
208
209
|
*example/config.yml*
|
209
|
-
|
210
|
-
|
210
|
+
|
211
|
+
``` yaml
|
211
212
|
extensions:
|
212
213
|
- my_criteria
|
213
214
|
```
|
214
215
|
|
215
216
|
*example/my_app.rb*
|
216
|
-
|
217
|
-
|
217
|
+
|
218
|
+
``` ruby
|
218
219
|
require 'reviser'
|
219
220
|
|
220
221
|
require_relative 'my_component'
|
data/lib/reviser/component.rb
CHANGED
@@ -21,15 +21,15 @@
|
|
21
21
|
#
|
22
22
|
require_relative 'loggers/logger'
|
23
23
|
|
24
|
-
#
|
25
|
-
# The abstract class Component
|
26
|
-
# Even though Ruby doesn't have abstract classes,
|
27
|
-
# we force inheriting classes to implement the run
|
28
|
-
# method that will be called during reviser's execution
|
29
|
-
#
|
30
|
-
# @author Renan Strauss
|
31
|
-
#
|
32
24
|
module Reviser
|
25
|
+
#
|
26
|
+
# The abstract class Component
|
27
|
+
# Even though Ruby doesn't have abstract classes,
|
28
|
+
# we force inheriting classes to implement the run
|
29
|
+
# method that will be called during reviser's execution
|
30
|
+
#
|
31
|
+
# @author Renan Strauss
|
32
|
+
#
|
33
33
|
class Component
|
34
34
|
#
|
35
35
|
# Don't forget to call super in your component's initializer !
|
@@ -25,7 +25,7 @@ require_relative 'extractors'
|
|
25
25
|
|
26
26
|
module Reviser
|
27
27
|
module Components
|
28
|
-
|
28
|
+
#
|
29
29
|
# Manages uncompression of archive.
|
30
30
|
# Archiver extracts all data in a given compressed file.
|
31
31
|
#
|
@@ -112,6 +112,7 @@ module Reviser
|
|
112
112
|
extracted = 0
|
113
113
|
|
114
114
|
entries.each do |entry|
|
115
|
+
puts "----[#{extracted+1}/#{entries.size}]\t#{entry}"
|
115
116
|
|
116
117
|
ext = File.extname entry
|
117
118
|
basename = File.basename entry, ext
|
@@ -24,17 +24,17 @@ require 'open3'
|
|
24
24
|
require_relative '../result'
|
25
25
|
require_relative '../helpers/criteria'
|
26
26
|
|
27
|
-
#
|
28
|
-
# @author Renan Strauss
|
29
|
-
#
|
30
|
-
# The Checker is a component that wraps
|
31
|
-
# all required tools to do the analysis.
|
32
|
-
# It adapts itself dynamically
|
33
|
-
# to the configuration
|
34
|
-
#
|
35
|
-
#
|
36
27
|
module Reviser
|
37
28
|
module Components
|
29
|
+
#
|
30
|
+
# @author Renan Strauss
|
31
|
+
#
|
32
|
+
# The Checker is a component that wraps
|
33
|
+
# all required tools to do the analysis.
|
34
|
+
# It adapts itself dynamically
|
35
|
+
# to the configuration
|
36
|
+
#
|
37
|
+
#
|
38
38
|
class Checker < Component
|
39
39
|
include Helpers::Criteria
|
40
40
|
|
@@ -70,7 +70,7 @@ module Reviser
|
|
70
70
|
def run
|
71
71
|
@data.each_with_index do |proj, i|
|
72
72
|
path = File.join(Cfg[:dest], proj)
|
73
|
-
puts "
|
73
|
+
puts "----[#{i+1}/#{@data.size}]\t#{proj}"
|
74
74
|
Dir.chdir(path) { check proj }
|
75
75
|
end
|
76
76
|
|
@@ -24,7 +24,7 @@ require_relative '../result'
|
|
24
24
|
|
25
25
|
module Reviser
|
26
26
|
module Components
|
27
|
-
|
27
|
+
#
|
28
28
|
# Generator is used to create a file result after the analysis.
|
29
29
|
# Currently, Generator supports HTML, XLS and CSV format.
|
30
30
|
#
|
@@ -43,9 +43,12 @@ module Reviser
|
|
43
43
|
# Runs the generation of results file in all asked formats by user.
|
44
44
|
def run
|
45
45
|
#begin
|
46
|
+
i = 0
|
46
47
|
Cfg[:out_format].each do |format|
|
47
48
|
# Deep copy !!!
|
48
49
|
arg = Marshal.load(Marshal.dump(@data))
|
50
|
+
|
51
|
+
puts "----[#{i+1}/#{Cfg[:out_format].size}] #{format.upcase}"
|
49
52
|
arg.each do |project, results|
|
50
53
|
results.each do |criterion, value|
|
51
54
|
arg[project][criterion] = value.send(format.to_sym).to_s.encode! 'utf-8', :invalid => :replace
|
@@ -53,6 +56,8 @@ module Reviser
|
|
53
56
|
end
|
54
57
|
|
55
58
|
send format.to_sym, arg
|
59
|
+
|
60
|
+
i += 1
|
56
61
|
end
|
57
62
|
#rescue Object => e
|
58
63
|
# @logger.h1 Logger::FATAL, "Wrong format : #{e.to_s}"
|
@@ -26,7 +26,7 @@ require_relative '../helpers/project'
|
|
26
26
|
|
27
27
|
module Reviser
|
28
28
|
module Components
|
29
|
-
|
29
|
+
#
|
30
30
|
# Class which organizes all directories to simplify projects' analysis.
|
31
31
|
# Organiser renames projects folders and organises the whole of projects
|
32
32
|
# in order to have a structured folder (files at the root of folder)
|
@@ -92,7 +92,7 @@ module Reviser
|
|
92
92
|
else
|
93
93
|
@logger.h2 Logger::ERROR, "Can't rename #{File.basename(entry)} - Datas not found in name"
|
94
94
|
end
|
95
|
-
name
|
95
|
+
@results << name
|
96
96
|
end
|
97
97
|
|
98
98
|
# Method which moves project's directories in order to
|
@@ -152,21 +152,17 @@ module Reviser
|
|
152
152
|
# Method which runs the organiser.
|
153
153
|
# It will apply all importants methods of this class for each project.
|
154
154
|
def run
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
155
|
+
to_do = [:structure, :git, :rename]
|
156
|
+
to_do.delete(:git) unless Cfg[:create_git_repo]
|
157
|
+
|
158
|
+
i = 0
|
159
|
+
to_do.each do |method|
|
160
|
+
puts "----[#{i+1}/#{to_do.size}] #{method.capitalize}"
|
161
|
+
@logger.h1 Logger::INFO, "#{method.capitalize}"
|
162
|
+
@data.each do |entry|
|
163
|
+
send method, entry
|
164
164
|
end
|
165
|
-
|
166
|
-
@logger.h1 Logger::INFO, "Renaming directory"
|
167
|
-
new_path = rename entry
|
168
|
-
@logger.newline
|
169
|
-
@results << new_path
|
165
|
+
i += 1
|
170
166
|
end
|
171
167
|
|
172
168
|
@logger.h1 Logger::INFO, "#{@projects_per_group.keys.size} group#{'s' if @projects_per_group.keys.size > 1} have been detected"
|
data/lib/reviser/config.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Reviser => a semi-automatic tool for
|
2
|
+
# Reviser => a semi-automatic tool for students projects evaluation
|
3
3
|
#
|
4
4
|
# Copyright (C) 2015 Renan Strauss
|
5
5
|
# Copyright (C) 2015 Yann Prono
|
@@ -21,14 +21,14 @@
|
|
21
21
|
#
|
22
22
|
require 'yaml'
|
23
23
|
|
24
|
-
#
|
25
|
-
# Externalises the configuration
|
26
|
-
# Cfg acts like a hash whose entries are config keys
|
27
|
-
# associated with their values
|
28
|
-
#
|
29
|
-
# @author Renan Strauss
|
30
|
-
#
|
31
24
|
module Reviser
|
25
|
+
#
|
26
|
+
# Externalises the configuration
|
27
|
+
# Cfg acts like a hash whose entries are config keys
|
28
|
+
# associated with their values
|
29
|
+
#
|
30
|
+
# @author Renan Strauss
|
31
|
+
#
|
32
32
|
class Cfg
|
33
33
|
# Path for specialized config files for projects
|
34
34
|
ROOT = File.join(File.dirname(File.dirname(File.dirname(__FILE__))))
|
@@ -60,6 +60,14 @@ module Reviser
|
|
60
60
|
# @return true if there is the key in the config
|
61
61
|
def self.has_key?(key)
|
62
62
|
@@mem.has_key? key
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# @return The specified
|
68
|
+
def self.workspace_file f
|
69
|
+
path = File.join @@workspace_root, f
|
70
|
+
File.exists?(path) && File.new(path) || nil
|
63
71
|
end
|
64
72
|
|
65
73
|
#
|
@@ -70,8 +78,7 @@ module Reviser
|
|
70
78
|
# calling this method
|
71
79
|
#
|
72
80
|
def self.resource path
|
73
|
-
|
74
|
-
File.new abs if File.exists? abs
|
81
|
+
self.workspace_file File.join(RES_DIR, path)
|
75
82
|
end
|
76
83
|
|
77
84
|
|
@@ -111,7 +118,7 @@ module Reviser
|
|
111
118
|
Cfg[:options] ||= { verbose: true, log_dir:'logs', log_mode: 'org' }
|
112
119
|
Cfg[:timeout] ||= 4
|
113
120
|
Cfg[:out] ||= 'results'
|
114
|
-
Cfg[:out_format] ||= ['
|
121
|
+
Cfg[:out_format] ||= ['csv', 'html']
|
115
122
|
Cfg[:required_files] ||= []
|
116
123
|
|
117
124
|
Cfg[:program_prefix] ||= ''
|
@@ -20,13 +20,13 @@
|
|
20
20
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
21
|
#
|
22
22
|
|
23
|
-
#
|
24
|
-
# @author Renan Strauss
|
25
|
-
#
|
26
|
-
# Basic criteria
|
27
|
-
#
|
28
23
|
module Reviser
|
29
24
|
module Criteria
|
25
|
+
#
|
26
|
+
# @author Renan Strauss
|
27
|
+
#
|
28
|
+
# Basic criteria
|
29
|
+
#
|
30
30
|
module CodeAnalysis
|
31
31
|
include Helpers::Project
|
32
32
|
|
@@ -20,15 +20,15 @@
|
|
20
20
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
21
|
#
|
22
22
|
|
23
|
-
#
|
24
|
-
# @author Yann Prono
|
25
|
-
# @author Renan Strauss
|
26
|
-
#
|
27
|
-
# Needed stuff for compiled languages
|
28
|
-
# such as C, Java, and so on.
|
29
|
-
#
|
30
23
|
module Reviser
|
31
24
|
module Criteria
|
25
|
+
#
|
26
|
+
# @author Yann Prono
|
27
|
+
# @author Renan Strauss
|
28
|
+
#
|
29
|
+
# Needed stuff for compiled languages
|
30
|
+
# such as C, Java, and so on.
|
31
|
+
#
|
32
32
|
module Compilation
|
33
33
|
include Helpers::System
|
34
34
|
|
@@ -21,16 +21,16 @@
|
|
21
21
|
#
|
22
22
|
require 'timeout'
|
23
23
|
|
24
|
-
#
|
25
|
-
# @author Renan Strauss
|
26
|
-
#
|
27
|
-
# Needed stuff for Checker
|
28
|
-
# when it comes to executing
|
29
|
-
# both compiled and interpreted
|
30
|
-
# languages
|
31
|
-
#
|
32
24
|
module Reviser
|
33
25
|
module Criteria
|
26
|
+
#
|
27
|
+
# @author Renan Strauss
|
28
|
+
#
|
29
|
+
# Needed stuff for Checker
|
30
|
+
# when it comes to executing
|
31
|
+
# both compiled and interpreted
|
32
|
+
# languages
|
33
|
+
#
|
34
34
|
module Execution
|
35
35
|
#
|
36
36
|
# Determines how to execute the program
|
data/lib/reviser/exec.rb
CHANGED
@@ -26,26 +26,23 @@ require 'colorize'
|
|
26
26
|
require_relative '../reviser'
|
27
27
|
require_relative 'helpers/criteria'
|
28
28
|
|
29
|
-
#
|
30
|
-
# Module used for managing all actions in command line
|
31
|
-
# This module enables to user the programm in command line.
|
32
|
-
# It use the powerful toolkit Thor for building command line interfaces
|
33
|
-
#
|
34
|
-
# @author Yann Prono
|
35
|
-
#
|
36
29
|
module Reviser
|
30
|
+
#
|
31
|
+
# Class used for managing all actions in command line
|
32
|
+
# This class enables the user to interact with the programm in command line.
|
33
|
+
# It use the powerful toolkit Thor for building command line interfaces
|
34
|
+
#
|
35
|
+
# @author Yann Prono
|
36
|
+
#
|
37
37
|
class Exec < Thor
|
38
38
|
|
39
|
-
VERSION = '0.0.3.
|
39
|
+
VERSION = '0.0.3.3'
|
40
40
|
|
41
41
|
map '--version' => :version
|
42
42
|
map '-v' => :version
|
43
43
|
|
44
44
|
@@setup = false
|
45
45
|
|
46
|
-
# path of config template file.
|
47
|
-
$template_path = File.join(Cfg::ROOT, 'config.yml')
|
48
|
-
|
49
46
|
def initialize(*args)
|
50
47
|
super
|
51
48
|
# If config.yml already exists in the working
|
@@ -61,7 +58,7 @@ module Reviser
|
|
61
58
|
# Import all files and directories
|
62
59
|
init_workspace dir
|
63
60
|
|
64
|
-
setup File.expand_path(File.join(dir,
|
61
|
+
setup File.expand_path(File.join(dir, 'config.yml')) unless @@setup
|
65
62
|
|
66
63
|
puts "Customize config.yml to your needs @see docs".yellow
|
67
64
|
puts 'Then simply execute \'reviser work\' to launch analysis.'.yellow
|
@@ -172,6 +169,8 @@ module Reviser
|
|
172
169
|
# Initialize workspace copying all files et directories.
|
173
170
|
# @param dir Directory to init.
|
174
171
|
def init_workspace dir
|
172
|
+
FileUtils.mkdir dir unless File.directory? dir
|
173
|
+
|
175
174
|
# First copy directories
|
176
175
|
[Cfg::RES_DIR, Cfg::TYPE_DIR].each do |d|
|
177
176
|
path = File.join(Cfg::ROOT, d)
|
@@ -184,9 +183,10 @@ module Reviser
|
|
184
183
|
end
|
185
184
|
|
186
185
|
# Then the config file
|
187
|
-
|
188
|
-
|
189
|
-
|
186
|
+
['config.yml', 'labels.yml'].each do |tpl|
|
187
|
+
FileUtils.cp File.join(Cfg::ROOT, tpl), dir
|
188
|
+
message('Create', dir == '.' && tpl || File.join(dir, tpl))
|
189
|
+
end
|
190
190
|
end
|
191
191
|
|
192
192
|
end
|
@@ -58,7 +58,7 @@ module Reviser
|
|
58
58
|
# Path of criteria
|
59
59
|
CRITERIA = File.join File.dirname(PWD), 'criteria'
|
60
60
|
# Path of extensions
|
61
|
-
EXTENSIONS = File.join
|
61
|
+
EXTENSIONS = File.join Cfg::ROOT, 'ext'
|
62
62
|
|
63
63
|
attr_reader :criteria
|
64
64
|
attr_reader :output
|
@@ -166,12 +166,8 @@ module Reviser
|
|
166
166
|
#
|
167
167
|
# @author Yann Prono
|
168
168
|
module Labels
|
169
|
-
|
170
|
-
# Current directory of this file
|
171
|
-
PWD = File.dirname __FILE__
|
172
|
-
|
173
169
|
# Path of label.yml file
|
174
|
-
LABELS =
|
170
|
+
LABELS = 'labels.yml'
|
175
171
|
|
176
172
|
#
|
177
173
|
# Enable to associate a label to a criterion (method).
|
@@ -180,7 +176,7 @@ module Reviser
|
|
180
176
|
# @param label Label to link with the method.
|
181
177
|
def self.add meth, label
|
182
178
|
res = "Create"
|
183
|
-
labels = YAML.load File.
|
179
|
+
labels = YAML.load File.read(Cfg.workspace_file LABELS)
|
184
180
|
if labels.respond_to? '[]'
|
185
181
|
res = "Update" if labels.key? meth
|
186
182
|
labels[meth] = label
|
@@ -192,7 +188,7 @@ module Reviser
|
|
192
188
|
# @return Hash all known labels by reviser.
|
193
189
|
# :criterion => label
|
194
190
|
def self.load
|
195
|
-
|
191
|
+
self.populate YAML.load File.read(Cfg.workspace_file LABELS)
|
196
192
|
end
|
197
193
|
|
198
194
|
def self.populate hash
|
@@ -21,15 +21,15 @@
|
|
21
21
|
#
|
22
22
|
require_relative '../result'
|
23
23
|
|
24
|
-
#
|
25
|
-
# Provide useful methods for projects evaluation
|
26
|
-
# as well as a naming module for custom regexes
|
27
|
-
#
|
28
|
-
# @author Renan Strauss
|
29
|
-
# @author Yann Prono
|
30
|
-
#
|
31
24
|
module Reviser
|
32
25
|
module Helpers
|
26
|
+
#
|
27
|
+
# Provide useful methods for projects evaluation
|
28
|
+
# as well as a naming module for custom regexes
|
29
|
+
#
|
30
|
+
# @author Renan Strauss
|
31
|
+
# @author Yann Prono
|
32
|
+
#
|
33
33
|
module Project
|
34
34
|
#
|
35
35
|
# For interpreted languages
|
@@ -88,7 +88,6 @@ module Reviser
|
|
88
88
|
#
|
89
89
|
# @author Yann Prono
|
90
90
|
#
|
91
|
-
|
92
91
|
module Naming
|
93
92
|
|
94
93
|
# Dictionnary for regex in config file
|
@@ -22,14 +22,13 @@
|
|
22
22
|
require 'open3'
|
23
23
|
require 'timeout'
|
24
24
|
|
25
|
-
|
26
|
-
#
|
27
|
-
# Wraps methods for system calls
|
28
|
-
# (external programs execution)
|
29
|
-
# @author Renan Strauss
|
30
|
-
#
|
31
25
|
module Reviser
|
32
26
|
module Helpers
|
27
|
+
#
|
28
|
+
# Wraps methods for system calls
|
29
|
+
# (external programs execution)
|
30
|
+
# @author Renan Strauss
|
31
|
+
#
|
33
32
|
module System
|
34
33
|
#
|
35
34
|
# @return the first executable found
|
data/lib/reviser/result.rb
CHANGED
@@ -20,14 +20,14 @@
|
|
20
20
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
21
|
#
|
22
22
|
|
23
|
-
#
|
24
|
-
# This class represents an analysis result
|
25
|
-
# It allows us to easily output well-formatted results for certain output formats
|
26
|
-
# (eg HTML)
|
27
|
-
#
|
28
|
-
# @author Renan Strauss
|
29
|
-
#
|
30
23
|
module Reviser
|
24
|
+
#
|
25
|
+
# This class represents an analysis result
|
26
|
+
# It allows us to easily output well-formatted results for certain output formats
|
27
|
+
# (eg HTML)
|
28
|
+
#
|
29
|
+
# @author Renan Strauss
|
30
|
+
#
|
31
31
|
class Result
|
32
32
|
#
|
33
33
|
# In case no call to manufacture was made,
|
data/lib/reviser.rb
CHANGED
@@ -42,18 +42,18 @@ def require_gem gem_name
|
|
42
42
|
require gem_name
|
43
43
|
end
|
44
44
|
|
45
|
-
#
|
46
|
-
# @author Renan Strauss
|
47
|
-
#
|
48
|
-
# This class is basically here to give the user
|
49
|
-
# a generic and comprehensive way to use and
|
50
|
-
# customize the behavior of our tool.
|
51
|
-
# The main idea is that the user should not
|
52
|
-
# instantiate components himself, nor worry
|
53
|
-
# about the data these components exchange.
|
54
|
-
# It is the API entry point.
|
55
|
-
#
|
56
45
|
module Reviser
|
46
|
+
#
|
47
|
+
# @author Renan Strauss
|
48
|
+
#
|
49
|
+
# This class is basically here to give the user
|
50
|
+
# a generic and comprehensive way to use and
|
51
|
+
# customize the behavior of our tool.
|
52
|
+
# The main idea is that the user should not
|
53
|
+
# instantiate components himself, nor worry
|
54
|
+
# about the data these components exchange.
|
55
|
+
# It is the API entry point.
|
56
|
+
#
|
57
57
|
class Reviser
|
58
58
|
@@setup = false
|
59
59
|
|
@@ -115,7 +115,7 @@ module Reviser
|
|
115
115
|
# let users load their own components
|
116
116
|
#
|
117
117
|
@@loaded_components.each do |comp, conf|
|
118
|
-
puts "
|
118
|
+
puts "[ " + "Running ".yellow + "#{Reviser.titleize comp}".blue + " ]"
|
119
119
|
|
120
120
|
require_relative "reviser/components/#{comp}" unless conf[:local]
|
121
121
|
|
@@ -126,7 +126,7 @@ module Reviser
|
|
126
126
|
|
127
127
|
@@loaded_components[comp][:data] = c.work
|
128
128
|
|
129
|
-
puts
|
129
|
+
puts "[ " + "Done".green + " ]"
|
130
130
|
end
|
131
131
|
|
132
132
|
# To handle multiple loads
|
@@ -0,0 +1,19 @@
|
|
1
|
+
62 18
|
2
|
+
**************************************************************
|
3
|
+
* * * * * *
|
4
|
+
* * * * * ****** * *
|
5
|
+
E ********** ****** ***** ******************* *******
|
6
|
+
* * * * * * S
|
7
|
+
******* ******* ************************** *********** ***
|
8
|
+
* * * * * * * *
|
9
|
+
* ******* * * * * * **************** * *
|
10
|
+
* * * ** ****** * * * * * *
|
11
|
+
* * *** * * * ***** ********** *
|
12
|
+
* * * * * * * ******************
|
13
|
+
* ** ****** * *** *** * * * * * *
|
14
|
+
* * * * * *** ***************************** *
|
15
|
+
* * * *********** * * * * * *
|
16
|
+
* * * *** **** * * * * * * S
|
17
|
+
*********** ***** ** * ********* * ********** *
|
18
|
+
* * * * * *
|
19
|
+
***E**********************************************************
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reviser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3.
|
4
|
+
version: 0.0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renan Strauss
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- res/css/normalize.css
|
118
118
|
- res/css/style_logs.css
|
119
119
|
- res/example/data.json
|
120
|
+
- res/example/labfich11.txt
|
120
121
|
- res/scss/style_logs.scss
|
121
122
|
- type/example/CProject.yml
|
122
123
|
- type/example/HelloWorldRuby.yml
|