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.
@@ -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
- # each level of directories
96
- # while there are only directories
97
- # in the current directory
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
@@ -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
- # @author Renan Strauss
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
- # Basic stuff needed for Checker
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
- # Manage criteria and labels.
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
@@ -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
- # Provide important methods
3
- # for compilation or something like that.
2
+ # Reviser => a semi-automatic tool for student's projects evaluation
4
3
  #
5
- # @author Renan Strauss
6
- # @author Yann Prono
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
- # Wraps methods for system calls
3
- # (external programs execution)
4
- # @author Renan Strauss
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