jcompiler 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jcompiler.rb +13 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba3f8725c08413f703fd2365ca07f6eea1f72325
|
4
|
+
data.tar.gz: 6db2edaaa8f68725eb1b2522f33f9dfd879b6a5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6bc7f6754ac949a013d64eef1f228961aec50eb39ae59dc9d220704c46dd059e3fbbe8a78a426762e7bf58cfc278ea2da2e33bdd41be351e4a50fd922e5d6ae
|
7
|
+
data.tar.gz: 95634efd4831fd1b7b89a8f2dc73c442f976931a96a5a34f6acc4831308f7b2a8d98231604f53aba1bc0d1e4cb7b95a8a4845dd8ca0d3b2e5a1f933d9f25407e
|
data/lib/jcompiler.rb
CHANGED
@@ -1,7 +1,18 @@
|
|
1
1
|
class Jcompiler
|
2
2
|
def self.b(brand)
|
3
|
-
|
4
|
-
|
3
|
+
{
|
4
|
+
id: 'brand.id',
|
5
|
+
name: 'brand.name',
|
6
|
+
description: 'brand.description',
|
7
|
+
published_at: 'brand.published_at.utc.iso8601(3)',
|
8
|
+
official_url: 'brand.blog_url',
|
9
|
+
sex_group: 'brand.blog_sex_switch',
|
10
|
+
# image_medium: 'absolute_url(brand.image_file.url(:medium))',
|
11
|
+
# image_square: 'absolute_url(brand.image_file.url(:square))',
|
12
|
+
# url: brand_
|
13
|
+
labels: '"#{brand.new_arrival? ? '["NEW"]' ? '[]'}"'
|
14
|
+
}.map do |key, code|
|
15
|
+
v = eval(code)
|
5
16
|
"\"#{attr}\":#{v.is_a?(String) ? ActiveSupport::JSON.encode(v) : v ? v.to_s : 'null'}"
|
6
17
|
end
|
7
18
|
end
|