mumuki-laboratory 5.6.1 → 5.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/guide.rb +3 -1
- data/lib/mumuki/laboratory/seed.rb +20 -2
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/db/seeds.rb +1 -2
- data/spec/models/guide_import_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf1e7ba469d8ee20ad2a43ef9f59b83d746c43d0a9ce388a7a5c4c6c0c1dbf6
|
4
|
+
data.tar.gz: 976f739faaae534f9cb5a7a9cfb32683fddb6be42b8d5db37b458209b014a160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94b3f5a4455054e596bd5800e7fd3638e425c0e041efb92b27124df292ecfd05b66086881dfa1d52a043f0f0249fce6a56b583dcccd8f23c227641feb0390829
|
7
|
+
data.tar.gz: 9efb17c56cd9b95086e9d01e0b0a64851209d69244bf6e579b96cf427169126eb3c722628cc28b550bb96c1cdeb530996a1facfcd50c506f07e1ece5a698cd26
|
data/app/models/guide.rb
CHANGED
@@ -72,7 +72,9 @@ class Guide < Content
|
|
72
72
|
exercise.import_from_json! (i+1), e
|
73
73
|
end
|
74
74
|
|
75
|
-
|
75
|
+
new_ids = json['exercises'].map { |it| it['id'] }
|
76
|
+
self.exercises.where.not(bibliotheca_id: new_ids).destroy_all
|
77
|
+
|
76
78
|
reload
|
77
79
|
end
|
78
80
|
|
@@ -1,8 +1,26 @@
|
|
1
1
|
require 'mumukit/bridge'
|
2
2
|
|
3
3
|
module Mumuki::Laboratory::Seed
|
4
|
-
|
5
|
-
|
4
|
+
# Those are organizations that provide content
|
5
|
+
# that was actually curated by the Mumuki Project and
|
6
|
+
# as such must be supported by each platform release
|
7
|
+
MAIN_CONTENT_ORGANIZATIONS = %w(
|
8
|
+
mumuki
|
9
|
+
mumukiproject
|
10
|
+
sagrado-corazon-alcal
|
11
|
+
pdep-utn
|
12
|
+
smartedu-mumuki
|
13
|
+
10pines-mumuki
|
14
|
+
arquitecturas-concurrentes
|
15
|
+
flbulgarelli
|
16
|
+
)
|
17
|
+
|
18
|
+
def self.import_main_contents!
|
19
|
+
import_contents! /^#{MAIN_CONTENT_ORGANIZATIONS.join('|')}\/.*$/i
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.import_contents!(slug_regex = /.*/)
|
23
|
+
Mumukit::Platform.bibliotheca_bridge.import_contents!(slug_regex) do |resource_type, slug|
|
6
24
|
resource_type.classify.constantize.import!(slug)
|
7
25
|
end
|
8
26
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -105,7 +105,7 @@ ActiveRecord::Schema.define(version: 20180704150839) do
|
|
105
105
|
t.string "queries", default: [], array: true
|
106
106
|
t.text "query_results"
|
107
107
|
t.text "manual_evaluation_comment"
|
108
|
-
t.integer "upvotes_count"
|
108
|
+
t.integer "upvotes_count", default: 0
|
109
109
|
t.index ["initiator_id"], name: "index_discussions_on_initiator_id"
|
110
110
|
t.index ["item_type", "item_id"], name: "index_discussions_on_item_type_and_item_id"
|
111
111
|
end
|
data/spec/dummy/db/seeds.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'mumuki/laboratory/seed'
|
2
2
|
|
3
3
|
Mumuki::Laboratory::Seed.import_languages!
|
4
|
-
|
5
|
-
Mumuki::Laboratory::Seed.import_contents!
|
4
|
+
Mumuki::Laboratory::Seed.import_main_contents!
|
6
5
|
|
7
6
|
Organization.find_or_create_by!(name: 'base') do |org|
|
8
7
|
org.contact_email = 'issues@mumuki.org'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.6.
|
4
|
+
version: 5.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
117
|
+
version: '2.3'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '2.
|
124
|
+
version: '2.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: mumukit-login
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|