lib/rallycat/cat.rb in rallycat-0.4.0 vs lib/rallycat/cat.rb in rallycat-0.4.1
- old
+ new
@@ -8,11 +8,11 @@
end
def story(story_number)
story_type = story_number.start_with?('US') ? :hierarchical_requirement : :defect
- results = @rally_api.find(story_type, fetch: true) do
+ results = @rally_api.find(story_type, :fetch => true) do
equal :formatted_id, story_number
end
if results.total_result_count == 0
raise StoryNotFound, "Story (#{ story_number }) does not exist."
@@ -55,10 +55,10 @@
# This is an example of a task formatted in plain text:
#
# [TA12345] [C] The name of the task.
#
sorted_tasks.map do |task|
- state = task.state == 'In-Progress' ? 'P' : task.state[0]
+ state = task.state == 'In-Progress' ? 'P' : task.state.split('')[0]
"[#{task.formatted_i_d}] [#{state}] #{task.name}"
end.join("\n")
end
def consolidate_newlines(story)