mondo-generators 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.7
1
+ 0.6.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mondo-generators}
8
- s.version = "0.6.7"
8
+ s.version = "0.6.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Luca Tironi"]
12
- s.date = %q{2010-03-26}
12
+ s.date = %q{2010-04-07}
13
13
  s.description = %q{A collection of useful generator scripts for Rails.}
14
14
  s.email = %q{luca.tironi@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -22,13 +22,13 @@ Rails::Generator::Commands::Create.class_eval do
22
22
  end
23
23
  end
24
24
 
25
- def route_resource_with_options(resource, route_options = {})
25
+ def route_resources_with_options(resource, route_options = {})
26
26
  sentinel = 'ActionController::Routing::Routes.draw do |map|'
27
27
 
28
- logger.route "map.resource #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
28
+ logger.route "map.resources #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
29
29
  unless options[:pretend]
30
30
  gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
31
- "#{match}\n map.resource #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }\n"
31
+ "#{match}\n map.resources #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }\n"
32
32
  end
33
33
  end
34
34
  end
@@ -72,9 +72,9 @@ Rails::Generator::Commands::Destroy.class_eval do
72
72
  end
73
73
  end
74
74
 
75
- def route_resource_with_options(resource, route_options = {})
76
- look_for = "\n map.resource #{resource.to_sym.inspect}, #{route_options}\n"
77
- logger.route "map.resource #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
75
+ def route_resources_with_options(resource, route_options = {})
76
+ look_for = "\n map.resources #{resource.to_sym.inspect}, #{route_options}\n"
77
+ logger.route "map.resources #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
78
78
  unless options[:pretend]
79
79
  gsub_file 'config/routes.rb', /(#{look_for})/mi, ''
80
80
  end
@@ -107,7 +107,7 @@ Rails::Generator::Commands::List.class_eval do
107
107
  end
108
108
 
109
109
  def route_resource_with_options(resource, route_options = {})
110
- logger.route "map.resource #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
110
+ logger.route "map.resources #{resource.to_sym.inspect}, :member => { #{route_options[:members]} }, :collection => { #{route_options[:collections]} }"
111
111
  end
112
112
 
113
113
  def route_name(name, path, options = {})
@@ -48,7 +48,7 @@ class MondoAuthenticationGenerator < Rails::Generator::Base
48
48
  m.route_root :controller => 'static_pages', :action => 'home'
49
49
 
50
50
  m.route_resources session_plural_name
51
- m.route_resource_with_options user_plural_name, :collections => ':mass_new => :get, :mass_create => :post'
51
+ m.route_resources_with_options user_plural_name, :collections => ':mass_new => :get, :mass_create => :post'
52
52
 
53
53
  m.insert_into "app/controllers/#{application_controller_name}.rb", 'include Authentication'
54
54
 
@@ -49,6 +49,7 @@ class MondoLayoutGenerator < Rails::Generator::Base
49
49
  m.file "images/accept.gif", "public/images/icons/accept.gif"
50
50
  m.file "images/cancel.gif", "public/images/icons/cancel.gif"
51
51
  m.file "images/back.gif", "public/images/icons/back.gif"
52
+ m.file "images/show.gif", "public/images/icons/show.gif"
52
53
  m.file "images/new.gif", "public/images/icons/new.gif"
53
54
  m.file "images/edit.gif", "public/images/icons/edit.gif"
54
55
  m.file "images/delete.gif", "public/images/icons/delete.gif"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 7
9
- version: 0.6.7
8
+ - 8
9
+ version: 0.6.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Luca Tironi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-26 00:00:00 +01:00
17
+ date: 2010-04-07 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20