marley 0.3.0 → 0.4.0
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.
- data/README.rdoc +2 -27
- data/Rakefile +3 -0
- data/TODO +11 -9
- data/lib/joints/basic_menu_system.rb +6 -23
- data/lib/joints/basic_messaging.rb +3 -3
- data/lib/joints/basic_user.rb +2 -2
- data/lib/joints/tagged_messaging.rb +4 -4
- data/lib/joints/tagging.rb +5 -9
- data/lib/marley.rb +21 -36
- data/lib/marley/joint.rb +4 -0
- data/lib/marley/reggae.rb +15 -10
- data/lib/marley/test_helpers.rb +1 -2
- data/lib/marley/utils.rb +36 -0
- data/lib/sequel/plugins/rest_convenience.rb +72 -76
- data/marley-0.3.0.gem +0 -0
- data/marley.gemspec +4 -2
- data/reggae.ebnf +11 -5
- data/test/tagged_messaging_tests.rb +4 -4
- data/test/test.sqlite3 +0 -0
- data/test/user_tests.rb +1 -1
- metadata +6 -5
- data/forum_tests.rb +0 -356
- data/lib/joints/user_based_navigation.rb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
|
2
|
-
module Marley
|
3
|
-
module Joints
|
4
|
-
class UserBasedNavigation < Joint
|
5
|
-
LOGIN_FORM= [:instance,{:url => 'login',:description => 'Existing users please log in here:',:new_rec => true,:schema => [[:text,'name',RESTRICT_REQ],[:password,'password',RESTRICT_REQ]]}]
|
6
|
-
module ClassMethods
|
7
|
-
module User
|
8
|
-
def sections
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
module Resources
|
13
|
-
class MainMenu
|
14
|
-
attr_accessor :title,:name,:description, :items
|
15
|
-
def self.rest_get
|
16
|
-
new.to_json
|
17
|
-
end
|
18
|
-
def initialize
|
19
|
-
if $request[:user].new?
|
20
|
-
u=$request[:user].to_a
|
21
|
-
u[1].merge!({:description => 'If you don\'t already have an account, please create one here:'})
|
22
|
-
@title="Welcome to #{$request[:opts][:app_name]}"
|
23
|
-
@description='Login or signup here.'
|
24
|
-
@items=[LOGIN_FORM,u]
|
25
|
-
else
|
26
|
-
$request[:user].class.sections
|
27
|
-
end
|
28
|
-
end
|
29
|
-
def self.requires_user?
|
30
|
-
true
|
31
|
-
end
|
32
|
-
def to_json
|
33
|
-
[:section,{:title => @title,:description => @description,:name => @name, :navigation => @items}]
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|