Skip to content

Commit

Permalink
added lines of code
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-benoit committed Oct 14, 2016
1 parent 0646c25 commit 0bc6ce7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# User Controller
class UsersController < ApplicationController
def show
access_token = '?access_token=051b1b751f26c2b757a5c253faddd534231156d0'
input_user = params[:user]
access_token = "?access_token=" + ENV['github_token']
@user = JSON.parse(open("https://api.github.com/users/#{input_user}" + access_token).read)
user_repos = JSON.parse(open("https://api.github.com/users/#{input_user}/repos" + access_token).read)
user_lang = {}
Expand Down
6 changes: 3 additions & 3 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h1>
<%= @user["name"] %>'s Languages
<%= @user["name"] ? @user["name"] : @user["login"] %>'s Languages
</h1>
<ul>
<% @sorted_languages.each do |lang_trio| %>
<li><%= lang_trio[0] + ", " + lang_trio[1].to_s + "KB, " + lang_trio[2].round(2).to_s + "%" %></li>
<li><%= lang_trio[0] + ", " + lang_trio[1].to_s + "bytes, ~" + (lang_trio[1]/25).to_s + " lines, " + lang_trio[2].round(2).to_s + "%" %></li>
<% end %>
</ul>
<div id="donut" style="width:400px; height:400px;"></div>
Expand All @@ -19,7 +19,7 @@
<% end %>
],
formatter: function (y, data) { return y+'%' },
colors: ["#857786", "#A699AD", "#D1CFD4", "#CCD9E2", "#6688AB", "#264D6E", "#1E2D4E", "#010225"]
colors: ["#5A869F", "#3E95B1", "#5D9475", "#ACA940", "#BAB037", "#B79649", "#BA8058", "#BF6775", "#B65171", "#8E5C79", "#776B81"]
});
});
<% end %>
Expand Down

0 comments on commit 0bc6ce7

Please sign in to comment.