avo-setup 0.0.21 → 0.0.22

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.
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
@@ -8,22 +8,26 @@ module Avo
8
8
  if yes?("Would you like to generate a layout?")
9
9
  generate("avo:layout")
10
10
  end
11
+ #Devise
11
12
  if yes?("Would you like to install Devise?")
12
13
  gem("devise")
13
14
  generate("devise:install")
14
15
  model_name = ask("What would you like the user model to be called? [user]")
15
16
  model_name = "user" if model_name.blank?
16
17
  generate("devise", model_name)
17
- end
18
- if yes?("Would you like to use CanCan")
19
- gem("cancan")
20
- copy_file "ability.rb", "models/ability.rb"
21
- @single=model_name
22
- @plural=model_name.pluralize
23
- @migname=@plural+"_roles" if @plural <= "roles"
24
- @migname="roles_"+@plural if @plural > "roles"
25
-
26
- migration_template 'create_roles_migration.rb', "db/migrate/create_roles.rb"
18
+
19
+ #CanCan
20
+ if yes?("Would you like to use CanCan?")
21
+ gem("cancan")
22
+ copy_file "ability.rb", "models/ability.rb"
23
+ @single=model_name
24
+ @plural=model_name.pluralize
25
+ @migname=@plural+"_roles" if (@plural.casecmp "roles")>=0
26
+ @migname="roles_"+@plural if (@plural.casecmp "roles")<0
27
+
28
+ migration_template 'create_roles_migration.rb', "db/migrate/create_roles.rb"
29
+ end
30
+
27
31
  end
28
32
  end
29
33
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 21
9
- version: 0.0.21
8
+ - 22
9
+ version: 0.0.22
10
10
  platform: ruby
11
11
  authors:
12
12
  - Avocado