radiant-fabulator-extension 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.0.10 2010-12-08
2
+
3
+ * 1 minor enhanmcenet:
4
+ * Better handling of state changes and page parts
5
+
1
6
  === 0.0.9 2010-12-03
2
7
 
3
8
  * 1 major enhancement:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
@@ -230,8 +230,6 @@ class FabulatorPage < Page
230
230
  tag 'for-each' do |tag|
231
231
  selection = tag.attr['select']
232
232
  c = get_fabulator_context(tag)
233
- #Rails.logger.info("context: #{YAML::dump(c)}")
234
- #Rails.logger.info("for-each: #{selection} from #{c}")
235
233
  ns = get_fabulator_ns(tag)
236
234
  items = c.nil? ? [] : c.eval_expression(selection)
237
235
  sort_by = tag.attr['sort']
@@ -271,7 +269,11 @@ class FabulatorPage < Page
271
269
  selection = tag.attr['select']
272
270
  c = get_fabulator_context(tag)
273
271
  items = c.nil? ? [] : c.eval_expression(selection)
274
- items.collect{|i| c.with_root(i).to([Fabulator::FAB_NS, 'html']).root.value }.join('')
272
+ if tag.attr['raw']
273
+ items.collect{|i| c.with_root(i).to([Fabulator::FAB_NS, 'string']).root.value }.join('')
274
+ else
275
+ items.collect{|i| c.with_root(i).to([Fabulator::FAB_NS, 'html']).root.value }.join('')
276
+ end
275
277
  end
276
278
 
277
279
  desc %{
@@ -341,11 +343,7 @@ private
341
343
  if c.nil?
342
344
  c = tag.globals.page
343
345
  end
344
- #Rails.logger.info("page: #{c}")
345
- #Rails.logger.info("state machine: #{c.state_machine}")
346
- #Rails.logger.info("namespaces: #{c.state_machine.namespaces}")
347
346
  ret = (c.state_machine.namespaces rescue { })
348
- #Rails.logger.info("get_fabulator_ns: [#{ret}]")
349
347
  ret
350
348
  end
351
349
 
@@ -378,15 +376,7 @@ private
378
376
  self[:compiled_xml] = nil
379
377
  @compiled_xml = nil
380
378
  sm = self.state_machine
381
- #Rails.logger.info("SM: #{YAML::dump(sm)}")
382
379
  return if sm.nil?
383
- #Rails.logger.info("Ensuring the right parts are present")
384
-
385
- sm.state_names.sort.each do |part_name|
386
- parts.create(:name => part_name, :content => %{
387
- <h1>View for State #{part_name}</h1>
388
- }) unless parts.any?{ |p| p.name == part_name }
389
- end
390
380
  end
391
381
 
392
382
  end
data/config/routes.rb CHANGED
@@ -4,8 +4,5 @@ ActionController::Routing::Routes.draw do |map|
4
4
  fab.resources :libraries
5
5
  end
6
6
  end
7
- # map.namespace 'api' do |api|
8
- # api.resources :libraries
9
- # end
10
7
  end
11
8
 
@@ -55,6 +55,7 @@ module Fabulator
55
55
 
56
56
  parents.each do |page_id|
57
57
  page = ::Page.find(page_id.value)
58
+ child = nil
58
59
  if using_children
59
60
  child = page.children.select{ |c| c.slug == s }.first
60
61
  if child.nil?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-fabulator-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ - 10
10
+ version: 0.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Smith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-03 00:00:00 +00:00
18
+ date: 2010-12-08 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency