seshlock 0.1.1 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc115787fdab26fce54d38f2c53cc45a8f057ee6c4500351b4d3b5ae8a90668e
4
- data.tar.gz: 9503ac6f8495456f901b024a33b8d76012214691642a5bdd9f634edb015856ee
3
+ metadata.gz: 888677e8feac4f482b962fec3b3bc00eeb76437215c0f92a144a2611a756bd03
4
+ data.tar.gz: 9049df875f10c6c8fb2149474044bd2743df708aa5b3027c49739c0e439762a4
5
5
  SHA512:
6
- metadata.gz: 9f25d79a04f799ee8b3d1855cc8b5db82589a65eddfe3275e235583f48545c1083f2a07aac613c35b80bb521bfaa7a5412db830661faaa94ece8bb8426108c63
7
- data.tar.gz: f1f1a957cdc8b93bf610c1253dbc7a700ea7b59c15f3c7c4ab67a3b112b0af45bd117b00345d18e66904964fba2e8d7cbdde044398f54964fa9e763af0de2470
6
+ metadata.gz: 78af9afbb32544e5af17bf955fa6a1bcf0175d76c387c3fac7f13e5018069bc0e16e2b2776970bf276ac11b81b22b5948ec342a1ba31bb859991e6ad987aba1f
7
+ data.tar.gz: 8c0b70f7c8476d2b54e80de4e03a02cd29d65f38ccf461a3e1a12105e33349950e742c9f37def6b49c8156582082bc9ef792570832e7b47b93dd713ee1adf01d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.2] - 2025-12-11
9
+
10
+ ### Fixed
11
+
12
+ - Explicit table name configuration for token models to match migrations (`seshlock_access_tokens`, `seshlock_refresh_tokens`).
13
+ - Fix `has_many :access_tokens` association to reference `Seshlock::AccessToken` (class_name), preventing missing table/class lookup errors.
14
+
8
15
  ## [0.1.1] - 2025-12-11
9
16
 
10
17
  ### Changed
@@ -2,11 +2,13 @@
2
2
  require "active_record"
3
3
 
4
4
  class Seshlock::AccessToken < ActiveRecord::Base
5
+ self.table_name = "seshlock_access_tokens"
5
6
  # Validations
6
7
  validates :token_digest, presence: true, uniqueness: true
7
8
 
8
9
  # Associations
9
10
  belongs_to :refresh_token, class_name: "Seshlock::RefreshToken", inverse_of: :access_tokens
11
+ has_one :user, through: :refresh_token
10
12
 
11
13
  # Scopes
12
14
  scope :not_expired, -> { where("expires_at > ?", Time.current) }
@@ -2,12 +2,13 @@
2
2
  require "active_record"
3
3
 
4
4
  class Seshlock::RefreshToken < ActiveRecord::Base
5
+ self.table_name = "seshlock_refresh_tokens"
5
6
  # Validations
6
7
  validates :token_digest, uniqueness: true, presence: true
7
8
 
8
9
  # Associations
9
10
  belongs_to :user, class_name: "User", inverse_of: :seshlock_refresh_tokens
10
- has_many :access_tokens, dependent: :destroy, inverse_of: :refresh_token
11
+ has_many :access_tokens, class_name: "Seshlock::AccessToken", dependent: :destroy, inverse_of: :refresh_token
11
12
 
12
13
  # Scopes
13
14
  scope :not_expired, -> { where("expires_at > ?", Time.current) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seshlock
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seshlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Inoa