mumukit-login 6.1.0 → 6.1.1

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: fe52c3b70549d1524064047a8b327993045b77494dd2595c099b5cbe3a3c629f
4
- data.tar.gz: 5a4e310ef3fc43944f24b71f0629600d1e62d6e888b30c8503b24a9824ba0204
3
+ metadata.gz: b4c0227c6312c203934f5b698f382707358a369eda06d8bd9e1a0a8acafbce8d
4
+ data.tar.gz: ed2e7d7c57184044d2ffe16f771a493766e66185beaafb85dce18e7461ea1ebf
5
5
  SHA512:
6
- metadata.gz: 41d1230b11a4b8baa99adfaa25b41b31f007d64b097097650540ce46ee1ef6fd702028403eb794c7ff1791000625a7dc1bba70226df0879656d629af22498081
7
- data.tar.gz: 39a87397c1f89c9f3378c840a22b0de9fda8208887a031ae68e3c216e59a207767fd262fc86ec53d50b3ec2e8790cd04982b24af1030b52a170b3acc06462eb1
6
+ metadata.gz: 302ffd66ec3ba05ef8d0586cc8be0fe58369c03d5886f4daf24bbeed01bc2fcc9af8519c38cd8c39c33b83fb40d5294eaa2fccfdbdd6ae5ad8ca387c13a40b93
7
+ data.tar.gz: 92c97e2fef48b9a9af586241c5ac22a210fc0195d2640328a07d20684208c2e550275807a8e552505a8c6cac2fdc86c66f785c7232f6b58e4624c41d9bbc6b47
@@ -11,8 +11,8 @@ module Mumukit::Login::Provider
11
11
  parse_login_provider(login_provider_string)
12
12
  end
13
13
 
14
- def self.default_enabled_providers
15
- case ENV['RACK_ENV'] || ENV['RAILS_ENV']
14
+ def self.default_enabled_providers # This is a list of the default enabled login providers
15
+ case ENV['RACK_ENV'] || ENV['RAILS_ENV'] # It depends only on the current environment
16
16
  when 'production'
17
17
  PROVIDERS - %w(developer)
18
18
  when 'test'
@@ -22,17 +22,17 @@ module Mumukit::Login::Provider
22
22
  end
23
23
  end
24
24
 
25
- def self.enabled_providers
26
- if ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].blank?
25
+ def self.enabled_providers # This is a list of the login providers enabled on the current instance of the platform
26
+ if ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].blank? # It is obtained from the environment, and if unset, it defaults to default_enabled_providers
27
27
  default_enabled_providers
28
28
  else
29
29
  ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].split ','
30
30
  end
31
31
  end
32
32
 
33
- def self.login_provider_string
34
- if ENV['MUMUKI_LOGIN_PROVIDER'].blank? || ENV['RACK_ENV'] == 'test' || ENV['RAILS_ENV'] == 'test'
35
- 'developer'
33
+ def self.login_provider_string # This is the default login provider used when it is not overriden in the organization's config
34
+ if ENV['MUMUKI_LOGIN_PROVIDER'].blank? # It is obtained from env, and defaults to the first of the current enabled providers
35
+ enabled_providers.first # It should always be a provider within the enabled_providers list
36
36
  else
37
37
  ENV['MUMUKI_LOGIN_PROVIDER']
38
38
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '6.1.0'
3
+ VERSION = '6.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-login
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler