lib/pt/client.rb in pt-0.8.2 vs lib/pt/client.rb in pt-0.8.3
- old
+ new
@@ -13,11 +13,11 @@
rescue RestClient::Unauthorized
raise PT::InputError.new("Bad email/password combination.")
end
def initialize(token)
- @client = TrackerApi::Client.new(token: token)
+ @client = TrackerApi::Client.new(token: token)
@project = nil
end
def get_project(project_id)
project = @client.project(project_id)
@@ -93,20 +93,20 @@
def get_tasks_to_assign(project)
project.stories filter: "-state:accepted", limit: 50
end
def get_all_stories(project, user_name)
- project.stories limit: 50, fields: STORY_FIELDS
+ project.stories limit: 20, fields: STORY_FIELDS
end
def get_member(project, query)
member = project.memberships.select{ |m| m.person.name.downcase.start_with?(query.downcase) || m.person.initials.downcase == query.downcase }
member.empty? ? nil : member.first
end
def find_member(project, query)
- memberships = project.memberships.detect do |m|
+ memberships = project.memberships.detect do |m|
m.person.name.downcase.start_with?(query.downcase) || m.person.initials.downcase == query.downcase
end
end
def get_members(project)