lightek_vpm 0.3.4 → 0.3.5
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.
- 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: f16be04a1c2c4f59ebaef123330a7d92048f05944fd815e056382504df5f9365
|
|
4
|
+
data.tar.gz: 485e851fdf7c8b0c63a08aa5abe46d1f1af748122aff1dbc6e09108d022e3750
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f96a2a9be6176d81b120ebdf52cc3ab558b661df817c4763097d238a14bba0b7b495b99ec5418d2f3f405e96e382558ff17a6dbc474bf6e251e25ec94198d92
|
|
7
|
+
data.tar.gz: 371700a5bdea02cc6efd42635c45b84f4dcab88174ce262da1e4951c82ec208958fce3ed9f59ef380ed17f4dd698e69344589d8f166e5af45b0325fb8826d742
|
|
@@ -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
|
+
|
|
8
|
+
def add_gems_needed
|
|
9
|
+
desc "Adding the gems and models needed for base work"
|
|
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