spotlight_search 0.3.3 → 0.3.4

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: b92c3e7bbf1f08608d56519a25d3bfbb89f9f15c3be6a966b8d3f511ef89852f
4
- data.tar.gz: db81f9f85d884545a7af576b5c25f1dde374aeb3d977bcaaaec89095b518d122
3
+ metadata.gz: bc7f95a4b32cda3a0fe9572388d9e73ef1bc8d6f539ea2ec63423a59ac051403
4
+ data.tar.gz: 5f2873974e3fc88a2d8693d7dca287d3bb74af3c7538443d3188d78790d81e34
5
5
  SHA512:
6
- metadata.gz: 8f2f9550bd462c7766f5386597af63ce6de850ec77810c7066be0b3cb240c632942430a62e74deeac297a72aff33c7cb4b9dd45caed94255c730d40685c19c98
7
- data.tar.gz: 36da0ccdfed1bae3bc5b680ebe31ebdf1269f2a0d37abcef410f044f0aa3057ca6333669b8fd18136a693245cf865ffd4bed78ee9b63e1e5d249091b3d04ed2d
6
+ metadata.gz: 4063285378cd29f80b0c7a3f67e907bd1f8cf549613754aa54c6633eae2e9037509a3224c83d38128a5119a6627210e7ebd74da591b58e7f9aea253b169fa9db
7
+ data.tar.gz: 85d4eae1e8ca517c454986bc383d57010b52971482b79e1e2285f651f534e57aad1685f8fe8418c8ca263d58897ac5b2fe2e6d4541fe1755a0413f61bfee729d
@@ -2,11 +2,13 @@
2
2
 
3
3
  module SpotlightSearch::Utils
4
4
  class << self
5
- def serialize_csv_columns(*columns, **hashes)
5
+ def serialize_csv_columns(*columns)
6
+ association_hash = columns.select{|columnable| columnable.class.eql?(Hash)}.last || {}
7
+ parent_table_columns = columns.select{|columnable| columnable.class.eql?(Symbol)}
6
8
  # Turns an arbitrary list of args and kwargs into a list of params to be used in a form
7
9
  # For example, turns SpotlightSearch::Utils.serialize_csv_columns(:a, :b, c: [:d, e: :h], f: :g)
8
10
  # into [:a, :b, "c/d", "c/e/h", "f/g"]
9
- columns.map(&:to_s) + hashes.map do |key, value|
11
+ parent_table_columns.map(&:to_s) + association_hash.map do |key, value|
10
12
  serialize_csv_columns(*value).map do |column|
11
13
  "#{key}/#{column}"
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module SpotlightSearch
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  # s.require_paths = ["lib"]
25
25
 
26
26
  s.add_development_dependency "bundler", "~> 2.0"
27
- s.add_development_dependency "rake", "~> 13.0.1"
27
+ s.add_development_dependency "rake", ">= 12.3.3"
28
28
  s.add_development_dependency "rails", "~> 5.2.4.2"
29
29
  s.add_development_dependency "rspec", "~> 3.0"
30
30
  s.add_runtime_dependency 'caxlsx', "~> 3.0.1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlight_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anbazhagan Palani
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 13.0.1
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 13.0.1
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement