mumukit-bridge 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/mumukit/bridge/bibliotheca.rb +20 -4
- data/lib/mumukit/bridge/thesaurus.rb +3 -2
- data/lib/mumukit/bridge/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzlhMWNiYTI4NjUwMzI4OWM2YjY5ZjFkMTNkZTBhMzMxZjI2ZjJjZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTAyZjk1ODYxY2EwMDY0ZWQyMmJiNmUyMWJlOGZlOGM4NGVjMjBlZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2YyZjFkOTIxMjM5ODI1Njc2MDZmNjU0MDc2NGY2MmNkZGIzNTMyOWEwZjYy
|
10
|
+
OGY3OGI1MTI1NzkxNDM3ZjQ4YjAyMDBkMTMwMzE2ZDZlZTIyNmM3YWRhMmZj
|
11
|
+
MmZmYjMxMzZkYTNiY2EwNzhiNWRjZDRjNjIzN2FiNzY5ZGVlMTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGI1NzllN2Y2ZmI0ZjI1OTg2NWJhMTEzNTc2ZTliOThhZGNjNTdmZjIwYzc0
|
14
|
+
NmNjZDMzYTg4ZWY1ZmJmNzEzMmEyYTM3OGYwN2E5MTlmNTMxMWE3OTQ0MmM4
|
15
|
+
ZDUwYTJkYzdmMWYxMTkzMzg5ZTNhMmI5NmJlZDUxZmZjYjljNjA=
|
@@ -8,19 +8,35 @@ module Mumukit
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def guides
|
11
|
-
|
11
|
+
get_collection 'guides'
|
12
|
+
end
|
13
|
+
|
14
|
+
def topics
|
15
|
+
get_collection 'topics'
|
12
16
|
end
|
13
17
|
|
14
18
|
def books
|
15
|
-
|
19
|
+
get_collection 'books'
|
16
20
|
end
|
17
21
|
|
18
22
|
def guide(slug)
|
19
|
-
|
23
|
+
get_element 'guides', slug
|
24
|
+
end
|
25
|
+
|
26
|
+
def topic(slug)
|
27
|
+
get_element 'topics', slug
|
20
28
|
end
|
21
29
|
|
22
30
|
def book(slug)
|
23
|
-
|
31
|
+
get_element 'books', slug
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_collection(name)
|
35
|
+
get(name)[name]
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_element(name, slug)
|
39
|
+
get "#{name}/#{slug}"
|
24
40
|
end
|
25
41
|
|
26
42
|
def get(path)
|
@@ -5,14 +5,15 @@ module Mumukit
|
|
5
5
|
|
6
6
|
def initialize(url = 'http://bibliotheca.mumuki.io')
|
7
7
|
@url = url
|
8
|
+
@language = {}
|
8
9
|
end
|
9
10
|
|
10
11
|
def languages
|
11
|
-
get('languages')['languages']
|
12
|
+
@languages ||= get('languages')['languages']
|
12
13
|
end
|
13
14
|
|
14
15
|
def language(name)
|
15
|
-
get "languages/#{name}"
|
16
|
+
@language[name] ||= get "languages/#{name}"
|
16
17
|
end
|
17
18
|
|
18
19
|
def get(path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|