random-rails 1.0.3 → 1.0.4

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: bb6231f4307cc09e1807ac95198a0c16ea186cd1b82386b572fb3e6d6e8d6a80
4
- data.tar.gz: da296f310d4bbcb76f141d2e2641aeb9227e2a566f66245a3fecc7a419f6e055
3
+ metadata.gz: 8476fa987466053c3b50f4c4fe306756c3c660ce43f5551c5f831423b4c25e42
4
+ data.tar.gz: 26a3c31572e1d962d465c591e4b88b3971f2ce0cad375ed85ee6c99b86fb92aa
5
5
  SHA512:
6
- metadata.gz: fb108e18e97aefd8edceb1c8a012f7f9f1c1d92a467eb9e5428395c2ddc6842e5fd1e481e0ea224564946da5b877fc6b2a6e1db7ffdeb67e8ef8dd088ed14839
7
- data.tar.gz: cb41d83806c9860331fe93afa5f885fe0967ac1f6560c4aeb8f0855c69183a703e9f04ec9e3c4232e0f83b37bae09340cbb48e5424e07ffec5c80cedb1d79007
6
+ metadata.gz: 71d4340bc71598c274ca8aea8cff875614750acca0c43c742bc4e8dded44634bb5a75ddef9ad5870cea0d9cdddd97731d22fcd78a7688834c3f6fbe1d005be35
7
+ data.tar.gz: 1d06cfcbaac8d6dba749706a58dec7a3afebd6674fdb5dccbacf25a98683721b208636170430b3888b852252656be5b101bdfa9d0daa744f434cd52282300596
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.4] - 2026-02-26
2
+
3
+ ### Maintenance Release - Removed versions lock for rails 8.1 and higher
4
+
5
+ - Removed lock on rails 8.0 and lower for `activerecord`, now it's available for all versions of rails
6
+ - Removed lock on rails 8.0 and lower for activesupport, now it's available for all versions of rails
7
+
1
8
  ## [1.0.3] - 2025-10-07
2
9
 
3
10
  ### Maintenance Release - RuboCop & Dependency Updates
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- random-rails (1.0.3)
5
- activerecord (>= 4.0, < 8.1)
6
- activesupport (>= 6.1.5, < 8.1)
4
+ random-rails (1.0.4)
5
+ activerecord (>= 4.0)
6
+ activesupport (>= 6.1.5)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  [![lint](https://github.com/the-rubies-way/random-rails/actions/workflows/linter.yml/badge.svg)](https://github.com/the-rubies-way/random-rails/actions/workflows/linter.yml)
2
2
  [![test](https://github.com/the-rubies-way/random-rails/actions/workflows/test.yml/badge.svg)](https://github.com/the-rubies-way/random-rails/actions/workflows/test.yml)
3
- [![Listed on OpenSource-Heroes.com](https://opensource-heroes.com/badge-v1.svg)](https://opensource-heroes.com/r/the-rubies-way/random-rails)
3
+ [![Gem Version](https://img.shields.io/gem/v/random-rails)](https://rubygems.org/gems/random-rails)
4
4
 
5
+ <p align="center">
6
+ <img width="600" height="600" alt="Image Oct 9, 2025, 04_30_33" src="https://github.com/user-attachments/assets/cc522bff-2de6-41f3-b458-83867bf70b26" />
7
+ </p>
8
+
5
9
  # RandomRails
6
10
 
7
11
  🚀 The most performant way to get random records from ActiveRecord. Supports **PostgreSQL**, **MySQL**, and **SQLite** with intelligent strategy selection to replace slow `ORDER BY RANDOM()` queries.
@@ -26,6 +30,9 @@ Real-world benchmark results comparing RandomRails with traditional methods (10
26
30
  | 100,000 users | 31.578s | **3.6968s** | 369.4334s | **8.54x faster** |
27
31
  | 1,000,000 users | 171.497s | **5.3441s** | 373.6102s | **32.09x faster** |
28
32
 
33
+ <img width="1968" height="1180" alt="image" src="https://github.com/user-attachments/assets/3c395cfd-d28f-45d1-92f2-872075552782" />
34
+
35
+
29
36
  **Key Takeaways:**
30
37
 
31
38
  - RandomRails consistently outperforms `ORDER BY RANDOM()` by 2-32x
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RandomRails
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.4"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - loqimean
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 2025-10-07 00:00:00.000000000 Z
11
+ date: 2026-02-26 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: activerecord
@@ -16,9 +17,6 @@ dependencies:
16
17
  - - ">="
17
18
  - !ruby/object:Gem::Version
18
19
  version: '4.0'
19
- - - "<"
20
- - !ruby/object:Gem::Version
21
- version: '8.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,9 +24,6 @@ dependencies:
26
24
  - - ">="
27
25
  - !ruby/object:Gem::Version
28
26
  version: '4.0'
29
- - - "<"
30
- - !ruby/object:Gem::Version
31
- version: '8.1'
32
27
  - !ruby/object:Gem::Dependency
33
28
  name: activesupport
34
29
  requirement: !ruby/object:Gem::Requirement
@@ -36,9 +31,6 @@ dependencies:
36
31
  - - ">="
37
32
  - !ruby/object:Gem::Version
38
33
  version: 6.1.5
39
- - - "<"
40
- - !ruby/object:Gem::Version
41
- version: '8.1'
42
34
  type: :runtime
43
35
  prerelease: false
44
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -46,9 +38,6 @@ dependencies:
46
38
  - - ">="
47
39
  - !ruby/object:Gem::Version
48
40
  version: 6.1.5
49
- - - "<"
50
- - !ruby/object:Gem::Version
51
- version: '8.1'
52
41
  - !ruby/object:Gem::Dependency
53
42
  name: rspec
54
43
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +259,6 @@ files:
270
259
  - lib/random-rails/adapters/active_record/base.rb
271
260
  - lib/random-rails/configuration.rb
272
261
  - lib/random-rails/version.rb
273
- - random-rails.gemspec
274
262
  - sig/random-rails/random.rbs
275
263
  homepage: https://github.com/the-rubies-way/random-rails
276
264
  licenses:
@@ -304,7 +292,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
292
  - !ruby/object:Gem::Version
305
293
  version: '0'
306
294
  requirements: []
307
- rubygems_version: 3.6.2
295
+ rubygems_version: 3.5.16
296
+ signing_key:
308
297
  specification_version: 4
309
298
  summary: Awesome gem to get random records from database.
310
299
  test_files: []
data/random-rails.gemspec DELETED
@@ -1,65 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $:.push File.expand_path("../lib", __FILE__)
4
- require "random-rails/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "random-rails"
8
- spec.version = RandomRails::VERSION
9
- spec.authors = ["loqimean"]
10
- spec.email = ["vanuha277@gmail.com"]
11
-
12
- spec.summary = "Awesome gem to get random records from database."
13
- spec.description = "The easiest way to get random records from database with best performance that you ever seen."
14
- spec.homepage = "https://github.com/the-rubies-way/random-rails"
15
- spec.license = "MIT"
16
- spec.required_ruby_version = ">= 2.6.0"
17
-
18
- spec.metadata["source_code_uri"] = spec.homepage
19
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(__dir__) do
24
- `git ls-files -z`.split("\x0").reject do |f|
25
- (File.expand_path(f) == __FILE__) || f.start_with?("bin/", "test/", "spec/", "features/", ".git", ".circleci", "appveyor")
26
- end
27
- end
28
- spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- # **********************************
33
- # * Dependencies
34
- spec.add_runtime_dependency "activerecord", ">= 4.0", "< 8.1"
35
- spec.add_runtime_dependency "activesupport", ">= 6.1.5", "< 8.1"
36
-
37
- spec.add_development_dependency "rspec", "~> 3.0"
38
- spec.add_development_dependency "rubocop-rspec", "~> 3.0.0"
39
- spec.add_development_dependency "standard", "~> 1.37.0"
40
- spec.add_development_dependency "rubocop", "~> 1.64.0"
41
- spec.add_development_dependency "rubocop-performance", "~> 1.21.0"
42
- spec.add_development_dependency "standard-performance", "~> 1.4.0"
43
- spec.add_development_dependency "simplecov", "~> 0.22.0"
44
- spec.add_development_dependency "pry", "~> 0.14.2"
45
- spec.add_development_dependency "sqlite3", "~> 1.6"
46
- spec.add_development_dependency "pg", "~> 1.5"
47
- spec.add_development_dependency "mysql2", "~> 0.5.5"
48
- spec.add_development_dependency "faker", "~> 3.2"
49
- spec.add_development_dependency "mutex_m"
50
- spec.add_development_dependency "bigdecimal"
51
-
52
- spec.post_install_message = <<~MSG
53
-
54
- ===================================================================
55
- Thanks for installing random-rails!
56
-
57
- => For usage examples and documentation, please visit:
58
- https://github.com/the-rubies-way/random-rails#examples
59
-
60
- => If you find this gem useful, please consider starring the repository:
61
- https://github.com/the-rubies-way/random-rails
62
- ===================================================================
63
-
64
- MSG
65
- end