mumukit-platform 0.7.0 → 0.8.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
  SHA256:
3
- metadata.gz: c34b7bd7ccf528fede38ba8e108ca20928c4a14e9988ca48796ef10e7b16fb96
4
- data.tar.gz: e28ca4e6470d4db434c1d7a14077658f7225bd29f8478adddc0ac0702608b5bf
3
+ metadata.gz: a972e1f7b7b15f3e20d529c6d8d4f292e2f3909ef6ada5ff018ff95be770af56
4
+ data.tar.gz: 9514a9c7f1bc1b92e2dc37ad1f53a1944a37cd96b22bffda57b4678b27b2c950
5
5
  SHA512:
6
- metadata.gz: 4ed368a6d04953fd302ca70618d4da0f9a1874661b502e33fe4d4c3015189d019cd1736c29a7fcfe834400e80e1a94ab024c8449312d4e9e35e3676a2ae2b93a
7
- data.tar.gz: 52a8d615b9fc8eb402ced6ad61dab4ebee898db0be2ca45162b723a46103825b840ea72ed74b5539319e2637f6a994af3043e7eca8404e6876b84711169a0152
6
+ metadata.gz: abe274333973ee044f32c3ae28dced992b2c46ec141868cf0c2f56d81fb7813673b24e949047a84a4d52f98d78b4b156f23fd82df5067d3da543e111e7d43425
7
+ data.tar.gz: 3ba6da486a455d7b5be00bf72eab590c9ff0b024fd4663cc5036e93ff136e8e68be461a99234472c351be0c2d26266e81197fc94357c8e2af802375537bd5c3e
@@ -31,6 +31,7 @@ end
31
31
 
32
32
  require_relative './platform/domain'
33
33
  require_relative './platform/model'
34
+ require_relative './platform/locale'
34
35
  require_relative './platform/organization'
35
36
  require_relative './platform/organization_mapping'
36
37
  require_relative './platform/application'
@@ -0,0 +1,5 @@
1
+ module Mumukit::Platform::Locale
2
+ def self.supported
3
+ %w(es en pt)
4
+ end
5
+ end
@@ -70,8 +70,16 @@ module Mumukit::Platform::Organization::Helpers
70
70
  Mumukit::Platform.application.organic_domain(name)
71
71
  end
72
72
 
73
+ def self.valid_name?(name)
74
+ !!(name =~ anchored_valid_name_regex)
75
+ end
76
+
77
+ def self.anchored_valid_name_regex
78
+ /\A#{valid_name_regex}\z/
79
+ end
80
+
73
81
  def self.valid_name_regex
74
- /\A([-a-z0-9_]+(\.[-a-z0-9_]+)*)?\z/
82
+ /([-a-z0-9_]+(\.[-a-z0-9_]+)*)?/
75
83
  end
76
84
 
77
85
  module ClassMethods
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Platform
3
- VERSION = '0.7.0'
3
+ VERSION = '0.8.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.7.0
4
+ version: 0.8.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-23 00:00:00.000000000 Z
11
+ date: 2018-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit-core
@@ -101,6 +101,7 @@ files:
101
101
  - lib/mumukit/platform.rb
102
102
  - lib/mumukit/platform/application.rb
103
103
  - lib/mumukit/platform/domain.rb
104
+ - lib/mumukit/platform/locale.rb
104
105
  - lib/mumukit/platform/model.rb
105
106
  - lib/mumukit/platform/organization.rb
106
107
  - lib/mumukit/platform/organization/helpers.rb