mumukit-platform 0.8.0 → 0.9.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
  SHA256:
3
- metadata.gz: a972e1f7b7b15f3e20d529c6d8d4f292e2f3909ef6ada5ff018ff95be770af56
4
- data.tar.gz: 9514a9c7f1bc1b92e2dc37ad1f53a1944a37cd96b22bffda57b4678b27b2c950
3
+ metadata.gz: 7c3979868b07dfcfeb136776a461bf627db1e301d56f059ee94ea3df702523c0
4
+ data.tar.gz: 77997a3c76f6a0729fbde3d3ec9c1445d55f737ea3a0d9da05e6b04c728fdc18
5
5
  SHA512:
6
- metadata.gz: abe274333973ee044f32c3ae28dced992b2c46ec141868cf0c2f56d81fb7813673b24e949047a84a4d52f98d78b4b156f23fd82df5067d3da543e111e7d43425
7
- data.tar.gz: 3ba6da486a455d7b5be00bf72eab590c9ff0b024fd4663cc5036e93ff136e8e68be461a99234472c351be0c2d26266e81197fc94357c8e2af802375537bd5c3e
6
+ metadata.gz: ee6758a9ce5b3e729464e1866d66196ca5c864830bd96996e92ac141c856256a33bab1174500e550f22c89fdf2cfd392fc10498fe2460bf16eb77a2998713f6f
7
+ data.tar.gz: ae6eac6d056c32b34e0d240235ef9dd0d6c68a64caa0b21d08d08a195e0fa05c095035fc95b17e2ba9eb716f671f7629094c9a87160b5ec59e946125884961d8
@@ -1,5 +1,11 @@
1
1
  module Mumukit::Platform::Locale
2
+ SPECS = {
3
+ en: { facebook_code: :en_US, auth0_code: :en, name: 'English' },
4
+ es: { facebook_code: :es_LA, auth0_code: :es, name: 'Español' },
5
+ pt: { facebook_code: :pt_BR, auth0_code: 'pt-br', name: 'Português' }
6
+ }.with_indifferent_access
7
+
2
8
  def self.supported
3
- %w(es en pt)
9
+ SPECS.keys
4
10
  end
5
11
  end
@@ -54,6 +54,10 @@ module Mumukit::Platform::Organization::Helpers
54
54
  name == 'test'
55
55
  end
56
56
 
57
+ def base?
58
+ name == 'base'
59
+ end
60
+
57
61
  def switch!
58
62
  Mumukit::Platform::Organization.switch! self
59
63
  end
@@ -1,9 +1,5 @@
1
1
  class Mumukit::Platform::Organization::Profile < Mumukit::Platform::Model
2
- LOCALES = {
3
- en: { facebook_code: :en_US, name: 'English' },
4
- es: { facebook_code: :es_LA, name: 'Español' },
5
- br: { facebook_code: :pt_BR, name: 'Português' }
6
- }.with_indifferent_access
2
+ LOCALES = Mumukit::Platform::Locale::SPECS
7
3
 
8
4
  model_attr_accessor :logo_url,
9
5
  :banner_url,
@@ -17,7 +13,11 @@ class Mumukit::Platform::Organization::Profile < Mumukit::Platform::Model
17
13
  :community_link
18
14
 
19
15
  def locale_json
20
- LOCALES[locale].to_json
16
+ locale_h.to_json
17
+ end
18
+
19
+ def locale_h
20
+ Mumukit::Platform::Locale::SPECS[locale]
21
21
  end
22
22
 
23
23
  def logo_url
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Platform
3
- VERSION = '0.8.0'
3
+ VERSION = '0.9.0'
4
4
  end
5
5
  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: 0.8.0
4
+ version: 0.9.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: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit-core