Skip to content

Commit

Permalink
fix: use Passage::VERSION instead of parsing gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekStride committed Nov 27, 2023
1 parent 3bd08db commit 331126a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/passageidentity/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require_relative "auth"
require_relative "user_api"
require_relative "error"
require_relative "version"
require "rubygems"

module Passage
Expand Down Expand Up @@ -96,9 +97,7 @@ def initialize(app_id:, api_key: "", auth_strategy: COOKIE_STRATEGY)
end

def get_connection
gemspec = File.join(__dir__, "../../passageidentity.gemspec")
spec = Gem::Specification.load(gemspec)
headers = { "Passage-Version" => "passage-ruby #{spec.version}" }
headers = { "Passage-Version" => "passage-ruby #{Passage::VERSION}" }
headers["Authorization"] = "Bearer #{@api_key}" if @api_key != ""

@connection =
Expand Down
5 changes: 5 additions & 0 deletions lib/passageidentity/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module Passage
VERSION = '0.2.4'
end
4 changes: 3 additions & 1 deletion passageidentity.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require_relative 'lib/passageidentity/version'

Gem::Specification.new do |s|
s.name = 'passageidentity'
s.version = '0.2.3'
s.version = Passage::VERSION
s.summary = 'Passage SDK for biometric authentication'
s.description =
'Enables verification of server-side authentication and user management for applications using Passage'
Expand Down

0 comments on commit 331126a

Please sign in to comment.