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: 30e9e9ca4f1f99138d2b5801fe6ca3d68af3d43c
4
- data.tar.gz: 2eae001b921d654315a999cf712b24ac3c3d8d14
3
+ metadata.gz: 66ecca34c1ce276d25eaf2c9b84cafac9d9ebd34
4
+ data.tar.gz: 9021040cb6715c3c018aef4909abfcef83ddbdba
5
5
  SHA512:
6
- metadata.gz: c9ba3ddd7bb2d33d2059c86e1f0729173136f9ad43047c3fe890989bc11f76346bc5fc52bcf44db1509ded526aadb3ea47e81b4da7df2f9e03b2fc15a32b9d52
7
- data.tar.gz: c3d4b4ce2ee11b75f73341f05beee0cbc865c42f5e853ccedc7310a26b1f1f4ee30bde7fad5ea081772800602d4002d4a7d9e1bb0b60a911bc99cfc5dbb124fe
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.10"
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
- "#{req.env[:widget_name]}_#{state}"
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
@@ -1,3 +1,5 @@
1
+ require 'cuba/tools'
2
+
1
3
  class OtherWidget < Cuba::Tools::Widget::Base
2
4
  respond_to :test, for: :some_widget, with: :some_test
3
5
 
@@ -1,3 +1,5 @@
1
+ require 'cuba/tools'
2
+
1
3
  class SomeWidget < Cuba::Tools::Widget::Base
2
4
  respond_to :test
3
5
 
@@ -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="some_widget_display"'] != nil
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="some_widget_some_state"'] != nil
97
+ assert body['id="some-widget-some-state"'] != nil
98
98
  end
99
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuba-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj