angsa 0.1.2 → 0.1.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: a45fad18d0808f91ff45aa6745e6409503693a523ff7b92ea97b78d3c1630f06
4
- data.tar.gz: 90ecfe981aa19f4a738845a0c788b2a3eca2f2810e4985f379af34bfce6958bb
3
+ metadata.gz: 5e640d5e5f43554d5986e6e12c961d5a0e96b436f4b229c07db31f8272e4076f
4
+ data.tar.gz: 83a91a05ac6723f92239cd513424bd1ddaee2785bdcfce01944b6457ace73201
5
5
  SHA512:
6
- metadata.gz: 73ff6ed9f04de20632201c142692fc0c2007d3102c367ede3734b34b987fd63c01b3694d2cab69c0da0ad3f4cf18791bda1a771d4db3585119df0c3df6a0ecbe
7
- data.tar.gz: 33306732ce13e3002e852b1127062ab062e42c3181ca485250c25b588995e1230222b3ca7ad1d1351cdef8252dcb89c7830664ef915e5396b55a04ce75c3f139
6
+ metadata.gz: 182d42455c9c3c4f6cab831087643f1251fb6807e9ef0aad0ee15d4e5689603ced9cda605d0d174bc6364efa6cc00b3ef18accc87f63a7320a72ec604ea70d8d
7
+ data.tar.gz: a6bececf5e09c90fdd909f65d0b28427486278b26c53e4b59b17e59883990575739f5bd7f304fa1227001f09c0650104e4f8cb1b90c13ee5a8506b77fa6bf984
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- angsa (0.1.1)
4
+ angsa (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/angsa-0.1.2.gem ADDED
Binary file
data/lib/angsa/base.rb CHANGED
@@ -40,8 +40,12 @@ module Angsa
40
40
  def extract_records(records)
41
41
  records.map do |record|
42
42
  columns.map do |column|
43
- source = column[:source].split('.')
44
- [column[:name], source.size == 1 ? record.send(source.first) : record.send(source.first).send(source.last)]
43
+ if column[:source].include?('custom_')
44
+ [column[:name], send(column[:source], record)]
45
+ else
46
+ source = column[:source].split('.')
47
+ [column[:name], source.size == 1 ? record.send(source.first) : record.send(source.first).send(source.last)]
48
+ end
45
49
  end.to_h
46
50
  end
47
51
  end
data/lib/angsa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Angsa
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kennedy Wee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-09 00:00:00.000000000 Z
11
+ date: 2023-08-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Angsa gem is a server-side tool for Ruby on Rails applications that
14
14
  provides pagination, sorting, and search capabilities for ActiveRecord models. It
@@ -29,6 +29,7 @@ files:
29
29
  - Rakefile
30
30
  - angsa-0.1.0.gem
31
31
  - angsa-0.1.1.gem
32
+ - angsa-0.1.2.gem
32
33
  - lib/angsa.rb
33
34
  - lib/angsa/base.rb
34
35
  - lib/angsa/pagination.rb