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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee918ba56e73e37d1c623e99f4bf2971f1f99a82a369582eaf78144951dab192
4
- data.tar.gz: c626b6953aae5d3e43e00291b5fba24d8326d133f5aba945ab58f59f4defcb65
3
+ metadata.gz: f5cecd8f175eb80cd97c4aa38d38113de436b2c437bd60d97a72585b994fea97
4
+ data.tar.gz: 16272ba486c5ecafd05e26b211ba373f0446173bbc26a32d2644b4d069d1ea79
5
5
  SHA512:
6
- metadata.gz: e82a5854442ce691bc664cf6bb32aa1db21ec5e527fbc4c2ff9ddca49c8b278b8edc454cb0178ddc147ab47db324b091a65840783c9912a3051c16185bf45be3
7
- data.tar.gz: '0978f96d0c782e7e6cb9221c11ea01f1ec55ebc1e287fec595416b587f64d30dbe8dcda0859a18d81445ea5900b21c3acf1838cb9c29592bfa76a192f7bd76d2'
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 enumerable
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
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2021 Andrew Kane
1
+ Copyright (c) 2014-2023 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -20,7 +20,7 @@ Works with Active Record, Mongoid, arrays and hashes
20
20
  Add this line to your application’s Gemfile:
21
21
 
22
22
  ```ruby
23
- gem 'hightop'
23
+ gem "hightop"
24
24
  ```
25
25
 
26
26
  ## Options
@@ -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 2, expected 0..1)" if args.size > 1
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]
@@ -1,3 +1,3 @@
1
1
  module Hightop
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/hightop.rb CHANGED
@@ -2,16 +2,16 @@
2
2
  require "active_support"
3
3
 
4
4
  # modules
5
- require "hightop/enumerable"
6
- require "hightop/version"
5
+ require_relative "hightop/enumerable"
6
+ require_relative "hightop/version"
7
7
 
8
8
  ActiveSupport.on_load(:active_record) do
9
- require "hightop/utils"
10
- require "hightop/kicks"
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
- require "hightop/mongoid"
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.3.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: 2021-08-13 00:00:00.000000000 Z
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: '5.2'
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: '5.2'
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: '2.6'
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.2.22
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