jcompiler 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jcompiler.rb +13 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc738f59cfae7cd6a2b0018b8dea05931988195c
4
- data.tar.gz: 4ed682253103af4bf4b502323f8358bed62e1487
3
+ metadata.gz: ba3f8725c08413f703fd2365ca07f6eea1f72325
4
+ data.tar.gz: 6db2edaaa8f68725eb1b2522f33f9dfd879b6a5b
5
5
  SHA512:
6
- metadata.gz: 67b87f48adb01c7044625bbf6d62493392b2eba027b8a0492aa6a6dc804d5e9c53fe2b3f0bd26f5fe3aaa7da7f61f3f956cf49eb4c9a94bc9fc28631ddf7ec38
7
- data.tar.gz: 66d4da337a5c55472ee25452615ed9b2fe59f2ccc937cbf0228af71ba8ca93353201847705b3e4892847816ba40cd486319602238beb8a471da3c57e7f404ef9
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
- %w(id name description).map do |attr|
4
- v = eval("brand.#{attr}")
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jcompiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya