conjoin 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 +4 -4
- data/lib/conjoin/assets.rb +18 -4
- data/lib/conjoin/version.rb +1 -1
- data/lib/conjoin/widgets.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98046cdb70b43968c5f2eeec7e1e2e45dd00db0
|
4
|
+
data.tar.gz: 6c3eb3f4690111a360f2e1412ff9bbbc3cccf8ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f5974b32f4bc1a100e38db3bd222165fc3861614f6f5755ad45c76ce20413a576111858a57fe5efa34592fd3eb4ff6b12c3f40c1b6dc49b65fc9901d2b5e432
|
7
|
+
data.tar.gz: d246ac477c083f88ed31123ec48e0c05b9fa498604e14a6ad3e5ece8233f1fe7687689c7795ab1f5c3f429b25507f61f4c6a849516e40f65422ae2d0ead32c4e
|
data/lib/conjoin/assets.rb
CHANGED
@@ -166,20 +166,34 @@ module Conjoin
|
|
166
166
|
dir = ''
|
167
167
|
new_ext = false
|
168
168
|
|
169
|
+
case file
|
170
|
+
when /^bower/
|
171
|
+
dir = 'assets/'
|
172
|
+
when /^widgets/
|
173
|
+
dir = '/'
|
174
|
+
else
|
175
|
+
case ext
|
176
|
+
when 'js'
|
177
|
+
dir = 'assets/javascripts/'
|
178
|
+
when 'css'
|
179
|
+
dir = 'assets/stylesheets/'
|
180
|
+
else
|
181
|
+
dir = 'assets/'
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
169
185
|
case ext
|
170
186
|
when 'css'
|
171
|
-
dir = !file[/^bower/] ? 'stylesheets/' : ''
|
172
187
|
new_ext = 'scss' if stylesheet_assets.include? file + '.scss'
|
173
188
|
when 'js'
|
174
|
-
dir = !file[/^bower/] ? 'javascripts/' : ''
|
175
189
|
new_ext = 'coffee' if javascript_assets.include? file + '.coffee' \
|
176
190
|
or javascript_head_assets.include? file + '.coffee'
|
177
191
|
end
|
178
192
|
|
179
193
|
if new_ext
|
180
|
-
render "#{Assets.app.root}/app
|
194
|
+
render "#{Assets.app.root}/app/#{dir}#{file}.#{new_ext}"
|
181
195
|
else
|
182
|
-
File.read "#{Assets.app.root}/app
|
196
|
+
File.read "#{Assets.app.root}/app/#{dir}#{file}.#{ext}"
|
183
197
|
end
|
184
198
|
end
|
185
199
|
|
data/lib/conjoin/version.rb
CHANGED
data/lib/conjoin/widgets.rb
CHANGED
@@ -48,7 +48,7 @@ module Conjoin
|
|
48
48
|
widget = req.env[:loaded_widgets][name]
|
49
49
|
|
50
50
|
if widget.method(state).parameters.length > 0
|
51
|
-
widget.send state, opts
|
51
|
+
widget.send state, opts.to_ostruct
|
52
52
|
else
|
53
53
|
widget.send state
|
54
54
|
end
|
@@ -278,7 +278,7 @@ module Conjoin
|
|
278
278
|
|
279
279
|
if locals.key?(:state) and state and state.to_s == view.to_s
|
280
280
|
if method(state).parameters.length > 0
|
281
|
-
send(state, locals)
|
281
|
+
send(state, locals.to_ostruct)
|
282
282
|
else
|
283
283
|
send(state)
|
284
284
|
end
|