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 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.2", :require_as => "merb-admin"
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
- slice(:MerbAdmin, :name_prefix => nil, :path_prefix => "", :default_routes => false)
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.2"
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.2"
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("/admin(/index)", :method => :get).
47
+ scope.match("/", :method => :get).
48
48
  to(:controller => "main", :action => "index").
49
49
  name(:admin_dashboard)
50
50
 
51
- scope.match("/admin/:model_name(/index)", :method => :get).
51
+ scope.match("/:model_name", :method => :get).
52
52
  to(:controller => "main", :action => "list").
53
53
  name(:admin_list)
54
54
 
55
- scope.match("/admin/:model_name/new", :method => :get).
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("/admin/:model_name/:id/edit", :method => :get).
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("/admin/:model_name", :method => :post).
63
+ scope.match("/:model_name", :method => :post).
64
64
  to(:controller => "main", :action => "create").
65
65
  name(:admin_create)
66
66
 
67
- scope.match("/admin/:model_name/:id", :method => :put).
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("/admin/:model_name/:id/delete", :method => :get).
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("/admin/:model_name/:id(.:format)", :method => :delete).
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(:MerbAdmin, :name_prefix => nil, :path_prefix => "admin", :default_routes => false)}
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.2
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-21 00:00:00 -07:00
12
+ date: 2009-09-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency