cellect-server 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/Gemfile +2 -0
- data/README.md +19 -0
- data/Rakefile +9 -0
- data/cellect-server.gemspec +40 -0
- data/cellect.gemspec +33 -0
- data/lib/cellect.rb +7 -0
- data/lib/cellect/node_set.rb +38 -0
- data/lib/cellect/server.rb +30 -0
- data/lib/cellect/server/adapters.rb +13 -0
- data/lib/cellect/server/adapters/default.rb +60 -0
- data/lib/cellect/server/adapters/postgres.rb +64 -0
- data/lib/cellect/server/api.rb +48 -0
- data/lib/cellect/server/api/helpers.rb +44 -0
- data/lib/cellect/server/api/sets.rb +21 -0
- data/lib/cellect/server/api/users.rb +32 -0
- data/lib/cellect/server/grouped_project.rb +65 -0
- data/lib/cellect/server/node_set.rb +19 -0
- data/lib/cellect/server/project.rb +123 -0
- data/lib/cellect/server/user.rb +66 -0
- data/lib/cellect/version.rb +3 -0
- data/spec/fixtures/project_data/grouped_pairwise_priority.json +109 -0
- data/spec/fixtures/project_data/grouped_pairwise_random.json +89 -0
- data/spec/fixtures/project_data/grouped_priority.json +59 -0
- data/spec/fixtures/project_data/grouped_random.json +49 -0
- data/spec/fixtures/project_data/pairwise_priority.json +49 -0
- data/spec/fixtures/project_data/pairwise_random.json +39 -0
- data/spec/fixtures/project_data/priority.json +49 -0
- data/spec/fixtures/project_data/random.json +39 -0
- data/spec/fixtures/user_data/complete_user.json +118 -0
- data/spec/fixtures/user_data/new_user.json +26 -0
- data/spec/fixtures/user_data/partial_user.json +58 -0
- data/spec/server/api/add_seen_spec.rb +26 -0
- data/spec/server/api/add_spec.rb +40 -0
- data/spec/server/api/remove_spec.rb +35 -0
- data/spec/server/api/sample_spec.rb +34 -0
- data/spec/server/api/user_load_spec.rb +25 -0
- data/spec/server/grouped_project_spec.rb +76 -0
- data/spec/server/node_set_spec.rb +13 -0
- data/spec/server/project_spec.rb +62 -0
- data/spec/server/server_spec.rb +24 -0
- data/spec/server/user_spec.rb +32 -0
- data/spec/spec_helper.rb +43 -0
- data/spec/support/cellect_helper.rb +12 -0
- data/spec/support/shared_api_context.rb +11 -0
- data/spec/support/shared_examples_for_node_set.rb +27 -0
- data/spec/support/shared_examples_for_project.rb +26 -0
- data/spec/support/shared_examples_for_set.rb +34 -0
- data/spec/support/spec_adapter.rb +43 -0
- data/spec/support/zk_setup.rb +26 -0
- metadata +337 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"id": 7,
|
3
|
+
"name": "grouped_pairwise_random",
|
4
|
+
"prioritized": false,
|
5
|
+
"pairwise": true,
|
6
|
+
"grouped": true,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 1,
|
10
|
+
"group_id": 1
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"id": 2,
|
14
|
+
"group_id": 2
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": 3,
|
18
|
+
"group_id": 3
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 4,
|
22
|
+
"group_id": 1
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"id": 5,
|
26
|
+
"group_id": 2
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": 6,
|
30
|
+
"group_id": 3
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 7,
|
34
|
+
"group_id": 1
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"id": 8,
|
38
|
+
"group_id": 2
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 9,
|
42
|
+
"group_id": 3
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"id": 10,
|
46
|
+
"group_id": 1
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"id": 11,
|
50
|
+
"group_id": 2
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"id": 12,
|
54
|
+
"group_id": 3
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"id": 13,
|
58
|
+
"group_id": 1
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"id": 14,
|
62
|
+
"group_id": 2
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"id": 15,
|
66
|
+
"group_id": 3
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"id": 16,
|
70
|
+
"group_id": 1
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"id": 17,
|
74
|
+
"group_id": 2
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"id": 18,
|
78
|
+
"group_id": 3
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"id": 19,
|
82
|
+
"group_id": 1
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"id": 20,
|
86
|
+
"group_id": 2
|
87
|
+
}
|
88
|
+
]
|
89
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"id": 4,
|
3
|
+
"name": "grouped_priority",
|
4
|
+
"prioritized": true,
|
5
|
+
"pairwise": false,
|
6
|
+
"grouped": true,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 8,
|
10
|
+
"priority": 2,
|
11
|
+
"group_id": 2
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"id": 7,
|
15
|
+
"priority": 3,
|
16
|
+
"group_id": 1
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"id": 10,
|
20
|
+
"priority": 0,
|
21
|
+
"group_id": 1
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"id": 5,
|
25
|
+
"priority": 5,
|
26
|
+
"group_id": 2
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": 6,
|
30
|
+
"priority": 4,
|
31
|
+
"group_id": 3
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"id": 2,
|
35
|
+
"priority": 8,
|
36
|
+
"group_id": 2
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"id": 3,
|
40
|
+
"priority": 7,
|
41
|
+
"group_id": 3
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"id": 1,
|
45
|
+
"priority": 9,
|
46
|
+
"group_id": 1
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"id": 9,
|
50
|
+
"priority": 1,
|
51
|
+
"group_id": 3
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"id": 4,
|
55
|
+
"priority": 6,
|
56
|
+
"group_id": 1
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"id": 3,
|
3
|
+
"name": "grouped_random",
|
4
|
+
"prioritized": false,
|
5
|
+
"pairwise": false,
|
6
|
+
"grouped": true,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 1,
|
10
|
+
"group_id": 1
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"id": 2,
|
14
|
+
"group_id": 2
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": 3,
|
18
|
+
"group_id": 3
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 4,
|
22
|
+
"group_id": 1
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"id": 5,
|
26
|
+
"group_id": 2
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": 6,
|
30
|
+
"group_id": 3
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 7,
|
34
|
+
"group_id": 1
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"id": 8,
|
38
|
+
"group_id": 2
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 9,
|
42
|
+
"group_id": 3
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"id": 10,
|
46
|
+
"group_id": 1
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"id": 6,
|
3
|
+
"name": "pairwise_priority",
|
4
|
+
"prioritized": true,
|
5
|
+
"pairwise": true,
|
6
|
+
"grouped": false,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 10,
|
10
|
+
"priority": 0
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"id": 6,
|
14
|
+
"priority": 4
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": 5,
|
18
|
+
"priority": 5
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 2,
|
22
|
+
"priority": 8
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"id": 4,
|
26
|
+
"priority": 6
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": 3,
|
30
|
+
"priority": 7
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 8,
|
34
|
+
"priority": 2
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"id": 9,
|
38
|
+
"priority": 1
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 7,
|
42
|
+
"priority": 3
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"id": 1,
|
46
|
+
"priority": 9
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"id": 5,
|
3
|
+
"name": "pairwise_random",
|
4
|
+
"prioritized": false,
|
5
|
+
"pairwise": true,
|
6
|
+
"grouped": false,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 1
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"id": 2
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"id": 3
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"id": 4
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 5
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"id": 6
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"id": 7
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"id": 8
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 9
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"id": 10
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"id": 2,
|
3
|
+
"name": "priority",
|
4
|
+
"prioritized": true,
|
5
|
+
"pairwise": false,
|
6
|
+
"grouped": false,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 7,
|
10
|
+
"priority": 3
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"id": 6,
|
14
|
+
"priority": 4
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": 1,
|
18
|
+
"priority": 9
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 3,
|
22
|
+
"priority": 7
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"id": 10,
|
26
|
+
"priority": 0
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": 8,
|
30
|
+
"priority": 2
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 2,
|
34
|
+
"priority": 8
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"id": 5,
|
38
|
+
"priority": 5
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 4,
|
42
|
+
"priority": 6
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"id": 9,
|
46
|
+
"priority": 1
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"id": 1,
|
3
|
+
"name": "random",
|
4
|
+
"prioritized": false,
|
5
|
+
"pairwise": false,
|
6
|
+
"grouped": false,
|
7
|
+
"entries": [
|
8
|
+
{
|
9
|
+
"id": 1
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"id": 2
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"id": 3
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"id": 4
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"id": 5
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"id": 6
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"id": 7
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"id": 8
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 9
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"id": 10
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
@@ -0,0 +1,118 @@
|
|
1
|
+
{
|
2
|
+
"random": [
|
3
|
+
1,
|
4
|
+
2,
|
5
|
+
3,
|
6
|
+
4,
|
7
|
+
5,
|
8
|
+
6,
|
9
|
+
7,
|
10
|
+
8,
|
11
|
+
9,
|
12
|
+
10
|
13
|
+
],
|
14
|
+
"priority": [
|
15
|
+
7,
|
16
|
+
6,
|
17
|
+
1,
|
18
|
+
3,
|
19
|
+
10,
|
20
|
+
8,
|
21
|
+
2,
|
22
|
+
5,
|
23
|
+
4,
|
24
|
+
9
|
25
|
+
],
|
26
|
+
"grouped_random": [
|
27
|
+
1,
|
28
|
+
2,
|
29
|
+
3,
|
30
|
+
4,
|
31
|
+
5,
|
32
|
+
6,
|
33
|
+
7,
|
34
|
+
8,
|
35
|
+
9,
|
36
|
+
10
|
37
|
+
],
|
38
|
+
"grouped_priority": [
|
39
|
+
8,
|
40
|
+
7,
|
41
|
+
10,
|
42
|
+
5,
|
43
|
+
6,
|
44
|
+
2,
|
45
|
+
3,
|
46
|
+
1,
|
47
|
+
9,
|
48
|
+
4
|
49
|
+
],
|
50
|
+
"pairwise_random": [
|
51
|
+
1,
|
52
|
+
2,
|
53
|
+
3,
|
54
|
+
4,
|
55
|
+
5,
|
56
|
+
6,
|
57
|
+
7,
|
58
|
+
8,
|
59
|
+
9,
|
60
|
+
10
|
61
|
+
],
|
62
|
+
"pairwise_priority": [
|
63
|
+
10,
|
64
|
+
6,
|
65
|
+
5,
|
66
|
+
2,
|
67
|
+
4,
|
68
|
+
3,
|
69
|
+
8,
|
70
|
+
9,
|
71
|
+
7,
|
72
|
+
1
|
73
|
+
],
|
74
|
+
"grouped_pairwise_random": [
|
75
|
+
1,
|
76
|
+
2,
|
77
|
+
3,
|
78
|
+
4,
|
79
|
+
5,
|
80
|
+
6,
|
81
|
+
7,
|
82
|
+
8,
|
83
|
+
9,
|
84
|
+
10,
|
85
|
+
11,
|
86
|
+
12,
|
87
|
+
13,
|
88
|
+
14,
|
89
|
+
15,
|
90
|
+
16,
|
91
|
+
17,
|
92
|
+
18,
|
93
|
+
19,
|
94
|
+
20
|
95
|
+
],
|
96
|
+
"grouped_pairwise_priority": [
|
97
|
+
16,
|
98
|
+
17,
|
99
|
+
3,
|
100
|
+
8,
|
101
|
+
7,
|
102
|
+
13,
|
103
|
+
14,
|
104
|
+
4,
|
105
|
+
6,
|
106
|
+
18,
|
107
|
+
12,
|
108
|
+
1,
|
109
|
+
11,
|
110
|
+
10,
|
111
|
+
9,
|
112
|
+
20,
|
113
|
+
2,
|
114
|
+
15,
|
115
|
+
5,
|
116
|
+
19
|
117
|
+
]
|
118
|
+
}
|