mumukit-bridge 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzRjMDkwNzQ1ZTVkMWE2ZTc2ZTNiNDc3ZDQ4OTZjZTlmYzk4ZjVkMA==
4
+ NDYyMzNjMjEwZWNhYjIzNmM4YjYxODRlY2JmMTJkODkyODZkOTJlYg==
5
5
  data.tar.gz: !binary |-
6
- ZTdkZmE3NzZkYjVkOTVhY2YxNmFhZWZmYTM2YWZhYjgzZGUyM2Y4ZA==
6
+ ZWFkYzQ1MzU0YTBlNGQ0NTQ1NzU3NzkyOWUzMDdlMjMyZTBmYjdmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjYxZmExNmIyNmYxZDU3NjJjNDJmNmMzYWFiN2VmOWU3ZTBlZDljYjk2ODMy
10
- NjkwMDVmNzM4ZDg0MzU2YzgwNDM0MDcxOWY2YWU0MDkxODFlMGY1NmI5NTYw
11
- OWViMzU3ZDk1ZjkxODE1ZjVkMzc5M2ZhYjE4YWZhZDQ2M2I2ZmY=
9
+ MWU3OTdjMjUzODQ1YWE5ZDgzOTI4ZmNjZWRjZmMyZWE3ZDYxNDA4Y2RhZDc5
10
+ OTFjNDk2ZWUyNmI5ZjdlNjcwZGJlYTY2YjQ5NjAxZDg0NjYwZjY2MDdhMzg4
11
+ ZGUzYTliNmQ0MWUyYTM5MjdiYzVhMzYxOWRmNzMzYTUxNWQyNmM=
12
12
  data.tar.gz: !binary |-
13
- ZTBiN2EzMzQ3NTY5NGY5NzNhMDM1ZjQzNDZlMGVkODdiM2ZlMDU0NTZmMTBh
14
- OTI3NDZmNjFhMTVmZTQ1OTBmYzJjZmIyNDNjMDRhYzVjNjY0NzZlN2RlZGMx
15
- NThjYWE0OGQzMmMzZGVjY2FkMTZmZGRmZDc0NmY5YjkyMzA0MTY=
13
+ NzNiNjhhYjE3Yzk3OTM3ZDBlYTUyMGM0MTAxOWM4MjNjNDYwMjZjNDZiMTNj
14
+ YjdmOTQyMzIzYWZiZTM1ZWU0Y2I0OWFkNzM3OWQ5ZmQ5Y2NjMDk0NGY3MWM3
15
+ ZTc2NTZiNWExMzA1NWQ2YWU2NmI1ZDIwOWUwNDEzNjczMGU3ZjE=
@@ -9,16 +9,21 @@ module Mumukit
9
9
  get('guides')['guides']
10
10
  end
11
11
 
12
+ def books
13
+ get('books')['books']
14
+ end
15
+
12
16
  def guide(slug)
13
17
  get "guides/#{slug}"
14
18
  end
15
19
 
16
- def get(path)
17
- JSON.parse RestClient.get("http://bibliotheca.mumuki.io/#{path}")
20
+ def book(slug)
21
+ get "books/#{slug}"
18
22
  end
19
23
 
24
+ def get(path)
25
+ JSON.parse RestClient.get("#{url}/#{path}")
26
+ end
20
27
  end
21
-
22
-
23
28
  end
24
29
  end
@@ -0,0 +1,21 @@
1
+ module Mumukit
2
+ module Bridge
3
+ class Thesaurus
4
+ def initialize(url = 'http://bibliotheca.mumuki.io')
5
+ @url = url
6
+ end
7
+
8
+ def languages
9
+ get('languages')['languages']
10
+ end
11
+
12
+ def language(name)
13
+ get "languages/#{name}"
14
+ end
15
+
16
+ def get(path)
17
+ JSON.parse RestClient.get("#{url}/#{path}")
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Bridge
3
- VERSION = "0.4.0"
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
@@ -4,6 +4,7 @@ require 'active_support/core_ext/object'
4
4
  require_relative './bridge/version'
5
5
  require_relative './bridge/runner'
6
6
  require_relative './bridge/bibliotheca'
7
+ require_relative './bridge/thesaurus'
7
8
 
8
9
 
9
10
  module Mumukit
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: 0.4.0
4
+ version: 1.0.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: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,6 +93,7 @@ files:
93
93
  - lib/mumukit/bridge/runner/array.rb
94
94
  - lib/mumukit/bridge/runner/boolean.rb
95
95
  - lib/mumukit/bridge/runner/response_type.rb
96
+ - lib/mumukit/bridge/thesaurus.rb
96
97
  - lib/mumukit/bridge/version.rb
97
98
  homepage: http://github.com/uqbar-project/mumukit-bridge
98
99
  licenses: