openopus-core-people 1.1.0 → 1.1.1

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: fb6c5d918b4cf8dc73c3c5a22503673dc1ddf9558a8447ef1a505154007753d9
4
- data.tar.gz: e749bc852fe3e432d4aae6e3ce33c04135a94fca16cda43c2ccaecc25b3e0942
3
+ metadata.gz: 44368a166f11f7362f786285cb70c6ec83c75018b3ea1b81c3c81dc2e17d1a17
4
+ data.tar.gz: 427ca23fabbcf709d3a16cff2a65af7ad68edbc099370320329f824eb69b54b9
5
5
  SHA512:
6
- metadata.gz: 5abc7901b229c1850154f628bb6c6efe47bfe3e39ebbf45c0e7d49c4a9286f48c5a1b48af70aaff01fe40ce85d1a148b9f166e83c90fbf371f0eb816aa5f252c
7
- data.tar.gz: 9c08ec78f0de97a8e880295e6e01a7db12471371c59c6db043533986d041bef2317fdbee48c7ba6c78a6c1317a6fca432a5641ee75e04d828efdc959ff8c43f9
6
+ metadata.gz: 9c39bc6ee24bb7f41f9c9366f537d3fd809d981dffe43f831b0a6df0c67889dbd8fe5fc201ba55a5aa2e8e690099a076ce20719297f045cf3183af3e3b35eb36
7
+ data.tar.gz: fdeafcfaa6b820b4b37969c512c7661ed409131dbc07b811c2e77da53ab075d6939a59ef2a778b33915a8456ff30d6e626d5c53fa7746a61b0f1cb1ab2615008
data/app/models/user.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  class User < ApplicationRecord
2
2
  belongs_to :person
3
3
  accepts_nested_attributes_for :person
4
- has_many :credentials, as: :credentialed, dependent: :destroy
5
- accepts_nested_attributes_for :credentials
6
4
  has_and_belongs_to_many :organizations
7
5
 
8
6
  delegate :name, :name=, to: :person
data/db/seeds.rb CHANGED
@@ -4,5 +4,4 @@ bfox = User.lookup("bfox@opuslogica.com") ||
4
4
  User.create(person_attributes: { email: "bfox@opuslogica.com", name: "Brian Jhan Fox",
5
5
  address: "901 Olive St., Santa Barbara, CA, 93101",
6
6
  phone: "805.555.8642" },
7
- organization: opus,
8
- credentials_attributes: [{ password: "idtmp2tv" }])
7
+ organization: opus)
@@ -0,0 +1,16 @@
1
+ module Openopus
2
+ module Core
3
+ module People
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace People
6
+ initializer :append_migrations do |app|
7
+ unless app.root.to_s.match(root.to_s)
8
+ config.paths["db/migrate"].expanded.each do |expanded_path|
9
+ app.config.paths["db/migrate"] << expanded_path
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,7 +1,7 @@
1
1
  module Openopus
2
2
  module Core
3
3
  module People
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openopus-core-people
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian J. Fox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-13 00:00:00.000000000 Z
11
+ date: 2019-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -53,7 +53,6 @@ files:
53
53
  - Rakefile
54
54
  - app/assets/config/openopus_core_people_manifest.js
55
55
  - app/models/address.rb
56
- - app/models/credential.rb
57
56
  - app/models/email.rb
58
57
  - app/models/label.rb
59
58
  - app/models/nickname.rb
@@ -70,10 +69,10 @@ files:
70
69
  - db/migrate/00000000000005_create_people.rb
71
70
  - db/migrate/00000000000006_create_organizations.rb
72
71
  - db/migrate/00000000000007_create_users.rb
73
- - db/migrate/00000000000008_create_credentials.rb
74
72
  - db/migrate/00000000000009_create_join_table_organizations_users.rb
75
73
  - db/seeds.rb
76
74
  - lib/openopus/core/people.rb
75
+ - lib/openopus/core/people/#engine.rb#
77
76
  - lib/openopus/core/people/engine.rb
78
77
  - lib/openopus/core/people/version.rb
79
78
  - lib/tasks/openopus/core/people_tasks.rake
@@ -1,15 +0,0 @@
1
- class Credential < ApplicationRecord
2
- has_secure_password
3
- belongs_to :credentialed, polymorphic: true
4
-
5
- # We point to an enail that actually polymorphically belongs to a different thing.
6
- # Which is great. So don't declare this to be a polymorphic relationship. It isn't.
7
- belongs_to :email
8
- before_validation :grab_email_from_credentialed
9
-
10
- # validates :password, length: { minimum: 8 }, on: :create
11
-
12
- def grab_email_from_credentialed
13
- self.email ||= self.credentialed.email
14
- end
15
- end
@@ -1,13 +0,0 @@
1
- class CreateCredentials < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :credentials do |t|
4
- t.references :credentialed, polymorphic: true
5
- t.references :email, foreign_key: true
6
- t.string :password_digest
7
- t.string :provider # Like Google, Facebook, etc.
8
- t.string :provider_auth # Whatever their auth token looks like.
9
-
10
- t.timestamps
11
- end
12
- end
13
- end