trogdir_models 0.7.1 → 0.7.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
  SHA1:
3
- metadata.gz: e42baf973b741d8dbb1b680c8ce22e44c2ca2c04
4
- data.tar.gz: 3e64949a69e81429eecd29f774ee4d493f3c0e38
3
+ metadata.gz: 390dc2ea0882ce33b0bef2dc3b068472ed01d155
4
+ data.tar.gz: d23048e4a40bcdea53235cea7094ccb2f329806a
5
5
  SHA512:
6
- metadata.gz: 75bbaeaa65e42450768c5d2313fb440c8230e948569233f920bfa9467fe0ed223188c6938ccd9d2f409c1f5369ee1471b5898734b5d3f90328955d187d3b552b
7
- data.tar.gz: 860fd191406ddfc2c59319f56d83623b0fbc9c3ae7f8ba5c4d93202c3dea245d9af38a6d3d5a22e72557d1b30c082a130f5581ce4c70d920a4daacea6057225b
6
+ metadata.gz: c808066608b9a465dd873897f47a4686caf6be0eb4c5973cae54a18c7044405a503e7d9e45ec06959411ca8e4b94308a06c7e9bfc90de39a9f46bd0379b5226d
7
+ data.tar.gz: 91f1b5101f8c98c82476710693869d44daaad27205a225697530f29100b2d1427db29b270e9e60359622f2f95711f94b8442a2d29c2326541ede496794003e7f
@@ -3,6 +3,13 @@ class Changeset
3
3
 
4
4
  embeds_many :change_syncs
5
5
 
6
+ index created_at: -1
7
+ index 'change_syncs.syncinator_id' => 1
8
+ index 'change_syncs.started_at' => 1
9
+ index 'change_syncs.succeeded_at' => 1
10
+ index({'change_syncs._id' => 1}, unique: true)
11
+ index({'change_syncs.sync_logs._id' => 1}, unique: true)
12
+
6
13
  after_create :create_change_syncs
7
14
 
8
15
  alias :person :trackable_root
@@ -14,4 +21,4 @@ class Changeset
14
21
  change_syncs.create syncinator: syncinator
15
22
  end
16
23
  end
17
- end
24
+ end
@@ -37,6 +37,23 @@ class Person
37
37
  # Options
38
38
  field :enabled, type: Boolean # TODO: figure out if tihs is necessary
39
39
 
40
+ # For sorting
41
+ index last_name: 1, preferred_name: 1
42
+
43
+ # For searching
44
+ index({uuid: 1}, unique: true)
45
+ index affiliations: 1
46
+ index first_name: 1
47
+ index preferred_name: 1
48
+ index last_name: 1
49
+ index display_name: 1
50
+ index title_name: 1
51
+ index department_name: 1
52
+ index residence_name: 1
53
+ index 'emails.address' => 1
54
+ index 'ids.identifier' => 1
55
+ index({'ids.identifier' => 1, 'ids.type' => 1}, unique: true)
56
+
40
57
  validates :uuid, :first_name, :last_name, presence: true
41
58
  validates :uuid, uniqueness: true
42
59
  validates :gender, inclusion: { in: Person::GENDERS, allow_nil: true }
@@ -1,3 +1,3 @@
1
1
  module TrogdirModels
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trogdir_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Crownoble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-06 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api-auth