lightek_vpm 0.3.4 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/lightek_vpm/init_generator.rb +38 -51
- data/lib/lightek_vpm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffb4b8b9cddc8d10e30340ca01e6da858cafd1b0f271caf35ffcacd3a57c08bc
|
4
|
+
data.tar.gz: 8fe3fb092ef7fa61e98d466da80452aed10d593fa58f118a2a890ea65d1b3cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd28772c6f3a8bd3219f3e0220efdeb4e48207580861f2ec2062c11ad07bcf3eb0992f3fb529d35a83ff0401143de1904e9e2ccc9bcf4b7b987d44bf41c852ae
|
7
|
+
data.tar.gz: 0d9dac3b0aa5318d5c021b527c12709ab8635d96079005be73f84e53ea0081018c4333f3c4538d36fe7770da5874f79c38e13ec993d7589acfc7a89bc514c713
|
@@ -1,54 +1,41 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
+
|
2
3
|
module LightekVpm
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
puts "Adding Devise gem..."
|
19
|
-
gem 'devise'
|
20
|
-
Bundler.with_clean_env { run 'bundle install' }
|
21
|
-
|
22
|
-
# Run Devise installation
|
23
|
-
puts "Now installing Devise..."
|
24
|
-
generate 'devise:install'
|
25
|
-
|
26
|
-
# Create Devise User model
|
27
|
-
puts "Creating User model with Devise..."
|
28
|
-
generate 'devise User role:integer first_name:string last_name:string bio:text website:string twitter:string facebook:string instagram:string dob:date street:string city:string state:string'
|
29
|
-
puts "Running db migration for user"
|
30
|
-
rake 'db:migrate'
|
31
|
-
|
32
|
-
|
33
|
-
# Add CanCanCan gem
|
34
|
-
puts "Adding CanCanCan gem..."
|
35
|
-
gem 'cancancan'
|
36
|
-
Bundler.with_clean_env { run 'bundle install' }
|
37
|
-
|
38
|
-
# Run CanCanCan installation (if needed)
|
39
|
-
# Replace the following lines with CanCanCan installation commands if necessary
|
40
|
-
|
41
|
-
# Add ActionText gem
|
42
|
-
puts "Adding ActionText gem..."
|
43
|
-
gem 'actiontext'
|
44
|
-
Bundler.with_clean_env { run 'bundle install' }
|
45
|
-
|
46
|
-
# Install Action Text
|
47
|
-
puts "Installing Action Text..."
|
48
|
-
generate 'action_text:install'
|
49
|
-
rake 'db:migrate'
|
50
|
-
end
|
4
|
+
module Generators
|
5
|
+
class InitGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
desc "Adding the gems and models needed for base work"
|
8
|
+
|
9
|
+
def add_gems_needed
|
10
|
+
|
11
|
+
# Add Bootstrap gem to Gemfile
|
12
|
+
gem 'bootstrap', '~> 5.3.3'
|
13
|
+
|
14
|
+
# Add Devise gem to Gemfile
|
15
|
+
gem 'devise'
|
16
|
+
|
17
|
+
# Add CanCanCan gem to Gemfile
|
18
|
+
gem 'cancancan'
|
51
19
|
|
52
|
-
|
53
|
-
|
54
|
-
|
20
|
+
# Add ActionText gem to Gemfile
|
21
|
+
gem 'actiontext'
|
22
|
+
|
23
|
+
# Run bundle install
|
24
|
+
Bundler.with_clean_env { run 'bundle install' }
|
25
|
+
|
26
|
+
# Run Devise installation
|
27
|
+
generate 'devise:install'
|
28
|
+
|
29
|
+
# Create Devise User model
|
30
|
+
generate 'devise User role:integer first_name:string last_name:string bio:text website:string twitter:string facebook:string instagram:string dob:date street:string city:string state:string'
|
31
|
+
|
32
|
+
# Run database migration
|
33
|
+
rake 'db:migrate'
|
34
|
+
|
35
|
+
# Run CanCanCan installation (if needed)
|
36
|
+
# Run Action Text installation
|
37
|
+
generate 'action_text:install'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/lightek_vpm/version.rb
CHANGED