omniauth-scaffold 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +38 -5
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/generators/omniauth/scaffold/templates/README.md +3 -5
- data/lib/generators/omniauth/scaffold/templates/config/initializers/local_setting.rb +9 -0
- data/lib/generators/omniauth/scaffold/templates/config/initializers/omniauth.rb +3 -1
- data/omniauth-scaffold.gemspec +2 -4
- metadata +3 -5
- data/LICENSE.txt +0 -20
data/README.md
CHANGED
@@ -4,14 +4,16 @@ Scaffold for OmniAuth.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add
|
7
|
+
Add: Gemfile
|
8
8
|
|
9
9
|
```ruby
|
10
10
|
gem 'omniauth-scaffold'
|
11
11
|
gem 'omniauth-twitter'
|
12
|
+
#gem 'omniauth-github'
|
13
|
+
#gem 'omniauth-facebook'
|
12
14
|
```
|
13
15
|
|
14
|
-
|
16
|
+
Execute:
|
15
17
|
|
16
18
|
$ bundle
|
17
19
|
|
@@ -31,12 +33,26 @@ Edit: config/initializers/constants.rb
|
|
31
33
|
APP_NAME = "YOUR_APP_NAME"
|
32
34
|
```
|
33
35
|
|
36
|
+
[ Keys ]
|
37
|
+
<a href="https://dev.twitter.com/apps/new" target="_blank">Twitter</a>
|
38
|
+
<a href="https://github.com/account/applications/new" target="_blank">GitHub</a>
|
39
|
+
<a href="https://developers.facebook.com/apps" target="_blank">Facebook</a>
|
40
|
+
|
34
41
|
[ Development ]
|
35
42
|
Edit: config/initializers/local_setting.rb
|
36
43
|
|
37
44
|
```ruby
|
45
|
+
# Twitter
|
38
46
|
ENV['TWITTER_KEY'] = "YOUR_CONSUMER_KEY"
|
39
47
|
ENV['TWITTER_SECRET'] = "YOUR_CONSUMER_SECRET"
|
48
|
+
|
49
|
+
# GitHub
|
50
|
+
#ENV['GITHUB_CLIENT_ID'] = "YOUR_CLIENT_ID"
|
51
|
+
#ENV['GITHUB_SECRET'] = "YOUR_SECRET"
|
52
|
+
|
53
|
+
# Facebook
|
54
|
+
#ENV['FACEBOOK_APP_ID'] = "YOUR_APP_ID"
|
55
|
+
#ENV['FACEBOOK_APP_SECRET'] = "YOUR_APP_SECRET"
|
40
56
|
```
|
41
57
|
|
42
58
|
[ Production ]
|
@@ -44,11 +60,29 @@ Edit: config/initializers/omniauth.rb
|
|
44
60
|
|
45
61
|
```ruby
|
46
62
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
47
|
-
provider :developer unless Rails.env.production?
|
48
63
|
provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET']
|
64
|
+
# provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_SECRET']
|
65
|
+
# provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET']
|
49
66
|
end
|
50
67
|
```
|
51
68
|
|
69
|
+
[ Heroku ]
|
70
|
+
|
71
|
+
Twitter
|
72
|
+
|
73
|
+
heroku config:add TWITTER_KEY=YOUR_CONSUMER_KEY
|
74
|
+
heroku config:add TWITTER_SECRET=YOUR_CONSUMER_SECRET
|
75
|
+
|
76
|
+
GitHub
|
77
|
+
|
78
|
+
heroku config:add GITHUB_CLIENT_ID=YOUR_CLIENT_ID
|
79
|
+
heroku config:add GITHUB_SECRET=YOUR_SECRET
|
80
|
+
|
81
|
+
Facebook
|
82
|
+
|
83
|
+
heroku config:add FACEBOOK_APP_ID=YOUR_APP_ID
|
84
|
+
heroku config:add FACEBOOK_APP_SECRET=YOUR_APP_SECRET
|
85
|
+
|
52
86
|
## Contributing
|
53
87
|
|
54
88
|
1. Fork it
|
@@ -59,5 +93,4 @@ end
|
|
59
93
|
|
60
94
|
## Copyright
|
61
95
|
|
62
|
-
Copyright (c) 2012 Shun Matsumoto.
|
63
|
-
further details.
|
96
|
+
Copyright (c) 2012 Shun Matsumoto. <a href="http://creativecommons.org/licenses/by-nc-sa/2.1/jp/" target="_blank">CC BY-NC-SA 2.1</a>
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ Jeweler::Tasks.new do |gem|
|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "omniauth-scaffold"
|
18
18
|
gem.homepage = "http://github.com/shu0115/omniauth-scaffold"
|
19
|
-
gem.license = "
|
19
|
+
gem.license = "CC BY-NC-SA 2.1"
|
20
20
|
gem.summary = "OmniAuth Scaffold"
|
21
21
|
gem.description = "Scaffold for OmniAuth."
|
22
22
|
gem.email = "s.matsumoto0115@gmail.com"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
@@ -20,7 +20,7 @@ APP_DESCRIPTION
|
|
20
20
|
|
21
21
|
### Twitterアプリ登録
|
22
22
|
|
23
|
-
https://dev.twitter.com/apps/new
|
23
|
+
<a href="https://dev.twitter.com/apps/new" target="_blank">Twitter Create an application</a>
|
24
24
|
|
25
25
|
Name: [ (アプリケーションの名前) ]
|
26
26
|
Description: [ (アプリケーションの説明) ]
|
@@ -41,9 +41,7 @@ Edit: config/initializers/local_setting.rb
|
|
41
41
|
|
42
42
|
※Twitterアプリ登録完了後に表示された「Consumer key」を「YOUR_CONSUMER_KEY」に、「Consumer secret」を「YOUR\_CONSUMER_SECRET」にそれぞれ入力
|
43
43
|
|
44
|
-
###
|
45
|
-
|
46
|
-
アプリ名設定
|
44
|
+
### アプリ名設定
|
47
45
|
|
48
46
|
Edit: config/initializers/constants.rb
|
49
47
|
|
@@ -71,4 +69,4 @@ Gemインストール
|
|
71
69
|
|
72
70
|
## Copyright
|
73
71
|
|
74
|
-
Copyright (c) 2012 MY NAME.
|
72
|
+
Copyright (c) 2012 MY NAME. <a href="http://creativecommons.org/licenses/by-nc-sa/2.1/jp/" target="_blank">CC BY-NC-SA 2.1</a>
|
@@ -1,2 +1,11 @@
|
|
1
|
+
# Twitter
|
1
2
|
ENV['TWITTER_KEY'] = "YOUR_CONSUMER_KEY"
|
2
3
|
ENV['TWITTER_SECRET'] = "YOUR_CONSUMER_SECRET"
|
4
|
+
|
5
|
+
# GitHub
|
6
|
+
#ENV['GITHUB_CLIENT_ID'] = "YOUR_CLIENT_ID"
|
7
|
+
#ENV['GITHUB_SECRET'] = "YOUR_SECRET"
|
8
|
+
|
9
|
+
# Facebook
|
10
|
+
#ENV['FACEBOOK_APP_ID'] = "YOUR_APP_ID"
|
11
|
+
#ENV['FACEBOOK_APP_SECRET'] = "YOUR_APP_SECRET"
|
@@ -1,4 +1,6 @@
|
|
1
1
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
2
|
-
provider :developer unless Rails.env.production?
|
2
|
+
# provider :developer unless Rails.env.production?
|
3
3
|
provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET']
|
4
|
+
# provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_SECRET']
|
5
|
+
# provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET']
|
4
6
|
end
|
data/omniauth-scaffold.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "omniauth-scaffold"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Shun Matsumoto"]
|
@@ -13,14 +13,12 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = "Scaffold for OmniAuth."
|
14
14
|
s.email = "s.matsumoto0115@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
16
|
"README.md"
|
18
17
|
]
|
19
18
|
s.files = [
|
20
19
|
".document",
|
21
20
|
".rspec",
|
22
21
|
"Gemfile",
|
23
|
-
"LICENSE.txt",
|
24
22
|
"README.md",
|
25
23
|
"Rakefile",
|
26
24
|
"VERSION",
|
@@ -41,7 +39,7 @@ Gem::Specification.new do |s|
|
|
41
39
|
"spec/spec_helper.rb"
|
42
40
|
]
|
43
41
|
s.homepage = "http://github.com/shu0115/omniauth-scaffold"
|
44
|
-
s.licenses = ["
|
42
|
+
s.licenses = ["CC BY-NC-SA 2.1"]
|
45
43
|
s.require_paths = ["lib"]
|
46
44
|
s.rubygems_version = "1.8.23"
|
47
45
|
s.summary = "OmniAuth Scaffold"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -112,13 +112,11 @@ email: s.matsumoto0115@gmail.com
|
|
112
112
|
executables: []
|
113
113
|
extensions: []
|
114
114
|
extra_rdoc_files:
|
115
|
-
- LICENSE.txt
|
116
115
|
- README.md
|
117
116
|
files:
|
118
117
|
- .document
|
119
118
|
- .rspec
|
120
119
|
- Gemfile
|
121
|
-
- LICENSE.txt
|
122
120
|
- README.md
|
123
121
|
- Rakefile
|
124
122
|
- VERSION
|
@@ -139,7 +137,7 @@ files:
|
|
139
137
|
- spec/spec_helper.rb
|
140
138
|
homepage: http://github.com/shu0115/omniauth-scaffold
|
141
139
|
licenses:
|
142
|
-
-
|
140
|
+
- CC BY-NC-SA 2.1
|
143
141
|
post_install_message:
|
144
142
|
rdoc_options: []
|
145
143
|
require_paths:
|
@@ -152,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
150
|
version: '0'
|
153
151
|
segments:
|
154
152
|
- 0
|
155
|
-
hash:
|
153
|
+
hash: 2168833982007192141
|
156
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
155
|
none: false
|
158
156
|
requirements:
|
data/LICENSE.txt
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 Shun Matsumoto
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|