abstractor 2.1.0 → 2.1.01

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
- MWUzYjczYWRlYjNkMzRiNzc2YTRjYjQ3YjIyM2IyZDAwYjE2ZGNkZg==
4
+ YmUyMzBmNjgwNGM2MGZhMjBiMjI2YzQ4ODIyYjM2YzRlMWVlMWM1Yg==
5
5
  data.tar.gz: !binary |-
6
- MDczMzEzODRiNGE1ZjM5NmYyYmQxM2Q1ODUyOGQ5NGQ2N2Y4MjY4Yw==
6
+ YmM5ZWE3ZDhhMTY1NzEzMjM0NjQyODEzMzNmNWZmYmU2NTQyYzU1NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTRlNzg5ZDFiOTlhMDBmMDc4YmNhZDkyYTY1Nzc0YjU0ZmEzYWJmYmY1YzEz
10
- OGRkMGE2MTkwZDUzNTcxODRjZjcwYTI4ODlmN2NlMzExN2U4YjBiNzM0ZTI0
11
- MzFlMTkzOWU2NDc4MWZkOTBhYmMzMDJkZmZiYzBhMWI2MTg4OWI=
9
+ ZjMwNjNhMGQzNjY4MGQwZThmZDVkZjhiMTBjMWM1NGI1ZmFkMGYzZjFmNWU5
10
+ OTgyMzUzMjFiZjE0YjRkMTQwNzdmMzU0NTdmZTQwOTYwOTU5ZWVmNjA0YTk2
11
+ NzAwMjNmNWFmMWU2MDdhMzUxOTk5ZjQ2Mzc0MzAzYjhjOTViYjY=
12
12
  data.tar.gz: !binary |-
13
- NGY1YTAzNmZiYWU4NWUxZThiOTExZmQxYWMyYjcwYTVkNTVkZTQzZThjMzc1
14
- MTAxYmFkNmYzMjQ3ZjUyOGYyMWFhZTgzODAyMWI3OWIwMDJmYWY3ZjE0N2Fi
15
- NTZhOWJjNjVmMDgzN2QxYzEyZDA3NmRmZjc4YmE5ODRiMWNjYzI=
13
+ MjZmMjA3MDQ4NDUzZWFlMDA0Mjc1NzcwZmFhOTBiNGUxYjQ4YmY5YzVkNDg2
14
+ N2RmYzU0YTg2ZWY2NGEzYjFmYWEzNTdkMjZmMDdkNDkwZDY5OTQ4N2NiNTAy
15
+ ZGY4MzRkMGQzZmZkYTY2MDIyNzFhZjBjNjBiNjllZDRhOGM0M2E=
@@ -46,12 +46,13 @@
46
46
  - abstraction_sources = abstractor_abstraction.abstractor_subject.abstractor_abstraction_sources.select { |s| s.abstractor_abstraction_source_type.name != 'indirect' }
47
47
  - abstraction_sources.each do |abstraction_source|
48
48
  - abstraction_source.normalize_from_method_to_sources(abstractor_abstraction.about).each do |source|
49
- - dom_id = "#{abstraction_source.id}_#{source[:source_type]}_#{source[:source_id]}_#{source[:source_method]}"
50
- %span{ :class => 'abstractor_abstraction_source_tooltip_img label', :rel =>"#abstraction_text_#{dom_id}", :title => "#{source[:source_type].to_s} #{source[:source_method]}"}
51
- = image_tag('abstractor/page.png', :id => "abstraction_text_link_#{dom_id}")
52
- %br
53
- %div{ :id => "abstraction_text_#{dom_id}", :class => 'tooltip'}
54
- = simple_format(source[:source_type].find(source[:source_id]).send(source[:source_method]))
49
+ - if source[:source_type] && source[:source_id] && source[:source_method]
50
+ - dom_id = "#{abstraction_source.id}_#{source[:source_type]}_#{source[:source_id]}_#{source[:source_method]}"
51
+ %span{ :class => 'abstractor_abstraction_source_tooltip_img label', :rel =>"#abstraction_text_#{dom_id}", :title => "#{source[:source_type].to_s} #{source[:source_method]}"}
52
+ = image_tag('abstractor/page.png', :id => "abstraction_text_link_#{dom_id}")
53
+ %br
54
+ %div{ :id => "abstraction_text_#{dom_id}", :class => 'tooltip'}
55
+ = simple_format(source[:source_type].find(source[:source_id]).send(source[:source_method]))
55
56
  .column-4
56
57
  = f.submit 'Save', :class => 'button positive'
57
58
  = link_to 'Cancel', abstractor_abstraction, :class => 'button negative', :remote => true
@@ -60,9 +60,9 @@ module Abstractor
60
60
  def abstractor_abstractions_by_abstractor_abstraction_status(abstractor_abstraction_status)
61
61
  case abstractor_abstraction_status
62
62
  when 'needs_review'
63
- abstractor_abstractions.select { |abstractor_abstraction| abstractor_abstraction.value.blank? && abstractor_abstraction.unknown.blank? && abstractor_abstraction.not_applicable.blank? }
63
+ abstractor_abstractions.not_deleted.select { |abstractor_abstraction| abstractor_abstraction.value.blank? && abstractor_abstraction.unknown.blank? && abstractor_abstraction.not_applicable.blank? }
64
64
  when 'reviewed'
65
- abstractor_abstractions.select { |abstractor_abstraction| !abstractor_abstraction.value.blank? || !abstractor_abstraction.unknown.blank? || !abstractor_abstraction.not_applicable.blank? }
65
+ abstractor_abstractions.not_deleted.select { |abstractor_abstraction| !abstractor_abstraction.value.blank? || !abstractor_abstraction.unknown.blank? || !abstractor_abstraction.not_applicable.blank? }
66
66
  end
67
67
  end
68
68
 
@@ -100,9 +100,9 @@ module Abstractor
100
100
  def by_abstractor_abstraction_status(abstractor_abstraction_status)
101
101
  case abstractor_abstraction_status
102
102
  when 'needs_review'
103
- where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND (aa.value IS NULL OR aa.value = '') AND (aa.unknown IS NULL OR aa.unknown = ?) AND (aa.not_applicable IS NULL OR aa.not_applicable = ?))", false, false])
103
+ where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND (aa.value IS NULL OR aa.value = '') AND (aa.unknown IS NULL OR aa.unknown = ?) AND (aa.not_applicable IS NULL OR aa.not_applicable = ?))", false, false])
104
104
  when 'reviewed'
105
- where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id) AND NOT EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND COALESCE(aa.value, '') = '' AND COALESCE(aa.unknown, ?) != ? AND COALESCE(aa.not_applicable, ?) != ?)", false, true, false, true])
105
+ where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id) AND NOT EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND COALESCE(aa.value, '') = '' AND COALESCE(aa.unknown, ?) != ? AND COALESCE(aa.not_applicable, ?) != ?)", false, true, false, true])
106
106
  else
107
107
  where(nil)
108
108
  end
@@ -1,3 +1,3 @@
1
1
  module Abstractor
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.01'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.01
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gurley, Yulia Bushmanova