datagnan 1.2.3 → 1.2.4

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/datagnan.rb +9 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b2c738cfafb4890e559b35030898616c754c635
4
- data.tar.gz: 373f8690aafc672636f0812ad50ef33170d52fb8
3
+ metadata.gz: 05607710b99a729b6621ee1ed606791acca3d926
4
+ data.tar.gz: 19fe21526067a3c30121ff0548f788ebd2d2db76
5
5
  SHA512:
6
- metadata.gz: 6a6f9b6069293fb8b9d3712d1517d7ac5a73857c9c012aff648332e2b7f2837151d690bb416fc97f74998bf2482c0a4291f7f583e2ea8101b1440b480fc125ab
7
- data.tar.gz: 791d0f38a04aa2c960a6ceb6946f65207ebc65ad8a6952e9b9a635fc066cd54e4dc366bea9acbf5978545bec81f6b2502925f5ba4d5ddeacae21b8bbebd75e0c
6
+ metadata.gz: d20055d75d94aac632aebeaf7f443c620a68477d1c999993a44a7f8e9674502b2352116bf0da9aaf1515966c548358fa4110a6f1bd00b38bf5fd863cb2ee1cd4
7
+ data.tar.gz: fc27c125b3c574a2a82074b95bea1e633f83ae7f673475d24be93b22dcf055ba737ab443da67fef1ae1e7f356184a0ec5dcd44c79664c8daf9d8f89f4cde8183
@@ -315,11 +315,17 @@ private
315
315
  ## display if true
316
316
  def data_when(vars, root)
317
317
  ## debug
318
- # puts "Datagnan.data_when ( vars = #{vars} )"
319
- # puts "Datagnan.data_when ( root = #{root} )"
318
+ # puts "-- Datagnan.data_when ( vars = #{vars} )"
319
+ # puts "-- Datagnan.data_when ( root.to_xml = #{root.to_xml} )"
320
320
  root.css('*[data-when]').each do |node|
321
321
 
322
- var = find_value(node.get('data-when'), vars)
322
+ var = node.get('data-when').split(@options[:attrs_sep]).each do |key|
323
+ ## debug
324
+ # puts "-- Datagnan.data_when each split ( key = #{key} )"
325
+ var = find_value(key, vars)
326
+ # puts "-- Datagnan.data_when each split ( var = #{var} )"
327
+ break var unless var
328
+ end
323
329
  ## debug
324
330
  # puts "-- Datagnan.data_when each ( node.to_xml = #{node.to_xml} )"
325
331
  # puts "-- Datagnan.data_when each ( var = #{var} )"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datagnan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-25 00:00:00.000000000 Z
12
+ date: 2015-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oga