abstractor 4.4.4 → 4.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTBiMDAxNGFjNTU1ZGExYWMzZjU5NDhjYTk2MTQ3YjU4MzUzNGZjNA==
4
+ OWRjNmRkZWM4YjJlOGNhNjczYjQ1ZTU5NmY0M2ViOTdkYzY5MGYxOA==
5
5
  data.tar.gz: !binary |-
6
- MWE0MWMzODk2MDY4Njg5MTAyYzc2MjI4YWRiMTAxMTZhMjllZWIwZA==
6
+ MThlNjVmNjA2ZGZjZWI4ZTQ0YmU1MTk2Y2Y0ZmJkOWMyMDFhNzMxYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTU2MTNkZjEwMjdiNjQyYjQ3NWM4Nzg4N2MxNDg2ZmE4NjIzOTMwNzI4MWNh
10
- NWM4MTFlOGM2NjE0OTAyNGM2NTJmZDhiMGVhNmI3ODViMjcxZTBmMzhiMDM3
11
- Yjk5NzRjZWEyYjExMDBiODdjMjM1OThhZmE1NmE5NmMwYWExYjQ=
9
+ NTZiOGY4NmEyYmMwMThmMTJiNGFjMzBlMWE1YTBiZTM2NWRiNTU5ZDU3MTY1
10
+ ZTM3NzY1NmI4MjVkZWYzMTVkMTg0OWM4YTYzNjlhNDI0NDY2NmI3OTI3YWRh
11
+ ZmM1N2Y5YTIxNGZkMzhkNTU5OWYxM2QzOTc3OGZkZTA3ODMzMWY=
12
12
  data.tar.gz: !binary |-
13
- OTY2OGYzMWIzMDU2NGJjZjEzYWY1MzRkNjhiMzM1NTFlYzFlNWQ5ZDEzYzBj
14
- MWIyODJkOTYwMjA2MjhiMzVjMjYzMTBlZWYwOGFlNzZlZjYwMjNjOGYxZmU2
15
- ZTZkNWVjZTczMTkwZTA4YjE2MTIzZGE4MTcxZmRlN2NlZGYzMTI=
13
+ NzlkYzk2OWY3YzNkZTlhMjcyYWFkNWQzZDhkNTY2MDgxMmRjZjg4NzdkYWVl
14
+ YzVjNzVkOGJiZTExZjdlMWVlN2FlYWZhYzA0ZjRjODJkOTQ0Y2YxMzAzMzJi
15
+ OWExZTExZTM2ODZjMzZiYTRiNmI0Y2RiNjY5OTJmMWZkNGI0MTI=
@@ -185,6 +185,13 @@ module Abstractor
185
185
  options = { abstractor_abstractions: abstractor_abstractions }.merge(options)
186
186
  abstractor_abstractions = abstractor_abstractions_by_abstraction_schemas(options)
187
187
  end
188
+ abstractor_abstraction_groups = []
189
+ abstractor_abstractions.each do |abstractor_abstraction|
190
+ if abstractor_abstraction.abstractor_abstraction_group
191
+ abstractor_abstraction_groups << abstractor_abstraction.abstractor_abstraction_group
192
+ end
193
+ end
194
+ abstractor_abstraction_groups.uniq!
188
195
  abstractor_abstractions.each do |abstractor_abstraction|
189
196
  if !options[:only_unreviewed] || (options[:only_unreviewed] && abstractor_abstraction.unreviewed?)
190
197
  abstractor_abstraction.abstractor_suggestions.each do |abstractor_suggestion|
@@ -195,9 +202,15 @@ module Abstractor
195
202
  abstractor_abstraction.abstractor_indirect_sources.each do |abstractor_indirect_source|
196
203
  abstractor_indirect_source.destroy
197
204
  end
205
+
198
206
  abstractor_abstraction.destroy
199
207
  end
200
208
  end
209
+ abstractor_abstraction_groups.each do |abstractor_abstraction_group|
210
+ if abstractor_abstraction_group.reload.abstractor_abstraction_group_members.empty?
211
+ abstractor_abstraction_group.destroy
212
+ end
213
+ end
201
214
  end
202
215
 
203
216
  ##
@@ -13,7 +13,7 @@ module Abstractor
13
13
  base.send :has_many, :abstractor_abstraction_sources, :through => :abstractor_abstractor_suggestions
14
14
  base.send :has_many, :abstractor_indirect_sources
15
15
 
16
- base.send :has_one, :abstractor_abstraction_group_member
16
+ base.send :has_one, :abstractor_abstraction_group_member, dependent: :destroy
17
17
  base.send :has_one, :abstractor_abstraction_group, :through => :abstractor_abstraction_group_member
18
18
  base.send :has_one, :abstractor_abstraction_schema, :through => :abstractor_subject
19
19
 
@@ -1,3 +1,3 @@
1
1
  module Abstractor
2
- VERSION = '4.4.4'
2
+ VERSION = '4.4.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.4
4
+ version: 4.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gurley, Yulia Bushmanova
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails