Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: JuliAne/githubviz
base: 9fef956b85
...
head fork: JuliAne/githubviz
compare: 501c31daf8
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 16 additions and 7 deletions.
  1. +0 −4 Gemfile.lock
  2. +5 −0 lib/access_token.rb
  3. +11 −3 lib/githubviz.rb
View
4 Gemfile.lock
@@ -3,13 +3,9 @@ GEM
specs:
daemons (1.1.6)
eventmachine (0.12.10)
- json (1.5.4)
- mime-types (1.17.2)
rack (1.4.1)
rack-protection (1.2.0)
rack
- rest-client (1.6.7)
- mime-types (>= 1.16)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
View
5 lib/access_token.rb
@@ -0,0 +1,5 @@
+class TOKEN
+ def get_token
+ @access = 'ACCESSTOKEN'
+ end
+end
View
14 lib/githubviz.rb
@@ -6,6 +6,7 @@
class GithubViz < Sinatra::Base
require 'github-v3-api.rb'
+require 'access_token.rb'
set :public_directory, Proc.new { File.join(root, "public") }
set :public_folder, File.dirname(__FILE__) + '/public'
@@ -66,7 +67,8 @@ def process_data
if @user
- @api = GitHubV3API.new(ACCESSTOKEN)
+ @token = TOKEN.new
+ @api = GitHubV3API.new(@token.get_token)
@data[@user] = @api.get("/users/#{@user}")
@data[@user]['level'] = 0
@@ -80,7 +82,10 @@ def process_data
get '/repo_viz' do
@user = params[:user]
- @api = GitHubV3API.new(ACCESSTOKEN)
+
+ @token = TOKEN.new
+ @api = GitHubV3API.new(@token.get_token)
+
user_data = @api.users.get(@user)
my_repos = @api.repos.list
page = 1
@@ -175,7 +180,10 @@ def process_data
end
get '/circle_viz' do
- @api = GitHubV3API.new(ACCESSTOKEN)
+
+ @token = TOKEN.new
+ @api = GitHubV3API.new(@token.get_token)
+
@user = params[:user]
user_data = @api.users.get(@user)
#@data[@user] = @api.get("/users/#{@user}")

No commit comments for this range

Something went wrong with that request. Please try again.