We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40250eb commit e7c8de3Copy full SHA for e7c8de3
lib/ruby_saml/saml_message.rb
@@ -20,15 +20,13 @@ class SamlMessage
20
PROTOCOL = "urn:oasis:names:tc:SAML:2.0:protocol"
21
22
BASE64_FORMAT = %r{\A([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?\Z}
23
- @@mutex = Mutex.new
24
25
# @return [Nokogiri::XML::Schema] Gets the schema object of the SAML 2.0 Protocol schema
26
#
27
def self.schema
28
- @@mutex.synchronize do
29
- Dir.chdir(File.expand_path('../../lib/ruby_saml/schemas', __dir__)) do
30
- ::Nokogiri::XML::Schema(File.read("saml-schema-protocol-2.0.xsd"))
31
- end
+ path = File.expand_path("../schemas/saml-schema-protocol-2.0.xsd", __FILE__)
+ File.open(path) do |file|
+ ::Nokogiri::XML::Schema(file)
32
end
33
34
0 commit comments