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 +4 -4
- data/lib/spotlight_search/utils.rb +4 -2
- data/lib/spotlight_search/version.rb +1 -1
- data/spotlight_search.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc7f95a4b32cda3a0fe9572388d9e73ef1bc8d6f539ea2ec63423a59ac051403
|
4
|
+
data.tar.gz: 5f2873974e3fc88a2d8693d7dca287d3bb74af3c7538443d3188d78790d81e34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
data/spotlight_search.gemspec
CHANGED
@@ -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", "
|
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.
|
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:
|
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:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|