grape-jwt-authentication 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/documentation.yml +3 -2
- data/.github/workflows/test.yml +9 -5
- data/.rspec +2 -2
- data/.rubocop.yml +19 -2
- data/.simplecov +12 -0
- data/Appraisals +7 -0
- data/CHANGELOG.md +8 -0
- data/Dockerfile +2 -3
- data/Envfile +0 -3
- data/Guardfile +44 -0
- data/LICENSE +1 -1
- data/Makefile +29 -6
- data/README.md +4 -4
- data/Rakefile +8 -61
- data/gemfiles/rails_5.2.gemfile +9 -0
- data/grape-jwt-authentication.gemspec +45 -29
- data/lib/grape/jwt/authentication/jwt_handler.rb +1 -4
- data/lib/grape/jwt/authentication/version.rb +19 -1
- metadata +116 -63
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a76b78814c21de200efd81a5b97a2032909f0dc67cb702562a814abb250986ab
         | 
| 4 | 
            +
              data.tar.gz: dc5c5536b5d5d445ae8391d7787e41858c178e200fc6cdf41fe8cb1349b7fa77
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4cb2b1ff597b9bfee4947d57a5c1ad0f0b1123b298a5675d78d761786ea2eb33cdb4b199d23e72e1fa41b72dc708b2d6149d3150bc5e10d9544313943e34203e
         | 
| 7 | 
            +
              data.tar.gz: 4fc142b1b6519a2a4fa0f1ba5895fd929bfca37ff26a1ad3de2096b23241f1d846710a0f3abfdb3f0a6e020300c6728f9db3686f0d0887f20e5c2ae3f480e973
         | 
| @@ -9,16 +9,17 @@ concurrency: | |
| 9 9 | 
             
            jobs:
         | 
| 10 10 | 
             
              docs:
         | 
| 11 11 | 
             
                name: Build gem documentation
         | 
| 12 | 
            -
                runs-on: ubuntu- | 
| 12 | 
            +
                runs-on: ubuntu-22.04
         | 
| 13 13 | 
             
                timeout-minutes: 5
         | 
| 14 14 | 
             
                steps:
         | 
| 15 | 
            -
                  - uses: actions/checkout@ | 
| 15 | 
            +
                  - uses: actions/checkout@v3
         | 
| 16 16 |  | 
| 17 17 | 
             
                  - name: Install the correct Ruby version
         | 
| 18 18 | 
             
                    uses: ruby/setup-ruby@v1
         | 
| 19 19 | 
             
                    with:
         | 
| 20 20 | 
             
                      ruby-version: 2.5
         | 
| 21 21 | 
             
                      bundler-cache: true
         | 
| 22 | 
            +
                      rubygems: '3.3.26'
         | 
| 22 23 |  | 
| 23 24 | 
             
                  - name: Prepare the virtual environment
         | 
| 24 25 | 
             
                    uses: hausgold/actions/ci@master
         | 
    
        data/.github/workflows/test.yml
    CHANGED
    
    | @@ -12,21 +12,25 @@ concurrency: | |
| 12 12 |  | 
| 13 13 | 
             
            jobs:
         | 
| 14 14 | 
             
              test:
         | 
| 15 | 
            -
                name: 'Test the gem (Ruby ${{ matrix.ruby }})'
         | 
| 16 | 
            -
                runs-on: ubuntu- | 
| 15 | 
            +
                name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
         | 
| 16 | 
            +
                runs-on: ubuntu-22.04
         | 
| 17 17 | 
             
                timeout-minutes: 5
         | 
| 18 18 | 
             
                strategy:
         | 
| 19 19 | 
             
                  fail-fast: false
         | 
| 20 20 | 
             
                  matrix:
         | 
| 21 | 
            -
                    ruby: [2. | 
| 21 | 
            +
                    ruby: ['2.5', '2.7']
         | 
| 22 | 
            +
                    rails: ['5.2']
         | 
| 23 | 
            +
                env:
         | 
| 24 | 
            +
                  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
         | 
| 22 25 | 
             
                steps:
         | 
| 23 | 
            -
                  - uses: actions/checkout@ | 
| 26 | 
            +
                  - uses: actions/checkout@v3
         | 
| 24 27 |  | 
| 25 28 | 
             
                  - name: Install the correct Ruby version
         | 
| 26 29 | 
             
                    uses: ruby/setup-ruby@v1
         | 
| 27 30 | 
             
                    with:
         | 
| 28 31 | 
             
                      ruby-version: ${{ matrix.ruby }}
         | 
| 29 32 | 
             
                      bundler-cache: true
         | 
| 33 | 
            +
                      rubygems: '3.3.26'
         | 
| 30 34 |  | 
| 31 35 | 
             
                  - name: Prepare the virtual environment
         | 
| 32 36 | 
             
                    uses: hausgold/actions/ci@master
         | 
| @@ -43,7 +47,7 @@ jobs: | |
| 43 47 |  | 
| 44 48 | 
             
              trigger-docs:
         | 
| 45 49 | 
             
                name: Trigger the documentation upload
         | 
| 46 | 
            -
                runs-on: ubuntu- | 
| 50 | 
            +
                runs-on: ubuntu-22.04
         | 
| 47 51 | 
             
                timeout-minutes: 2
         | 
| 48 52 | 
             
                needs: test
         | 
| 49 53 | 
             
                if: github.ref == 'refs/heads/master'
         | 
    
        data/.rspec
    CHANGED
    
    
    
        data/.rubocop.yml
    CHANGED
    
    | @@ -1,14 +1,19 @@ | |
| 1 | 
            -
            require: | 
| 1 | 
            +
            require:
         | 
| 2 | 
            +
              - rubocop-rspec
         | 
| 3 | 
            +
              - rubocop-rails
         | 
| 2 4 |  | 
| 3 5 | 
             
            Rails:
         | 
| 4 6 | 
             
              Enabled: true
         | 
| 5 7 |  | 
| 6 | 
            -
            Documentation:
         | 
| 8 | 
            +
            Style/Documentation:
         | 
| 7 9 | 
             
              Enabled: true
         | 
| 8 10 |  | 
| 9 11 | 
             
            AllCops:
         | 
| 12 | 
            +
              NewCops: enable
         | 
| 13 | 
            +
              SuggestExtensions: false
         | 
| 10 14 | 
             
              DisplayCopNames: true
         | 
| 11 15 | 
             
              TargetRubyVersion: 2.5
         | 
| 16 | 
            +
              TargetRailsVersion: 5.2
         | 
| 12 17 | 
             
              Exclude:
         | 
| 13 18 | 
             
                - bin/**/*
         | 
| 14 19 | 
             
                - vendor/**/*
         | 
| @@ -23,6 +28,14 @@ Metrics/BlockLength: | |
| 23 28 | 
             
                - '**/*.rake'
         | 
| 24 29 | 
             
                - doc/**/*.rb
         | 
| 25 30 |  | 
| 31 | 
            +
            # MFA is not yet enabled for our gems yet.
         | 
| 32 | 
            +
            Gemspec/RequireMFA:
         | 
| 33 | 
            +
              Enabled: false
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            # We stay with the original Ruby Style Guide recommendation.
         | 
| 36 | 
            +
            Layout/LineLength:
         | 
| 37 | 
            +
              Max: 80
         | 
| 38 | 
            +
             | 
| 26 39 | 
             
            # Document all the things.
         | 
| 27 40 | 
             
            Style/DocumentationMethod:
         | 
| 28 41 | 
             
              Enabled: true
         | 
| @@ -51,3 +64,7 @@ RSpec/FilePath: | |
| 51 64 | 
             
            # Because we just implemented the ActiveRecord API.
         | 
| 52 65 | 
             
            Rails/SkipsModelValidations:
         | 
| 53 66 | 
             
              Enabled: false
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            # We highly depend on memoized helpers across the specs.
         | 
| 69 | 
            +
            RSpec/MultipleMemoizedHelpers:
         | 
| 70 | 
            +
              Enabled: false
         | 
    
        data/.simplecov
    CHANGED
    
    | @@ -1,3 +1,15 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'simplecov-html'
         | 
| 4 | 
            +
            require 'simplecov_json_formatter'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
         | 
| 7 | 
            +
              [
         | 
| 8 | 
            +
                SimpleCov::Formatter::HTMLFormatter,
         | 
| 9 | 
            +
                SimpleCov::Formatter::JSONFormatter
         | 
| 10 | 
            +
              ]
         | 
| 11 | 
            +
            )
         | 
| 12 | 
            +
             | 
| 1 13 | 
             
            SimpleCov.start 'test_frameworks' do
         | 
| 2 14 | 
             
              add_filter '/vendor/bundle/'
         | 
| 3 15 | 
             
            end
         | 
    
        data/Appraisals
    ADDED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,3 +1,11 @@ | |
| 1 | 
            +
            ### 2.1.0
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * Bundler >= 2.3 is from now on required as minimal version (#9)
         | 
| 4 | 
            +
            * Dropped support for Ruby < 2.5 (#9)
         | 
| 5 | 
            +
            * Dropped support for Rails < 5.2 (#9)
         | 
| 6 | 
            +
            * Updated all development/runtime gems to their latest
         | 
| 7 | 
            +
              Ruby 2.5 compatible version (#9)
         | 
| 8 | 
            +
             | 
| 1 9 | 
             
            ### 2.0.4
         | 
| 2 10 |  | 
| 3 11 | 
             
            * Migrated to Github Actions
         | 
    
        data/Dockerfile
    CHANGED
    
    | @@ -2,7 +2,7 @@ FROM hausgold/ruby:2.5 | |
| 2 2 | 
             
            MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
         | 
| 3 3 |  | 
| 4 4 | 
             
            # Update system gem
         | 
| 5 | 
            -
            RUN gem update --system
         | 
| 5 | 
            +
            RUN gem update --system '3.3.26'
         | 
| 6 6 |  | 
| 7 7 | 
             
            # Install system packages and the latest bundler
         | 
| 8 8 | 
             
            RUN apt-get update -yqqq && \
         | 
| @@ -11,8 +11,7 @@ RUN apt-get update -yqqq && \ | |
| 11 11 | 
             
                ca-certificates \
         | 
| 12 12 | 
             
                bash-completion inotify-tools && \
         | 
| 13 13 | 
             
              echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
         | 
| 14 | 
            -
              gem install bundler -v '~> 2.0' --no-document --no-prerelease | 
| 15 | 
            -
              gem install bundler -v '~> 1.0' --no-document --no-prerelease
         | 
| 14 | 
            +
              gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
         | 
| 16 15 |  | 
| 17 16 | 
             
            # Add new web user
         | 
| 18 17 | 
             
            RUN mkdir /app && \
         | 
    
        data/Envfile
    CHANGED
    
    
    
        data/Guardfile
    ADDED
    
    | @@ -0,0 +1,44 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # A sample Guardfile
         | 
| 4 | 
            +
            # More info at https://github.com/guard/guard#readme
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            ## Uncomment and set this to only include directories you want to watch
         | 
| 7 | 
            +
            (directories %w[lib spec]).select do |d|
         | 
| 8 | 
            +
              if Dir.exist?(d)
         | 
| 9 | 
            +
                d
         | 
| 10 | 
            +
              else
         | 
| 11 | 
            +
                UI.warning("Directory #{d} does not exist")
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
            end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ## Note: if you are using the `directories` clause above and you are not
         | 
| 16 | 
            +
            ## watching the project directory ('.'), then you will want to move
         | 
| 17 | 
            +
            ## the Guardfile to a watched dir and symlink it back, e.g.
         | 
| 18 | 
            +
            #
         | 
| 19 | 
            +
            #  $ mkdir config
         | 
| 20 | 
            +
            #  $ mv Guardfile config/
         | 
| 21 | 
            +
            #  $ ln -s config/Guardfile .
         | 
| 22 | 
            +
            #
         | 
| 23 | 
            +
            # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            # NOTE: The cmd option is now required due to the increasing number of ways
         | 
| 26 | 
            +
            #       rspec may be run, below are examples of the most common uses.
         | 
| 27 | 
            +
            #  * bundler: 'bundle exec rspec'
         | 
| 28 | 
            +
            #  * bundler binstubs: 'bin/rspec'
         | 
| 29 | 
            +
            #  * spring: 'bin/rspec' (This will use spring if running and you have
         | 
| 30 | 
            +
            #                          installed the spring binstubs per the docs)
         | 
| 31 | 
            +
            #  * zeus: 'zeus rspec' (requires the server to be started separately)
         | 
| 32 | 
            +
            #  * 'just' rspec: 'rspec'
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            guard :rspec, cmd: 'bundle exec rspec' do
         | 
| 35 | 
            +
              watch('spec/spec_helper.rb') { 'spec' }
         | 
| 36 | 
            +
              watch(%r{^lib/grape/jwt/authentication.rb}) { 'spec' }
         | 
| 37 | 
            +
              watch(%r{^spec/.+_spec\.rb$})
         | 
| 38 | 
            +
              watch(%r{^lib/grape/jwt/authentication/([^\\]+)\.rb$}) do |m|
         | 
| 39 | 
            +
                "spec/grape/jwt/authentication/#{m[1]}_spec.rb"
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
              watch(%r{^lib/grape/jwt/authentication/([^\\]+)/(.*)\.rb$}) do |m|
         | 
| 42 | 
            +
                "spec/grape/jwt/authentication/#{m[1]}/#{m[2]}_spec.rb"
         | 
| 43 | 
            +
              end
         | 
| 44 | 
            +
            end
         | 
    
        data/LICENSE
    CHANGED
    
    
    
        data/Makefile
    CHANGED
    
    | @@ -9,6 +9,7 @@ SHELL := bash | |
| 9 9 | 
             
            # Environment switches
         | 
| 10 10 | 
             
            MAKE_ENV ?= docker
         | 
| 11 11 | 
             
            COMPOSE_RUN_SHELL_FLAGS ?= --rm
         | 
| 12 | 
            +
            BASH_RUN_SHELL_FLAGS ?=
         | 
| 12 13 |  | 
| 13 14 | 
             
            # Directories
         | 
| 14 15 | 
             
            VENDOR_DIR ?= vendor/bundle
         | 
| @@ -25,9 +26,12 @@ RM ?= rm | |
| 25 26 | 
             
            XARGS ?= xargs
         | 
| 26 27 |  | 
| 27 28 | 
             
            # Container binaries
         | 
| 29 | 
            +
            APPRAISAL ?= appraisal
         | 
| 28 30 | 
             
            BUNDLE ?= bundle
         | 
| 29 31 | 
             
            GEM ?= gem
         | 
| 32 | 
            +
            GUARD ?= guard
         | 
| 30 33 | 
             
            RAKE ?= rake
         | 
| 34 | 
            +
            RSPEC ?= rspec
         | 
| 31 35 | 
             
            RUBOCOP ?= rubocop
         | 
| 32 36 | 
             
            YARD ?= yard
         | 
| 33 37 |  | 
| @@ -38,7 +42,8 @@ define run-shell | |
| 38 42 | 
             
            	$(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
         | 
| 39 43 | 
             
            		-e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
         | 
| 40 44 | 
             
            		-e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
         | 
| 41 | 
            -
            		-u `$(ID) -u` test  | 
| 45 | 
            +
            		-u `$(ID) -u` test \
         | 
| 46 | 
            +
            		bash $(BASH_RUN_SHELL_FLAGS) -c 'sleep 0.1; echo; $(1)'
         | 
| 42 47 | 
             
            endef
         | 
| 43 48 | 
             
            else ifeq ($(MAKE_ENV),baremetal)
         | 
| 44 49 | 
             
            define run-shell
         | 
| @@ -55,6 +60,7 @@ all: | |
| 55 60 | 
             
            	#
         | 
| 56 61 | 
             
            	# test               Run the whole test suite
         | 
| 57 62 | 
             
            	# test-style         Test the code styles
         | 
| 63 | 
            +
            	# watch              Watch for code changes and rerun the test suite
         | 
| 58 64 | 
             
            	#
         | 
| 59 65 | 
             
            	# docs               Generate the Ruby documentation of the library
         | 
| 60 66 | 
             
            	# stats              Print the code statistics (library and test suite)
         | 
| @@ -64,12 +70,24 @@ all: | |
| 64 70 | 
             
            	# shell              Run an interactive shell on the container
         | 
| 65 71 | 
             
            	# shell-irb          Run an interactive IRB shell on the container
         | 
| 66 72 |  | 
| 73 | 
            +
            .interactive:
         | 
| 74 | 
            +
            	@$(eval BASH_RUN_SHELL_FLAGS = --login)
         | 
| 75 | 
            +
             | 
| 67 76 | 
             
            install:
         | 
| 68 77 | 
             
            	# Install the dependencies
         | 
| 69 78 | 
             
            	@$(MKDIR) -p $(VENDOR_DIR)
         | 
| 70 79 | 
             
            	@$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
         | 
| 71 | 
            -
            	@$(call run-shell | 
| 72 | 
            -
             | 
| 80 | 
            +
            	@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            update:
         | 
| 83 | 
            +
            	# Install the dependencies
         | 
| 84 | 
            +
            	@$(MKDIR) -p $(VENDOR_DIR)
         | 
| 85 | 
            +
            	@$(call run-shell,$(BUNDLE) update)
         | 
| 86 | 
            +
            	@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
         | 
| 87 | 
            +
             | 
| 88 | 
            +
            watch: install .interactive
         | 
| 89 | 
            +
            	# Watch for code changes and rerun the test suite
         | 
| 90 | 
            +
            	@$(call run-shell,$(BUNDLE) exec $(GUARD))
         | 
| 73 91 |  | 
| 74 92 | 
             
            test: \
         | 
| 75 93 | 
             
            	test-specs \
         | 
| @@ -79,6 +97,11 @@ test-specs: | |
| 79 97 | 
             
            	# Run the whole test suite
         | 
| 80 98 | 
             
            	@$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
         | 
| 81 99 |  | 
| 100 | 
            +
            $(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
         | 
| 101 | 
            +
            $(TEST_GEMFILES):
         | 
| 102 | 
            +
            	# Run the whole test suite ($(GEMFILE))
         | 
| 103 | 
            +
            	@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RSPEC))
         | 
| 104 | 
            +
             | 
| 82 105 | 
             
            test-style: \
         | 
| 83 106 | 
             
            	test-style-ruby
         | 
| 84 107 |  | 
| @@ -90,8 +113,8 @@ clean: | |
| 90 113 | 
             
            	# Clean the dependencies
         | 
| 91 114 | 
             
            	@$(RM) -rf $(VENDOR_DIR)
         | 
| 92 115 | 
             
            	@$(RM) -rf $(VENDOR_DIR)/Gemfile.lock
         | 
| 93 | 
            -
            	@$(RM) -rf pkg
         | 
| 94 | 
            -
             | 
| 116 | 
            +
            	@$(RM) -rf .bundle .yardoc coverage pkg Gemfile.lock doc/api \
         | 
| 117 | 
            +
            		.rspec_status
         | 
| 95 118 |  | 
| 96 119 | 
             
            clean-containers:
         | 
| 97 120 | 
             
            	# Clean running containers
         | 
| @@ -102,7 +125,7 @@ endif | |
| 102 125 | 
             
            clean-images:
         | 
| 103 126 | 
             
            	# Clean build images
         | 
| 104 127 | 
             
            ifeq ($(MAKE_ENV),docker)
         | 
| 105 | 
            -
            	@-$(DOCKER) images | $(GREP)  | 
| 128 | 
            +
            	@-$(DOCKER) images | $(GREP) $(shell basename "`pwd`") \
         | 
| 106 129 | 
             
            		| $(AWK) '{ print $$3 }' \
         | 
| 107 130 | 
             
            		| $(XARGS) -rn1 $(DOCKER) rmi -f
         | 
| 108 131 | 
             
            endif
         | 
    
        data/README.md
    CHANGED
    
    | @@ -8,7 +8,7 @@ | |
| 8 8 |  | 
| 9 9 | 
             
            This gem is dedicated to easily integrate a JWT authentication to your
         | 
| 10 10 | 
             
            [Grape](https://github.com/ruby-grape/grape) API. The real authentication
         | 
| 11 | 
            -
            functionality must be provided by the user and this makes this gem  | 
| 11 | 
            +
            functionality must be provided by the user and this makes this gem highly
         | 
| 12 12 | 
             
            flexible on the JWT verification level.
         | 
| 13 13 |  | 
| 14 14 | 
             
            - [Installation](#installation)
         | 
| @@ -154,7 +154,7 @@ end | |
| 154 154 |  | 
| 155 155 | 
             
            #### Failed authentication handling
         | 
| 156 156 |  | 
| 157 | 
            -
            When the client sends a  | 
| 157 | 
            +
            When the client sends a correctly formatted JSON Web Token with the Bearer
         | 
| 158 158 | 
             
            authentication scheme within the `Authorization` header and your authenticator
         | 
| 159 159 | 
             
            fails for some reason (token claims, wrong audience, bad subject, expired
         | 
| 160 160 | 
             
            token, wrong cryptographic signing etc), this function is called to handle the
         | 
| @@ -175,8 +175,8 @@ end | |
| 175 175 | 
             
            #### RSA public key helper
         | 
| 176 176 |  | 
| 177 177 | 
             
            We provide a straightforward solution to deal with the provision of RSA public
         | 
| 178 | 
            -
            keys.   | 
| 179 | 
            -
            a local access, and  | 
| 178 | 
            +
            keys.  Sometimes you want to distribute them by file to each machine and have
         | 
| 179 | 
            +
            a local access, and sometimes you provide an endpoint on your identity
         | 
| 180 180 | 
             
            provider to fetch the RSA public key via HTTP/HTTPS.  The `RsaPublicKey` class
         | 
| 181 181 | 
             
            helps you to fulfill this task easily.
         | 
| 182 182 |  | 
    
        data/Rakefile
    CHANGED
    
    | @@ -2,71 +2,18 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require 'bundler/gem_tasks'
         | 
| 4 4 | 
             
            require 'rspec/core/rake_task'
         | 
| 5 | 
            -
            require ' | 
| 6 | 
            -
            require 'pp'
         | 
| 5 | 
            +
            require 'countless/rake_tasks'
         | 
| 7 6 |  | 
| 8 7 | 
             
            RSpec::Core::RakeTask.new(:spec)
         | 
| 9 8 |  | 
| 10 9 | 
             
            task default: :spec
         | 
| 11 10 |  | 
| 12 | 
            -
            # Load some railties tasks
         | 
| 13 | 
            -
            load 'rails/tasks/statistics.rake'
         | 
| 14 | 
            -
            load 'rails/tasks/annotations.rake'
         | 
| 15 | 
            -
             | 
| 16 | 
            -
            # Clear the default statistics directory constant
         | 
| 17 | 
            -
            #
         | 
| 18 | 
            -
            # rubocop:disable Style/MutableConstant because we define it
         | 
| 19 | 
            -
            Object.send(:remove_const, :STATS_DIRECTORIES)
         | 
| 20 | 
            -
            ::STATS_DIRECTORIES = []
         | 
| 21 | 
            -
            # rubocop:enable Style/MutableConstant
         | 
| 22 | 
            -
             | 
| 23 | 
            -
            # Monkey patch the Rails +CodeStatistics+ class to support configurable
         | 
| 24 | 
            -
            # patterns per path. This is reuqired to support top-level only file matches.
         | 
| 25 | 
            -
            class CodeStatistics
         | 
| 26 | 
            -
              DEFAULT_PATTERN = /^(?!\.).*?\.(rb|js|coffee|rake)$/.freeze
         | 
| 27 | 
            -
             | 
| 28 | 
            -
              # Pass the possible +pattern+ argument down to the
         | 
| 29 | 
            -
              # +calculate_directory_statistics+ method call.
         | 
| 30 | 
            -
              def calculate_statistics
         | 
| 31 | 
            -
                Hash[@pairs.map do |pair|
         | 
| 32 | 
            -
                  [pair.first, calculate_directory_statistics(*pair[1..-1])]
         | 
| 33 | 
            -
                end]
         | 
| 34 | 
            -
              end
         | 
| 35 | 
            -
             | 
| 36 | 
            -
              # Match the pattern against the individual file name and the relative file
         | 
| 37 | 
            -
              # path. This allows top-level only matches.
         | 
| 38 | 
            -
              def calculate_directory_statistics(directory, pattern = DEFAULT_PATTERN)
         | 
| 39 | 
            -
                stats = CodeStatisticsCalculator.new
         | 
| 40 | 
            -
             | 
| 41 | 
            -
                Dir.foreach(directory) do |file_name|
         | 
| 42 | 
            -
                  path = "#{directory}/#{file_name}"
         | 
| 43 | 
            -
             | 
| 44 | 
            -
                  if File.directory?(path) && (/^\./ !~ file_name)
         | 
| 45 | 
            -
                    stats.add(calculate_directory_statistics(path, pattern))
         | 
| 46 | 
            -
                  elsif file_name =~ pattern || path =~ pattern
         | 
| 47 | 
            -
                    stats.add_by_file_path(path)
         | 
| 48 | 
            -
                  end
         | 
| 49 | 
            -
                end
         | 
| 50 | 
            -
             | 
| 51 | 
            -
                stats
         | 
| 52 | 
            -
              end
         | 
| 53 | 
            -
            end
         | 
| 54 | 
            -
             | 
| 55 11 | 
             
            # Configure all code statistics directories
         | 
| 56 | 
            -
             | 
| 57 | 
            -
               | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
               | 
| 63 | 
            -
              ::CodeStatistics::TEST_TYPES << type if type.include? 'specs'
         | 
| 64 | 
            -
            end
         | 
| 65 | 
            -
             | 
| 66 | 
            -
            # Setup annotations
         | 
| 67 | 
            -
            ENV['SOURCE_ANNOTATION_DIRECTORIES'] = 'spec,doc'
         | 
| 68 | 
            -
             | 
| 69 | 
            -
            desc 'Enumerate all annotations'
         | 
| 70 | 
            -
            task :notes do
         | 
| 71 | 
            -
              SourceAnnotationExtractor.enumerate '@?OPTIMIZE|@?FIXME|@?TODO', tag: true
         | 
| 12 | 
            +
            Countless.configure do |config|
         | 
| 13 | 
            +
              config.stats_base_directories = [
         | 
| 14 | 
            +
                { name: 'Top-levels',
         | 
| 15 | 
            +
                  pattern: 'lib/**/*.rb' },
         | 
| 16 | 
            +
                { name: 'Top-levels specs', test: true,
         | 
| 17 | 
            +
                  pattern: 'spec/grape/**/*.rb' }
         | 
| 18 | 
            +
              ]
         | 
| 72 19 | 
             
            end
         | 
| @@ -5,41 +5,57 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | |
| 5 5 | 
             
            require 'grape/jwt/authentication/version'
         | 
| 6 6 |  | 
| 7 7 | 
             
            Gem::Specification.new do |spec|
         | 
| 8 | 
            -
              spec.name | 
| 9 | 
            -
              spec.version | 
| 10 | 
            -
              spec.authors | 
| 11 | 
            -
              spec.email | 
| 8 | 
            +
              spec.name = 'grape-jwt-authentication'
         | 
| 9 | 
            +
              spec.version = Grape::Jwt::Authentication::VERSION
         | 
| 10 | 
            +
              spec.authors = ['Hermann Mayer']
         | 
| 11 | 
            +
              spec.email = ['hermann.mayer92@gmail.com']
         | 
| 12 12 |  | 
| 13 | 
            -
              spec. | 
| 14 | 
            -
              spec. | 
| 15 | 
            -
              spec. | 
| 13 | 
            +
              spec.license = 'MIT'
         | 
| 14 | 
            +
              spec.summary = 'A reusable Grape JWT authentication concern'
         | 
| 15 | 
            +
              spec.description = 'A reusable Grape JWT authentication concern'
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              base_uri = "https://github.com/hausgold/#{spec.name}"
         | 
| 18 | 
            +
              spec.metadata = {
         | 
| 19 | 
            +
                'homepage_uri' => base_uri,
         | 
| 20 | 
            +
                'source_code_uri' => base_uri,
         | 
| 21 | 
            +
                'changelog_uri' => "#{base_uri}/blob/master/CHANGELOG.md",
         | 
| 22 | 
            +
                'bug_tracker_uri' => "#{base_uri}/issues",
         | 
| 23 | 
            +
                'documentation_uri' => "https://www.rubydoc.info/gems/#{spec.name}"
         | 
| 24 | 
            +
              }
         | 
| 16 25 |  | 
| 17 26 | 
             
              spec.files = `git ls-files -z`.split("\x0").reject do |f|
         | 
| 18 27 | 
             
                f.match(%r{^(test|spec|features)/})
         | 
| 19 28 | 
             
              end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
              spec. | 
| 29 | 
            +
             | 
| 30 | 
            +
              spec.bindir = 'exe'
         | 
| 31 | 
            +
              spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         | 
| 22 32 | 
             
              spec.require_paths = ['lib']
         | 
| 23 33 |  | 
| 24 | 
            -
              spec. | 
| 34 | 
            +
              spec.required_ruby_version = '>= 2.5'
         | 
| 35 | 
            +
             | 
| 36 | 
            +
              spec.add_runtime_dependency 'activesupport', '>= 5.2'
         | 
| 25 37 | 
             
              spec.add_runtime_dependency 'grape', '~> 1.0'
         | 
| 26 | 
            -
              spec.add_runtime_dependency 'httparty'
         | 
| 27 | 
            -
              spec.add_runtime_dependency 'jwt', '~> 2. | 
| 28 | 
            -
              spec.add_runtime_dependency 'keyless', '~> 1. | 
| 29 | 
            -
              spec.add_runtime_dependency 'recursive-open-struct', '~> 1. | 
| 30 | 
            -
             | 
| 31 | 
            -
              spec.add_development_dependency ' | 
| 32 | 
            -
              spec.add_development_dependency ' | 
| 33 | 
            -
              spec.add_development_dependency ' | 
| 34 | 
            -
              spec.add_development_dependency ' | 
| 35 | 
            -
              spec.add_development_dependency ' | 
| 36 | 
            -
              spec.add_development_dependency ' | 
| 37 | 
            -
              spec.add_development_dependency ' | 
| 38 | 
            -
              spec.add_development_dependency ' | 
| 39 | 
            -
              spec.add_development_dependency ' | 
| 40 | 
            -
              spec.add_development_dependency ' | 
| 41 | 
            -
              spec.add_development_dependency ' | 
| 42 | 
            -
              spec.add_development_dependency ' | 
| 43 | 
            -
              spec.add_development_dependency ' | 
| 44 | 
            -
              spec.add_development_dependency ' | 
| 38 | 
            +
              spec.add_runtime_dependency 'httparty', '>= 0.21'
         | 
| 39 | 
            +
              spec.add_runtime_dependency 'jwt', '~> 2.6'
         | 
| 40 | 
            +
              spec.add_runtime_dependency 'keyless', '~> 1.1'
         | 
| 41 | 
            +
              spec.add_runtime_dependency 'recursive-open-struct', '~> 1.1'
         | 
| 42 | 
            +
             | 
| 43 | 
            +
              spec.add_development_dependency 'appraisal', '~> 2.4'
         | 
| 44 | 
            +
              spec.add_development_dependency 'bundler', '~> 2.3'
         | 
| 45 | 
            +
              spec.add_development_dependency 'countless', '~> 1.1'
         | 
| 46 | 
            +
              spec.add_development_dependency 'guard-rspec', '~> 4.7'
         | 
| 47 | 
            +
              spec.add_development_dependency 'rack', '~> 2.2'
         | 
| 48 | 
            +
              spec.add_development_dependency 'rack-test', '~> 2.0'
         | 
| 49 | 
            +
              spec.add_development_dependency 'railties', '>= 5.2'
         | 
| 50 | 
            +
              spec.add_development_dependency 'rake', '~> 13.0'
         | 
| 51 | 
            +
              spec.add_development_dependency 'rspec', '~> 3.12'
         | 
| 52 | 
            +
              spec.add_development_dependency 'rubocop', '~> 1.28'
         | 
| 53 | 
            +
              spec.add_development_dependency 'rubocop-rails', '~> 2.14'
         | 
| 54 | 
            +
              spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
         | 
| 55 | 
            +
              spec.add_development_dependency 'simplecov', '>= 0.22'
         | 
| 56 | 
            +
              spec.add_development_dependency 'timecop', '>= 0.9.6'
         | 
| 57 | 
            +
              spec.add_development_dependency 'vcr', '~> 6.0'
         | 
| 58 | 
            +
              spec.add_development_dependency 'webmock', '~> 3.18'
         | 
| 59 | 
            +
              spec.add_development_dependency 'yard', '>= 0.9.28'
         | 
| 60 | 
            +
              spec.add_development_dependency 'yard-activesupport-concern', '>= 0.0.1'
         | 
| 45 61 | 
             
            end
         | 
| @@ -102,10 +102,8 @@ module Grape | |
| 102 102 | 
             
                    # interface.
         | 
| 103 103 | 
             
                    #
         | 
| 104 104 | 
             
                    # @param env [Hash{String => Mixed}] the Rack environment
         | 
| 105 | 
            -
                    #
         | 
| 106 | 
            -
                    # rubocop:disable Metrics/AbcSize because thats the auth handling core
         | 
| 105 | 
            +
                    # because thats the auth handling core
         | 
| 107 106 | 
             
                    # :reek:TooManyStatements because reek counts exception
         | 
| 108 | 
            -
                    #                         handling as statements
         | 
| 109 107 | 
             
                    def call(env)
         | 
| 110 108 | 
             
                      # Unfortunately Grape's middleware stack orders the error
         | 
| 111 109 | 
             
                      # handling higher than the formatter. So when a error is
         | 
| @@ -139,7 +137,6 @@ module Grape | |
| 139 137 | 
             
                      # Call the user defined failed authentication handler.
         | 
| 140 138 | 
             
                      failed_handler.call(token, @app)
         | 
| 141 139 | 
             
                    end
         | 
| 142 | 
            -
                    # rubocop:enable Metrics/AbcSize
         | 
| 143 140 | 
             
                  end
         | 
| 144 141 | 
             
                end
         | 
| 145 142 | 
             
              end
         | 
| @@ -2,8 +2,26 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            module Grape
         | 
| 4 4 | 
             
              module Jwt
         | 
| 5 | 
            +
                # The gem version details.
         | 
| 5 6 | 
             
                module Authentication
         | 
| 6 | 
            -
                   | 
| 7 | 
            +
                  # The version of the +grape-jwt-authentication+ gem
         | 
| 8 | 
            +
                  VERSION = '2.1.0'
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  class << self
         | 
| 11 | 
            +
                    # Returns the version of gem as a string.
         | 
| 12 | 
            +
                    #
         | 
| 13 | 
            +
                    # @return [String] the gem version as string
         | 
| 14 | 
            +
                    def version
         | 
| 15 | 
            +
                      VERSION
         | 
| 16 | 
            +
                    end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    # Returns the version of the gem as a +Gem::Version+.
         | 
| 19 | 
            +
                    #
         | 
| 20 | 
            +
                    # @return [Gem::Version] the gem version as object
         | 
| 21 | 
            +
                    def gem_version
         | 
| 22 | 
            +
                      Gem::Version.new VERSION
         | 
| 23 | 
            +
                    end
         | 
| 24 | 
            +
                  end
         | 
| 7 25 | 
             
                end
         | 
| 8 26 | 
             
              end
         | 
| 9 27 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: grape-jwt-authentication
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0 | 
| 4 | 
            +
              version: 2.1.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Hermann Mayer
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-01-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 19 | 
            +
                    version: '5.2'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version:  | 
| 26 | 
            +
                    version: '5.2'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: grape
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -44,262 +44,306 @@ dependencies: | |
| 44 44 | 
             
                requirements:
         | 
| 45 45 | 
             
                - - ">="
         | 
| 46 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: '0'
         | 
| 47 | 
            +
                    version: '0.21'
         | 
| 48 48 | 
             
              type: :runtime
         | 
| 49 49 | 
             
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 52 | 
             
                - - ">="
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: '0'
         | 
| 54 | 
            +
                    version: '0.21'
         | 
| 55 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 56 | 
             
              name: jwt
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 58 | 
             
                requirements:
         | 
| 59 59 | 
             
                - - "~>"
         | 
| 60 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: '2. | 
| 61 | 
            +
                    version: '2.6'
         | 
| 62 62 | 
             
              type: :runtime
         | 
| 63 63 | 
             
              prerelease: false
         | 
| 64 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 65 | 
             
                requirements:
         | 
| 66 66 | 
             
                - - "~>"
         | 
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: '2. | 
| 68 | 
            +
                    version: '2.6'
         | 
| 69 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 70 | 
             
              name: keyless
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 72 | 
             
                requirements:
         | 
| 73 73 | 
             
                - - "~>"
         | 
| 74 74 | 
             
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            -
                    version: '1. | 
| 75 | 
            +
                    version: '1.1'
         | 
| 76 76 | 
             
              type: :runtime
         | 
| 77 77 | 
             
              prerelease: false
         | 
| 78 78 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 79 | 
             
                requirements:
         | 
| 80 80 | 
             
                - - "~>"
         | 
| 81 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            -
                    version: '1. | 
| 82 | 
            +
                    version: '1.1'
         | 
| 83 83 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 84 84 | 
             
              name: recursive-open-struct
         | 
| 85 85 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 86 | 
             
                requirements:
         | 
| 87 87 | 
             
                - - "~>"
         | 
| 88 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version: '1. | 
| 89 | 
            +
                    version: '1.1'
         | 
| 90 90 | 
             
              type: :runtime
         | 
| 91 91 | 
             
              prerelease: false
         | 
| 92 92 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 93 | 
             
                requirements:
         | 
| 94 94 | 
             
                - - "~>"
         | 
| 95 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            -
                    version: '1. | 
| 96 | 
            +
                    version: '1.1'
         | 
| 97 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 98 | 
            +
              name: appraisal
         | 
| 99 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 | 
            +
                requirements:
         | 
| 101 | 
            +
                - - "~>"
         | 
| 102 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            +
                    version: '2.4'
         | 
| 104 | 
            +
              type: :development
         | 
| 105 | 
            +
              prerelease: false
         | 
| 106 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 | 
            +
                requirements:
         | 
| 108 | 
            +
                - - "~>"
         | 
| 109 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            +
                    version: '2.4'
         | 
| 97 111 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 98 112 | 
             
              name: bundler
         | 
| 99 113 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 114 | 
             
                requirements:
         | 
| 101 | 
            -
                - - " | 
| 115 | 
            +
                - - "~>"
         | 
| 116 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 117 | 
            +
                    version: '2.3'
         | 
| 118 | 
            +
              type: :development
         | 
| 119 | 
            +
              prerelease: false
         | 
| 120 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 121 | 
            +
                requirements:
         | 
| 122 | 
            +
                - - "~>"
         | 
| 102 123 | 
             
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            -
                    version: ' | 
| 104 | 
            -
             | 
| 124 | 
            +
                    version: '2.3'
         | 
| 125 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 126 | 
            +
              name: countless
         | 
| 127 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 128 | 
            +
                requirements:
         | 
| 129 | 
            +
                - - "~>"
         | 
| 105 130 | 
             
                  - !ruby/object:Gem::Version
         | 
| 106 | 
            -
                    version: ' | 
| 131 | 
            +
                    version: '1.1'
         | 
| 107 132 | 
             
              type: :development
         | 
| 108 133 | 
             
              prerelease: false
         | 
| 109 134 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 110 135 | 
             
                requirements:
         | 
| 111 | 
            -
                - - " | 
| 136 | 
            +
                - - "~>"
         | 
| 112 137 | 
             
                  - !ruby/object:Gem::Version
         | 
| 113 | 
            -
                    version: '1. | 
| 114 | 
            -
             | 
| 138 | 
            +
                    version: '1.1'
         | 
| 139 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 140 | 
            +
              name: guard-rspec
         | 
| 141 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 142 | 
            +
                requirements:
         | 
| 143 | 
            +
                - - "~>"
         | 
| 115 144 | 
             
                  - !ruby/object:Gem::Version
         | 
| 116 | 
            -
                    version: ' | 
| 145 | 
            +
                    version: '4.7'
         | 
| 146 | 
            +
              type: :development
         | 
| 147 | 
            +
              prerelease: false
         | 
| 148 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 149 | 
            +
                requirements:
         | 
| 150 | 
            +
                - - "~>"
         | 
| 151 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 152 | 
            +
                    version: '4.7'
         | 
| 117 153 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 118 154 | 
             
              name: rack
         | 
| 119 155 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 120 156 | 
             
                requirements:
         | 
| 121 157 | 
             
                - - "~>"
         | 
| 122 158 | 
             
                  - !ruby/object:Gem::Version
         | 
| 123 | 
            -
                    version: '2. | 
| 159 | 
            +
                    version: '2.2'
         | 
| 124 160 | 
             
              type: :development
         | 
| 125 161 | 
             
              prerelease: false
         | 
| 126 162 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 127 163 | 
             
                requirements:
         | 
| 128 164 | 
             
                - - "~>"
         | 
| 129 165 | 
             
                  - !ruby/object:Gem::Version
         | 
| 130 | 
            -
                    version: '2. | 
| 166 | 
            +
                    version: '2.2'
         | 
| 131 167 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 132 168 | 
             
              name: rack-test
         | 
| 133 169 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 134 170 | 
             
                requirements:
         | 
| 135 171 | 
             
                - - "~>"
         | 
| 136 172 | 
             
                  - !ruby/object:Gem::Version
         | 
| 137 | 
            -
                    version: 0 | 
| 173 | 
            +
                    version: '2.0'
         | 
| 138 174 | 
             
              type: :development
         | 
| 139 175 | 
             
              prerelease: false
         | 
| 140 176 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 141 177 | 
             
                requirements:
         | 
| 142 178 | 
             
                - - "~>"
         | 
| 143 179 | 
             
                  - !ruby/object:Gem::Version
         | 
| 144 | 
            -
                    version: 0 | 
| 180 | 
            +
                    version: '2.0'
         | 
| 145 181 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 146 182 | 
             
              name: railties
         | 
| 147 183 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 148 184 | 
             
                requirements:
         | 
| 149 185 | 
             
                - - ">="
         | 
| 150 186 | 
             
                  - !ruby/object:Gem::Version
         | 
| 151 | 
            -
                    version:  | 
| 152 | 
            -
                - - "<"
         | 
| 153 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 154 | 
            -
                    version: '6.1'
         | 
| 187 | 
            +
                    version: '5.2'
         | 
| 155 188 | 
             
              type: :development
         | 
| 156 189 | 
             
              prerelease: false
         | 
| 157 190 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 158 191 | 
             
                requirements:
         | 
| 159 192 | 
             
                - - ">="
         | 
| 160 193 | 
             
                  - !ruby/object:Gem::Version
         | 
| 161 | 
            -
                    version:  | 
| 162 | 
            -
                - - "<"
         | 
| 163 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 164 | 
            -
                    version: '6.1'
         | 
| 194 | 
            +
                    version: '5.2'
         | 
| 165 195 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 166 196 | 
             
              name: rake
         | 
| 167 197 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 168 198 | 
             
                requirements:
         | 
| 169 199 | 
             
                - - "~>"
         | 
| 170 200 | 
             
                  - !ruby/object:Gem::Version
         | 
| 171 | 
            -
                    version: ' | 
| 201 | 
            +
                    version: '13.0'
         | 
| 172 202 | 
             
              type: :development
         | 
| 173 203 | 
             
              prerelease: false
         | 
| 174 204 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 175 205 | 
             
                requirements:
         | 
| 176 206 | 
             
                - - "~>"
         | 
| 177 207 | 
             
                  - !ruby/object:Gem::Version
         | 
| 178 | 
            -
                    version: ' | 
| 208 | 
            +
                    version: '13.0'
         | 
| 179 209 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 180 210 | 
             
              name: rspec
         | 
| 181 211 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 182 212 | 
             
                requirements:
         | 
| 183 213 | 
             
                - - "~>"
         | 
| 184 214 | 
             
                  - !ruby/object:Gem::Version
         | 
| 185 | 
            -
                    version: '3. | 
| 215 | 
            +
                    version: '3.12'
         | 
| 186 216 | 
             
              type: :development
         | 
| 187 217 | 
             
              prerelease: false
         | 
| 188 218 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 189 219 | 
             
                requirements:
         | 
| 190 220 | 
             
                - - "~>"
         | 
| 191 221 | 
             
                  - !ruby/object:Gem::Version
         | 
| 192 | 
            -
                    version: '3. | 
| 222 | 
            +
                    version: '3.12'
         | 
| 193 223 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 194 224 | 
             
              name: rubocop
         | 
| 195 225 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 196 226 | 
             
                requirements:
         | 
| 197 227 | 
             
                - - "~>"
         | 
| 198 228 | 
             
                  - !ruby/object:Gem::Version
         | 
| 199 | 
            -
                    version:  | 
| 229 | 
            +
                    version: '1.28'
         | 
| 200 230 | 
             
              type: :development
         | 
| 201 231 | 
             
              prerelease: false
         | 
| 202 232 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 203 233 | 
             
                requirements:
         | 
| 204 234 | 
             
                - - "~>"
         | 
| 205 235 | 
             
                  - !ruby/object:Gem::Version
         | 
| 206 | 
            -
                    version:  | 
| 236 | 
            +
                    version: '1.28'
         | 
| 237 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 238 | 
            +
              name: rubocop-rails
         | 
| 239 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 240 | 
            +
                requirements:
         | 
| 241 | 
            +
                - - "~>"
         | 
| 242 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 243 | 
            +
                    version: '2.14'
         | 
| 244 | 
            +
              type: :development
         | 
| 245 | 
            +
              prerelease: false
         | 
| 246 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 247 | 
            +
                requirements:
         | 
| 248 | 
            +
                - - "~>"
         | 
| 249 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 250 | 
            +
                    version: '2.14'
         | 
| 207 251 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 208 252 | 
             
              name: rubocop-rspec
         | 
| 209 253 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 210 254 | 
             
                requirements:
         | 
| 211 255 | 
             
                - - "~>"
         | 
| 212 256 | 
             
                  - !ruby/object:Gem::Version
         | 
| 213 | 
            -
                    version: ' | 
| 257 | 
            +
                    version: '2.10'
         | 
| 214 258 | 
             
              type: :development
         | 
| 215 259 | 
             
              prerelease: false
         | 
| 216 260 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 217 261 | 
             
                requirements:
         | 
| 218 262 | 
             
                - - "~>"
         | 
| 219 263 | 
             
                  - !ruby/object:Gem::Version
         | 
| 220 | 
            -
                    version: ' | 
| 264 | 
            +
                    version: '2.10'
         | 
| 221 265 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 222 266 | 
             
              name: simplecov
         | 
| 223 267 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 224 268 | 
             
                requirements:
         | 
| 225 | 
            -
                - - " | 
| 269 | 
            +
                - - ">="
         | 
| 226 270 | 
             
                  - !ruby/object:Gem::Version
         | 
| 227 | 
            -
                    version: '0. | 
| 271 | 
            +
                    version: '0.22'
         | 
| 228 272 | 
             
              type: :development
         | 
| 229 273 | 
             
              prerelease: false
         | 
| 230 274 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 231 275 | 
             
                requirements:
         | 
| 232 | 
            -
                - - " | 
| 276 | 
            +
                - - ">="
         | 
| 233 277 | 
             
                  - !ruby/object:Gem::Version
         | 
| 234 | 
            -
                    version: '0. | 
| 278 | 
            +
                    version: '0.22'
         | 
| 235 279 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 236 280 | 
             
              name: timecop
         | 
| 237 281 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 238 282 | 
             
                requirements:
         | 
| 239 | 
            -
                - - " | 
| 283 | 
            +
                - - ">="
         | 
| 240 284 | 
             
                  - !ruby/object:Gem::Version
         | 
| 241 | 
            -
                    version: 0.9. | 
| 285 | 
            +
                    version: 0.9.6
         | 
| 242 286 | 
             
              type: :development
         | 
| 243 287 | 
             
              prerelease: false
         | 
| 244 288 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 245 289 | 
             
                requirements:
         | 
| 246 | 
            -
                - - " | 
| 290 | 
            +
                - - ">="
         | 
| 247 291 | 
             
                  - !ruby/object:Gem::Version
         | 
| 248 | 
            -
                    version: 0.9. | 
| 292 | 
            +
                    version: 0.9.6
         | 
| 249 293 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 250 294 | 
             
              name: vcr
         | 
| 251 295 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 252 296 | 
             
                requirements:
         | 
| 253 297 | 
             
                - - "~>"
         | 
| 254 298 | 
             
                  - !ruby/object:Gem::Version
         | 
| 255 | 
            -
                    version: ' | 
| 299 | 
            +
                    version: '6.0'
         | 
| 256 300 | 
             
              type: :development
         | 
| 257 301 | 
             
              prerelease: false
         | 
| 258 302 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 259 303 | 
             
                requirements:
         | 
| 260 304 | 
             
                - - "~>"
         | 
| 261 305 | 
             
                  - !ruby/object:Gem::Version
         | 
| 262 | 
            -
                    version: ' | 
| 306 | 
            +
                    version: '6.0'
         | 
| 263 307 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 264 308 | 
             
              name: webmock
         | 
| 265 309 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 266 310 | 
             
                requirements:
         | 
| 267 311 | 
             
                - - "~>"
         | 
| 268 312 | 
             
                  - !ruby/object:Gem::Version
         | 
| 269 | 
            -
                    version: '3. | 
| 313 | 
            +
                    version: '3.18'
         | 
| 270 314 | 
             
              type: :development
         | 
| 271 315 | 
             
              prerelease: false
         | 
| 272 316 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 273 317 | 
             
                requirements:
         | 
| 274 318 | 
             
                - - "~>"
         | 
| 275 319 | 
             
                  - !ruby/object:Gem::Version
         | 
| 276 | 
            -
                    version: '3. | 
| 320 | 
            +
                    version: '3.18'
         | 
| 277 321 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 278 322 | 
             
              name: yard
         | 
| 279 323 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 280 324 | 
             
                requirements:
         | 
| 281 | 
            -
                - - " | 
| 325 | 
            +
                - - ">="
         | 
| 282 326 | 
             
                  - !ruby/object:Gem::Version
         | 
| 283 | 
            -
                    version: 0.9. | 
| 327 | 
            +
                    version: 0.9.28
         | 
| 284 328 | 
             
              type: :development
         | 
| 285 329 | 
             
              prerelease: false
         | 
| 286 330 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 287 331 | 
             
                requirements:
         | 
| 288 | 
            -
                - - " | 
| 332 | 
            +
                - - ">="
         | 
| 289 333 | 
             
                  - !ruby/object:Gem::Version
         | 
| 290 | 
            -
                    version: 0.9. | 
| 334 | 
            +
                    version: 0.9.28
         | 
| 291 335 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 292 336 | 
             
              name: yard-activesupport-concern
         | 
| 293 337 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 294 338 | 
             
                requirements:
         | 
| 295 | 
            -
                - - " | 
| 339 | 
            +
                - - ">="
         | 
| 296 340 | 
             
                  - !ruby/object:Gem::Version
         | 
| 297 341 | 
             
                    version: 0.0.1
         | 
| 298 342 | 
             
              type: :development
         | 
| 299 343 | 
             
              prerelease: false
         | 
| 300 344 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 301 345 | 
             
                requirements:
         | 
| 302 | 
            -
                - - " | 
| 346 | 
            +
                - - ">="
         | 
| 303 347 | 
             
                  - !ruby/object:Gem::Version
         | 
| 304 348 | 
             
                    version: 0.0.1
         | 
| 305 349 | 
             
            description: A reusable Grape JWT authentication concern
         | 
| @@ -317,10 +361,12 @@ files: | |
| 317 361 | 
             
            - ".rubocop.yml"
         | 
| 318 362 | 
             
            - ".simplecov"
         | 
| 319 363 | 
             
            - ".yardopts"
         | 
| 364 | 
            +
            - Appraisals
         | 
| 320 365 | 
             
            - CHANGELOG.md
         | 
| 321 366 | 
             
            - Dockerfile
         | 
| 322 367 | 
             
            - Envfile
         | 
| 323 368 | 
             
            - Gemfile
         | 
| 369 | 
            +
            - Guardfile
         | 
| 324 370 | 
             
            - LICENSE
         | 
| 325 371 | 
             
            - Makefile
         | 
| 326 372 | 
             
            - README.md
         | 
| @@ -332,15 +378,22 @@ files: | |
| 332 378 | 
             
            - config/docker/.inputrc
         | 
| 333 379 | 
             
            - doc/assets/project.svg
         | 
| 334 380 | 
             
            - docker-compose.yml
         | 
| 381 | 
            +
            - gemfiles/rails_5.2.gemfile
         | 
| 335 382 | 
             
            - grape-jwt-authentication.gemspec
         | 
| 336 383 | 
             
            - lib/grape/jwt/authentication.rb
         | 
| 337 384 | 
             
            - lib/grape/jwt/authentication/configuration.rb
         | 
| 338 385 | 
             
            - lib/grape/jwt/authentication/dependencies.rb
         | 
| 339 386 | 
             
            - lib/grape/jwt/authentication/jwt_handler.rb
         | 
| 340 387 | 
             
            - lib/grape/jwt/authentication/version.rb
         | 
| 341 | 
            -
            homepage: | 
| 342 | 
            -
            licenses: | 
| 343 | 
            -
             | 
| 388 | 
            +
            homepage:
         | 
| 389 | 
            +
            licenses:
         | 
| 390 | 
            +
            - MIT
         | 
| 391 | 
            +
            metadata:
         | 
| 392 | 
            +
              homepage_uri: https://github.com/hausgold/grape-jwt-authentication
         | 
| 393 | 
            +
              source_code_uri: https://github.com/hausgold/grape-jwt-authentication
         | 
| 394 | 
            +
              changelog_uri: https://github.com/hausgold/grape-jwt-authentication/blob/master/CHANGELOG.md
         | 
| 395 | 
            +
              bug_tracker_uri: https://github.com/hausgold/grape-jwt-authentication/issues
         | 
| 396 | 
            +
              documentation_uri: https://www.rubydoc.info/gems/grape-jwt-authentication
         | 
| 344 397 | 
             
            post_install_message:
         | 
| 345 398 | 
             
            rdoc_options: []
         | 
| 346 399 | 
             
            require_paths:
         | 
| @@ -349,14 +402,14 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 349 402 | 
             
              requirements:
         | 
| 350 403 | 
             
              - - ">="
         | 
| 351 404 | 
             
                - !ruby/object:Gem::Version
         | 
| 352 | 
            -
                  version: ' | 
| 405 | 
            +
                  version: '2.5'
         | 
| 353 406 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 354 407 | 
             
              requirements:
         | 
| 355 408 | 
             
              - - ">="
         | 
| 356 409 | 
             
                - !ruby/object:Gem::Version
         | 
| 357 410 | 
             
                  version: '0'
         | 
| 358 411 | 
             
            requirements: []
         | 
| 359 | 
            -
            rubygems_version: 3. | 
| 412 | 
            +
            rubygems_version: 3.3.8
         | 
| 360 413 | 
             
            signing_key:
         | 
| 361 414 | 
             
            specification_version: 4
         | 
| 362 415 | 
             
            summary: A reusable Grape JWT authentication concern
         |