conjoin 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 836e7101787f76311801fb2aa38035ce70c1ab58
4
- data.tar.gz: 7d48b81888db49e598070a6820c634cc53eb92a9
3
+ metadata.gz: a98046cdb70b43968c5f2eeec7e1e2e45dd00db0
4
+ data.tar.gz: 6c3eb3f4690111a360f2e1412ff9bbbc3cccf8ea
5
5
  SHA512:
6
- metadata.gz: f2aa96039522a96034f6bc7b8218c126afd371ab09f2faed7f39ebe14598ff96977537134a7dd4bb2ee740eaf252fe2075947885871e908171265423670b591f
7
- data.tar.gz: d32d81c661e56e2baa6b2b4aee1abc3e5bee79cc4141291f21f0aa81386f0fba959414b3cccf274b9042d4755e6238e579bbe9ca8ee9ad0067fed3209834e55e
6
+ metadata.gz: 9f5974b32f4bc1a100e38db3bd222165fc3861614f6f5755ad45c76ce20413a576111858a57fe5efa34592fd3eb4ff6b12c3f40c1b6dc49b65fc9901d2b5e432
7
+ data.tar.gz: d246ac477c083f88ed31123ec48e0c05b9fa498604e14a6ad3e5ece8233f1fe7687689c7795ab1f5c3f429b25507f61f4c6a849516e40f65422ae2d0ead32c4e
@@ -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/assets/#{dir}#{file}.#{new_ext}"
194
+ render "#{Assets.app.root}/app/#{dir}#{file}.#{new_ext}"
181
195
  else
182
- File.read "#{Assets.app.root}/app/assets/#{dir}#{file}.#{ext}"
196
+ File.read "#{Assets.app.root}/app/#{dir}#{file}.#{ext}"
183
197
  end
184
198
  end
185
199
 
@@ -1,3 +1,3 @@
1
1
  module Conjoin
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjoin
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