Skip to content

Commit

Permalink
Switching to octokit instead of github_api
Browse files Browse the repository at this point in the history
  • Loading branch information
pyro2927 committed Feb 2, 2014
1 parent 4dc429d commit 5f054af
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 86 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ gem 'flowdock'
# ---------------------------------------
# GitHub OAuth
gem 'omniauth-github'
gem 'github_api', '~> 0.11.2'

gem 'ri_cal'
gem 'yajl-ruby', :require => "yajl"
Expand Down
149 changes: 66 additions & 83 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ GEM
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.5)
airbrake (3.1.15)
airbrake (3.1.14)
builder
multi_json
json
arel (3.0.3)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
better_errors (1.1.0)
better_errors (1.0.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bitbucket_rest_api (0.1.5)
bitbucket_rest_api (0.1.4)
faraday (~> 0.8.1)
faraday_middleware (~> 0.9.0)
hashie (~> 2.0.5)
multi_json (~> 1.3)
nokogiri (>= 1.5.2)
nokogiri (~> 1.5.2)
simple_oauth
builder (3.0.4)
callsite (0.0.11)
Expand All @@ -60,13 +60,13 @@ GEM
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (2.2.1)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coderay (1.1.0)
coderay (1.0.9)
columnize (0.3.6)
coveralls (0.7.0)
multi_json (~> 1.3)
Expand All @@ -80,30 +80,28 @@ GEM
addressable
database_cleaner (1.2.0)
debug_inspector (0.0.2)
debugger (1.6.5)
debugger (1.6.3)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.1)
debugger-ruby_core_source (~> 1.2.4)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.1)
debugger-ruby_core_source (1.2.4)
decent_exposure (2.3.0)
descendants_tracker (0.0.3)
devise (3.2.2)
devise (3.1.1)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
docile (1.1.2)
diff-lcs (1.2.4)
dotenv (0.9.0)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
erubis (2.7.0)
execjs (2.0.2)
fabrication (2.9.6)
faraday (0.8.9)
fabrication (2.8.1)
faraday (0.8.8)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
Expand All @@ -113,24 +111,16 @@ GEM
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
github_api (0.11.2)
addressable (~> 2.3)
descendants_tracker (~> 0.0.1)
faraday (~> 0.8, < 0.10)
hashie (>= 1.2)
multi_json (>= 1.7.5, < 2.0)
nokogiri (~> 1.6.0)
oauth2
gitlab (3.0.0)
httparty
haml (4.0.5)
haml (4.0.3)
tilt
happymapper (0.4.1)
libxml-ruby (~> 2.0)
hashie (2.0.5)
highline (1.6.20)
highline (1.6.19)
hike (1.2.3)
hipchat (1.0.1)
hipchat (0.12.0)
httparty
hoi (0.0.6)
httparty (> 0.6.0)
Expand All @@ -142,22 +132,24 @@ GEM
httparty (0.12.0)
json (~> 1.8)
multi_xml (>= 0.5.2)
httpauth (0.2.0)
i18n (0.6.9)
jira-ruby (0.1.7)
jira-ruby (0.1.2)
activesupport
oauth
railties
journey (1.0.4)
jquery-rails (2.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (0.1.11)
jwt (0.1.8)
multi_json (>= 1.5)
kaminari (0.15.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.8.1)
launchy (2.4.2)
launchy (2.3.0)
addressable (~> 2.3)
libv8 (3.16.14.3)
libxml-ruby (2.7.0)
Expand All @@ -175,13 +167,12 @@ GEM
railties
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.5.2)
mongoid (3.1.6)
mongoid (3.1.5)
activemodel (~> 3.2)
moped (~> 1.4)
origin (~> 1.0)
tzinfo (~> 0.3.29)
mongoid-rspec (1.10.0)
mongoid-rspec (1.9.0)
mongoid (>= 3.0.1)
rake
rspec (>= 2.14)
Expand All @@ -190,8 +181,8 @@ GEM
bundler (>= 1.0.0)
rails (>= 3.2.0)
railties (>= 3.2.0)
moped (1.5.2)
multi_json (1.8.4)
moped (1.5.1)
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
net-scp (1.1.2)
Expand All @@ -202,16 +193,15 @@ GEM
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
netrc (0.7.7)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
nokogiri (1.5.10)
nokogiri-happymapper (0.5.8)
nokogiri (~> 1.5)
oauth (0.4.7)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
oauth2 (0.8.1)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
octokit (1.25.0)
addressable (~> 2.2)
Expand All @@ -220,19 +210,17 @@ GEM
hashie (~> 2.0)
multi_json (~> 1.3)
netrc (~> 0.7.7)
omniauth (1.2.1)
omniauth (1.1.4)
hashie (>= 1.2, < 3)
rack (~> 1.0)
rack
omniauth-github (1.1.1)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
origin (1.1.0)
orm_adapter (0.5.0)
orm_adapter (0.4.0)
oruen_redmine_client (0.0.1)
activeresource (>= 2.3.0)
pivotal-tracker (0.5.12)
Expand All @@ -245,20 +233,19 @@ GEM
nokogiri-happymapper (>= 0.5.4)
rest-client (~> 1.6.0)
rest-client (~> 1.6.0)
pjax_rails (0.4.0)
pjax_rails (0.3.4)
jquery-rails
railties (>= 3.2, < 5.0)
polyglot (0.3.3)
premailer (1.8.0)
css_parser (>= 1.3.5)
premailer (1.7.3)
css_parser (>= 1.1.9)
htmlentities (>= 4.0.0)
pry (0.9.12.6)
coderay (~> 1.0)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
pry-rails (0.3.2)
pry (>= 0.9.10)
puma (2.7.1)
puma (2.6.0)
rack (>= 1.1, < 2.0)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
Expand All @@ -280,7 +267,7 @@ GEM
activesupport (= 3.2.16)
bundler (~> 1.0)
railties (= 3.2.16)
rails_autolink (1.1.5)
rails_autolink (1.1.4)
rails (> 3.1)
railties (3.2.16)
actionpack (= 3.2.16)
Expand All @@ -290,7 +277,7 @@ GEM
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
raindrops (0.12.0)
rake (10.1.1)
rake (10.1.0)
rbx-require-relative (0.0.9)
rdoc (3.12.2)
json (~> 1.4)
Expand All @@ -302,13 +289,12 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
rspec-core (2.14.6)
rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rspec-rails (2.14.1)
rspec-rails (2.14.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
Expand All @@ -326,21 +312,19 @@ GEM
rest-client
safe_yaml (0.9.7)
simple_oauth (0.2.0)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.4.7)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
slop (3.4.6)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
strong_parameters (0.2.3)
strong_parameters (0.2.1)
actionpack (~> 3.0)
activemodel (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
term-ansicolor (1.2.2)
tins (~> 0.8)
Expand All @@ -351,33 +335,33 @@ GEM
thread_safe (0.1.3)
atomic
tilt (1.4.1)
timecop (0.7.1)
tins (0.13.1)
timecop (0.6.3)
tins (0.12.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbo-sprockets-rails3 (0.3.11)
turbo-sprockets-rails3 (0.3.10)
railties (> 3.2.8, < 4.0.0)
sprockets (>= 2.2.0)
sprockets (>= 2.0.0)
tzinfo (0.3.38)
uglifier (2.4.0)
uglifier (2.2.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
multi_json (~> 1.0, >= 1.0.2)
underscore-rails (1.5.2)
unicorn (4.8.1)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
useragent (0.10.0)
useragent (0.8.3)
warden (1.2.3)
rack (>= 1.0)
webmock (1.17.1)
webmock (1.15.0)
addressable (>= 2.2.7)
crack (>= 0.3.2)
xmpp4r (0.5.5)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.2.0)
yajl-ruby (1.1.0)

PLATFORMS
ruby
Expand All @@ -403,7 +387,6 @@ DEPENDENCIES
fabrication
flowdock
foreman
github_api (~> 0.11.2)
gitlab (~> 3.0.0)
haml
hipchat
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def github
if github_user.nil? && Errbit::Config.github_org_id
# See if they are a member of the organization that we have access for
# If they are, automatically create an account
github_api = Github.new oauth_token: github_token
org_ids = github_api.orgs.all.map { |org| org.id.to_s }
client = client = Octokit::Client.new :access_token => github_token
org_ids = client.organizations.map { |org| org.id.to_s }
if org_ids.include? Errbit::Config.github_org_id
github_user = User.create(name: env["omniauth.auth"].extra.raw_info.name, email: env["omniauth.auth"].extra.raw_info.email)
end
Expand Down

0 comments on commit 5f054af

Please sign in to comment.