machinery-tool 1.14.2 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +14 -0
  4. data/html/assets/compare/machinery.js +20 -13
  5. data/html/assets/file_loader.gif +0 -0
  6. data/html/assets/machinery-base.css +21 -12
  7. data/html/assets/machinery-base.js +19 -0
  8. data/html/assets/machinery.css +35 -11
  9. data/html/assets/show/machinery.js +24 -7
  10. data/html/comparison.html.haml +13 -36
  11. data/html/index.html.haml +32 -47
  12. data/html/partials/changed_managed_files.html.haml +5 -5
  13. data/html/partials/compare/changed_managed_file_list.html.haml +1 -1
  14. data/html/partials/compare/changed_managed_files.html.haml +41 -47
  15. data/html/partials/compare/changes.html.haml +8 -0
  16. data/html/partials/compare/config_file_list.html.haml +5 -5
  17. data/html/partials/compare/config_files.html.haml +38 -44
  18. data/html/partials/compare/group_list.html.haml +3 -3
  19. data/html/partials/compare/groups.html.haml +34 -42
  20. data/html/partials/compare/os.html.haml +21 -23
  21. data/html/partials/compare/package_list.html.haml +2 -2
  22. data/html/partials/compare/packages.html.haml +40 -56
  23. data/html/partials/compare/pattern_list.html.haml +2 -2
  24. data/html/partials/compare/patterns.html.haml +40 -42
  25. data/html/partials/compare/repositories.html.haml +40 -41
  26. data/html/partials/compare/service_list.html.haml +1 -1
  27. data/html/partials/compare/services.html.haml +44 -36
  28. data/html/partials/compare/summary.html.haml +17 -0
  29. data/html/partials/compare/unmanaged_file_list.html.haml +4 -3
  30. data/html/partials/compare/unmanaged_files.html.haml +44 -38
  31. data/html/partials/compare/user_list.html.haml +2 -2
  32. data/html/partials/compare/users.html.haml +40 -43
  33. data/html/partials/config_files.html.haml +8 -8
  34. data/html/partials/os.html.haml +8 -5
  35. data/html/partials/packages.html.haml +4 -4
  36. data/html/partials/patterns.html.haml +2 -2
  37. data/html/partials/repositories.html.haml +5 -5
  38. data/html/partials/scope_header.html.haml +4 -6
  39. data/html/partials/services.html.haml +1 -1
  40. data/html/partials/unmanaged_files.html.haml +1 -1
  41. data/html/partials/users.html.haml +4 -4
  42. data/lib/array.rb +4 -0
  43. data/lib/cli.rb +12 -4
  44. data/lib/file_scope.rb +9 -3
  45. data/lib/html.rb +1 -0
  46. data/lib/machinery.rb +1 -0
  47. data/lib/scope.rb +16 -0
  48. data/lib/server.rb +61 -23
  49. data/lib/system_description.rb +0 -8
  50. data/lib/try.rb +28 -0
  51. data/lib/version.rb +1 -1
  52. data/machinery-helper/version.go +1 -1
  53. data/man/generated/machinery.1.gz +0 -0
  54. data/man/generated/machinery.1.html +54 -22
  55. data/plugins/changed_managed_files/{changed_managed_files.md → changed_managed_files.yml} +4 -0
  56. data/plugins/changed_managed_files/changed_managed_files_model.rb +14 -0
  57. data/plugins/changed_managed_files/changed_managed_files_renderer.rb +17 -0
  58. data/plugins/config_files/{config_files.md → config_files.yml} +4 -0
  59. data/plugins/config_files/config_files_model.rb +14 -0
  60. data/plugins/config_files/config_files_renderer.rb +17 -0
  61. data/plugins/groups/{groups.md → groups.yml} +4 -0
  62. data/plugins/groups/groups_model.rb +14 -0
  63. data/plugins/groups/groups_renderer.rb +17 -0
  64. data/plugins/os/{os.md → os.yml} +4 -0
  65. data/plugins/packages/{packages.md → packages.yml} +4 -0
  66. data/plugins/packages/packages_model.rb +1 -12
  67. data/plugins/patterns/{patterns.md → patterns.yml} +4 -0
  68. data/plugins/patterns/patterns_model.rb +14 -0
  69. data/plugins/patterns/patterns_renderer.rb +21 -0
  70. data/plugins/repositories/{repositories.md → repositories.yml} +4 -0
  71. data/plugins/repositories/repositories_model.rb +14 -0
  72. data/plugins/repositories/repositories_renderer.rb +17 -0
  73. data/plugins/services/{services.md → services.yml} +4 -0
  74. data/plugins/services/services_model.rb +21 -11
  75. data/plugins/services/services_renderer.rb +17 -0
  76. data/plugins/unmanaged_files/{unmanaged_files.md → unmanaged_files.yml} +4 -0
  77. data/plugins/unmanaged_files/unmanaged_files_model.rb +2 -1
  78. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +17 -0
  79. data/plugins/users/{users.md → users.yml} +4 -0
  80. data/plugins/users/users_model.rb +38 -0
  81. data/plugins/users/users_renderer.rb +17 -0
  82. metadata +17 -32
  83. data/html/assets/logo-changed-managed-files-small.png +0 -0
  84. data/html/assets/logo-changed-managed-files.png +0 -0
  85. data/html/assets/logo-config-files-small.png +0 -0
  86. data/html/assets/logo-config-files.png +0 -0
  87. data/html/assets/logo-groups-small.png +0 -0
  88. data/html/assets/logo-groups.png +0 -0
  89. data/html/assets/logo-os-small.png +0 -0
  90. data/html/assets/logo-os.png +0 -0
  91. data/html/assets/logo-packages-small.png +0 -0
  92. data/html/assets/logo-packages.png +0 -0
  93. data/html/assets/logo-patterns-small.png +0 -0
  94. data/html/assets/logo-patterns.png +0 -0
  95. data/html/assets/logo-repositories-small.png +0 -0
  96. data/html/assets/logo-repositories.png +0 -0
  97. data/html/assets/logo-services-small.png +0 -0
  98. data/html/assets/logo-services.png +0 -0
  99. data/html/assets/logo-unmanaged-files-small.png +0 -0
  100. data/html/assets/logo-unmanaged-files.png +0 -0
  101. data/html/assets/logo-users-small.png +0 -0
  102. data/html/assets/logo-users.png +0 -0
@@ -4,8 +4,8 @@
4
4
  %th Name
5
5
  %th.small UID
6
6
  %th.small GID
7
- %th Comment
8
- %th Home
7
+ %th.medium Comment
8
+ %th.medium Home
9
9
  %th.small Shell
10
10
  %tbody
11
11
  - list.each do |user|
@@ -1,52 +1,49 @@
1
- - if @diff["patterns"]
2
- %a.scope_anchor{ id: "users" }
1
+ - if @diff["users"]
2
+ - scope = "users"
3
+ %a.scope_anchor{ id: scope }
3
4
  .scope#users_container
4
5
  .row
5
6
  .col-xs-1
6
- %a{ href: "#users" }
7
- %img.over.scope_logo_big{ :src => "/assets/logo-users.png",
8
- "data-toggle" => "popover",
9
- :title => "Users",
10
- "data-content" => "#{scope_help("users")}" }
7
+ %a.btn.btn-default.btn-lg.scope_logo_big{ :href => "##{scope}",
8
+ :title => scope_title(scope), "data-toggle"=>"popover",
9
+ "data-content" => scope_help(scope) }
10
+ %span= scope_initials(scope)
11
11
  %span.toggle{ title: "Collapse/Expand" }
12
12
  .col-xs-11
13
13
  %h2
14
14
  Users
15
- .scope-summary
16
- - if @diff["users"].only_in1
17
- %span.summary-part
18
- #{@description_a.name}: #{@diff["users"].only_in1.length} users
19
- - if @diff["users"].only_in2
20
- %span.summary-part
21
- #{@description_b.name}: #{@diff["users"].only_in2.length} users
22
- - if @diff["users"].common
23
- %span.summary-part
24
- %a.show-common-elements{ href: "#users_both" }<
25
- both
26
- = ": #{@diff["users"].common.length} users"
15
+ = render_partial "compare/summary",
16
+ scope: "users",
17
+ singular: "user",
18
+ plural: "users"
27
19
  .row.scope_content.collapse.in
28
- .row
29
- .col-xs-1
30
- .col-xs-5.table_container
31
- - if @diff["users"].only_in1
32
- = only_in_a
33
- = render_partial "compare/user_list", list: @diff["users"].only_in1
34
- .col-xs-1
35
- .col-xs-5.table_container
36
- - if @diff["users"].only_in2
37
- = only_in_b
38
- = render_partial "compare/user_list", list: @diff["users"].only_in2
39
- - if @diff["users"].common
40
- %a.both_anchor{ id: "users_both" }
20
+ .col-md-12
41
21
  .row
42
- .col-xs-1
43
- .col-xs-2
44
- %a.show-common-elements{ href: "#users_both" }
45
- Show common elements in users
46
- %a.hide-common-elements{ href: "#", style: "display: none" }
47
- Hide common elements in users
48
- .row.scope_common_content.collapse
49
- .col-xs-1
50
- .col-xs-10.table_container
51
- = in_both
52
- = render_partial "compare/user_list", list: @diff["users"].common
22
+ .col-md-6.table_container
23
+ - if @diff["users"].only_in1
24
+ = only_in_a
25
+ = render_partial "compare/user_list", list: @diff["users"].only_in1
26
+ .col-md-6.table_container
27
+ - if @diff["users"].only_in2
28
+ = only_in_b
29
+ = render_partial "compare/user_list", list: @diff["users"].only_in2
30
+ - if @diff["users"].changed
31
+ %a.both_anchor{ id: "users_changed" }
32
+ .row
33
+ .col-md-12.table_container
34
+ = changed
35
+ = render_partial "compare/changes", changes: changed_elements("users",
36
+ key: "name",
37
+ attributes: ["uid", "gid", "comment", "shell", "home"])
38
+ - if @diff["users"].common
39
+ %a.both_anchor{ id: "users_both" }
40
+ .row
41
+ .col-md-12
42
+ %a.show-common-elements{ href: "#users_both" }
43
+ Show common elements in users
44
+ %a.hide-common-elements{ href: "#", style: "display: none" }
45
+ Hide common elements in users
46
+ .row.scope_common_content.collapse
47
+ .col-md-12.table_container
48
+ = in_both
49
+ = render_partial "compare/user_list", list: @diff["users"].common
@@ -20,18 +20,18 @@
20
20
  %td.linenumber= line.new_line_number
21
21
  %td
22
22
  = line.content
23
- .col-xs-1
24
- .col-xs-11
23
+ .col-md-1
24
+ .col-md-11
25
25
  %table.table.table-striped.table-hover.table-condensed.files-table.filterable
26
26
  %thead
27
27
  %tr
28
28
  %th Name
29
- %th Package Name
30
- %th Package Version
31
- %th Changes
32
- %th Mode
33
- %th User
34
- %th Group
29
+ %th.medium Package Name
30
+ %th.medium Package Version
31
+ %th.medium Changes
32
+ %th.small Mode
33
+ %th.small User
34
+ %th.small Group
35
35
  %tbody
36
36
  - config_files.files.each do |file|
37
37
  %tr
@@ -1,19 +1,22 @@
1
1
  - if os
2
+ - scope = "os"
2
3
  %div
3
- %a.scope_anchor{ :id => "os" }
4
+ %a.scope_anchor{ :id => scope }
4
5
  .scope#os_container
5
6
  .row
6
7
  .col-xs-1
7
- %img.scope_logo_big.over{ "src" => "assets/logo-os.png", "data-toggle" => "popover",
8
- "title" => "Operating System", "data-content" => scope_help('os') }
8
+ %a.btn.btn-default.btn-lg.scope_logo_big{ :href => "##{scope}",
9
+ :title => scope_title(scope), "data-toggle"=>"popover",
10
+ "data-content" => scope_help(scope) }
11
+ %span= scope_initials(scope)
9
12
  %span.toggle{ title: "Collapse/Expand" }
10
13
  .col-xs-11
11
14
  %h2
12
15
  Operating System
13
16
  .scope-summary
14
- = scope_meta_info("os")
17
+ = scope_meta_info(scope)
15
18
  .col-xs-1
16
- .col-xs-3.scope_content.collapse.in
19
+ .col-xs-11.scope_content.collapse.in
17
20
  %table.table.table-striped.table-condensed
18
21
  %tr
19
22
  %th Name
@@ -14,10 +14,10 @@
14
14
  %thead
15
15
  %tr
16
16
  %th Name
17
- %th Version
18
- %th Release
19
- %th Arch
20
- %th Vendor
17
+ %th.medium Version
18
+ %th.medium Release
19
+ %th.medium Arch
20
+ %th.medium Vendor
21
21
  %th Checksum
22
22
  %tbody
23
23
  - packages.each do |package|
@@ -13,8 +13,8 @@
13
13
  %thead
14
14
  %tr
15
15
  %th Name
16
- %th Version
17
- %th Release
16
+ %th.medium Version
17
+ %th.medium Release
18
18
  %tbody
19
19
  - patterns.each do |pattern|
20
20
  %tr
@@ -15,12 +15,12 @@
15
15
  %tr
16
16
  %th Name
17
17
  %th Alias
18
- %th Type
18
+ %th.small Type
19
19
  %th URL
20
- %th Enabled
21
- %th Autorefresh
22
- %th GPG Check
23
- %th Priority
20
+ %th.small Enabled
21
+ %th.small Autorefresh
22
+ %th.small GPG Check
23
+ %th.small Priority
24
24
  %tbody
25
25
  - repositories.each do |repo|
26
26
  %tr
@@ -1,12 +1,10 @@
1
1
  - meta = @description[scope].meta
2
2
  .row
3
3
  .col-xs-1
4
- %img.over.scope_logo_big{ "data-content" => "<p>#{scope_help(scope)}</p>",
5
- "data-toggle" => "popover",
6
- "src" => "assets/logo-#{scope.tr("_", "-")}.png",
7
- "title" => "",
8
- "data-original-title" => title,
9
- "style" => "top: 125px;" }
4
+ %a.btn.btn-default.btn-lg.over.scope_logo_big{ :href => "##{scope}",
5
+ :title => scope_title(scope), "data-toggle"=>"popover",
6
+ "data-content" => scope_help(scope) }
7
+ %span= scope_initials(scope)
10
8
  %span.toggle{ "title" => "Collapse/Expand" }
11
9
  .col-xs-11
12
10
  %h2
@@ -14,7 +14,7 @@
14
14
  %thead
15
15
  %tr
16
16
  %th Name
17
- %th State
17
+ %th.medium State
18
18
  %tbody
19
19
  - services.services.each do |service|
20
20
  %tr
@@ -14,7 +14,7 @@
14
14
  %thead
15
15
  %tr
16
16
  %th Name
17
- %th Type
17
+ %th.medium Type
18
18
  %tbody
19
19
  - unmanaged_files.files.each do |file|
20
20
  %tr
@@ -13,11 +13,11 @@
13
13
  %thead
14
14
  %tr
15
15
  %th Name
16
- %th UID
17
- %th GID
16
+ %th.small UID
17
+ %th.small GID
18
18
  %th Comment
19
- %th Home
20
- %th Shell
19
+ %th.medium Home
20
+ %th.medium Shell
21
21
  %tbody
22
22
  - users.each do |user|
23
23
  %tr
data/lib/array.rb CHANGED
@@ -62,6 +62,10 @@ module Machinery
62
62
  end
63
63
  end
64
64
 
65
+ def to_s
66
+ @elements.empty? ? "(empty)" : @elements.join(",")
67
+ end
68
+
65
69
  def ==(other)
66
70
  self.class == other.class && @elements == other.elements
67
71
  end
data/lib/cli.rb CHANGED
@@ -774,15 +774,23 @@ class Cli
774
774
  inspected_filters = description.filter_definitions("inspect")
775
775
 
776
776
  if options[:verbose]
777
+ details = ""
778
+
779
+ if description[:environment].system_type == "docker"
780
+ details += "\n Type of inspected container: #{description[:environment].system_type}\n"
781
+ end
782
+
777
783
  if !inspected_filters.empty?
778
- Machinery::Ui.puts "\nThe following filters were applied during inspection:"
779
- Machinery::Ui.puts inspected_filters.join("\n") + "\n\n"
784
+ details += "\n The following filters were applied during inspection:"
785
+ details += "\n * " + inspected_filters.join("\n * ") + "\n\n"
780
786
  end
781
787
 
782
788
  if !filter.empty?
783
- Machinery::Ui.puts "\nThe following filters were applied before showing the description:"
784
- Machinery::Ui.puts filter.to_array.join("\n") + "\n\n"
789
+ details += "\n The following filters were applied before showing the description:"
790
+ details += "\n * " + filter.to_array.join("\n * ") + "\n\n"
785
791
  end
792
+
793
+ Machinery::Ui.puts "# Inspection details\n" + details unless details.empty?
786
794
  end
787
795
 
788
796
  task = ShowTask.new
data/lib/file_scope.rb CHANGED
@@ -24,12 +24,16 @@ class FileScope < Machinery::Object
24
24
  shared = self.class.new
25
25
 
26
26
  compare_extracted(other, only_self, only_other, shared)
27
- compare_files(other, only_self, only_other, shared)
27
+ changed = compare_files(other, only_self, only_other, shared)
28
28
 
29
29
  only_self = nil if only_self.empty?
30
30
  only_other = nil if only_other.empty?
31
31
  shared = nil if shared.empty?
32
- [only_self, only_other, nil, shared]
32
+ [only_self, only_other, changed, shared]
33
+ end
34
+
35
+ def length
36
+ files.try(:length) || 0
33
37
  end
34
38
 
35
39
  private
@@ -57,10 +61,12 @@ class FileScope < Machinery::Object
57
61
  end
58
62
 
59
63
  def compare_files(other, only_self, only_other, shared)
60
- own_files, other_files, _changed, shared_files = files.compare_with(other.files)
64
+ own_files, other_files, changed, shared_files = files.compare_with(other.files)
61
65
 
62
66
  only_self.files = own_files if own_files
63
67
  only_other.files = other_files if other_files
64
68
  shared.files = shared_files if shared_files
69
+
70
+ changed
65
71
  end
66
72
  end
data/lib/html.rb CHANGED
@@ -24,6 +24,7 @@ class Html
24
24
  Server.set :port, opts[:port] || Machinery::Config.new.http_server_port
25
25
  Server.set :bind, opts[:ip] || "localhost"
26
26
  Server.set :public_folder, File.join(Machinery::ROOT, "html")
27
+ Server.set :static_cache_control, "no-cache"
27
28
 
28
29
  if opts[:ip] != "localhost" && opts[:ip] != "127.0.0.1"
29
30
  if opts[:ip] == "0.0.0.0"
data/lib/machinery.rb CHANGED
@@ -38,6 +38,7 @@ require "diffy"
38
38
  require "sinatra/base"
39
39
  require "mimemagic"
40
40
 
41
+ require_relative "try"
41
42
  require_relative "machinery_logger"
42
43
  require_relative "zypper"
43
44
  require_relative "rpm"
data/lib/scope.rb CHANGED
@@ -46,6 +46,22 @@ module Machinery
46
46
  nil
47
47
  end
48
48
 
49
+ def self.extract_changed_elements(a, b, primary_key)
50
+ changed_keys = a.map(&primary_key) & b.map(&primary_key)
51
+ changed = []
52
+
53
+ changed_keys.each do |key|
54
+ changed << [
55
+ a.find { |e| e.send(primary_key) == key },
56
+ b.find { |e| e.send(primary_key) == key },
57
+ ]
58
+ a.reject! { |e| e.send(primary_key) == key }
59
+ b.reject! { |e| e.send(primary_key) == key }
60
+ end
61
+
62
+ changed
63
+ end
64
+
49
65
  module ClassMethods
50
66
  def hidden?
51
67
  @hidden || false
data/lib/server.rb CHANGED
@@ -35,12 +35,32 @@ class Server < Sinatra::Base
35
35
  end
36
36
 
37
37
  def scope_help(scope)
38
- text = File.read(File.join(Machinery::ROOT, "plugins", "#{scope}/#{scope}.md"))
38
+ text = scope_info(scope)[:description]
39
39
  Kramdown::Document.new(text).to_html
40
40
  end
41
41
 
42
+ def scope_info(scope)
43
+ YAML.load(File.read(File.join(Machinery::ROOT, "plugins", "#{scope}/#{scope}.yml")))
44
+ end
45
+
46
+ def scope_title(scope)
47
+ scope_info(scope)[:name]
48
+ end
49
+
50
+ def scope_initials(scope)
51
+ scope_info(scope)[:initials].upcase
52
+ end
53
+
54
+ def nav_class(scope)
55
+ if @description
56
+ return @description[scope] ? "" : "disabled"
57
+ elsif @description_a && @description_b
58
+ return @description_a[scope] && @description_b[scope] ? "" : "disabled"
59
+ end
60
+ end
61
+
42
62
  def safe_length(object, attribute)
43
- if object && collection = object.send(attribute)
63
+ if collection = object.try(attribute)
44
64
  collection.length
45
65
  else
46
66
  0
@@ -63,40 +83,58 @@ class Server < Sinatra::Base
63
83
  "<h3>In both with different attributes:</h3>"
64
84
  end
65
85
 
66
- def changed_packages
86
+ def pluralize_scope(object, singular, plural)
87
+ object.length.to_s + " " + Machinery.pluralize(object.length, singular, plural)
88
+ end
89
+
90
+ def changed_elements(scope, opts)
91
+ optional_attributes = opts[:optional_attributes] || []
92
+
67
93
  changed = []
68
- @diff["packages"].changed.each do |change|
94
+ @diff[scope].changed.each do |change|
69
95
  changes = []
70
- relevant_attributes = ["version", "vendor", "arch"]
96
+ relevant_attributes = if opts[:attributes]
97
+ opts[:attributes].dup
98
+ else
99
+ change[0].attributes.keys & change[1].attributes.keys
100
+ end
71
101
 
72
- if change[0].version == change[1].version
73
- relevant_attributes.push("release")
74
- if change[0].release == change[1].release
75
- relevant_attributes.push("checksum")
102
+ (1..optional_attributes.length).each do |i|
103
+ if change[0][optional_attributes[i - 1]] ==
104
+ change[1][optional_attributes[i - 1]]
105
+ relevant_attributes.push(optional_attributes[i])
106
+ else
107
+ break
76
108
  end
77
109
  end
78
-
79
110
  relevant_attributes.each do |attribute|
80
111
  if change[0][attribute] != change[1][attribute]
81
- changes.push(attribute + ": " + change[0][attribute] + " ↔ " + change[1][attribute])
112
+ changes.push(
113
+ attribute + ": " + human_readable_attribute(change[0], attribute) + " ↔ " +
114
+ human_readable_attribute(change[1], attribute)
115
+ )
82
116
  end
83
117
  end
84
118
 
85
- changed.push(change[0].name + " (" + changes.join(", ") + ")")
119
+ changed.push(
120
+ id: change[0][opts[:key]],
121
+ change: "(" + changes.join(", ") + ")",
122
+ diffable: change[0].is_a?(UnmanagedFile) && change[0].is_a?(UnmanagedFile) &&
123
+ change[0].file? && change[1].file?
124
+ )
86
125
  end
87
126
  changed
88
127
  end
89
128
 
90
- def diffable_unmanaged_files
91
- return @diffable_unmanaged_files if @diffable_unmanaged_files
92
-
93
- return [] if !@diff["unmanaged_files"] || !@diff["unmanaged_files"].only_in1 ||
94
- !@diff["unmanaged_files"].only_in2
129
+ def human_readable_attribute(object, attribute)
130
+ value = object[attribute]
95
131
 
96
- files_in_1 = @diff["unmanaged_files"].only_in1.files.select(&:file?).map(&:name)
97
- files_in_2 = @diff["unmanaged_files"].only_in2.files.select(&:file?).map(&:name)
132
+ case object
133
+ when Machinery::SystemFile
134
+ value = number_to_human_size(value) if attribute == "size"
135
+ end
98
136
 
99
- @diffable_unmanaged_files = files_in_1 & files_in_2
137
+ value.to_s
100
138
  end
101
139
 
102
140
  def diff_to_object(diff)
@@ -186,14 +224,14 @@ class Server < Sinatra::Base
186
224
  Inspector.all_scopes.each do |scope|
187
225
  if @description_a[scope] && @description_b[scope]
188
226
  @diff[scope] = Comparison.compare_scope(@description_a, @description_b, scope)
189
- else
227
+ elsif @description_a[scope] || @description_b[scope]
190
228
  @meta[:uninspected] ||= Hash.new
191
229
 
192
- if !@description_a[scope] && @description_b[scope]
230
+ if !@description_a[scope]
193
231
  @meta[:uninspected][@description_a.name] ||= Array.new
194
232
  @meta[:uninspected][@description_a.name] << scope
195
233
  end
196
- if !@description_b[scope] && @description_a[scope]
234
+ if !@description_b[scope]
197
235
  @meta[:uninspected][@description_b.name] ||= Array.new
198
236
  @meta[:uninspected][@description_b.name] << scope
199
237
  end