mumukit-platform 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/platform/uri.rb +13 -11
- data/lib/mumukit/platform/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42d78680220628b11a38c17a920bdaf60ab8643e432b0e6cdf01f1c16ef7bd7
|
4
|
+
data.tar.gz: fb10d6cef42063207c021baf8a739bdd3c0cb46869fb23cf00049c441b69b6b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d217e061ccf40c8119a86436efce03f4058785c116a9031b08135edc3767cf1fe04fb4e48ba3cb630ccf4bc933b4bea88f5250b73f3e3f53be0b88a9d8f17f92
|
7
|
+
data.tar.gz: eeff3b676f93553c98527ada1782018dfef406abc7ddc60a59c2ce05a9928dd07af18d6af8afdaaf76458d82f779ad49d4b93727fa6d5999c1fa5a9e52d3f3d2
|
data/lib/mumukit/platform/uri.rb
CHANGED
@@ -5,11 +5,7 @@ class URI::HTTP
|
|
5
5
|
else
|
6
6
|
new_host = "#{subdomain}.#{host}"
|
7
7
|
end
|
8
|
-
|
9
|
-
host: new_host,
|
10
|
-
path: path,
|
11
|
-
query: query,
|
12
|
-
port: port)
|
8
|
+
rebuild(host: new_host)
|
13
9
|
end
|
14
10
|
|
15
11
|
def subroute(route)
|
@@ -18,14 +14,20 @@ class URI::HTTP
|
|
18
14
|
else
|
19
15
|
new_path = "/#{route}/#{path}"
|
20
16
|
end
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
rebuild(path: new_path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def rebuild(updates)
|
21
|
+
self.class.build({
|
22
|
+
scheme: scheme,
|
23
|
+
host: host,
|
24
|
+
path: path,
|
25
|
+
query: query,
|
26
|
+
port: port,
|
27
|
+
fragment: fragment}.merge(updates))
|
26
28
|
end
|
27
29
|
|
28
30
|
def url_for(path)
|
29
31
|
URI.join(self, path).to_s
|
30
32
|
end
|
31
|
-
end
|
33
|
+
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: 2.6.
|
4
|
+
version: 2.6.1
|
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-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit-nuntius
|