saml-kit 1.0.12 → 1.0.13

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: 6e9ec0e7c8f6d74adb1573553909a40481127c6b7267125fea0dfa355952aefd
4
- data.tar.gz: d03824b9ee2b40906ffcfba24dcd4fa312a0624163aaae238417c08d4b231cb2
3
+ metadata.gz: bee64af01bee9e3ec08669be41f4b3ba272eec4bee6157c56e43b395e72d0a81
4
+ data.tar.gz: ecc4baf598932cd6900320c7ed2544ef64fff1e3179d4df54e3215547bcd0845
5
5
  SHA512:
6
- metadata.gz: 3eb96b0900cbc4fe95a41e558ed437f320430d833184ebd720758628a6f4e04209cf26a4d625208bb13dfdd52df34bf6d75776f7d1706891a2042d50af293e95
7
- data.tar.gz: 2c151db5c475909292e7b31e96a904a7dacf23802715ab95dd3e11cc211aab328ee62389149cd20434574d197a16ce9fe8db64ddbac8dd44285eae49058cbe87
6
+ metadata.gz: ad57558fe8f97ed27b4a6804d654d4022d633d7d499e71ebe812e09023c92f1323e3d2887efa67debdf78cf26e13f0db8bd1037b9765fac3026f46db1009a16d
7
+ data.tar.gz: a3b83a575a1f528af64843cee34e4b8d3da2cfea2aa8b8acbc8b1e656a56ade030db9f39eb62d8b2f59c4745251808f08a07bd406439f41b83f1497c61aa3062
@@ -51,7 +51,7 @@ module Saml
51
51
  module Kit
52
52
  class << self
53
53
  def configuration
54
- @config ||= Saml::Kit::Configuration.new
54
+ @configuration ||= Saml::Kit::Configuration.new
55
55
  end
56
56
 
57
57
  def configure
@@ -18,6 +18,7 @@ module Saml
18
18
  'xmlenc' => ::Xml::Kit::Namespaces::XMLENC,
19
19
  }.freeze
20
20
  attr_accessor :registry
21
+ attr_reader :name
21
22
  validates_presence_of :content
22
23
  validates_presence_of :id
23
24
  validate :must_match_xsd
@@ -58,7 +59,7 @@ module Saml
58
59
 
59
60
  # Returns the SAML document returned as a Hash.
60
61
  def to_h
61
- @xml_hash ||= Hash.from_xml(content) || {}
62
+ @to_h ||= Hash.from_xml(content) || {}
62
63
  end
63
64
 
64
65
  # Returns the SAML document as an XML string.
@@ -76,7 +77,7 @@ module Saml
76
77
 
77
78
  # @!visibility private
78
79
  def to_nokogiri
79
- @nokogiri ||= Nokogiri::XML(content)
80
+ @to_nokogiri ||= Nokogiri::XML(content)
80
81
  end
81
82
 
82
83
  # @!visibility private
@@ -137,7 +138,7 @@ module Saml
137
138
 
138
139
  private
139
140
 
140
- attr_reader :content, :name, :configuration
141
+ attr_reader :content, :configuration
141
142
 
142
143
  def must_match_xsd
143
144
  matches_xsd?(PROTOCOL_XSD)
@@ -148,7 +148,7 @@ module Saml
148
148
 
149
149
  # Returns the XML document converted to a Hash.
150
150
  def to_h
151
- @xml_hash ||= Hash.from_xml(to_xml)
151
+ @to_h ||= Hash.from_xml(to_xml)
152
152
  end
153
153
 
154
154
  # Returns the XML document as a String.
@@ -210,7 +210,7 @@ module Saml
210
210
 
211
211
  # @!visibility private
212
212
  def to_nokogiri
213
- @nokogiri ||= Nokogiri::XML(xml)
213
+ @to_nokogiri ||= Nokogiri::XML(xml)
214
214
  end
215
215
 
216
216
  def at_xpath(xpath)
@@ -26,7 +26,7 @@ module Saml
26
26
  # Returns true when the fingerprint of the certificate matches one of the certificates registered in the metadata.
27
27
  def trusted?(metadata)
28
28
  return false if metadata.nil?
29
- metadata.matches?(certificate.fingerprint, use: :signing)
29
+ metadata.matches?(certificate.fingerprint, use: :signing).present?
30
30
  end
31
31
 
32
32
  def digest_value
@@ -62,11 +62,11 @@ module Saml
62
62
 
63
63
  # Returns the XML Hash.
64
64
  def to_h
65
- @xml_hash ||= present? ? Hash.from_xml(to_xml)['Signature'] : {}
65
+ @to_h ||= present? ? Hash.from_xml(to_xml)['Signature'] : {}
66
66
  end
67
67
 
68
68
  def present?
69
- node
69
+ node.present?
70
70
  end
71
71
 
72
72
  def to_xml(pretty: false)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Saml
4
4
  module Kit
5
- VERSION = '1.0.12'.freeze
5
+ VERSION = '1.0.13'.freeze
6
6
  end
7
7
  end
@@ -1,7 +1,6 @@
1
-
2
1
  # frozen_string_literal: true
3
2
 
4
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
5
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
5
  require 'saml/kit/version'
7
6
 
@@ -30,7 +29,7 @@ Gem::Specification.new do |spec|
30
29
  spec.require_paths = ['lib']
31
30
 
32
31
  spec.add_dependency 'activemodel', '>= 4.2.0'
33
- spec.add_dependency 'xml-kit', '>= 0.1.12', '<= 1.0.0'
32
+ spec.add_dependency 'xml-kit', '>= 0.1.13', '<= 1.0.0'
34
33
  spec.add_development_dependency 'bundler', '~> 1.15'
35
34
  spec.add_development_dependency 'bundler-audit', '~> 0.6'
36
35
  spec.add_development_dependency 'ffaker', '~> 2.7'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-03 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.12
33
+ version: 0.1.13
34
34
  - - "<="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 1.0.0
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.1.12
43
+ version: 0.1.13
44
44
  - - "<="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.0