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: dcae9d8073721ad9f3e9b1eb37125e183f1a41530a0f5abeda3e1ede47f6935c
4
- data.tar.gz: ef2fee73d49e5be0b14d629abbce2e9d527b5b3eda1f9bbcfc751b5685705e36
3
+ metadata.gz: 65a57494367bdb4efec8efcc58beb0518b8fe8d691b4f0f3e63c7f2ac0a2db18
4
+ data.tar.gz: 84ec69f3677a2d4fcf25f73fc83982f2f4e484627a4a845b288ec01f66bdf345
5
5
  SHA512:
6
- metadata.gz: 78b00fb645a43d4ccdf84c13116b464d1ecf6807c0e88c578c9b784ed91455594865a145147ddc2b1de19dfe559171f2508d4198a50ad3c9ceb7199afed91e9c
7
- data.tar.gz: 24e3e595d792dc213d3e45deb436d2da09819411adf5ed94b9615d6f76f8b8ab71c4cc21a373b1df7e4f75ecdb0ab4cf2efeb5dfe6c3399f86c859225cabed85
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 content
4
+ ## from Bibliotheca API
2
5
  class Bibliotheca < Mumukit::Sync::Store::Base
3
6
  include Mumukit::Sync::Store::WithWrappedLanguage
4
7
 
@@ -1,4 +1,7 @@
1
1
  module Mumukit::Sync::Store
2
+
3
+ ## This Store enables importing and exporting content
4
+ ## from and to Github
2
5
  class Github
3
6
  def initialize(bot, author_email = nil, web_hook_base_url = nil)
4
7
  @bot = bot
@@ -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
- Mumukit::Bridge::Runner.new(sync_key.id).importable_info
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!(*)
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Sync
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
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.7'
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.2
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-15 00:00:00.000000000 Z
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.7'
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.7'
26
+ version: '1.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mumukit-bridge
29
29
  requirement: !ruby/object:Gem::Requirement