gitkeeper 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -0
- data/app/assets/javascripts/gitkeeper/{home.js → auth.js} +0 -0
- data/app/assets/stylesheets/gitkeeper/{home.css → auth.css} +0 -0
- data/app/controllers/gitkeeper/{sessions_controller.rb → auth_controller.rb} +14 -12
- data/app/helpers/gitkeeper/{home_helper.rb → auth_helper.rb} +1 -1
- data/app/views/gitkeeper/{home → auth}/index.html.erb +0 -0
- data/app/views/layouts/gitkeeper/application.html.erb +1 -1
- data/config/routes.rb +3 -9
- data/lib/gitkeeper/version.rb +1 -1
- metadata +21 -9
- data/app/controllers/gitkeeper/home_controller.rb +0 -12
- data/app/helpers/gitkeeper/sessions_helper.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4c2d83f4bb91775e262d97457fc7f255d2e8c0e
|
4
|
+
data.tar.gz: da5c3aa49a7558ec1baf6095768bd6b6a51f7426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc53cbee8de283a5c0ed02b452565255988ee116dabdb7d07efcb78cba387806eccf31544ed7ce2b320285985f117fe3b1d98a7dae7632fcae8d84232e17d9d
|
7
|
+
data.tar.gz: 3ef5126511e0a26948df4f45123c38cfcd70fc661cf5cc47c00b14a46e63226afb1e2b90d1d7d47a595a81f2378ca3dcfa299ab9f02170722cd0942e4c5f3b65
|
data/README.rdoc
CHANGED
File without changes
|
File without changes
|
@@ -1,25 +1,23 @@
|
|
1
1
|
require_dependency "gitkeeper/application_controller"
|
2
2
|
|
3
3
|
module Gitkeeper
|
4
|
-
class
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
# def new
|
11
|
-
# redirect_to '/auth/#{config['provider']}'
|
12
|
-
# end
|
13
|
-
|
4
|
+
class AuthController < ApplicationController
|
5
|
+
before_filter :current_user
|
6
|
+
|
7
|
+
def index
|
8
|
+
end
|
9
|
+
|
14
10
|
# binding.pry
|
15
11
|
def create
|
12
|
+
# raise request.env["omniauth.auth"].to_yaml
|
13
|
+
# Rails.logger.info "\r\n" + "#{Time.now} " + "auth = #{auth}" + "\r\n"
|
16
14
|
user_find_or_create_from_auth_hash(request.env['omniauth.auth'])
|
17
|
-
redirect_to '/'
|
15
|
+
redirect_to '/auth'
|
18
16
|
end
|
19
17
|
|
20
18
|
def destroy
|
21
19
|
session[:user_id] = nil
|
22
|
-
redirect_to '/'
|
20
|
+
redirect_to '/auth'
|
23
21
|
end
|
24
22
|
|
25
23
|
protected
|
@@ -27,5 +25,9 @@ module Gitkeeper
|
|
27
25
|
user = User.where(nickname: auth['info']['nickname']).first || User.create_with_omniauth(auth)
|
28
26
|
session[:user_id] = user.id.to_s
|
29
27
|
end
|
28
|
+
|
30
29
|
end
|
31
30
|
end
|
31
|
+
|
32
|
+
|
33
|
+
|
File without changes
|
data/config/routes.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
Gitkeeper::Engine.routes.draw do
|
2
|
+
root to: 'auth#index'
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
# get '/signin', to: 'sessions#new'
|
6
|
-
get '/signout', to: 'sessions#destroy'
|
7
|
-
# get '/auth/:provider', to: 'errors#error'
|
8
|
-
# get '/auth/:provider/callback', to: 'sessions#create', as: 'signin'
|
9
|
-
get ':provider/callback', to: 'sessions#create'
|
10
|
-
|
11
|
-
# get ':provider/callback', to: 'auth#callback'
|
4
|
+
get '/signout', to: 'auth#destroy'
|
5
|
+
get ':provider/callback', to: 'auth#create'
|
12
6
|
end
|
data/lib/gitkeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca G. Soave
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.1.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mongoid
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: An engine for Rails 4.0.0, MongoID, OmniAuth, to Sign in with Github
|
70
84
|
email:
|
71
85
|
- luca.soave@gmail.com
|
@@ -73,18 +87,16 @@ executables: []
|
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
90
|
+
- app/controllers/gitkeeper/auth_controller.rb
|
76
91
|
- app/controllers/gitkeeper/application_controller.rb
|
77
|
-
- app/controllers/gitkeeper/home_controller.rb
|
78
|
-
- app/controllers/gitkeeper/sessions_controller.rb
|
79
92
|
- app/assets/javascripts/gitkeeper/application.js
|
80
|
-
- app/assets/javascripts/gitkeeper/
|
93
|
+
- app/assets/javascripts/gitkeeper/auth.js
|
94
|
+
- app/assets/stylesheets/gitkeeper/auth.css
|
81
95
|
- app/assets/stylesheets/gitkeeper/application.css
|
82
|
-
- app/assets/stylesheets/gitkeeper/home.css
|
83
96
|
- app/helpers/gitkeeper/application_helper.rb
|
84
|
-
- app/helpers/gitkeeper/
|
85
|
-
- app/helpers/gitkeeper/home_helper.rb
|
97
|
+
- app/helpers/gitkeeper/auth_helper.rb
|
86
98
|
- app/models/gitkeeper/user.rb
|
87
|
-
- app/views/gitkeeper/
|
99
|
+
- app/views/gitkeeper/auth/index.html.erb
|
88
100
|
- app/views/layouts/gitkeeper/application.html.erb
|
89
101
|
- config/routes.rb
|
90
102
|
- config/mongoid.yml
|