lib/planner.rb in tdi-0.2.3 vs lib/planner.rb in tdi-0.2.4
- old
+ new
@@ -1,7 +1,7 @@
#
-# Copyright (C) 2013-2015 Globo.com
+# Copyright (C) 2013-2017 Globo.com
#
# This file is part of TDI.
# TDI is free software: you can redistribute it and/or modify
@@ -130,13 +130,13 @@
puts 'Case content:'
puts "* #{case_content}".yellow
end
# Test case compile.
- new_case_content = role_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) or val.is_a?(Hash) }
- new_case_content.merge!(plan_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) or val.is_a?(Hash) })
- new_case_content.merge!(case_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) or val.is_a?(Hash) })
+ new_case_content = role_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) || val.is_a?(Hash) }
+ new_case_content.merge!(plan_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) || val.is_a?(Hash) })
+ new_case_content.merge!(case_content.reject { |key, val| UNMERGEABLE_KEY_LIST.include?(key) || val.is_a?(Hash) })
# Test case (new, merged).
compiled_plan[role_name][plan_name][case_name] = new_case_content
if opts[:verbose] > 2
@@ -207,10 +207,10 @@
# Inheritance present?
i_plan = plan_content['inherits']
unless i_plan.nil?
i_role_name, i_plan_name = role_plan_split(i_plan)
- if i_role_name.nil? or i_plan_name.nil?
+ if i_role_name.nil? || i_plan_name.nil?
puts "ERR: Invalid inheritance \"#{i_plan}\". Must match pattern \"role::plan\".".light_magenta
exit 1
end
# TODO: Tratar quando chave não existe.