lib/cuker/helpers/formatters/jira_model.rb in cuker-0.5.15 vs lib/cuker/helpers/formatters/jira_model.rb in cuker-0.5.21
- old
+ new
@@ -54,11 +54,11 @@
get_values_ary order
end
def make_rows
if @asts.nil? or @asts.empty?
- @log.warn "No asts to parse!"
+ @log.debug "No asts to parse!"
return []
end
feat_counter = 1
res = []
@@ -118,11 +118,11 @@
children = feat[:children]
children.each do |child|
yield feat_tags, feat_title, child
end
else
- @log.warn "No Features found in file @ #{@file_path}"
+ @log.debug "No Features found in file @ #{@file_path}"
end
end
def in_item(child)
item_title = name_merge child
@@ -136,11 +136,11 @@
yield tags, item_title, child[:type], get_steps(child)
elsif child[:type] == :ScenarioOutline
yield tags, item_title, child[:type], get_steps(child)
# todo: think about new examples in new lines
else
- @log.warn "Unknown type '#{child[:type]}' found in file @ #{@file_path}"
+ @log.debug "Unknown type '#{child[:type]}' found in file @ #{@file_path}"
end
end
def get_steps(hsh)
if hsh[:steps] and hsh[:steps].any?
@@ -150,11 +150,11 @@
content += step
end
content += in_example(hsh[:examples]) if hsh[:examples]
content
else
- @log.warn "No Tags found in #{hsh[:keyword]} @ #{@file_path}"
+ @log.debug "No Tags found in #{hsh[:keyword]} @ #{@file_path}"
[]
end
end
def in_example(examples)
@@ -171,31 +171,31 @@
eg_body = example[:tableBody]
eg_body.map {|row_hsh| res << surround(in_table_row(row_hsh), '|')}
else
- @log.warn "Unknown type '#{item[:type]}' found in file @ #{@file_path}"
+ @log.debug "Unknown type '#{item[:type]}' found in file @ #{@file_path}"
end
end
res
end
def in_table_row row_hsh
if row_hsh[:type] == :TableRow
row_hsh[:cells].map(&method(:in_table_cell))
else
- @log.warn "Expected :TableRow in #{row_hsh} @ #{@file_path}"
+ @log.debug "Expected :TableRow in #{row_hsh} @ #{@file_path}"
[]
end
end
def in_table_cell cell_hsh
if cell_hsh[:type] == :TableCell
val = cell_hsh[:value].strip
val.empty? ? JIRA_BLANK : val
else
- @log.warn "Expected :TableCell in #{cell_hsh} @ #{@file_path}"
+ @log.debug "Expected :TableCell in #{cell_hsh} @ #{@file_path}"
JIRA_BLANK
end
end
def in_step(steps)
@@ -212,11 +212,11 @@
step_ary += in_step_args(step[:argument]) if step[:argument]
# todo: padding as needed
yield step_ary
else
- @log.warn "Unknown type '#{item[:type]}' found in file @ #{@file_path}"
+ @log.debug "Unknown type '#{item[:type]}' found in file @ #{@file_path}"
end
end
end
# helps handle tables for now
@@ -228,19 +228,19 @@
res << surround(row[:cells].map {|hsh| jira_blank_pad hsh[:value]}, sep)
end
return res
elsif arg[:type] == :DocString
# todo: handle if needed
- @log.warn "Docstrings found in '#{arg}' found in file @ #{@file_path}"
+ @log.debug "Docstrings found in '#{arg}' found in file @ #{@file_path}"
else
- @log.warn "Unknown type '#{arg[:type]}' found in file @ #{@file_path}"
+ @log.debug "Unknown type '#{arg[:type]}' found in file @ #{@file_path}"
end
[]
end
def name_merge hsh, max_len = TITLE_MAX_LEN
str = ""
- @log.debug "name merge for #{hsh} with max_len (#{max_len})"
+ @log.trace "name merge for #{hsh} with max_len (#{max_len})"
str += add_newlines!(hsh[:name].strip.force_encoding("UTF-8"), max_len) if hsh[:name]
str += add_newlines!("\n#{hsh[:description].strip.force_encoding("UTF-8")}", max_len) if hsh[:description]
str
end
\ No newline at end of file