lotus_admin 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7654d4a6375e34d5e2b58abff7c19c3e16721b4518ada9b5f84ccfe955838f95
4
- data.tar.gz: 828b1e84b78a6b828c4b5f503d4205d14732064e145c343630c49aca4e440dea
3
+ metadata.gz: 4398379a31a5394d89a2afb785e1c9ab334523aa84c419363ca4be7d812d6846
4
+ data.tar.gz: 6c453e3ac7713b27b10764018f21bbe898cbc5b1903497837afb000566621c7b
5
5
  SHA512:
6
- metadata.gz: d288f6e13b189d0b63af5ba153caffc5e4e3a8a86d64920cc0b9315e661bc781d61e01dd0e48b17bfcdd601c08a302485c56f5832a0b5bc3bdc04c95b20b92f2
7
- data.tar.gz: 27425031f367f49b0b35946bc11a276ecd139ed560f1825d23a2f6c0e2db9968a4745917badacd58ebd803bfee4bd28c225eff87f688245ed8aa6ee697923b6b
6
+ metadata.gz: 26c243b53f82aecbcec522fa597d40fe32aac0e31dd67297e585e954084577d84aa25ef652f8c982b1b4f65fde7e8dcee502ac49a2bbefbcc45426e1d7ffe05a
7
+ data.tar.gz: ab8fee03884513fe5120b2a1eb470b1d989c47e86a3f7e02e7e0283a6782a1ad9bd3d3863d49c2eeb5c3dd8986b2030936459ce1c16dc39e3c644c49940a5399
@@ -0,0 +1,9 @@
1
+ module LotusAdmin::Invitable
2
+ extend ActiveSupport::Concern
3
+
4
+ def send_invited_email_notification
5
+ token = set_reset_password_token
6
+
7
+ LotusAdmin::UserMailer.invited(self, token).deliver_later
8
+ end
9
+ end
@@ -1,5 +1,7 @@
1
1
  module LotusAdmin
2
2
  class User < ApplicationRecord
3
+ include Invitable
4
+
3
5
  devise :database_authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
4
6
 
5
7
  validates :first_name, :last_name, presence: true
@@ -7,11 +9,5 @@ module LotusAdmin
7
9
  def name
8
10
  [ first_name, last_name ].join(' ')
9
11
  end
10
-
11
- def send_invited_email_notification
12
- token = set_reset_password_token
13
-
14
- LotusAdmin::UserMailer.invited(self, token).deliver_later
15
- end
16
12
  end
17
13
  end
@@ -17,14 +17,5 @@ module LotusAdmin
17
17
  FactoryBot.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__)
18
18
  end
19
19
  end
20
-
21
- initializer :append_migrations do |app|
22
- # This prevents migrations from being loaded twice from the inside of the gem itself (dummy test app)
23
- if app.root.to_s !~ /#{root}/
24
- config.paths['db/migrate'].expanded.each do |migration_path|
25
- app.config.paths['db/migrate'] << migration_path
26
- end
27
- end
28
- end
29
20
  end
30
21
  end
@@ -1,3 +1,3 @@
1
1
  module LotusAdmin
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :administrator, class: LotusAdmin.configuration.user_class_name do
2
+ factory :lotus_user, class: LotusAdmin.configuration.user_class_name do
3
3
  first_name { 'Johnny' }
4
4
  sequence(:last_name) { |n| "Appleseed #{ n }" }
5
5
  sequence(:email) { |n| "user+#{ n }@gmail.com" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Millsaps-Brewer
@@ -374,6 +374,7 @@ files:
374
374
  - app/jobs/lotus_admin/application_job.rb
375
375
  - app/mailers/lotus_admin/application_mailer.rb
376
376
  - app/mailers/lotus_admin/user_mailer.rb
377
+ - app/models/concerns/lotus_admin/invitable.rb
377
378
  - app/models/lotus_admin/application_record.rb
378
379
  - app/models/lotus_admin/filters/configuration.rb
379
380
  - app/models/lotus_admin/user.rb