avo-setup 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -1,12 +1,20 @@
1
1
  module Avo
2
2
  module Generators
3
3
  class LayoutGenerator < Rails::Generators::Base
4
+ source_root File.expand_path("../templates", __FILE__)
4
5
  argument :layout_name, :type => :string, :default => "application"
5
6
  class_option :stylesheet, :type => :boolean, :default => true, :desc => "Include stylesheet file."
6
7
 
7
8
  def generate_layout
8
9
  copy_file "stylesheet.css", "public/stylesheets/#{file_name}.css" if options.stylesheet?
9
10
  template "layout.html.erb", "app/views/layouts/#{file_name}.html.erb"
11
+ if yes?("Would you like to install Devise?")
12
+ gem("devise")
13
+ generate("devise:install")
14
+ model_name = ask("What would you like the user model to be called? [user]")
15
+ model_name = "user" if model_name.blank?
16
+ generate("devise", model_name)
17
+ end
10
18
  end
11
19
 
12
20
  private
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 15
9
- version: 0.0.15
8
+ - 16
9
+ version: 0.0.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - Avocado