fast_exists 1.0.1 → 1.0.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: 92206292b99de9c861690f2a0b05a5f792e99a4fd7ee39782aaf9dac31b0e259
4
- data.tar.gz: 4d04cbb11a3fa180e209e54ea843bfd1116bfe878bd5335e747a53653282f055
3
+ metadata.gz: 840f9908c74f299c03604a5315216b3cf7989df4ee8d36c3a4c882fe15e80746
4
+ data.tar.gz: ed3cf8169f01be4892df5c488232c94328aeed83296680ff1ec524e7758dd65f
5
5
  SHA512:
6
- metadata.gz: 9f1a49cfb24291eeba45ba7df69d013f7b42f07085b8a74e72e169fbda6d370d8f87391c5e38e2c1897964ebe40b89fe6b948b63080c224980f276ae034610fa
7
- data.tar.gz: ee5d17c5afde5b9b6c56e4e7af2238cc3f4874b0b933ff03b951794cc0c770fb483d32f8d05219b872138f2c2fd170941f91562385bc23f2cb0cc70fd1dbb00a
6
+ metadata.gz: b335f6b7675f78ccefdca3ab1456b50808a01bcbfae31501affe6572fe41d3ef0199de4a12ef55e955ba0b2595a86b172f1e2c3306585fd5d9fcc89e2d3a3c44
7
+ data.tar.gz: 9a6c90ff0c7abf9e614c3a658f4db46d483881d2cf0fa954280290b03ed153c00751879f89cbc811713f42a0af6d499df6626147db85e90e51dfb2afaade864d
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > **Ultra-Fast Existence Checks in Ruby on Rails Using Probabilistic Data Structures**
4
4
 
5
5
  [![CI](https://github.com/nirazan1/fast_exists/actions/workflows/ci.yml/badge.svg)](https://github.com/nirazan1/fast_exists/actions)
6
- [![Gem Version](https://img.shields.io/badge/version-v1.0.0-blue.svg)](https://github.com/nirazan1/fast_exists/releases)
6
+ [![Gem Version](https://img.shields.io/badge/version-v1.0.3-blue.svg)](https://github.com/nirazan1/fast_exists/releases)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
 
9
9
  **FastExists** is a production-ready Ruby gem that drastically reduces unnecessary database queries in Ruby on Rails applications by evaluating existence checks against ultra-fast, thread-safe probabilistic data structures (Bloom Filters, Scalable Bloom Filters, Cuckoo Filters, HyperLogLog) while **keeping the database as the single source of truth**.
@@ -42,14 +42,14 @@ High-volume Rails applications handle millions or billions of existence checks w
42
42
 
43
43
  ## 📦 Installation
44
44
 
45
- Add `fast_exists` (latest version **v1.0.0**) to your Gemfile:
45
+ Add `fast_exists` (latest version **v1.0.3**) to your Gemfile:
46
46
 
47
47
  ```ruby
48
48
  # From RubyGems
49
- gem "fast_exists", "~> 1.0.0"
49
+ gem "fast_exists", "~> 1.0.3"
50
50
 
51
51
  # Or directly from GitHub repository
52
- gem "fast_exists", git: "https://github.com/nirazan1/fast_exists.git", tag: "v1.0.0"
52
+ gem "fast_exists", git: "https://github.com/nirazan1/fast_exists.git", tag: "v1.0.3"
53
53
  ```
54
54
 
55
55
  Then run:
@@ -36,12 +36,12 @@ module FastExists
36
36
  private
37
37
 
38
38
  def determine_models(target, models)
39
- if target.is_a?(Class) && target < ActiveRecord::Base
39
+ if target.is_a?(Class) && defined?(::ActiveRecord::Base) && target < ::ActiveRecord::Base
40
40
  [target]
41
41
  elsif models.is_a?(Array)
42
42
  models.compact
43
- elsif defined?(ActiveRecord::Base)
44
- ActiveRecord::Base.descendants.reject(&:abstract_class?)
43
+ elsif defined?(::ActiveRecord::Base)
44
+ ::ActiveRecord::Base.descendants.reject(&:abstract_class?)
45
45
  else
46
46
  []
47
47
  end
@@ -127,7 +127,7 @@ module FastExists
127
127
  {
128
128
  ruby_version: RUBY_VERSION,
129
129
  rails_version: defined?(Rails) && Rails.respond_to?(:version) ? Rails.version : "N/A",
130
- database: defined?(ActiveRecord::Base) ? (ActiveRecord::Base.connection_db_config.adapter rescue "sqlite3") : "N/A"
130
+ database: defined?(::ActiveRecord::Base) ? (::ActiveRecord::Base.connection_db_config.adapter rescue "sqlite3") : "N/A"
131
131
  }
132
132
  end
133
133
  end
@@ -11,8 +11,8 @@ module FastExists
11
11
  findings = []
12
12
 
13
13
  # 1. Inspect ActiveRecord Models & Indexes
14
- if defined?(ActiveRecord::Base)
15
- ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |klass|
14
+ if defined?(::ActiveRecord::Base)
15
+ ::ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |klass|
16
16
  next unless klass.respond_to?(:table_exists?) && klass.table_exists?
17
17
  inspect_model(klass, findings)
18
18
  end
@@ -45,7 +45,7 @@ module FastExists
45
45
  ruby_version: RUBY_VERSION,
46
46
  ruby_platform: RUBY_PLATFORM,
47
47
  rails_version: defined?(Rails) && Rails.respond_to?(:version) ? Rails.version : "N/A",
48
- database_adapter: defined?(ActiveRecord::Base) ? (ActiveRecord::Base.connection_db_config.adapter rescue "sqlite3") : "N/A",
48
+ database_adapter: defined?(::ActiveRecord::Base) ? (::ActiveRecord::Base.connection_db_config.adapter rescue "sqlite3") : "N/A",
49
49
  backend: FastExists.configuration.backend.to_s,
50
50
  auto_sync: FastExists.configuration.auto_sync,
51
51
  instrumentation: FastExists.configuration.instrumentation,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastExists
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_exists
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - FastExists Team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-07-29 00:00:00.000000000 Z
10
+ date: 2026-07-30 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport