Comparing changes

v1.1.0 v1.2.0
37 commits 31 files changed

Commits

3355911 feat: prep release v1.2.0 mo khan 2021-02-04 22:59:50
a07ae8a chore: update changelog mo khan 2021-02-04 22:54:18
b7b01d4 Upgrade gems mo khan 2021-02-04 17:54:43
f1778dc chore: move continue-on-error to step mo khan 2021-02-04 18:46:02
231b18f chore: remove badges mo khan 2021-02-04 18:45:24
e886222 chore: add audit job mo khan 2021-02-04 18:32:12
fca712b chore: split lint into style and audit mo khan 2021-02-04 18:29:49
d1881b9 chore: skip setup in lint/test script mo khan 2021-02-04 18:23:37
546f8d8 chore: remove ruby 3.0 from matrix mo khan 2021-02-04 18:21:54
07857bc chore: specify branch to monitor mo khan 2021-02-04 18:19:24
3bfbd71 chore: fix typo in ruby/setup-ruby mo khan 2021-02-04 18:17:34
dae742f chore: add full name in license mo khan 2021-02-04 18:14:07
1b02a57 chore: remove travis ci file mo khan 2021-02-04 18:12:40
bdf7795 chore: remove gl ci file mo khan 2021-02-04 18:12:20
31f4bb9 feat: add ci job for GH actions mo khan 2021-02-04 18:11:01
88def71 chore: update url in gemspec mo khan 2021-02-04 17:38:48
3f1d786 [Security] Bump activesupport from 5.2.3 to 5.2.4.3 dependabot-preview[bot] 2020-05-24 14:16:31
318ee5e Update json gem mo khan 2020-04-10 23:14:28
d66e0d5 Update rake requirement from ~> 10.0 to ~> 13.0 dependabot[bot] 2020-02-29 10:09:07
9615778 Bump nokogiri from 1.10.5 to 1.10.8 dependabot[bot] 2020-02-25 22:05:56
9ce6c9a update nokogiri mo khan 2019-11-22 23:40:30
e06be70 fix ruby 2.4 build mo khan 2019-08-26 20:11:28
6824636 fix invalid yml setting. mo khan 2019-08-23 17:25:41
6bebc74 install latest bundler mo khan 2019-08-23 17:23:35
fbb3fcd add package job to release stage mo khan 2019-08-23 17:21:29
6d5a1a2 fix leaky constant in spec mo khan 2019-08-23 17:16:40
c2a7ad8 update dependencies mo khan 2019-08-23 17:03:46
e9bc991 update to rails 6 mo khan 2019-08-23 16:57:36
29db137 update nokogiri mo khan 2019-08-23 16:54:05
.github/workflows/ci.yml
@@ -0,0 +1,44 @@
+---
+name: Continuous Integration
+on:
+  push:
+    branches: [main]
+  pull_request:
+    branches: [main]
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        ruby-version: ['2.5', '2.6', '2.7']
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Ruby
+        uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler-cache: true
+      - name: Running tests…
+        run: sh bin/test
+  style:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Ruby
+        uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: '2.7'
+          bundler-cache: true
+      - name: Running style checks…
+        run: sh bin/style
+  audit:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Ruby
+        uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: '2.7'
+          bundler-cache: true
+      - name: Running audit…
+        run: sh bin/audit
bin/audit
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+[ -z "$DEBUG" ] || set -x
+
+echo [$(date "+%H:%M:%S")] "==> Running audit…"
+bundle exec rake bundle:audit
bin/cibuild
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# script/cibuild: Setup environment for CI to run tests. This is primarily
-#                 designed to run on the continuous integration server.
-
-set -e
-
-cd "$(dirname "$0")/.."
-
-echo [$(date "+%H:%M:%S")] "==> Started at…"
-
-# GC customizations
-export RUBY_GC_MALLOC_LIMIT=79000000
-export RUBY_GC_HEAP_INIT_SLOTS=800000
-export RUBY_HEAP_FREE_MIN=100000
-export RUBY_HEAP_SLOTS_INCREMENT=400000
-export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
-
-ruby -v
-gem install bundler --conservative -v '~> 2.0'
-bin/test
bin/lint
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-[ -z "$DEBUG" ] || set -x
-
-echo [$(date "+%H:%M:%S")] "==> Running setup…"
-bin/setup
-
-echo [$(date "+%H:%M:%S")] "==> Running linters…"
-bundle exec rake lint
bin/setup
@@ -1,6 +1,8 @@
-#!/usr/bin/env bash
+#!/bin/sh
+
 set -euo pipefail
-IFS=$'\n\t'
-set -vx
 
-bundle check || bundle install --jobs "$(sysctl -n hw.ncpu || nproc)"
+cd "$(dirname "$0")/.."
+
+ruby -v
+bundle check || bundle install
bin/style
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -e
+cd "$(dirname "$0")/.."
+
+bundle exec rake rubocop
bin/test
@@ -1,17 +1,7 @@
 #!/bin/sh
 
-# script/test: Run test suite for application. Optionally pass in a path to an
-#              individual test file to run a single test.
-
-
 set -e
 
 cd "$(dirname "$0")/.."
 
-[ -z "$DEBUG" ] || set -x
-
-echo [$(date "+%H:%M:%S")] "==> Running setup…"
-bin/setup
-
-echo [$(date "+%H:%M:%S")] "==> Running tests…"
-bundle exec rake spec
+bundle exec rspec "$@"
lib/saml/kit/concerns/respondable.rb
@@ -45,7 +45,7 @@ module Saml
         return if request_id.nil?
         return if in_response_to == request_id
 
-        errors[:in_response_to] << error_message(:invalid_response_to)
+        errors.add(:in_response_to, error_message(:invalid_response_to))
       end
     end
   end
lib/saml/kit/concerns/trustable.rb
@@ -54,7 +54,7 @@ module Saml
 
         signature.valid?
         signature.errors.each do |attribute, error|
-          errors[attribute] << error
+          errors.add(attribute, error)
         end
       end
 
@@ -62,14 +62,14 @@ module Saml
         return unless expected_type?
         return if provider.present?
 
-        errors[:provider] << error_message(:unregistered)
+        errors.add(:provider, error_message(:unregistered))
       end
 
       def must_be_trusted
         return if trusted?
         return if provider.present? && !signed?
 
-        errors[:fingerprint] << error_message(:invalid_fingerprint)
+        errors.add(:fingerprint, error_message(:invalid_fingerprint))
       end
     end
   end
lib/saml/kit/concerns/xsd_validatable.rb
@@ -20,7 +20,7 @@ module Saml
         Dir.chdir(File.dirname(xsd)) do
           xsd = Nokogiri::XML::Schema(IO.read(xsd))
           xsd.validate(to_nokogiri.document).each do |error|
-            errors[:base] << error.message
+            errors.add(:base, error.message)
           end
         end
       end
lib/saml/kit/assertion.rb
@@ -114,13 +114,13 @@ module Saml
       def must_match_issuer
         return if audiences.empty? || audiences.include?(configuration.entity_id)
 
-        errors[:audience] << error_message(:must_match_issuer)
+        errors.add(:audience, error_message(:must_match_issuer))
       end
 
       def must_be_active_session
         return if active?
 
-        errors[:base] << error_message(:expired)
+        errors.add(:base, error_message(:expired))
       end
 
       def must_have_valid_signature
lib/saml/kit/document.rb
@@ -101,7 +101,7 @@ module Saml
       end
 
       def must_be_expected_type
-        errors[:base] << error_message(:invalid) unless expected_type?
+        errors.add(:base, error_message(:invalid)) unless expected_type?
       end
 
       def expected_type?
@@ -112,7 +112,7 @@ module Saml
         return unless expected_type?
         return if version == '2.0'
 
-        errors[:version] << error_message(:invalid_version)
+        errors.add(:version, error_message(:invalid_version))
       end
     end
   end
lib/saml/kit/invalid_document.rb
@@ -7,7 +7,7 @@ module Saml
     # {include:file:spec/saml/kit/invalid_document_spec.rb}
     class InvalidDocument < Document
       validate do |model|
-        model.errors[:base] << model.error_message(:invalid)
+        model.errors.add(:base, model.error_message(:invalid))
       end
 
       def initialize(xml, *)
lib/saml/kit/metadata.rb
@@ -182,7 +182,7 @@ module Saml
       end
 
       def must_contain_descriptor
-        errors[:base] << error_message(:invalid) unless metadata
+        errors.add(:base, error_message(:invalid)) unless metadata
       end
 
       def must_match_xsd
@@ -193,7 +193,7 @@ module Saml
         return if !signature.present? || signature.valid?
 
         signature.errors.each do |attribute, error|
-          errors[attribute] << error
+          errors.add(attribute, error)
         end
       end
     end
lib/saml/kit/null_assertion.rb
@@ -53,7 +53,7 @@ module Saml
       end
 
       def invalid
-        errors[:assertion].push(error_message(:invalid))
+        errors.add(:assertion, error_message(:invalid))
       end
 
       def name
lib/saml/kit/response.rb
@@ -45,14 +45,14 @@ module Saml
         assertion.valid?
         assertion.errors.each do |attribute, error|
           attribute = :assertion if attribute == :base
-          errors[attribute] << error
+          errors.add(attribute, error)
         end
       end
 
       def must_contain_single_assertion
         return if assertion_nodes.count <= 1
 
-        errors[:base] << error_message(:must_contain_single_assertion)
+        errors.add(:base, error_message(:must_contain_single_assertion))
       end
 
       def assertion_nodes
lib/saml/kit/version.rb
@@ -2,6 +2,6 @@
 
 module Saml
   module Kit
-    VERSION = '1.1.0'
+    VERSION = '1.2.0'
   end
 end
spec/saml/kit/bindings/http_redirect_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe Saml::Kit::Bindings::HttpRedirect do
     end
 
     it 'deserializes the SAMLRequest to an AuthnRequest when given a custom params object' do
-      class Parameters
+      params = Class.new do
         attr_reader :params
 
         def initialize(params)
@@ -79,8 +79,9 @@ RSpec.describe Saml::Kit::Bindings::HttpRedirect do
           params[key]
         end
       end
+
       url, = subject.serialize(Saml::Kit::AuthenticationRequest.builder)
-      result = subject.deserialize(Parameters.new(query_params_from(url)))
+      result = subject.deserialize(params.new(query_params_from(url)))
       expect(result).to be_instance_of(Saml::Kit::AuthenticationRequest)
     end
 
spec/saml/kit/composite_metadata_spec.rb
@@ -89,19 +89,23 @@ RSpec.describe Saml::Kit::CompositeMetadata do
   it { expect(subject.want_authn_requests_signed).to be_truthy }
   it { expect(subject.attributes).to match_array([name: 'id', format: nil]) }
   it { expect(subject.login_request_for(binding: :http_post)).to be_present }
+
   it do
     expect(subject.assertion_consumer_services).to match_array([
       Saml::Kit::Bindings::HttpPost.new(location: assertion_consumer_service)
     ])
   end
+
   it do
     expect(subject.assertion_consumer_service_for(binding: :http_post)).to eql(
       Saml::Kit::Bindings::HttpPost.new(location: assertion_consumer_service)
     )
   end
+
   it { expect(subject.want_assertions_signed).to be_truthy }
   it { expect(subject.entity_id).to eql(entity_id) }
   it { expect(subject.name_id_formats).to match_array([Saml::Kit::Namespaces::PERSISTENT]) }
+
   it do
     expect(subject.certificates).to match_array([
       sp_signing_certificate,
@@ -117,39 +121,46 @@ RSpec.describe Saml::Kit::CompositeMetadata do
       idp_encryption_certificate,
     ])
   end
+
   it do
     expect(subject.signing_certificates).to match_array([
       sp_signing_certificate,
       idp_signing_certificate,
     ])
   end
+
   it do
     expect(subject.services('SingleLogoutService')).to match_array([
       Saml::Kit::Bindings::HttpPost.new(location: sp_logout_service),
       Saml::Kit::Bindings::HttpPost.new(location: idp_logout_service),
     ])
   end
+
   it do
     expect(subject.service_for(type: 'SingleLogoutService', binding: :http_post)).to eql(
       Saml::Kit::Bindings::HttpPost.new(location: sp_logout_service)
     )
   end
+
   it do
     expect(subject.services('AssertionConsumerService')).to match_array([
       Saml::Kit::Bindings::HttpPost.new(location: assertion_consumer_service),
     ])
   end
+
   it do
     expect(subject.service_for(type: 'AssertionConsumerService', binding: :http_post)).to eql(
       Saml::Kit::Bindings::HttpPost.new(location: assertion_consumer_service)
     )
   end
+
   it do
     expect(subject.services('SingleSignOnService')).to match_array([
       Saml::Kit::Bindings::HttpPost.new(location: sign_on_service),
       Saml::Kit::Bindings::HttpRedirect.new(location: sign_on_service),
     ])
   end
+
   it do
     expect(subject.service_for(type: 'SingleSignOnService', binding: :http_post)).to eql(
       Saml::Kit::Bindings::HttpPost.new(location: sign_on_service)
spec/saml/kit/identity_provider_metadata_spec.rb
@@ -11,6 +11,7 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
 
     it { expect(subject.entity_id).to eql('http://www.okta.com/1') }
     it { expect(subject.name_id_formats).to match_array([Saml::Kit::Namespaces::EMAIL_ADDRESS, Saml::Kit::Namespaces::UNSPECIFIED_NAMEID]) }
+
     it do
       location = 'https://dev.oktapreview.com/app/example/1/sso/saml'
       expect(subject.single_sign_on_services.map(&:to_h)).to match_array([
@@ -18,12 +19,15 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
         { binding: Saml::Kit::Bindings::HTTP_REDIRECT, location: location },
       ])
     end
+
     it { expect(subject.single_logout_services).to be_empty }
+
     it do
       fingerprint = '9F:74:13:3B:BC:5A:7B:8B:2D:4F:8B:EF:1E:88:EB:D1:AE:BC:19:BF:CA:19:C6:2F:0F:4B:31:1D:68:98:B0:1B'
       expect(subject.certificates).to match_array([::Xml::Kit::Certificate.new(certificate, use: :signing)])
       expect(subject.certificates.first.fingerprint.to_s).to eql(fingerprint)
     end
+
     it { expect(subject.attributes).to be_empty }
   end
 
@@ -38,6 +42,7 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
     end
 
     it { expect(subject.entity_id).to eql('http://www.example.com/adfs/services/trust') }
+
     it do
       expect(subject.name_id_formats).to match_array([
         Saml::Kit::Namespaces::EMAIL_ADDRESS,
@@ -45,6 +50,7 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
         Saml::Kit::Namespaces::TRANSIENT,
       ])
     end
+
     it do
       location = 'https://www.example.com/adfs/ls/'
       expect(subject.single_sign_on_services.map(&:to_h)).to match_array([
@@ -52,6 +58,7 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
         { location: location, binding: Saml::Kit::Bindings::HTTP_POST },
       ])
     end
+
     it do
       location = 'https://www.example.com/adfs/ls/'
       expect(subject.single_logout_services.map(&:to_h)).to match_array([
@@ -59,12 +66,14 @@ RSpec.describe Saml::Kit::IdentityProviderMetadata do
         { location: location, binding: Saml::Kit::Bindings::HTTP_POST },
       ])
     end
+
     it do
       expect(subject.certificates).to match_array([
         ::Xml::Kit::Certificate.new(signing_certificate, use: :signing),
         ::Xml::Kit::Certificate.new(encryption_certificate, use: :encryption),
       ])
     end
+
     it { expect(subject.attributes).to be_present }
   end
 
spec/saml/kit/signature_spec.rb
@@ -17,6 +17,7 @@ RSpec.describe Saml::Kit::Signature do
   specify { expect(subject.signature_method).to eql(xml_hash['Signature']['SignedInfo']['SignatureMethod']['Algorithm']) }
   specify { expect(subject.canonicalization_method).to eql(xml_hash['Signature']['SignedInfo']['CanonicalizationMethod']['Algorithm']) }
   specify { expect(subject.transforms).to eql(xml_hash['Signature']['SignedInfo']['Reference']['Transforms']['Transform'].map { |x| x['Algorithm'] }) }
+
   specify do
     expected = ::Xml::Kit::Certificate.new(xml_hash['Signature']['KeyInfo']['X509Data']['X509Certificate'], use: :signing)
     expect(subject.certificate).to eql(expected)
spec/spec_helper.rb
@@ -7,13 +7,14 @@ end
 require 'bundler/setup'
 require 'saml/kit'
 require 'saml/kit/rspec'
+require 'active_support/core_ext/string/strip'
 require 'active_support/testing/time_helpers'
 require 'ffaker'
 require 'webmock/rspec'
 
 Saml::Kit.configuration.logger.level = Xml::Kit.logger.level = Logger::FATAL
 
-Dir[File.join(Dir.pwd, 'spec/support/**/*.rb')].each { |f| require f }
+Dir[File.join(Dir.pwd, 'spec/support/**/*.rb')].sort.each { |f| require f }
 RSpec.configure do |config|
   config.include ActiveSupport::Testing::TimeHelpers
   # Enable flags like --only-failures and --next-failure
.gitlab-ci.yml
@@ -1,15 +0,0 @@
-image: ruby:2.6
-
-before_script:
-  - apt-get update && apt-get install -y locales
-  - echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
-  - locale-gen
-  - export LC_ALL=en_US.UTF-8
-
-rspec:
-  script:
-    - bin/cibuild
-
-lint:
-  script:
-    - bin/lint
.rubocop.yml
@@ -12,9 +12,12 @@ AllCops:
     - 'spec/examples/**/*'
     - 'tmp/**/*'
     - 'vendor/**/*'
-  TargetRubyVersion: 2.4
+  TargetRubyVersion: 2.5
 
-Layout/AlignParameters:
+Layout/ArgumentAlignment:
+  EnforcedStyle: with_fixed_indentation
+
+Layout/ParameterAlignment:
   Enabled: true
   EnforcedStyle: with_fixed_indentation
   IndentationWidth: 2
@@ -38,10 +41,10 @@ Layout/ClassStructure:
 Layout/EndOfLine:
   EnforcedStyle: lf
 
-Layout/IndentArray:
+Layout/FirstArrayElementIndentation:
   EnforcedStyle: consistent
 
-Layout/IndentHeredoc:
+Layout/HeredocIndentation:
   EnforcedStyle: active_support
 
 Layout/MultilineMethodCallIndentation:
@@ -103,6 +106,9 @@ RSpec/ExampleLength:
 RSpec/MultipleExpectations:
   Enabled: false
 
+RSpec/MultipleMemoizedHelpers:
+  Enabled: false
+
 RSpec/NamedSubject:
   Enabled: false
 
.travis.yml
@@ -1,20 +0,0 @@
-sudo: false
-env:
-  - CC_TEST_REPORTER_ID=256cf27053220ac6b8962d6aef566e28753bc58633348ffef9274d3e1a48b31c
-language: ruby
-rvm:
-  - 2.4.6
-  - 2.5.5
-  - 2.6.3
-before_install:
-  - gem update --system
-  - gem install bundler -v '~> 2.0'
-before_script:
-  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
-  - chmod +x ./cc-test-reporter
-  - ./cc-test-reporter before-build
-script:
-  - bin/cibuild
-  - bin/lint
-after_script:
-  - ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT
CHANGELOG.md
@@ -1,4 +1,4 @@
-Version 1.1.0
+Version 1.2.0
 
 # Changelog
 All notable changes to this project will be documented in this file.
@@ -7,7 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
-- nil
+
+## [1.2.0] - 2021-02-04
+### Changed
+- Use [ActiveModel::Errors#add](https://www.rubydoc.info/docs/rails/ActiveModel%2FErrors:add)
+- Update minimum activemodel version to `5.1`.
 
 ## [1.1.0] - 2019-04-30
 ### Added
@@ -83,62 +87,63 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Removed
 - Removed optional SessionNotOnOrAfter attribute from AuthnStatement.
 
-[Unreleased]: https://github.com/saml-kit/saml-kit/compare/v1.1.0...HEAD
-[1.1.0]: https://github.com/saml-kit/saml-kit/compare/v1.0.31...v1.1.0
-[1.0.31]: https://github.com/saml-kit/saml-kit/compare/v1.0.30...v1.0.31
-[1.0.30]: https://github.com/saml-kit/saml-kit/compare/v1.0.29...v1.0.30
-[1.0.29]: https://github.com/saml-kit/saml-kit/compare/v1.0.28...v1.0.29
-[1.0.28]: https://github.com/saml-kit/saml-kit/compare/v1.0.27...v1.0.28
-[1.0.27]: https://github.com/saml-kit/saml-kit/compare/v1.0.26...v1.0.27
-[1.0.26]: https://github.com/saml-kit/saml-kit/compare/v1.0.25...v1.0.26
-[1.0.25]: https://github.com/saml-kit/saml-kit/compare/v1.0.24...v1.0.25
-[1.0.24]: https://github.com/saml-kit/saml-kit/compare/v1.0.23...v1.0.24
-[1.0.23]: https://github.com/saml-kit/saml-kit/compare/v1.0.22...v1.0.23
-[1.0.22]: https://github.com/saml-kit/saml-kit/compare/v1.0.21...v1.0.22
-[1.0.21]: https://github.com/saml-kit/saml-kit/compare/v1.0.20...v1.0.21
-[1.0.20]: https://github.com/saml-kit/saml-kit/compare/v1.0.19...v1.0.20
-[1.0.19]: https://github.com/saml-kit/saml-kit/compare/v1.0.18...v1.0.19
-[1.0.18]: https://github.com/saml-kit/saml-kit/compare/v1.0.17...v1.0.18
-[1.0.17]: https://github.com/saml-kit/saml-kit/compare/v1.0.16...v1.0.17
-[1.0.16]: https://github.com/saml-kit/saml-kit/compare/v1.0.15...v1.0.16
-[1.0.15]: https://github.com/saml-kit/saml-kit/compare/v1.0.14...v1.0.15
-[1.0.14]: https://github.com/saml-kit/saml-kit/compare/v1.0.13...v1.0.14
-[1.0.13]: https://github.com/saml-kit/saml-kit/compare/v1.0.12...v1.0.13
-[1.0.12]: https://github.com/saml-kit/saml-kit/compare/v1.0.11...v1.0.12
-[1.0.11]: https://github.com/saml-kit/saml-kit/compare/v1.0.10...v1.0.11
-[1.0.10]: https://github.com/saml-kit/saml-kit/compare/v1.0.9...v1.0.10
-[1.0.9]: https://github.com/saml-kit/saml-kit/compare/v1.0.8...v1.0.9
-[1.0.8]: https://github.com/saml-kit/saml-kit/compare/v1.0.7...v1.0.8
-[1.0.7]: https://github.com/saml-kit/saml-kit/compare/v1.0.6...v1.0.7
-[1.0.6]: https://github.com/saml-kit/saml-kit/compare/v1.0.5...v1.0.6
-[1.0.5]: https://github.com/saml-kit/saml-kit/compare/v1.0.4...v1.0.5
-[1.0.4]: https://github.com/saml-kit/saml-kit/compare/v1.0.3...v1.0.4
-[1.0.3]: https://github.com/saml-kit/saml-kit/compare/v1.0.2...v1.0.3
-[1.0.2]: https://github.com/saml-kit/saml-kit/compare/v1.0.1...v1.0.2
-[1.0.1]: https://github.com/saml-kit/saml-kit/compare/v1.0.0...v1.0.1
-[1.0.0]: https://github.com/saml-kit/saml-kit/compare/v0.3.6...v1.0.0
-[0.3.6]: https://github.com/saml-kit/saml-kit/compare/v0.3.5...v0.3.6
-[0.3.5]: https://github.com/saml-kit/saml-kit/compare/v0.3.4...v0.3.5
-[0.3.4]: https://github.com/saml-kit/saml-kit/compare/v0.3.3...v0.3.4
-[0.3.3]: https://github.com/saml-kit/saml-kit/compare/v0.3.2...v0.3.3
-[0.3.2]: https://github.com/saml-kit/saml-kit/compare/v0.3.1...v0.3.2
-[0.3.1]: https://github.com/saml-kit/saml-kit/compare/v0.3.0...v0.3.1
-[0.3.0]: https://github.com/saml-kit/saml-kit/compare/v0.2.18...v0.3.0
-[0.2.18]: https://github.com/saml-kit/saml-kit/compare/v0.2.17...v0.2.18
-[0.2.17]: https://github.com/saml-kit/saml-kit/compare/v0.2.16...v0.2.17
-[0.2.16]: https://github.com/saml-kit/saml-kit/compare/v0.2.15...v0.2.16
-[0.2.15]: https://github.com/saml-kit/saml-kit/compare/v0.2.14...v0.2.15
-[0.2.14]: https://github.com/saml-kit/saml-kit/compare/v0.2.13...v0.2.14
-[0.2.13]: https://github.com/saml-kit/saml-kit/compare/v0.2.12...v0.2.13
-[0.2.12]: https://github.com/saml-kit/saml-kit/compare/v0.2.11...v0.2.12
-[0.2.11]: https://github.com/saml-kit/saml-kit/compare/v0.2.10...v0.2.11
-[0.2.10]: https://github.com/saml-kit/saml-kit/compare/v0.2.9...v0.2.10
-[0.2.9]: https://github.com/saml-kit/saml-kit/compare/v0.2.8...v0.2.9
-[0.2.8]: https://github.com/saml-kit/saml-kit/compare/v0.2.7...v0.2.8
-[0.2.7]: https://github.com/saml-kit/saml-kit/compare/v0.2.6...v0.2.7
-[0.2.6]: https://github.com/saml-kit/saml-kit/compare/v0.2.5...v0.2.6
-[0.2.5]: https://github.com/saml-kit/saml-kit/compare/v0.2.4...v0.2.5
-[0.2.4]: https://github.com/saml-kit/saml-kit/compare/v0.2.3...v0.2.4
-[0.2.3]: https://github.com/saml-kit/saml-kit/compare/v0.2.2...v0.2.3
-[0.2.2]: https://github.com/saml-kit/saml-kit/compare/v0.2.1...v0.2.2
-[0.2.1]: https://github.com/saml-kit/saml-kit/compare/v0.1.0...v0.2.1
+[Unreleased]: https://github.com/xlgmokha/saml-kit/compare/v1.2.0...HEAD
+[1.2.0]: https://github.com/xlgmokha/saml-kit/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/xlgmokha/saml-kit/compare/v1.0.31...v1.1.0
+[1.0.31]: https://github.com/xlgmokha/saml-kit/compare/v1.0.30...v1.0.31
+[1.0.30]: https://github.com/xlgmokha/saml-kit/compare/v1.0.29...v1.0.30
+[1.0.29]: https://github.com/xlgmokha/saml-kit/compare/v1.0.28...v1.0.29
+[1.0.28]: https://github.com/xlgmokha/saml-kit/compare/v1.0.27...v1.0.28
+[1.0.27]: https://github.com/xlgmokha/saml-kit/compare/v1.0.26...v1.0.27
+[1.0.26]: https://github.com/xlgmokha/saml-kit/compare/v1.0.25...v1.0.26
+[1.0.25]: https://github.com/xlgmokha/saml-kit/compare/v1.0.24...v1.0.25
+[1.0.24]: https://github.com/xlgmokha/saml-kit/compare/v1.0.23...v1.0.24
+[1.0.23]: https://github.com/xlgmokha/saml-kit/compare/v1.0.22...v1.0.23
+[1.0.22]: https://github.com/xlgmokha/saml-kit/compare/v1.0.21...v1.0.22
+[1.0.21]: https://github.com/xlgmokha/saml-kit/compare/v1.0.20...v1.0.21
+[1.0.20]: https://github.com/xlgmokha/saml-kit/compare/v1.0.19...v1.0.20
+[1.0.19]: https://github.com/xlgmokha/saml-kit/compare/v1.0.18...v1.0.19
+[1.0.18]: https://github.com/xlgmokha/saml-kit/compare/v1.0.17...v1.0.18
+[1.0.17]: https://github.com/xlgmokha/saml-kit/compare/v1.0.16...v1.0.17
+[1.0.16]: https://github.com/xlgmokha/saml-kit/compare/v1.0.15...v1.0.16
+[1.0.15]: https://github.com/xlgmokha/saml-kit/compare/v1.0.14...v1.0.15
+[1.0.14]: https://github.com/xlgmokha/saml-kit/compare/v1.0.13...v1.0.14
+[1.0.13]: https://github.com/xlgmokha/saml-kit/compare/v1.0.12...v1.0.13
+[1.0.12]: https://github.com/xlgmokha/saml-kit/compare/v1.0.11...v1.0.12
+[1.0.11]: https://github.com/xlgmokha/saml-kit/compare/v1.0.10...v1.0.11
+[1.0.10]: https://github.com/xlgmokha/saml-kit/compare/v1.0.9...v1.0.10
+[1.0.9]: https://github.com/xlgmokha/saml-kit/compare/v1.0.8...v1.0.9
+[1.0.8]: https://github.com/xlgmokha/saml-kit/compare/v1.0.7...v1.0.8
+[1.0.7]: https://github.com/xlgmokha/saml-kit/compare/v1.0.6...v1.0.7
+[1.0.6]: https://github.com/xlgmokha/saml-kit/compare/v1.0.5...v1.0.6
+[1.0.5]: https://github.com/xlgmokha/saml-kit/compare/v1.0.4...v1.0.5
+[1.0.4]: https://github.com/xlgmokha/saml-kit/compare/v1.0.3...v1.0.4
+[1.0.3]: https://github.com/xlgmokha/saml-kit/compare/v1.0.2...v1.0.3
+[1.0.2]: https://github.com/xlgmokha/saml-kit/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/xlgmokha/saml-kit/compare/v1.0.0...v1.0.1
+[1.0.0]: https://github.com/xlgmokha/saml-kit/compare/v0.3.6...v1.0.0
+[0.3.6]: https://github.com/xlgmokha/saml-kit/compare/v0.3.5...v0.3.6
+[0.3.5]: https://github.com/xlgmokha/saml-kit/compare/v0.3.4...v0.3.5
+[0.3.4]: https://github.com/xlgmokha/saml-kit/compare/v0.3.3...v0.3.4
+[0.3.3]: https://github.com/xlgmokha/saml-kit/compare/v0.3.2...v0.3.3
+[0.3.2]: https://github.com/xlgmokha/saml-kit/compare/v0.3.1...v0.3.2
+[0.3.1]: https://github.com/xlgmokha/saml-kit/compare/v0.3.0...v0.3.1
+[0.3.0]: https://github.com/xlgmokha/saml-kit/compare/v0.2.18...v0.3.0
+[0.2.18]: https://github.com/xlgmokha/saml-kit/compare/v0.2.17...v0.2.18
+[0.2.17]: https://github.com/xlgmokha/saml-kit/compare/v0.2.16...v0.2.17
+[0.2.16]: https://github.com/xlgmokha/saml-kit/compare/v0.2.15...v0.2.16
+[0.2.15]: https://github.com/xlgmokha/saml-kit/compare/v0.2.14...v0.2.15
+[0.2.14]: https://github.com/xlgmokha/saml-kit/compare/v0.2.13...v0.2.14
+[0.2.13]: https://github.com/xlgmokha/saml-kit/compare/v0.2.12...v0.2.13
+[0.2.12]: https://github.com/xlgmokha/saml-kit/compare/v0.2.11...v0.2.12
+[0.2.11]: https://github.com/xlgmokha/saml-kit/compare/v0.2.10...v0.2.11
+[0.2.10]: https://github.com/xlgmokha/saml-kit/compare/v0.2.9...v0.2.10
+[0.2.9]: https://github.com/xlgmokha/saml-kit/compare/v0.2.8...v0.2.9
+[0.2.8]: https://github.com/xlgmokha/saml-kit/compare/v0.2.7...v0.2.8
+[0.2.7]: https://github.com/xlgmokha/saml-kit/compare/v0.2.6...v0.2.7
+[0.2.6]: https://github.com/xlgmokha/saml-kit/compare/v0.2.5...v0.2.6
+[0.2.5]: https://github.com/xlgmokha/saml-kit/compare/v0.2.4...v0.2.5
+[0.2.4]: https://github.com/xlgmokha/saml-kit/compare/v0.2.3...v0.2.4
+[0.2.3]: https://github.com/xlgmokha/saml-kit/compare/v0.2.2...v0.2.3
+[0.2.2]: https://github.com/xlgmokha/saml-kit/compare/v0.2.1...v0.2.2
+[0.2.1]: https://github.com/xlgmokha/saml-kit/compare/v0.1.0...v0.2.1
Gemfile.lock
@@ -1,104 +1,107 @@
 PATH
   remote: .
   specs:
-    saml-kit (1.1.0)
-      activemodel (>= 4.2.0)
+    saml-kit (1.2.0)
+      activemodel (~> 5.1)
       net-hippie (~> 0.1)
-      xml-kit (>= 0.3.0, < 1.0.0)
+      xml-kit (~> 0.4)
 
 GEM
   remote: https://rubygems.org/
   specs:
-    activemodel (5.2.3)
-      activesupport (= 5.2.3)
-    activesupport (5.2.3)
+    activemodel (5.2.4.4)
+      activesupport (= 5.2.4.4)
+    activesupport (5.2.4.4)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 0.7, < 2)
       minitest (~> 5.1)
       tzinfo (~> 1.1)
-    addressable (2.6.0)
-      public_suffix (>= 2.0.2, < 4.0)
-    ast (2.4.0)
-    benchmark-malloc (0.1.0)
-    benchmark-perf (0.5.0)
-    benchmark-trend (0.3.0)
-    builder (3.2.3)
-    bundler-audit (0.6.1)
+    addressable (2.7.0)
+      public_suffix (>= 2.0.2, < 5.0)
+    ast (2.4.2)
+    benchmark-malloc (0.2.0)
+    benchmark-perf (0.6.0)
+    benchmark-trend (0.4.0)
+    builder (3.2.4)
+    bundler-audit (0.7.0.1)
       bundler (>= 1.2.0, < 3)
-      thor (~> 0.18)
-    concurrent-ruby (1.1.5)
-    crack (0.4.3)
-      safe_yaml (~> 1.0.0)
-    diff-lcs (1.3)
-    docile (1.3.1)
-    ffaker (2.11.0)
-    hashdiff (0.3.9)
-    i18n (1.6.0)
+      thor (>= 0.18, < 2)
+    concurrent-ruby (1.1.8)
+    crack (0.4.5)
+      rexml
+    diff-lcs (1.4.4)
+    docile (1.3.5)
+    ffaker (2.17.0)
+    hashdiff (1.0.1)
+    i18n (1.8.8)
       concurrent-ruby (~> 1.0)
-    jaro_winkler (1.5.2)
-    json (2.2.0)
-    mini_portile2 (2.4.0)
-    minitest (5.11.3)
-    net-hippie (0.2.5)
-    nokogiri (1.10.3)
-      mini_portile2 (~> 2.4.0)
-    parallel (1.17.0)
-    parser (2.6.2.1)
-      ast (~> 2.4.0)
-    psych (3.1.0)
-    public_suffix (3.0.3)
+    minitest (5.14.3)
+    net-hippie (0.3.2)
+    nokogiri (1.11.1-x86_64-linux)
+      racc (~> 1.4)
+    parallel (1.20.1)
+    parser (3.0.0.0)
+      ast (~> 2.4.1)
+    public_suffix (4.0.6)
+    racc (1.5.2)
     rainbow (3.0.0)
-    rake (10.5.0)
-    rspec (3.8.0)
-      rspec-core (~> 3.8.0)
-      rspec-expectations (~> 3.8.0)
-      rspec-mocks (~> 3.8.0)
-    rspec-benchmark (0.5.0)
-      benchmark-malloc (~> 0.1.0)
-      benchmark-perf (~> 0.5.0)
-      benchmark-trend (~> 0.3.0)
-      rspec (>= 3.0.0, < 4.0.0)
-    rspec-core (3.8.0)
-      rspec-support (~> 3.8.0)
-    rspec-expectations (3.8.3)
+    rake (13.0.3)
+    regexp_parser (2.0.3)
+    rexml (3.2.4)
+    rspec (3.10.0)
+      rspec-core (~> 3.10.0)
+      rspec-expectations (~> 3.10.0)
+      rspec-mocks (~> 3.10.0)
+    rspec-benchmark (0.6.0)
+      benchmark-malloc (~> 0.2)
+      benchmark-perf (~> 0.6)
+      benchmark-trend (~> 0.4)
+      rspec (>= 3.0)
+    rspec-core (3.10.1)
+      rspec-support (~> 3.10.0)
+    rspec-expectations (3.10.1)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.8.0)
-    rspec-mocks (3.8.0)
+      rspec-support (~> 3.10.0)
+    rspec-mocks (3.10.2)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.8.0)
-    rspec-support (3.8.0)
-    rubocop (0.67.2)
-      jaro_winkler (~> 1.5.1)
+      rspec-support (~> 3.10.0)
+    rspec-support (3.10.2)
+    rubocop (0.93.1)
       parallel (~> 1.10)
-      parser (>= 2.5, != 2.5.1.1)
-      psych (>= 3.1.0)
+      parser (>= 2.7.1.5)
       rainbow (>= 2.2.2, < 4.0)
+      regexp_parser (>= 1.8)
+      rexml
+      rubocop-ast (>= 0.6.0)
       ruby-progressbar (~> 1.7)
-      unicode-display_width (>= 1.4.0, < 1.6)
-    rubocop-rspec (1.32.0)
-      rubocop (>= 0.60.0)
-    ruby-prof (0.17.0)
-    ruby-progressbar (1.10.0)
-    safe_yaml (1.0.5)
-    simplecov (0.16.1)
+      unicode-display_width (>= 1.4.0, < 2.0)
+    rubocop-ast (1.4.1)
+      parser (>= 2.7.1.5)
+    rubocop-rspec (1.44.1)
+      rubocop (~> 0.87)
+      rubocop-ast (>= 0.7.1)
+    ruby-prof (1.4.2)
+    ruby-progressbar (1.11.0)
+    simplecov (0.21.2)
       docile (~> 1.1)
-      json (>= 1.8, < 3)
-      simplecov-html (~> 0.10.0)
-    simplecov-html (0.10.2)
-    thor (0.20.3)
+      simplecov-html (~> 0.11)
+      simplecov_json_formatter (~> 0.1)
+    simplecov-html (0.12.3)
+    simplecov_json_formatter (0.1.2)
+    thor (1.1.0)
     thread_safe (0.3.6)
-    tilt (2.0.9)
-    tzinfo (1.2.5)
+    tilt (2.0.10)
+    tzinfo (1.2.9)
       thread_safe (~> 0.1)
-    unicode-display_width (1.5.0)
-    webmock (3.5.1)
+    unicode-display_width (1.7.0)
+    webmock (3.11.2)
       addressable (>= 2.3.6)
       crack (>= 0.3.2)
-      hashdiff
-    xml-kit (0.3.1)
+      hashdiff (>= 0.4.0, < 2.0.0)
+    xml-kit (0.5.0)
       activemodel (>= 4.2.0)
       builder (~> 3.2)
-      nokogiri (>= 1.8.5)
+      nokogiri (~> 1.10)
       tilt (>= 1.4.1)
       xmldsig (~> 0.6)
     xmldsig (0.6.6)
@@ -111,7 +114,7 @@ DEPENDENCIES
   bundler (~> 2.0)
   bundler-audit (~> 0.6)
   ffaker (~> 2.7)
-  rake (~> 10.0)
+  rake (~> 13.0)
   rspec (~> 3.0)
   rspec-benchmark (~> 0.3)
   rubocop (~> 0.52)
@@ -122,4 +125,4 @@ DEPENDENCIES
   webmock (~> 3.1)
 
 BUNDLED WITH
-   2.0.1
+   2.1.4
LICENSE.txt
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2017 mo
+Copyright (c) 2017 mo khan
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
Rakefile
@@ -9,5 +9,4 @@ RSpec::Core::RakeTask.new(:spec)
 RuboCop::RakeTask.new(:rubocop)
 Bundler::Audit::Task.new
 
-task lint: [:rubocop, 'bundle:audit']
 task default: :spec
README.md
@@ -1,17 +1,13 @@
-![SAML-Kit](https://github.com/saml-kit/saml-kit/raw/master/spec/examples/saml-kit.gif)
+![SAML-Kit](https://github.com/xlgmokha/saml-kit/raw/main/spec/examples/saml-kit.gif)
 
 *Logo courtesy of [@speasley](https://github.com/speasley)*
 
-[![Build Status](https://travis-ci.org/saml-kit/saml-kit.svg?branch=master)](https://travis-ci.org/saml-kit/saml-kit)
-[![Code Climate](https://codeclimate.com/github/saml-kit/saml-kit.svg)](https://codeclimate.com/github/saml-kit/saml-kit)
 [![Gem Version](https://badge.fury.io/rb/saml-kit.svg)](https://rubygems.org/gems/saml-kit)
-[![Security](https://hakiri.io/github/saml-kit/saml-kit/master.svg)](https://hakiri.io/github/saml-kit/saml-kit/master)
-[![Test Coverage](https://api.codeclimate.com/v1/badges/32583dc119cf05ff4080/test_coverage)](https://codeclimate.com/github/saml-kit/saml-kit/test_coverage)
 
 Saml::Kit is a library with the purpose of creating and consuming SAML
 documents. It supports the HTTP Post and HTTP Redirect bindings. It can
 create Service Provider Metadata, Identity Provider Metadata,
-AuthnRequest, Response, LogoutRequest, LogoutResponse documents.  
+AuthnRequest, Response, LogoutRequest, LogoutResponse documents.
 It also supports generating signed and encrypted assertions.
 
 ## Installation
@@ -249,13 +245,13 @@ puts [url, saml_params].inspect
 
 ## Development
 
-After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
+After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
 
 To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
 
 ## Contributing
 
-Bug reports and pull requests are welcome on Github at https://github.com/saml-kit/saml-kit.
+Bug reports and pull requests are welcome on Github at https://github.com/xlgmokha/saml-kit.
 
 ## License
 
saml-kit.gemspec
@@ -12,9 +12,9 @@ Gem::Specification.new do |spec|
 
   spec.summary       = 'A simple toolkit for working with SAML.'
   spec.description   = 'A simple toolkit for working with SAML.'
-  spec.homepage      = 'https://github.com/saml-kit/saml-kit'
+  spec.homepage      = 'https://github.com/xlgmokha/saml-kit'
   spec.license       = 'MIT'
-  spec.required_ruby_version = '~> 2.4'
+  spec.required_ruby_version = '~> 2.5'
 
   spec.files = `git ls-files -z`.split("\x0").reject do |f|
     (
@@ -28,13 +28,13 @@ Gem::Specification.new do |spec|
   spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
   spec.require_paths = ['lib']
 
-  spec.add_dependency 'activemodel', '>= 4.2.0'
+  spec.add_dependency 'activemodel', '~> 5.1'
   spec.add_dependency 'net-hippie', '~> 0.1'
-  spec.add_dependency 'xml-kit', '>= 0.3.0', '< 1.0.0'
+  spec.add_dependency 'xml-kit', '~> 0.4'
   spec.add_development_dependency 'bundler', '~> 2.0'
   spec.add_development_dependency 'bundler-audit', '~> 0.6'
   spec.add_development_dependency 'ffaker', '~> 2.7'
-  spec.add_development_dependency 'rake', '~> 10.0'
+  spec.add_development_dependency 'rake', '~> 13.0'
   spec.add_development_dependency 'rspec', '~> 3.0'
   spec.add_development_dependency 'rspec-benchmark', '~> 0.3'
   spec.add_development_dependency 'rubocop', '~> 0.52'