origen 0.59.0 → 0.59.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen/users/ldap.rb +8 -2
- data/spec/format/origen_formatter.rb +20 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be12bb5b800939408adf130a00a28b7f18231ad8ff4c4d85faf1d84e5a010269
|
4
|
+
data.tar.gz: d109bc8ff310e00c4a95408845bfcb376f2685471407dd7acb146c7ed0f0718b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cae4addf34171310be4685c8fada1529be19dafcd19db00e8c51211026e34f7490c476d484136cfaeac40d962d06f4de9877b4ffdc5aa3d7b2f89ac4f8115f7
|
7
|
+
data.tar.gz: 0a13bd267944d0aa0f8a79bb6b1b48c3f570269cf204a48e7507d9e4557bae7e98869847fd1b4787d0a55137228bf60ea68960dc2fad13488bb835f09b414d81
|
data/config/version.rb
CHANGED
data/lib/origen/users/ldap.rb
CHANGED
@@ -15,9 +15,14 @@ module Origen
|
|
15
15
|
HOST = Origen.site_config.ldap_host
|
16
16
|
PORT = Origen.site_config.ldap_port
|
17
17
|
BASE_DN = Origen.site_config.ldap_base_dn
|
18
|
+
LDAP_ENCRYPTION = Origen.site_config.ldap_encryption
|
19
|
+
|
20
|
+
if LDAP_ENCRYPTION.nil?
|
21
|
+
LDAP_ENCRYPTION = 'simple_tls'
|
22
|
+
end
|
18
23
|
|
19
24
|
def available?
|
20
|
-
!!(SERVICE_ACCOUNT && SERVICE_PASS && HOST && PORT && BASE_DN)
|
25
|
+
!!(SERVICE_ACCOUNT && SERVICE_PASS && HOST && PORT && BASE_DN && LDAP_ENCRYPTION)
|
21
26
|
end
|
22
27
|
|
23
28
|
# Lookup the given user in the core directory and return an object representing the user's entry
|
@@ -57,7 +62,8 @@ module Origen
|
|
57
62
|
def service
|
58
63
|
@service ||= Net::LDAP.new host: HOST,
|
59
64
|
port: PORT,
|
60
|
-
|
65
|
+
base: BASE_DN,
|
66
|
+
encryption: LDAP_ENCRYPTION,
|
61
67
|
auth: { method: :simple, username: SERVICE_ACCOUNT, password: SERVICE_PASS }
|
62
68
|
end
|
63
69
|
end
|
@@ -1,14 +1,26 @@
|
|
1
1
|
require 'rspec/core/formatters/base_formatter'
|
2
2
|
|
3
3
|
class OrigenFormatter < RSpec::Core::Formatters::BaseFormatter
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
if Gem::Version.new(RSpec::Version::STRING) < Gem::Version.new('3.0.0')
|
5
|
+
# legacy formatter
|
6
|
+
def dump_summary(duration, example_count, failure_count, pending_count)
|
7
|
+
if failure_count > 0
|
8
|
+
Origen.app.stats.report_fail
|
9
|
+
else
|
10
|
+
Origen.app.stats.report_pass
|
11
|
+
end
|
12
|
+
super(duration, example_count, failure_count, pending_count)
|
13
|
+
end
|
14
|
+
else
|
15
|
+
# RSpec 3 API
|
16
|
+
RSpec::Core::Formatters.register self, :dump_summary
|
17
|
+
def dump_summary(summary)
|
18
|
+
puts
|
19
|
+
if summary.failed_examples.size > 0
|
20
|
+
Origen.app.stats.report_fail
|
21
|
+
else
|
22
|
+
Origen.app.stats.report_pass
|
23
|
+
end
|
10
24
|
end
|
11
|
-
super(duration, example_count, failure_count, pending_count)
|
12
25
|
end
|
13
|
-
|
14
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.59.
|
4
|
+
version: 0.59.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|