Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #1088

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #1088

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.sqlite3
*.log
tmp/Gemfile.lock
tmp/Gemfile.lock
.env
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ gem 'coffee-rails', '~> 4.1.0'
# gem 'therubyracer', platforms: :ruby

gem 'thin'

gem 'omniauth'
gem 'omniauth-github'
gem 'dotenv-rails'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
Expand Down
38 changes: 37 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,29 @@ GEM
concurrent-ruby (1.1.5)
crass (1.0.5)
daemons (1.3.1)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
erubis (2.7.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-net_http (1.0.1)
ffi (1.11.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashie (4.1.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jwt (2.2.2)
loofah (2.3.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -73,13 +84,34 @@ GEM
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
nio4r (2.4.0)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (2.0.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
rack-protection
omniauth-github (2.0.0)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-oauth2 (1.7.1)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rack (2.2.3)
rack-protection (2.1.0)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.7.2)
Expand Down Expand Up @@ -109,6 +141,7 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
ruby2_keywords (0.0.4)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
Expand Down Expand Up @@ -153,7 +186,10 @@ PLATFORMS
DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
dotenv-rails
jquery-rails
omniauth
omniauth-github
pry
rails (~> 5.0)
sass-rails (~> 5.0)
Expand All @@ -164,4 +200,4 @@ DEPENDENCIES
uglifier (>= 1.3.0)

BUNDLED WITH
2.0.1
2.1.4
9 changes: 9 additions & 0 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class SessionsController
def create
raise params.inspect
end

def for_auth
redirect_to "https://github.com/login/oauth/authorize"
end
end
2 changes: 2 additions & 0 deletions app/views/welcome/home.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<%# Add the Facebook login link here %>
<h1>Login to your face</h1>
<%= link_to("github login", "/auth/github") %>
3 changes: 3 additions & 0 deletions config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Rails.application.config.middleware.use OmniAuth::Builder do
provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], origin_param: false
end
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Rails.application.routes.draw do
root 'welcome#home'

get '/auth/:provider/callback', to: 'sessions#create'
# get '/auth/:provider', to: 'sessions#for_auth'

# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[o:Set:
@hash}
I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"|file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs.js;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/stylesheets/application.css?type=text/css&pipeline=debug&id=78b7facfaf6a5f25821c747af133c0eba20300a61dc6d4dac91bcd3aa964c1d2:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[o:Set:
@hash}
I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"~file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks.js;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"}app/assets/stylesheets/application.css?type=text/css&id=64fade1a69ac16c14d3140cbc0f8b506028e2ba1e200d139703392e6a44b4b70:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%���/�.?Ȳ�0-H��qN�c2���{M�rb�
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%�d�-�K���`���8Y��3�͹/Y����a~K
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash}#I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"nfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts;TTI"ufile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery;TTI"xfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery.js;TTI"/file-digest://app/assets/images/jquery_ujs;TTI"4file-digest://app/assets/javascripts/jquery_ujs;TTI"4file-digest://app/assets/stylesheets/jquery_ujs;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs;TTI"|file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs.js;TTI"/file-digest://app/assets/images/turbolinks;TTI"4file-digest://app/assets/javascripts/turbolinks;TTI"4file-digest://app/assets/stylesheets/turbolinks;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/turbolinks;TTI"kfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts;TTI"vfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts/turbolinks;TTI"ifile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled;TTI"tfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled/turbolinks;TTI"pfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts;TTI"{file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks;TTI"~file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks.js;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�/Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery.js?type=application/javascript&pipeline=self&id=64335ba7c0af5bb106c79ac746ec6533e3f1d57a09b30a95c70e11fc566a725b:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"?processors:type=text/css&file_type=text/css&pipeline=debug;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�/Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs.js?type=application/javascript&pipeline=self&id=cb022950528b9d857ed77fa7765ed817fb3c779afa815b5d886f145dfe92858d:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash}$I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"[processors:type=application/javascript&file_type=application/javascript&pipeline=debug;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"xfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery.js;TTI"|file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs.js;TTI"~file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks.js;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"nfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts;TTI"ufile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery;TTI"/file-digest://app/assets/images/jquery_ujs;TTI"4file-digest://app/assets/javascripts/jquery_ujs;TTI"4file-digest://app/assets/stylesheets/jquery_ujs;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs;TTI"/file-digest://app/assets/images/turbolinks;TTI"4file-digest://app/assets/javascripts/turbolinks;TTI"4file-digest://app/assets/stylesheets/turbolinks;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/turbolinks;TTI"kfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts;TTI"vfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts/turbolinks;TTI"ifile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled;TTI"tfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled/turbolinks;TTI"pfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts;TTI"{file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%C6������ܦ�M=��Qu���/�,"c�5u
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%����`���/F� �� ���Y(}H�R�
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/javascripts/application.js?type=application/javascript&id=d85e3b7d6510882d94d2112c3ee055a872e432fba720552aefb8930f39a2eede:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=b183be6fef1e824d30336c29e846b98fb9780e0cc9a63b94df7a7080b43eb6ae:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%�~��2%�a�5�p���L�Je5�-,$�o\2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=debug&id=e87dfc9e265f7f1288725e8d51bc5f3630935d0d5d0cbf150aac6e25ecce947b:ET
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�/Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks.js?type=application/javascript&pipeline=self&id=b960b209b92705f38acb98b20ae82cc1b8560132f9c3b79d595acdbd11e01245:ET
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%uW��l��j��Z� xU��>�?]��pc��s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=8d2d467ce0b53e93379987843df7170bdcf2c1c9846253b425f4b674d810a01a:ET
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%ó�n���x���|��b�[ģ��Y��xF�
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%xJ�g&k��"��U���m��X�V�;Fj
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[o:Set:
@hash}
I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"xfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery.js;TTF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[o:Set:
@hash}$I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"xfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery.js;TTI"|file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs.js;TTI"~file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks.js;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"nfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts;TTI"ufile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery;TTI"/file-digest://app/assets/images/jquery_ujs;TTI"4file-digest://app/assets/javascripts/jquery_ujs;TTI"4file-digest://app/assets/stylesheets/jquery_ujs;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/jquery_ujs;TTI"/file-digest://app/assets/images/turbolinks;TTI"4file-digest://app/assets/javascripts/turbolinks;TTI"4file-digest://app/assets/stylesheets/turbolinks;TTI"yfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/jquery-rails-4.3.5/vendor/assets/javascripts/turbolinks;TTI"kfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts;TTI"vfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/coffee-rails-4.1.1/lib/assets/javascripts/turbolinks;TTI"ifile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled;TTI"tfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/actioncable-5.0.7.2/lib/assets/compiled/turbolinks;TTI"pfile-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts;TTI"{file-digest:///Users/coffeedust.io/.rvm/gems/ruby-2.6.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts/turbolinks;TTF
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%��B�����șo�$'�A�d��L���xR�U
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"%Ѱč@�����6H�uZoX�Z�gbh0W��V
Binary file not shown.