mumukit-platform 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f4248f9e8395f447b4556b0eb135c70132af184
4
- data.tar.gz: 4fbd01cc3dc1801b970ae8fa41101547eae6665b
3
+ metadata.gz: 7154b3afdb0790bb53652318132117eae4cf6373
4
+ data.tar.gz: d86f32512ff2cf050a761666336ebbc5d35cbfab
5
5
  SHA512:
6
- metadata.gz: f16f64cf1598077efe142a4ed9d3cbfd95e2800d211801429591633163c2d3e72b43d0bd84adf7f98817638ea1a65091e58b8d18a1b14589458babf374344438
7
- data.tar.gz: 8c27d533188baccaec3e2fcf38d1b36746418d82dadfe57b5fef3e27a5db106737d3c43541ec2b2bc1a2f7be5ca89e4358b7928498528df27841e0fa69c97472
6
+ metadata.gz: 937e151e473cff1dc48cfe8cb740e6779b1a0a1524b197654e3544da5d6c7a7f23aa4e31ea4b66be92d34def09e6a59a834313d1e4659afa978213ade3f17596
7
+ data.tar.gz: 23c188a3033e2dd478f4f9af63033afd975fea976b7622c0269bf69d2bfc8f5b64c3ac1b3e9308a711b9de2d5a5b83b81a54316218d495957020b0175b0b5dad
@@ -19,6 +19,10 @@ module Mumukit::Platform::OrganizationMapping
19
19
  end
20
20
 
21
21
  module Subdomain
22
+ def self.implicit_organization?(request, domain)
23
+ request.empty_subdomain_after?(domain)
24
+ end
25
+
22
26
  def self.map_organization_routes!(native, _framework, &block)
23
27
  native.instance_eval(&block)
24
28
  end
@@ -33,6 +37,10 @@ module Mumukit::Platform::OrganizationMapping
33
37
  end
34
38
 
35
39
  module Path
40
+ def self.implicit_organization?(_request, _domain)
41
+ false
42
+ end
43
+
36
44
  def self.map_organization_routes!(native, framework, &block)
37
45
  framework.configure_tenant_path_routes! native, &block
38
46
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Platform
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -1,6 +1,10 @@
1
1
  module Mumukit::Platform::WithOrganizationMapping
2
2
  delegate :organization_mapping, to: :config
3
3
 
4
+ def implicit_organization?(request)
5
+ organization_mapping.implicit_organization? request, application.domain
6
+ end
7
+
4
8
  def organization_name(request)
5
9
  organization_mapping.organization_name(request, application.domain)
6
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli