qor_dsl 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/qor_dsl/node.rb CHANGED
@@ -36,7 +36,7 @@ module Qor
36
36
  end
37
37
 
38
38
  def value
39
- block.nil? ? (options[:value] || name) : block.call
39
+ (config.__children.size > 0 || block.nil?) ? (options[:value] || name) : block.call
40
40
  end
41
41
 
42
42
  def add_config(config)
data/qor_dsl.gemspec CHANGED
@@ -11,5 +11,5 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
12
12
  gem.name = "qor_dsl"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = "0.1.0"
14
+ gem.version = "0.1.1"
15
15
  end
data/test/layout_test.rb CHANGED
@@ -40,6 +40,9 @@ describe Layout do
40
40
  # Parents
41
41
  Layout::Configuration.find(:gadget, :quick_buy).first(:template).parents.count.must_equal 2
42
42
 
43
+ # Value for node
44
+ Layout::Configuration.find(:gadget, :quick_buy).value.must_equal :quick_buy
45
+
43
46
  # More is coming... (multi, alias_node)
44
47
  end
45
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qor_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-20 00:00:00.000000000 Z
12
+ date: 2012-10-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Qor DSL is designed to be as flexible as possible while helping you to
15
15
  create your DSLs.