mumukit-sync 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65a57494367bdb4efec8efcc58beb0518b8fe8d691b4f0f3e63c7f2ac0a2db18
|
4
|
+
data.tar.gz: 84ec69f3677a2d4fcf25f73fc83982f2f4e484627a4a845b288ec01f66bdf345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b72950160c368396dc31a307b9ff1b8313c36f238987bc2cfe10f0aa4ff019ae6aa9331e377572ad67f72dd53d7eb0e055bb7eb7b5f9f011065ff7d2bc5d9187
|
7
|
+
data.tar.gz: 5fd4aa6ff17e12908f497fd017b7804c160494a54a9922c6b8fd46eb0da71e15d79dee60dca69eaa6c8214e4f684d4893ee20847f35577424179ea638c51802d
|
@@ -5,6 +5,9 @@ class Mumukit::Sync::Store::Base
|
|
5
5
|
|
6
6
|
private
|
7
7
|
|
8
|
+
# We are assuming rails-like models, that can be whitelisted,
|
9
|
+
# and that resource-hashes resemble the model structure.
|
10
|
+
# The store must ensure that only valid hashes are read
|
8
11
|
def pre_transform(key, json)
|
9
12
|
Mumukit::Sync.constantize(key).whitelist_attributes(json, relations: true)
|
10
13
|
end
|
@@ -1,4 +1,7 @@
|
|
1
1
|
module Mumukit::Sync::Store
|
2
|
+
|
3
|
+
## This Store enables importing languages
|
4
|
+
## from Thesaurus API
|
2
5
|
class Thesaurus < Mumukit::Sync::Store::Base
|
3
6
|
def initialize(thesaurus_bridge)
|
4
7
|
@thesaurus_bridge = thesaurus_bridge
|
@@ -10,7 +13,11 @@ module Mumukit::Sync::Store
|
|
10
13
|
|
11
14
|
def do_read(sync_key)
|
12
15
|
return unless sync_key.kind == :language
|
13
|
-
|
16
|
+
# the only difference between an `importable_info`
|
17
|
+
# and a `resource_h` is the way `runner_url` is named
|
18
|
+
Mumukit::Bridge::Runner.new(sync_key.id)
|
19
|
+
.importable_info
|
20
|
+
.replace_key(:test_runner_url, :runner_url)
|
14
21
|
end
|
15
22
|
|
16
23
|
def write_resource!(*)
|
data/lib/mumukit/sync/version.rb
CHANGED
data/mumukit-sync.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_dependency 'mumukit-core', '~> 1.
|
24
|
+
spec.add_dependency 'mumukit-core', '~> 1.10'
|
25
25
|
spec.add_dependency 'mumukit-bridge', '~> 3.5'
|
26
26
|
spec.add_dependency 'mumukit-auth', '~> 7.0'
|
27
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mumukit-bridge
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|