mumukit-platform 2.7.1 → 3.0.0
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/lib/mumukit/platform/bridge.rb +0 -54
- data/lib/mumukit/platform/course/helpers.rb +1 -1
- data/lib/mumukit/platform/notifiable.rb +1 -1
- data/lib/mumukit/platform/organization/helpers.rb +1 -1
- data/lib/mumukit/platform/user/helpers.rb +1 -1
- data/lib/mumukit/platform/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0bcd9af2725a5e0ad248a2315cead3ca98b37e9a055a575c589a9993a1d911d
|
4
|
+
data.tar.gz: 63d88b251ede6678845e78ae3b0893959bba9d142ad52388312f8fcdac30fe0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dec4847ca7a0ce8fd9333e69e9edafa3b56aedcb102555fef9bc2bcda0c798ee5813ed093f368de869a141639ad13906166c12f0477148f680f1e7124e594f51
|
7
|
+
data.tar.gz: ef717a1fcf9cdc805f7ea10e5b8216df34b4f8dbd152b9f578026a30979c6fb8da22965bf1758302f58fbc5008639fcc019e76e160839ce2641920652a613467
|
@@ -7,57 +7,3 @@ module Mumukit::Platform
|
|
7
7
|
Mumukit::Bridge::Thesaurus.new(config.thesaurus_url)
|
8
8
|
end
|
9
9
|
end
|
10
|
-
|
11
|
-
class Mumukit::Bridge::Thesaurus
|
12
|
-
|
13
|
-
# Import all the languages the runners suppor,
|
14
|
-
# using a block that will do the actual
|
15
|
-
# persistence job.
|
16
|
-
#
|
17
|
-
# The block takes the language's runner's url (string).
|
18
|
-
#
|
19
|
-
# Exceptions raised within the block will be ignored
|
20
|
-
def import_languages!(&block)
|
21
|
-
runners.each do |url|
|
22
|
-
puts "Importing Language #{url}"
|
23
|
-
begin
|
24
|
-
block.call url
|
25
|
-
rescue => e
|
26
|
-
puts "Ignoring Language #{url} because of import error #{e}"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
class Mumukit::Bridge::Bibliotheca
|
33
|
-
|
34
|
-
# Import all the contents whose slug matches the given regex, using a block that will do the actual
|
35
|
-
# persistence job.
|
36
|
-
#
|
37
|
-
# The block takes:
|
38
|
-
#
|
39
|
-
# * a resource_type (string): guide | topic | book
|
40
|
-
# * a slug (string)
|
41
|
-
#
|
42
|
-
# Exceptions raised within the block will be ignored
|
43
|
-
def import_contents!(slug_regex = /.*/, &block)
|
44
|
-
%w(guide topic book).each do |resource_type|
|
45
|
-
import_content!(resource_type, slug_regex) { |slug| block.call(resource_type, slug) }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
# Import all the contents of a given type, that matches a given slug
|
50
|
-
def import_content!(resource_type, slug_regex = /.*/, &block)
|
51
|
-
send(resource_type.to_s.pluralize).each do |resource|
|
52
|
-
slug = resource['slug']
|
53
|
-
next unless slug_regex.matches? slug
|
54
|
-
|
55
|
-
puts "Importing #{resource_type} #{slug}"
|
56
|
-
begin
|
57
|
-
block.call slug
|
58
|
-
rescue => e
|
59
|
-
puts "Ignoring #{slug} because of import error #{e}"
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit-nuntius
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.7.
|
188
|
+
rubygems_version: 2.7.8
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Shared Mumuki Platform Components
|