cuba-tools 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cuba-tools.gemspec +1 -1
- data/lib/cuba/tools/widget/base.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 485aa1326bbb4d84007924dea0a59214a806fbec
|
4
|
+
data.tar.gz: c3e4989fcbcaecf215cd1b79132d9ef32bb7f47d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
31
|
-
|
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(
|
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 =
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2014-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cuba
|