Skip to content

Commit

Permalink
Fixed more rubocop issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtanzillo committed Jul 14, 2015
1 parent f1c1136 commit 432d7c2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lib/extensions/ar_merge_conditions.rb
Expand Up @@ -59,7 +59,7 @@ def self._included_associations(includes, arr)
when Symbol, String
arr << includes.to_sym
when Array
includes.each do |assoc|
includes.each do |assoc|
_included_associations assoc, arr
end
when Hash
Expand Down
37 changes: 18 additions & 19 deletions spec/lib/extensions/ar_merge_conditions_spec.rb
Expand Up @@ -13,25 +13,25 @@

# Typical includes for rendering daily metrics charts
@include = {
:max_derived_cpu_available => {},
:max_derived_cpu_reserved => {},
:min_cpu_usagemhz_rate_average => {},
:max_cpu_usagemhz_rate_average => {},
:min_cpu_usage_rate_average => {},
:max_cpu_usage_rate_average => {},
:max_derived_cpu_available => {},
:max_derived_cpu_reserved => {},
:min_cpu_usagemhz_rate_average => {},
:max_cpu_usagemhz_rate_average => {},
:min_cpu_usage_rate_average => {},
:max_cpu_usage_rate_average => {},
:v_pct_cpu_ready_delta_summation => {},
:v_pct_cpu_wait_delta_summation => {},
:v_pct_cpu_used_delta_summation => {},
:max_derived_memory_available => {},
:max_derived_memory_reserved => {},
:min_derived_memory_used => {},
:max_derived_memory_used => {},
:min_disk_usage_rate_average => {},
:max_disk_usage_rate_average => {},
:min_net_usage_rate_average => {},
:max_net_usage_rate_average => {},
:v_derived_storage_used => {},
:resource => {}
:v_pct_cpu_wait_delta_summation => {},
:v_pct_cpu_used_delta_summation => {},
:max_derived_memory_available => {},
:max_derived_memory_reserved => {},
:min_derived_memory_used => {},
:max_derived_memory_used => {},
:min_disk_usage_rate_average => {},
:max_disk_usage_rate_average => {},
:min_net_usage_rate_average => {},
:max_net_usage_rate_average => {},
:v_derived_storage_used => {},
:resource => {}

}
end
Expand All @@ -45,4 +45,3 @@
end
end
end

6 changes: 3 additions & 3 deletions spec/models/metric_rollup_spec.rb
Expand Up @@ -6,9 +6,9 @@
pending "until ActiveRecord is fixed"
# TODO: A fix in ActiveRecord will make this test pass
expect do
MetricRollup.where(:id => 1000000544893)
.includes(:resource => {}, :time_profile => {})
.references(:time_profile => {}).last
MetricRollup.where(:id => 1)
.includes(:resource => {}, :time_profile => {})
.references(:time_profile => {}).last
end.not_to raise_error

# TODO: Also, there is a bug that exists in only the manageiq repo and not rails
Expand Down

0 comments on commit 432d7c2

Please sign in to comment.