ANX vor 6 Jahren
Ursprung
Commit
5f485e64fa
3 geänderte Dateien mit 10 neuen und 11 gelöschten Zeilen
  1. 7 2
      README.md
  2. 1 4
      app/models/user.rb
  3. 2 5
      template.rb

+ 7 - 2
README.md

@@ -20,13 +20,13 @@ You'll need the following installed to run the template successfully:
 #### Creating a new app
 
 ```bash
-rails new myapp -d postgresql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb
+rails new myapp -d postgresql -m http://gogs.anxgang.com/Hiskio/jumpstart/raw/master/template.rb --skip-coffee --skip-test
 ```
 
 Or if you have downloaded this repo, you can reference template.rb locally:
 
 ```bash
-rails new myapp -d postgresql -m template.rb
+rails new myapp -d postgresql -m template.rb --skip-coffee --skip-test
 ```
 
 #### Cleaning up
@@ -37,3 +37,8 @@ spring stop
 cd ..
 rm -rf myapp
 ```
+
+#### Stimulus (Options)
+```
+$ rake webpacker:install:stimulus
+```

+ 1 - 4
app/models/user.rb

@@ -1,10 +1,7 @@
 class User < ApplicationRecord
   # Include default devise modules. Others available are:
   # :confirmable, :lockable, :timeoutable and :omniauthable
-  devise :masqueradable, :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :omniauthable
+  devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :omniauthable
 
-  has_person_name
-
-  has_many :notifications, foreign_key: :recipient_id
   has_many :services
 end

+ 2 - 5
template.rb

@@ -13,7 +13,7 @@ def add_template_repository_to_source_path
     at_exit { FileUtils.remove_entry(tempdir) }
     git clone: [
       "--quiet",
-      "https://github.com/excid3/jumpstart.git",
+      "http://gogs.anxgang.com/Hiskio/jumpstart.git",
       tempdir
     ].map(&:shellescape).join(" ")
 
@@ -82,9 +82,6 @@ def add_users
       /  # config.secret_key = .+/,
       "  config.secret_key = Rails.application.credentials.secret_key_base"
   end
-
-  # Add Devise masqueradable to users
-  inject_into_file("app/models/user.rb", "omniauthable, :masqueradable, :", after: "devise :")
 end
 
 def add_bootstrap
@@ -110,7 +107,7 @@ end
 
 def add_webpack
   rails_command 'webpacker:install'
-  rails_command 'webpacker:install:stimulus'
+  # rails_command 'webpacker:install:stimulus'
 end
 
 def add_sidekiq