hightop 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/hightop/enumerable.rb +1 -1
- data/lib/hightop/version.rb +1 -1
- data/lib/hightop.rb +5 -5
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5cecd8f175eb80cd97c4aa38d38113de436b2c437bd60d97a72585b994fea97
|
4
|
+
data.tar.gz: 16272ba486c5ecafd05e26b211ba373f0446173bbc26a32d2644b4d069d1ea79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c7b2abd51dc28b295fd7d039d1127e7d2a4e855f5204564c0f0bd54c1522b9d707429f56214a3a457e3c0d0e3bcfa6046122e53356fb4d24679935dfa0cb856
|
7
|
+
data.tar.gz: 4e33403bb495306b78ebe1d5ea97d15defd6e3952dcc97e346ad6e45a933795577cb4dde81fe01e1b73fa2c41da3cb3f6735972638b8b6011b019275ad9b5f36
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
## 0.4.0 (2023-07-02)
|
2
|
+
|
3
|
+
- Dropped support for Active Record < 6.1 and Ruby < 3
|
4
|
+
- Dropped support for Mongoid < 7
|
5
|
+
|
1
6
|
## 0.3.0 (2021-08-12)
|
2
7
|
|
3
8
|
- Raise `ActiveRecord::UnknownAttributeReference` for non-attribute arguments
|
4
|
-
- Raise `ArgumentError` for too many arguments with
|
9
|
+
- Raise `ArgumentError` for too many arguments with arrays and hashes
|
5
10
|
- Removed `uniq` option (use `distinct` instead)
|
6
11
|
- Dropped support for Active Record < 5.2 and Ruby < 2.6
|
7
12
|
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
data/lib/hightop/enumerable.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Enumerable
|
2
2
|
def top(*args, **options, &block)
|
3
3
|
if block || !(respond_to?(:scoping) || respond_to?(:with_scope))
|
4
|
-
raise ArgumentError, "wrong number of arguments (given
|
4
|
+
raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 0..1)" if args.size > 1
|
5
5
|
|
6
6
|
limit = args[0]
|
7
7
|
min = options[:min]
|
data/lib/hightop/version.rb
CHANGED
data/lib/hightop.rb
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
require "active_support"
|
3
3
|
|
4
4
|
# modules
|
5
|
-
|
6
|
-
|
5
|
+
require_relative "hightop/enumerable"
|
6
|
+
require_relative "hightop/version"
|
7
7
|
|
8
8
|
ActiveSupport.on_load(:active_record) do
|
9
|
-
|
10
|
-
|
9
|
+
require_relative "hightop/utils"
|
10
|
+
require_relative "hightop/kicks"
|
11
11
|
extend Hightop::Kicks
|
12
12
|
end
|
13
13
|
|
14
14
|
ActiveSupport.on_load(:mongoid) do
|
15
|
-
|
15
|
+
require_relative "hightop/mongoid"
|
16
16
|
Mongoid::Document::ClassMethods.include(Hightop::Mongoid)
|
17
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hightop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-02 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: '6.1'
|
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: '6.1'
|
27
27
|
description:
|
28
28
|
email: andrew@ankane.org
|
29
29
|
executables: []
|
@@ -51,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3'
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.4.10
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: A nice shortcut for group count queries
|