mumukit-platform 0.5.1 → 0.6.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
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 4f994f78b1dd2a1716f9b64418db3015b9139bb745691f848668061df2d6d834
|
|
4
|
+
data.tar.gz: bf34b9daa54bc9fe2f96ec0ae01c234f21d2f963ccc715e799917d812e6f0c4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ace5ca1225286ee40d96f49d5231eab34d4e689c98ac2f42881597c1cccef11313861506de35a512fc86982c5bee8150847de28847076a2ec12c2471b001b275
|
|
7
|
+
data.tar.gz: e8d9476da02fafe016d64fe8c73ea092d385628e37942a99b301e9136a5d463d228b91412cd976dc3ba1c07a1fc9302f4ebab9ad64888d8cea5e6812c95da9cd
|
|
@@ -19,6 +19,14 @@ module Mumukit::Platform::Organization::Helpers
|
|
|
19
19
|
|
|
20
20
|
delegate :logo_url,
|
|
21
21
|
:logo_url=,
|
|
22
|
+
:banner_url,
|
|
23
|
+
:banner_url=,
|
|
24
|
+
:open_graph_image_url,
|
|
25
|
+
:open_graph_image_url=,
|
|
26
|
+
:favicon_url,
|
|
27
|
+
:favicon_url=,
|
|
28
|
+
:breadcrumb_image_url,
|
|
29
|
+
:breadcrumb_image_url=,
|
|
22
30
|
:locale,
|
|
23
31
|
:locale=,
|
|
24
32
|
:locale_json,
|
|
@@ -60,6 +68,10 @@ module Mumukit::Platform::Organization::Helpers
|
|
|
60
68
|
Mumukit::Platform.application.organic_domain(name)
|
|
61
69
|
end
|
|
62
70
|
|
|
71
|
+
def self.valid_name_regex
|
|
72
|
+
/\A([-a-z0-9_]+(\.[-a-z0-9_]+)*)?\z/
|
|
73
|
+
end
|
|
74
|
+
|
|
63
75
|
module ClassMethods
|
|
64
76
|
def current
|
|
65
77
|
Mumukit::Platform::Organization.current
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
class Mumukit::Platform::Organization::Profile < Mumukit::Platform::Model
|
|
2
2
|
LOCALES = {
|
|
3
3
|
en: { facebook_code: :en_US, name: 'English' },
|
|
4
|
-
es: { facebook_code: :es_LA, name: 'Español' }
|
|
4
|
+
es: { facebook_code: :es_LA, name: 'Español' },
|
|
5
|
+
br: { facebook_code: :pt_BR, name: 'Português' }
|
|
5
6
|
}.with_indifferent_access
|
|
6
7
|
|
|
7
8
|
model_attr_accessor :logo_url,
|
|
9
|
+
:banner_url,
|
|
10
|
+
:favicon_url,
|
|
11
|
+
:breadcrumb_image_url,
|
|
12
|
+
:open_graph_image_url,
|
|
8
13
|
:locale,
|
|
9
14
|
:description,
|
|
10
15
|
:contact_email,
|
|
@@ -16,6 +21,18 @@ class Mumukit::Platform::Organization::Profile < Mumukit::Platform::Model
|
|
|
16
21
|
end
|
|
17
22
|
|
|
18
23
|
def logo_url
|
|
19
|
-
@logo_url ||= 'https://mumuki.io/logo-alt-large.png'
|
|
24
|
+
@logo_url ||= 'https://mumuki.io/logo-alt-large.png' # Best image size: 350x75
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def banner_url
|
|
28
|
+
@banner_url || logo_url # Best image size: 350x75
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def favicon_url
|
|
32
|
+
@favicon_url ||= '/favicon.ico' # Best image size: 16x16, 32x32 or 48x48
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def open_graph_image_url
|
|
36
|
+
@open_graph_image_url ||= Mumukit::Platform.application.url_for("logo-alt.png") # Best image size: 256x256
|
|
20
37
|
end
|
|
21
38
|
end
|
|
@@ -28,7 +28,7 @@ module Mumukit::Platform::OrganizationMapping
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def self.organization_name(request, domain)
|
|
31
|
-
request.
|
|
31
|
+
request.subdomain_after(domain) || 'central'
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.organic_uri(uri, organization)
|
|
@@ -53,4 +53,4 @@ module Mumukit::Platform::OrganizationMapping
|
|
|
53
53
|
uri.subroute(organization)
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
|
-
end
|
|
56
|
+
end
|
data/mumukit-platform.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ['lib']
|
|
23
23
|
|
|
24
|
-
spec.add_dependency 'mumukit-core', '~> 1.
|
|
24
|
+
spec.add_dependency 'mumukit-core', '~> 1.2'
|
|
25
25
|
spec.add_dependency 'activemodel', '>= 4.0'
|
|
26
26
|
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
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: 0.
|
|
4
|
+
version: 0.6.0
|
|
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:
|
|
11
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mumukit-core
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
19
|
+
version: '1.2'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.
|
|
26
|
+
version: '1.2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activemodel
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
136
136
|
version: '0'
|
|
137
137
|
requirements: []
|
|
138
138
|
rubyforge_project:
|
|
139
|
-
rubygems_version: 2.4
|
|
139
|
+
rubygems_version: 2.7.4
|
|
140
140
|
signing_key:
|
|
141
141
|
specification_version: 4
|
|
142
142
|
summary: Shared Mumuki Platform Components
|