umbrellio-utils 1.5.5 → 1.6.1

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: d7c940381c60e25ca5861e86d81d314984cb0312a811bbf4427ddb2ff0553a51
4
- data.tar.gz: c824e59c5e6e017e395598a02fb1a32309d178dc8306d7b700f27fbd2aac5807
3
+ metadata.gz: 8be88d2fa97055fc1bc49b73c4b3af3a387f17fb6d8915d861efeefb005a0abd
4
+ data.tar.gz: 39b7bf9da7908d054078739cc5ab1ab2005b9704517adb597279272e624ef4fb
5
5
  SHA512:
6
- metadata.gz: 532480cd4b6cf10d9122dee5890444e0b71439a84a66eb707546de3c625caf7afdfb39a9eb31e877f3991b7ee095e5fb9b458faf0e6959bd7cec92f34ba4c2ba
7
- data.tar.gz: 78225dde8e021c742ee7c6c5d34612e74e57dc6aed1bef7c8cac6c4ba24f97fa3b2eeec4cfde7b161d1cca15c5a67931d3d6586548ed5db247fffe89ee8acddf
6
+ metadata.gz: 92064061a08489b21412bac9339d390af12e22be2b94576b9ad9d6af97ba3bffc19fc05a3b732e8d229a707f96eca807ca6b01f422d17abc5b9f053889cd22ea
7
+ data.tar.gz: 312675a6b065ff407689c39aa04a73da156cd952c905546d575a2af2f713fa81f2d3d3f03ee9050f87aa68d89fb6d88f38a01ed777fa2a93fd496267f53bba81
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- umbrellio-utils (1.5.5)
4
+ umbrellio-utils (1.6.1)
5
5
  memery (~> 1)
6
6
 
7
7
  GEM
@@ -25,7 +25,7 @@ module UmbrellioUtils
25
25
  def each_record(dataset, primary_key: nil, **options, &block)
26
26
  primary_key = primary_key_from(dataset, primary_key:)
27
27
 
28
- with_temp_table(dataset, **options) do |ids|
28
+ with_temp_table(dataset, primary_key:, **options) do |ids|
29
29
  rows = ids.map { |id| row(id.is_a?(Hash) ? id.values : [id]) }
30
30
  dataset.model.where(row(primary_key) => rows).reverse(row(primary_key)).each(&block)
31
31
  end
@@ -63,5 +63,15 @@ module UmbrellioUtils
63
63
  end
64
64
  end
65
65
  end
66
+
67
+ # needs any_ascii gem to work
68
+ def normalize_bank_name(name)
69
+ result = AnyAscii.transliterate(name).gsub(/[^A-Za-z0-9]+/, " ").upcase.squish
70
+ result.sub!(/\ATHE\s+/, "")
71
+ result.sub!(/\bLIMITED\b/, "LTD")
72
+ result.sub!(/\bCOMPANY\b/, "CO")
73
+ result.sub!(/\bCORPORATION\b/, "CORP")
74
+ result
75
+ end
66
76
  end
67
77
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UmbrellioUtils
4
- VERSION = "1.5.5"
4
+ VERSION = "1.6.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umbrellio-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Umbrellio
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-12-11 00:00:00.000000000 Z
10
+ date: 2025-02-25 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: memery
@@ -72,7 +71,6 @@ metadata:
72
71
  homepage_uri: https://github.com/umbrellio/utils
73
72
  source_code_uri: https://github.com/umbrellio/utils
74
73
  documentation_uri: https://rubydoc.info/gems/umbrellio-utils
75
- post_install_message:
76
74
  rdoc_options: []
77
75
  require_paths:
78
76
  - lib
@@ -87,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
85
  - !ruby/object:Gem::Version
88
86
  version: '0'
89
87
  requirements: []
90
- rubygems_version: 3.5.22
91
- signing_key:
88
+ rubygems_version: 3.6.3
92
89
  specification_version: 4
93
90
  summary: A set of utilities that speed up development
94
91
  test_files: []