sferik-merb-admin 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -2
- data/Rakefile +1 -1
- data/lib/merb-admin.rb +9 -9
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -14,11 +14,11 @@ At the command prompt, type:
|
|
14
14
|
|
15
15
|
In your app, add the following dependency to `config/dependencies.rb`:
|
16
16
|
|
17
|
-
dependency "sferik-merb-admin", "0.4.
|
17
|
+
dependency "sferik-merb-admin", "0.4.3", :require_as => "merb-admin"
|
18
18
|
|
19
19
|
Add the following route to `config/router.rb`:
|
20
20
|
|
21
|
-
|
21
|
+
add_slice(:merb_admin, :name_prefix => nil, :path_prefix => "admin", :default_routes => false)
|
22
22
|
|
23
23
|
Then, run the following rake task:
|
24
24
|
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ AUTHOR = "Erik Michaels-Ober"
|
|
9
9
|
EMAIL = "sferik@gmail.com"
|
10
10
|
HOMEPAGE = "http://twitter.com/sferik"
|
11
11
|
SUMMARY = "MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data."
|
12
|
-
GEM_VERSION = "0.4.
|
12
|
+
GEM_VERSION = "0.4.3"
|
13
13
|
|
14
14
|
spec = Gem::Specification.new do |s|
|
15
15
|
s.rubyforge_project = "merb"
|
data/lib/merb-admin.rb
CHANGED
@@ -23,7 +23,7 @@ if defined?(Merb::Plugins)
|
|
23
23
|
|
24
24
|
# Slice metadata
|
25
25
|
self.description = "MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data."
|
26
|
-
self.version = "0.4.
|
26
|
+
self.version = "0.4.3"
|
27
27
|
self.author = "Erik Michaels-Ober"
|
28
28
|
|
29
29
|
# Stub classes loaded hook - runs before LoadClasses BootLoader
|
@@ -44,35 +44,35 @@ if defined?(Merb::Plugins)
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.setup_router(scope)
|
47
|
-
scope.match("/
|
47
|
+
scope.match("/", :method => :get).
|
48
48
|
to(:controller => "main", :action => "index").
|
49
49
|
name(:admin_dashboard)
|
50
50
|
|
51
|
-
scope.match("
|
51
|
+
scope.match("/:model_name", :method => :get).
|
52
52
|
to(:controller => "main", :action => "list").
|
53
53
|
name(:admin_list)
|
54
54
|
|
55
|
-
scope.match("
|
55
|
+
scope.match("/:model_name/new", :method => :get).
|
56
56
|
to(:controller => "main", :action => "new").
|
57
57
|
name(:admin_new)
|
58
58
|
|
59
|
-
scope.match("
|
59
|
+
scope.match("/:model_name/:id/edit", :method => :get).
|
60
60
|
to(:controller => "main", :action => "edit").
|
61
61
|
name(:admin_edit)
|
62
62
|
|
63
|
-
scope.match("
|
63
|
+
scope.match("/:model_name", :method => :post).
|
64
64
|
to(:controller => "main", :action => "create").
|
65
65
|
name(:admin_create)
|
66
66
|
|
67
|
-
scope.match("
|
67
|
+
scope.match("/:model_name/:id", :method => :put).
|
68
68
|
to(:controller => "main", :action => "update").
|
69
69
|
name(:admin_update)
|
70
70
|
|
71
|
-
scope.match("
|
71
|
+
scope.match("/:model_name/:id/delete", :method => :get).
|
72
72
|
to(:controller => "main", :action => "delete").
|
73
73
|
name(:admin_delete)
|
74
74
|
|
75
|
-
scope.match("
|
75
|
+
scope.match("/:model_name/:id(.:format)", :method => :delete).
|
76
76
|
to(:controller => "main", :action => "destroy").
|
77
77
|
name(:admin_destroy)
|
78
78
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -106,7 +106,7 @@ Merb::Test.add_helpers do
|
|
106
106
|
def mount_slice
|
107
107
|
if standalone?
|
108
108
|
Merb::Router.reset!
|
109
|
-
Merb::Router.prepare{add_slice(:
|
109
|
+
Merb::Router.prepare{add_slice(:merb_admin, :name_prefix => nil, :path_prefix => "admin", :default_routes => false)}
|
110
110
|
end
|
111
111
|
end
|
112
112
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sferik-merb-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Michaels-Ober
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-22 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|