cuba-tools 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66ecca34c1ce276d25eaf2c9b84cafac9d9ebd34
4
- data.tar.gz: 9021040cb6715c3c018aef4909abfcef83ddbdba
3
+ metadata.gz: 485aa1326bbb4d84007924dea0a59214a806fbec
4
+ data.tar.gz: c3e4989fcbcaecf215cd1b79132d9ef32bb7f47d
5
5
  SHA512:
6
- metadata.gz: a5a6791404f2e1298909350d237c5326af4981ba4d772d1dcd2df0ff02069ad1d223ce92285a4b0f5b8fa230aed8fccaa93dbf1e8f0c07b20b41be9e50c65e38
7
- data.tar.gz: 428109d2210e88864aff5d9cc7e484d182148975eb3ef6735b13bef456eab7156616c3a9eaf27bd1eb7d46df2dc5cece15bab2089947dfc4a9f98a2f1315138f
6
+ metadata.gz: da51f3922789f2400763bcfb4a7f54e88838b1fb10c8befe4d9c3c5550893cf1a554742659af439d4e5e20a977f808952bab8d7237707e5d8b6647e778bfb5b2
7
+ data.tar.gz: 4cc5fc303b0793337069e70dc75d2ced7f1d5ab44ac56580ef5a742a46d73af17b70270a4f70bfb6ec5b92684ebd186493f9e403726a16e0c3a04b9e20ed6223
data/cuba-tools.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "cuba-tools"
7
- spec.version = "0.0.11"
7
+ spec.version = "0.0.12"
8
8
  spec.authors = ["cj"]
9
9
  spec.email = ["cjlazell@gmail.com"]
10
10
  spec.description = %q{Contains a group of tools to extend cuba}
@@ -27,10 +27,12 @@ module Cuba::Tools
27
27
  end
28
28
 
29
29
  def render_state options = {}
30
- if method(widget_state).parameters.length > 0
31
- send(widget_state, options.to_deep_ostruct)
30
+ state = widget_state || options.delete(:state)
31
+
32
+ if method(state).parameters.length > 0
33
+ send(state, options.to_deep_ostruct)
32
34
  else
33
- send(widget_state)
35
+ send(state)
34
36
  end
35
37
  end
36
38
 
@@ -122,11 +124,12 @@ module Cuba::Tools
122
124
  def replace state, opts = {}
123
125
  if !state.is_a? String
124
126
  opts[:state] = state
125
- content = render state, opts
127
+ content = render_state opts
126
128
  selector = '#' + id_for(state)
127
129
  else
128
130
  if !opts.key?(:content) and !opts.key?(:with)
129
- content = render opts
131
+ opts[:state] = caller[0][/`.*'/][1..-2]
132
+ content = render_state opts
130
133
  else
131
134
  content = opts[:content] || opts[:with]
132
135
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuba-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-28 00:00:00.000000000 Z
11
+ date: 2014-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cuba