effective_qb_online 0.1.4 → 0.1.5

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: f20c50a036b10136d52f4c052b16abf5e555cfbe8502babb3b6ceb0922194a42
4
- data.tar.gz: 7d45f23076d1678691b6d1f1cfd86331048ae9d40c2020c871ad0567257b3770
3
+ metadata.gz: b576a3949ed29e03fff73780968b77c380cd4454c8117b39aba87690f96a0ae9
4
+ data.tar.gz: c16c7f2ad020a416e0fae62fa98016cff913f1bd372e4e06feb8cd042954ebae
5
5
  SHA512:
6
- metadata.gz: c2d817cd48f01bae89b467c06b4bd48cb14912698db983947051d083dfae9c07f29502247b6a78deaf602c00288f17525b3737988cfdd94cf64f8bcedbcc9e9e
7
- data.tar.gz: 1ffdebaa33b29ba09c0ee322449894b37e7e5c565e4ea5a528a255b53f190728cb9f3b6d62ba3ea4716d70ff1eebc7ed0e7faf754d63178a155d188bc638aa81
6
+ metadata.gz: 07c548ac7ea522e377897dca08cb17f77b3db74b3633bd61135584297857c04100a7adc1942f410b141dbbb2c7e3968e748c2769f4e32c98fbd627977924c8fc
7
+ data.tar.gz: d4986d17edbe98241942c5888537f2593fcbab09a0ddf81c6194989a0daf7db7124025c992c0d39ac1157077314cd8b6dd3dcdbdecd6dabd05e4a00e428e6c99
@@ -75,10 +75,19 @@ module Effective
75
75
  items
76
76
  .reject { |item| item.type == 'Category' }
77
77
  .sort_by { |item| [item.type, item.name] }
78
- .map { |item| [item.name, item.id, {'data-html': item_html(item)}, item.type] }
78
+ .map { |item| [item_name(item), item.id, {'data-html': item_html(item)}, item.type] }
79
79
  .group_by(&:last)
80
80
  end
81
81
 
82
+ def item_name(item)
83
+ [
84
+ item.name,
85
+ ("##{item.id}"),
86
+ (item.sku if item.sku.present?),
87
+ (item.description if item.description.present?)
88
+ ].compact.join(' ')
89
+ end
90
+
82
91
  def item_html(item)
83
92
  details = [
84
93
  ("##{item.id}"),
@@ -1,3 +1,3 @@
1
1
  module EffectiveQbOnline
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_qb_online
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-30 00:00:00.000000000 Z
11
+ date: 2022-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails