Truncate descriptions on the profile page
This commit is contained in:
parent
8af4606cdf
commit
0d050776a0
|
@ -1,4 +1,8 @@
|
|||
Feature: Generate a user's profile
|
||||
@views
|
||||
Feature: Build a user profile
|
||||
In order to find RCS repos to clone
|
||||
As a user
|
||||
I want to see a listing of a github user's events and projects
|
||||
|
||||
Scenario: Viewing a profile
|
||||
Given a user named "mike"
|
||||
|
@ -24,3 +28,5 @@ Feature: Generate a user's profile
|
|||
Given a user with 1 timeline events
|
||||
When I visit the user's profile
|
||||
Then I should see 1 timeline events
|
||||
|
||||
# vim: ft=cucumber sw=2 ts=2 et
|
||||
|
|
|
@ -12,7 +12,7 @@ end
|
|||
Given /^a user with (\d+) repositories$/ do |count|
|
||||
repos = []
|
||||
count.to_i.times do |i|
|
||||
repo = {"name" => "repo_#{i}"}
|
||||
repo = {"name" => "repo_#{i}", "description" => "Simple Repo #{i}"}
|
||||
repos << repo
|
||||
end
|
||||
RCSHub::API::GitHub.any_instance.expects(:repos_for_user).
|
||||
|
|
|
@ -52,11 +52,11 @@ module RCSHub
|
|||
private
|
||||
|
||||
def fetch_repos_for(username)
|
||||
return self.class.get("#{BASE_URL}/users/#{username}/repos")
|
||||
return self.class.get("#{BASE_URL}/users/#{username}/repos?per_page=100")
|
||||
end
|
||||
|
||||
def fetch_tree_for(username, repo)
|
||||
return self.class.get("#{BASE_URL}/repos/#{username}/#{repo}/git/trees/HEAD")
|
||||
return self.class.get("#{BASE_URL}/repos/#{username}/#{repo}/git/trees/HEAD?per_page=100")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -45,4 +45,6 @@
|
|||
%td{:align => "right"}
|
||||
\-
|
||||
%td
|
||||
#{r["description"]}
|
||||
#{r["description"][0 .. 80]}
|
||||
- if r["description"].length > 80
|
||||
\...
|
||||
|
|
Loading…
Reference in New Issue