merbiful-release 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +0,0 @@
1
- Merb.logger.info("Compiling merbiful routes...")
2
- Merb::Router.prepare do |r|
3
- r.match(/(.*)/).to(:controller => "merbiful", :action => "peek")
4
- end
@@ -1,45 +0,0 @@
1
-
2
- module Merbiful
3
-
4
- class Page
5
-
6
- class NoSuchFilterError < RuntimeError
7
- end
8
-
9
- include DataMapper::Resource
10
- include DataMapper::Validate
11
- include Merbiful::Body
12
-
13
- validates_is_unique :version, :scope => [:path]
14
-
15
- property :id, Serial
16
- property :version, Integer, :index => true
17
- property :body, DataMapper::Types::Text
18
- property :filter, DataMapper::Types::Text
19
- property :path, DataMapper::Types::Text, :index => true
20
- property :position, Integer
21
- property :created_at, DateTime
22
- property :updated_at, DateTime
23
- property :title, DataMapper::Types::Text
24
- property :keywords, DataMapper::Types::Text
25
- property :parent_path, DataMapper::Types::Text
26
- property :layout_id, Integer
27
-
28
- before :save do
29
- if self.position.nil?
30
- last_position = self.class.first(:parent_path => self.parent_path, :path.not => self.path)
31
- if last_position.nil?
32
- self.position = 0
33
- else
34
- self.position = last_position.position + 1
35
- end
36
- end
37
- if self.path.nil?
38
- self.path = "/"
39
- end
40
-
41
- end
42
-
43
- end
44
-
45
- end
@@ -1,10 +0,0 @@
1
- %html
2
- %link{:href => url(:merbiful_admin_css), :rel => 'Stylesheet', :type => 'text/css'}
3
- %body
4
- %h1= link_to("Merbiful Release Administration Interface", url(:merbiful_admin_index))
5
- %ul.menu
6
- %li= link_to("Pages", url(:merbiful_admin, :action => "pages"))
7
- %li= link_to("Layouts", url(:merbiful_admin, :action => "layouts"))
8
- %li= link_to("Css", url(:merbiful_admin, :action => "css"))
9
- %li= link_to("Js", url(:merbiful_admin, :action => "js"))
10
- = catch_content :for_layout
@@ -1,2 +0,0 @@
1
- %p Welcome to the Merbiful Release Administration Interface
2
- %p I am sure we will get along well.
@@ -1,3 +0,0 @@
1
- %ul
2
- = render_page @root
3
-