cuba-tools 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66ecca34c1ce276d25eaf2c9b84cafac9d9ebd34
|
4
|
+
data.tar.gz: 9021040cb6715c3c018aef4909abfcef83ddbdba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5a6791404f2e1298909350d237c5326af4981ba4d772d1dcd2df0ff02069ad1d223ce92285a4b0f5b8fa230aed8fccaa93dbf1e8f0c07b20b41be9e50c65e38
|
7
|
+
data.tar.gz: 428109d2210e88864aff5d9cc7e484d182148975eb3ef6735b13bef456eab7156616c3a9eaf27bd1eb7d46df2dc5cece15bab2089947dfc4a9f98a2f1315138f
|
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.11"
|
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}
|
@@ -141,7 +141,10 @@ module Cuba::Tools
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def id_for state
|
144
|
-
|
144
|
+
w_name = req.env[:widget_name].to_s.gsub(/_/, '-')
|
145
|
+
w_state = state.to_s.gsub(/_/, '-')
|
146
|
+
|
147
|
+
"#{w_name}-#{w_state}"
|
145
148
|
end
|
146
149
|
|
147
150
|
def escape js
|
data/test/tools/widget_test.rb
CHANGED
@@ -90,10 +90,10 @@ scope "cuba/tools/widget/middleware" do
|
|
90
90
|
|
91
91
|
assert body['test_helper'] != nil
|
92
92
|
assert body['display'] != nil
|
93
|
-
assert body['id="
|
93
|
+
assert body['id="some-widget-display"'] != nil
|
94
94
|
assert body['some partial'] != nil
|
95
95
|
assert body['some state'] != nil
|
96
96
|
assert body['user_widget_method'] != nil
|
97
|
-
assert body['id="
|
97
|
+
assert body['id="some-widget-some-state"'] != nil
|
98
98
|
end
|
99
99
|
end
|