github_on_rails 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/github_on_rails/sessions_controller.rb +4 -0
- data/app/views/github_on_rails/sessions/show.html.haml +1 -0
- data/lib/controller_extensions.rb +1 -1
- data/lib/github_on_rails/engine.rb +4 -2
- data/lib/github_on_rails/version.rb +1 -1
- metadata +2 -3
- data/app/views/layouts/github_on_rails/application.html.erb +0 -14
- data/app/views/sessions/new.html.haml +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTM2Yzc4ZTZmOTdkMDY5MzA5MzNkOTExZTRiNzNiMDI3ZDgzM2M2ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDM3ODAzOTdiODQxNTg0ODgwMzQzY2NmMTczZjU3Njg5Yzg3ZDcwNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmY3NjhhOThmNWQ1YzQzMjQ2OThmOGU2ZWVhY2M0YjdiYzQ5ZGVlNDFjNDE0
|
10
|
+
Njc0MzI4MTAyNTU5ZTRmYTE2NDU5MGNmMWIyMDJiY2IwODY5MTY1ZDk0ZWVl
|
11
|
+
MDJmOTVkYTM4YTIzN2ViMzZjNzg4ODAwNmRhYmE4Y2FmZWYyNTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGYyZmQ0YTg5YzMwMGQ3NjhjMTcxNzgxMTMzY2UyNzdjNGE3MGE2MTVlYTIy
|
14
|
+
M2EwNjM4OGNjMTQ2N2FlMzA1NTQ2ZGE4MDEyNTU1NDVhMTdlODI1MjQ4NmU3
|
15
|
+
MmVkYzFiYmMyNWYxODIzMzJkYmRiMjI1MGVhMWQ0NDA1NTA3ZTk=
|
@@ -1,11 +1,15 @@
|
|
1
1
|
module GithubOnRails
|
2
2
|
class SessionsController < ApplicationController
|
3
3
|
before_action :authenticate_user!, only: :destroy
|
4
|
+
layout 'application'
|
4
5
|
|
5
6
|
def new
|
6
7
|
redirect_to '/auth/github'
|
7
8
|
end
|
8
9
|
|
10
|
+
def show
|
11
|
+
end
|
12
|
+
|
9
13
|
def create
|
10
14
|
auth = request.env['omniauth.auth']
|
11
15
|
user = User.where(provider: auth['provider'],
|
@@ -0,0 +1 @@
|
|
1
|
+
%p= "Please, sign in..."
|
@@ -19,7 +19,7 @@ module ControllerExtensions
|
|
19
19
|
|
20
20
|
def authenticate_user!
|
21
21
|
if !current_user
|
22
|
-
redirect_to
|
22
|
+
redirect_to github_on_rails.sessions_path, alert: 'You need to sign in for access to this page.'
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -7,8 +7,10 @@ module GithubOnRails
|
|
7
7
|
class Engine < ::Rails::Engine
|
8
8
|
isolate_namespace GithubOnRails
|
9
9
|
|
10
|
-
initializer
|
11
|
-
|
10
|
+
initializer 'github_on_rails.app_controller' do |app|
|
11
|
+
ActiveSupport.on_load(:action_controller) do
|
12
|
+
include ControllerExtensions
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stevo
|
@@ -93,8 +93,7 @@ files:
|
|
93
93
|
- app/controllers/github_on_rails/sessions_controller.rb
|
94
94
|
- app/helpers/github_on_rails/application_helper.rb
|
95
95
|
- app/models/user.rb
|
96
|
-
- app/views/
|
97
|
-
- app/views/sessions/new.html.haml
|
96
|
+
- app/views/github_on_rails/sessions/show.html.haml
|
98
97
|
- config/routes.rb
|
99
98
|
- lib/controller_extensions.rb
|
100
99
|
- lib/github_on_rails/engine.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>GithubOnRails</title>
|
5
|
-
<%= stylesheet_link_tag "github_on_rails/application", media: "all" %>
|
6
|
-
<%= javascript_include_tag "github_on_rails/application" %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|
File without changes
|