reviser 0.0.3.rc2 → 0.0.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/LICENSE +674 -0
- data/config.yml +23 -7
- data/ext/valgrind.rb +25 -0
- data/ext/web_validators.rb +27 -17
- data/lang/C.yml +24 -1
- data/lang/HTML.yml +23 -1
- data/lang/Java.yml +24 -1
- data/lang/Ruby.yml +24 -1
- data/lib/exec.rb +23 -3
- data/lib/reviser.rb +27 -8
- data/lib/reviser/component.rb +23 -2
- data/lib/reviser/components/archiver.rb +21 -0
- data/lib/reviser/components/checker.rb +26 -5
- data/lib/reviser/components/extractors.rb +21 -0
- data/lib/reviser/components/generator.rb +21 -1
- data/lib/reviser/components/generators.rb +21 -0
- data/lib/reviser/components/organiser.rb +27 -5
- data/lib/reviser/config.rb +23 -2
- data/lib/reviser/criteria/code_analysis.rb +26 -2
- data/lib/reviser/criteria/compilation.rb +22 -1
- data/lib/reviser/criteria/execution.rb +23 -3
- data/lib/reviser/helpers/criteria.rb +24 -1
- data/lib/reviser/helpers/git.rb +22 -0
- data/lib/reviser/helpers/project.rb +25 -4
- data/lib/reviser/helpers/system.rb +25 -3
- data/lib/reviser/loggers/logger.rb +21 -0
- data/lib/reviser/loggers/modes.rb +21 -0
- data/lib/reviser/result.rb +22 -0
- metadata +5 -4
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
require 'rubygems'
|
2
23
|
require 'fileutils'
|
3
24
|
|
@@ -1,5 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
require_relative 'generators'
|
2
|
-
|
3
23
|
require_relative '../result'
|
4
24
|
|
5
25
|
module Reviser
|
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
module Reviser
|
2
23
|
module Components
|
3
24
|
|
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
require 'fileutils'
|
2
23
|
require 'rubygems'
|
3
24
|
|
@@ -91,12 +112,13 @@ module Reviser
|
|
91
112
|
|
92
113
|
# Loop to find the core of project
|
93
114
|
#
|
94
|
-
# Basically running through
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
115
|
+
# Basically running through each level of directories
|
116
|
+
# while there is only one directory in the current directory.
|
117
|
+
# Sometimes needed when archives have a sub-folder with their name.
|
118
|
+
# In case the student created multiple nested folders, we don't
|
119
|
+
# do anything.
|
98
120
|
#
|
99
|
-
while all == directories
|
121
|
+
while all == directories && directories.size == 1
|
100
122
|
level += 1
|
101
123
|
@logger.h2 Logger::DEBUG, "Level += 1\nPath = #{@path}"
|
102
124
|
chdir directories.first
|
data/lib/reviser/config.rb
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
22
|
+
require 'yaml'
|
23
|
+
|
1
24
|
#
|
2
25
|
# Externalises the configuration
|
3
26
|
# Cfg acts like a hash whose entries are config keys
|
@@ -5,8 +28,6 @@
|
|
5
28
|
#
|
6
29
|
# @author Renan Strauss
|
7
30
|
#
|
8
|
-
require 'yaml'
|
9
|
-
|
10
31
|
module Reviser
|
11
32
|
class Cfg
|
12
33
|
# Path for specialized config files for projects
|
@@ -1,14 +1,38 @@
|
|
1
1
|
#
|
2
|
-
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
3
13
|
#
|
4
|
-
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
5
21
|
#
|
6
22
|
|
23
|
+
#
|
24
|
+
# @author Renan Strauss
|
25
|
+
#
|
26
|
+
# Basic criteria
|
27
|
+
#
|
7
28
|
module Reviser
|
8
29
|
module Criteria
|
9
30
|
module CodeAnalysis
|
10
31
|
include Helpers::Project
|
11
32
|
|
33
|
+
#
|
34
|
+
# @return project's directory contents
|
35
|
+
#
|
12
36
|
def all_files
|
13
37
|
files.join("\r")
|
14
38
|
end
|
@@ -1,3 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
22
|
+
|
1
23
|
#
|
2
24
|
# @author Yann Prono
|
3
25
|
# @author Renan Strauss
|
@@ -5,7 +27,6 @@
|
|
5
27
|
# Needed stuff for compiled languages
|
6
28
|
# such as C, Java, and so on.
|
7
29
|
#
|
8
|
-
|
9
30
|
module Reviser
|
10
31
|
module Criteria
|
11
32
|
module Compilation
|
@@ -1,3 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
22
|
+
require 'timeout'
|
23
|
+
|
1
24
|
#
|
2
25
|
# @author Renan Strauss
|
3
26
|
#
|
@@ -6,9 +29,6 @@
|
|
6
29
|
# both compiled and interpreted
|
7
30
|
# languages
|
8
31
|
#
|
9
|
-
|
10
|
-
require 'timeout'
|
11
|
-
|
12
32
|
module Reviser
|
13
33
|
module Criteria
|
14
34
|
module Execution
|
@@ -1,5 +1,28 @@
|
|
1
|
-
#
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
2
22
|
|
23
|
+
#
|
24
|
+
# Manage criteria and labels.
|
25
|
+
#
|
3
26
|
# @example Call a criterion (in the config File):
|
4
27
|
# criteria:
|
5
28
|
# - :count_lines: Number of lines
|
data/lib/reviser/helpers/git.rb
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
22
|
+
|
1
23
|
# Class which organizes all directories for use them with git.
|
2
24
|
# Its another component of the project
|
3
25
|
#
|
@@ -1,12 +1,33 @@
|
|
1
1
|
#
|
2
|
-
#
|
3
|
-
# for compilation or something like that.
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
4
3
|
#
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
7
21
|
#
|
8
22
|
require_relative '../result'
|
9
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
|
+
#
|
10
31
|
module Reviser
|
11
32
|
module Helpers
|
12
33
|
module Project
|
@@ -1,11 +1,33 @@
|
|
1
1
|
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
5
21
|
#
|
6
22
|
require 'open3'
|
7
23
|
require 'timeout'
|
8
24
|
|
25
|
+
|
26
|
+
#
|
27
|
+
# Wraps methods for system calls
|
28
|
+
# (external programs execution)
|
29
|
+
# @author Renan Strauss
|
30
|
+
#
|
9
31
|
module Reviser
|
10
32
|
module Helpers
|
11
33
|
module System
|
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
require 'logger'
|
2
23
|
require_relative 'modes'
|
3
24
|
|
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Reviser => a semi-automatic tool for student's projects evaluation
|
3
|
+
#
|
4
|
+
# Copyright (C) 2015 Renan Strauss
|
5
|
+
# Copyright (C) 2015 Yann Prono
|
6
|
+
# Copyright (C) 2015 Romain Ruez
|
7
|
+
# Copyright (C) 2015 Anthony Cerf
|
8
|
+
#
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#
|
1
22
|
require 'logger'
|
2
23
|
|
3
24
|
module Reviser
|