github_on_rails 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmY3MzJmZGY2NWM3OTI4ODQ0MTJlMDliMWE0Y2U3NWU1ZmNlMjY2Ng==
4
+ NTM2Yzc4ZTZmOTdkMDY5MzA5MzNkOTExZTRiNzNiMDI3ZDgzM2M2ZQ==
5
5
  data.tar.gz: !binary |-
6
- ZmY4ODMyN2JhYmFjY2Q3ODY0NzI5N2Y3ZGE5YzkzMTdiOTU1ZWYyZA==
6
+ MDM3ODAzOTdiODQxNTg0ODgwMzQzY2NmMTczZjU3Njg5Yzg3ZDcwNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzI0N2QzMzBkNDkyYTBhZGFjMTk0N2ViNDVjMTMwNzgwM2MxYTg3NzUzYzU2
10
- MTkzMDQzNWZhYzkxOGQzZDA4MDRlMzEwMTEwNGUzOGU1NDUzOTQ5ZThkNTMy
11
- OWQ2NDM5ZWRhYWE5MDYyMjRjZWY0ODAzZTVlYjQwYWM5Yzg2Y2M=
9
+ NmY3NjhhOThmNWQ1YzQzMjQ2OThmOGU2ZWVhY2M0YjdiYzQ5ZGVlNDFjNDE0
10
+ Njc0MzI4MTAyNTU5ZTRmYTE2NDU5MGNmMWIyMDJiY2IwODY5MTY1ZDk0ZWVl
11
+ MDJmOTVkYTM4YTIzN2ViMzZjNzg4ODAwNmRhYmE4Y2FmZWYyNTE=
12
12
  data.tar.gz: !binary |-
13
- OTczOTdmNGE5OGYwNGZkODNiODQyNzVlN2Y3Mjc3ZDk1MzhkNGNlZWUzYzVl
14
- ZTY3NTk5Y2ViNDAyZjM1NzA5NWIxMGYzZjExODUzYTAyNDM0NmE1YjczMWM0
15
- NTMzYmZkODA0YTAwNWQ3ZDRmMTliMTQ0MGNlNTIzMTkwOGVlMDA=
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 new_session_path, alert: 'You need to sign in for access to this page.'
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 "controller_extensions" do |app|
11
- ::ApplicationController.send :include, ControllerExtensions
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
@@ -1,3 +1,3 @@
1
1
  module GithubOnRails
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  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.1
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/layouts/github_on_rails/application.html.erb
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