mumukit-platform 0.3.0 → 0.4.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 634dc869405637f51920cb23016fd72c4d04f929
|
4
|
+
data.tar.gz: d99f425b1166d80544e0ddee5240729ab8501306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ec5750a1ad2e4243a3ca4c656eb805125c906fb2cb3d40f7c1d61c65a28f0083814035a773b66c0b5542ec7d9e98d3522c284ecd84a390c8e3365c5b513dd3
|
7
|
+
data.tar.gz: 98be2cb9a50427ff741b53edf83b8073dcef3d3e0a0ac8d922a8e54b376df512f8577c3fcee9a646a9dd5772980d8fc78c1b4aed62a3235a12387f294191d473
|
data/lib/mumukit/platform.rb
CHANGED
@@ -30,16 +30,19 @@ module Mumukit::Platform
|
|
30
30
|
end
|
31
31
|
|
32
32
|
require_relative './platform/domain'
|
33
|
+
require_relative './platform/organization'
|
33
34
|
require_relative './platform/organization_mapping'
|
34
35
|
require_relative './platform/application'
|
35
36
|
require_relative './platform/web_framework'
|
36
37
|
|
38
|
+
require_relative './platform/with_organization'
|
37
39
|
require_relative './platform/with_applications'
|
38
40
|
require_relative './platform/with_organization_mapping'
|
39
41
|
require_relative './platform/with_web_framework'
|
40
42
|
|
41
43
|
module Mumukit::Platform
|
42
44
|
extend Mumukit::Platform::WithApplications
|
45
|
+
extend Mumukit::Platform::WithOrganization
|
43
46
|
extend Mumukit::Platform::WithOrganizationMapping
|
44
47
|
extend Mumukit::Platform::WithWebFramework
|
45
48
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Mumukit::Platform::Organization
|
2
|
+
def self.switch!(organization)
|
3
|
+
raise 'Organization must not be nil' unless organization
|
4
|
+
Thread.current[:organization] = organization
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.leave!
|
8
|
+
Thread.current[:organization] = nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.current
|
12
|
+
Thread.current[:organization] || raise('organization not selected')
|
13
|
+
end
|
14
|
+
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
@@ -86,11 +86,13 @@ files:
|
|
86
86
|
- lib/mumukit/platform.rb
|
87
87
|
- lib/mumukit/platform/application.rb
|
88
88
|
- lib/mumukit/platform/domain.rb
|
89
|
+
- lib/mumukit/platform/organization.rb
|
89
90
|
- lib/mumukit/platform/organization_mapping.rb
|
90
91
|
- lib/mumukit/platform/uri.rb
|
91
92
|
- lib/mumukit/platform/version.rb
|
92
93
|
- lib/mumukit/platform/web_framework.rb
|
93
94
|
- lib/mumukit/platform/with_applications.rb
|
95
|
+
- lib/mumukit/platform/with_organization.rb
|
94
96
|
- lib/mumukit/platform/with_organization_mapping.rb
|
95
97
|
- lib/mumukit/platform/with_web_framework.rb
|
96
98
|
- mumukit-platform.gemspec
|