Sha256: 038225477bb4bc5c8159e601f67e0953b1b98d23edbb668826da565d5c4e8d56
Contents?: true
Size: 644 Bytes
Versions: 8
Compression:
Stored size: 644 Bytes
Contents
class YouTrack::Client::GetIssues < YouTrack::Client::Request def real(project, filters={}) service.request( :path => "/issue/byproject/#{project}", :parser => YouTrack::Parser::IssuesParser, :query => filters, ) end def mock(project, filters={}) issues = service.data[:issues].values.select { |i| i["projectShortName"] == project } # delete first n elements from the array if filters["after"] issues.delete_if.with_index { |x,i| i < (filters["after"].to_i - 1) } end max = filters["max"] || 10 issues.slice!(max) service.response( :body => issues ) end end
Version data entries
8 entries across 8 versions & 1 rubygems