edge_rider 2.2.0 → 2.3.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: e76fe31acbaa313ea4b8d6eec7a26809dd3a340cd6b9d8cda55305f9c8f71157
4
- data.tar.gz: ca5884575995ddb539a74262d682648e44325e454e8fce1e0f0da33d487969e0
3
+ metadata.gz: 33202d76dc67a93b07083b49b163fbb330d023564050e4db51c5e630aafc6e85
4
+ data.tar.gz: bb0bd9164292042276bb4be32b7378e96fbcc4032da04941fa5ae3a2c0dbc8ab
5
5
  SHA512:
6
- metadata.gz: 3fca12b801fd31fb76480118fb57e42ec7db53de75888e0f6714fc523f897f64cc0f44cdfbc44ebb024b12cd9ea783c68a45c72756bdfa3416838973bce9f7e5
7
- data.tar.gz: b468254fface8669ae9bb26b1a71ebd80ba70c4c10f4a857ddd568d791582e002e5aa3ef8542e89f72689932c95ce111c31ac39608843f02dd29c23782666558
6
+ metadata.gz: f4844a44d8ba640e873052515d1cb1635f5c08240090cdfb0ee7bf75e3320bf45e6ad482a9984dd630d2e5dd574dc25714b7b510b8a24b68912a8430ed90dcc7
7
+ data.tar.gz: 45ded01f3ca6dfde897838995cb990e16159b9eb2a68dba2769960bf34af5d18e52c7808853a70e0c126d55f086e3b5bc39c9b56b11f8ef119d75ca0a8f45a38
@@ -49,7 +49,7 @@ jobs:
49
49
  - name: Run tests
50
50
  run: bundle exec rspec
51
51
  test_pg:
52
- runs-on: ubuntu-20.04
52
+ runs-on: ubuntu-22.04
53
53
  services:
54
54
  postgres:
55
55
  image: postgres
data/CHANGELOG.md CHANGED
@@ -9,6 +9,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
 
10
10
  ### Compatible changes
11
11
 
12
+ ## 2.3.0 - 2023-05-26
13
+
14
+ ### Compatible changes
15
+
16
+ - `collect_ids` is now capable of parsing "string arrays" like `['1', '2', '3']`. This can be handy when handling params with ID arrays.
12
17
 
13
18
  ## 2.2.0 - 2023-03-01
14
19
 
data/Gemfile CHANGED
@@ -1 +1 @@
1
- Gemfile.6.1.pg
1
+ ./Gemfile.6.1.pg
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.4.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.5.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.2.0)
4
+ edge_rider (2.3.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.lock CHANGED
@@ -1 +1 @@
1
- Gemfile.6.1.pg.lock
1
+ ./Gemfile.6.1.pg.lock
@@ -8,9 +8,18 @@ module EdgeRider
8
8
  def collect_ids
9
9
  collect do |obj|
10
10
  case obj
11
- when Integer then obj
12
- when ActiveRecord::Base then obj.id
13
- else raise Uncollectable, "Cannot collect an id from #{obj.inspect}"
11
+ when Integer
12
+ obj
13
+ when ActiveRecord::Base
14
+ obj.id
15
+ when String
16
+ if obj.match(/\A\d+\z/)
17
+ obj.to_i
18
+ else
19
+ raise Uncollectable, "Cannot collect an id from #{obj.inspect}"
20
+ end
21
+ else
22
+ raise Uncollectable, "Cannot collect an id from #{obj.inspect}"
14
23
  end
15
24
  end
16
25
  end
@@ -1,3 +1,3 @@
1
1
  module EdgeRider
2
- VERSION = '2.2.0'
2
+ VERSION = '2.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edge_rider
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.2.32
88
+ rubygems_version: 3.2.3
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Power tools for ActiveRecord relations (scopes)