omniauth-scaffold 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +3 -16
  3. data/LICENSE +22 -0
  4. data/README.md +92 -51
  5. data/Rakefile +2 -49
  6. data/lib/omniauth-scaffold/templates/README.md +80 -0
  7. data/lib/{generators/omniauth/scaffold/templates/app/views/layouts → omniauth-scaffold/templates}/application.html.erb +7 -7
  8. data/lib/{generators/omniauth/scaffold/templates/app/controllers → omniauth-scaffold/templates}/application_controller.rb +7 -7
  9. data/lib/{generators/omniauth/scaffold/templates/app/assets/stylesheets → omniauth-scaffold/templates}/base.css.scss +0 -1
  10. data/lib/{generators/omniauth/scaffold/templates/db/migrate → omniauth-scaffold/templates}/create_users.rb +0 -0
  11. data/lib/omniauth-scaffold/templates/index.html.erb +2 -0
  12. data/lib/{generators/omniauth/scaffold/templates/config/locales → omniauth-scaffold/templates}/ja.yml +3 -3
  13. data/lib/omniauth-scaffold/templates/omniauth.rb +10 -0
  14. data/lib/omniauth-scaffold/templates/rails_config/development.yml +0 -0
  15. data/lib/omniauth-scaffold/templates/rails_config/production.yml +11 -0
  16. data/lib/omniauth-scaffold/templates/rails_config/rails_config.rb +3 -0
  17. data/lib/omniauth-scaffold/templates/rails_config/settings.local.yml +3 -0
  18. data/lib/omniauth-scaffold/templates/rails_config/settings.yml +11 -0
  19. data/lib/omniauth-scaffold/templates/rails_config/test.yml +0 -0
  20. data/lib/{generators/omniauth/scaffold/templates/app/assets/stylesheets → omniauth-scaffold/templates}/scaffolds.css.scss +27 -13
  21. data/lib/{generators/omniauth/scaffold/templates/app/controllers → omniauth-scaffold/templates}/sessions_controller.rb +0 -0
  22. data/lib/{generators/omniauth/scaffold/templates/app/controllers → omniauth-scaffold/templates}/top_controller.rb +0 -0
  23. data/lib/{generators/omniauth/scaffold/templates/app/models → omniauth-scaffold/templates}/user.rb +1 -1
  24. data/lib/omniauth-scaffold/version.rb +5 -0
  25. data/lib/omniauth-scaffold.rb +92 -0
  26. data/omniauth-scaffold.gemspec +13 -73
  27. metadata +31 -129
  28. data/.document +0 -5
  29. data/.rspec +0 -1
  30. data/VERSION +0 -1
  31. data/lib/generators/omniauth/scaffold/scaffold_generator.rb +0 -93
  32. data/lib/generators/omniauth/scaffold/templates/README.md +0 -64
  33. data/lib/generators/omniauth/scaffold/templates/app/views/top/index.html.erb +0 -2
  34. data/lib/generators/omniauth/scaffold/templates/config/initializers/constants.rb +0 -19
  35. data/lib/generators/omniauth/scaffold/templates/config/initializers/local_setting.rb +0 -13
  36. data/lib/generators/omniauth/scaffold/templates/config/initializers/omniauth.rb +0 -6
  37. data/spec/omniauth-scaffold_spec.rb +0 -7
  38. data/spec/spec_helper.rb +0 -12
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile CHANGED
@@ -1,17 +1,4 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- gem 'omniauth-twitter'
6
- gem 'omniauth-github'
7
- gem 'omniauth-facebook'
1
+ source 'https://rubygems.org'
8
2
 
9
- # Add dependencies to develop your gem here.
10
- # Include everything needed to run rake, tests, features, etc.
11
- group :development do
12
- gem "rspec", "~> 2.8.0"
13
- gem "rdoc", "~> 3.12"
14
- # gem "bundler", "~> 1.0.0"
15
- gem "jeweler", "~> 1.8.3"
16
- # gem "rcov", ">= 0"
17
- end
3
+ # Specify your gem's dependencies in omniauth-scaffold.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 shu0115
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,94 +1,139 @@
1
- # OmniAuth Scaffold
1
+ # Omniauth::Scaffold
2
2
 
3
3
  Scaffold for OmniAuth.
4
4
 
5
5
  ## Installation
6
6
 
7
- Edit: Gemfile
7
+ Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'omniauth-scaffold'
10
+ vi Gemfile
11
+ ----------
12
+ # For OmniAuth
13
+ gem 'rails_config'
14
+ gem 'omniauth-scaffold', :group => :development
11
15
  gem 'omniauth-twitter'
12
16
  #gem 'omniauth-github'
13
17
  #gem 'omniauth-facebook'
18
+ ----------
14
19
  ```
15
20
 
16
- Execute:
21
+ And then execute:
17
22
 
18
- bundle
23
+ ```
24
+ bundle install --without production
25
+ ```
19
26
 
20
27
  Or install it yourself as:
21
28
 
22
- gem install omniauth-scaffold
29
+ ```
30
+ gem install rails_config
31
+ gem install omniauth-scaffold
32
+ gem install omniauth-twitter
33
+ ```
23
34
 
24
35
  ## Usage
25
36
 
26
- Generate omniauth scaffold:
37
+ ### Generate omniauth scaffold
27
38
 
28
- rails g omniauth:scaffold
39
+ ```
40
+ rails g omniauth:scaffold
41
+ ----------
42
+ create config/initializers/rails_config.rb
43
+ create config/settings.yml
44
+ create config/settings.local.yml
45
+ create config/settings/development.yml
46
+ create config/settings/production.yml
47
+ create config/settings/test.yml
48
+ create config/initializers/omniauth.rb
49
+ insert config/routes.rb
50
+ insert config/routes.rb
51
+ insert config/routes.rb
52
+ insert config/application.rb
53
+ insert config/application.rb
54
+ insert config/application.rb
55
+ gsub config/environments/development.rb
56
+ insert config/environments/development.rb
57
+ create config/locales/ja.yml
58
+ create db/migrate/20000101000000_create_users.rb
59
+ create app/models/user.rb
60
+ create app/controllers/application_controller.rb
61
+ create app/controllers/sessions_controller.rb
62
+ create app/controllers/top_controller.rb
63
+ create app/views/layouts/application.html.erb
64
+ create app/views/top/index.html.erb
65
+ create app/assets/stylesheets/base.css.scss
66
+ create app/assets/stylesheets/scaffolds.css.scss
67
+ remove public/index.html
68
+ remove README.rdoc
69
+ create README.md
70
+ append .gitignore
71
+ ----------
72
+ ```
29
73
 
30
- Edit: config/initializers/constants.rb
74
+ Edit: config/settings.yml
31
75
 
32
76
  ```ruby
33
- APP_NAME = "YOUR_APP_NAME"
77
+ # アプリケーション名
78
+ app_name: "YOUR_APP_NAME"
34
79
  ```
35
80
 
36
- [ Keys ]
37
- <a href="https://dev.twitter.com/apps/new" target="_blank">Twitter</a>
38
- <a href="https://github.com/settings/applications/new" target="_blank">GitHub</a>
39
- <a href="https://developers.facebook.com/apps" target="_blank">Facebook</a>
40
-
41
- [ Development ]
42
- Edit: config/initializers/local_setting.rb
81
+ ### Keys
43
82
 
44
- ```ruby
45
- # Twitter
46
- ENV['TWITTER_KEY'] = "YOUR_CONSUMER_KEY"
47
- ENV['TWITTER_SECRET'] = "YOUR_CONSUMER_SECRET"
48
-
49
- # GitHub
50
- #ENV['GITHUB_CLIENT_ID'] = "YOUR_CLIENT_ID"
51
- #ENV['GITHUB_SECRET'] = "YOUR_SECRET"
83
+ <a href="https://dev.twitter.com/apps/new" target="_blank">Twitter</a>
84
+ <a href="https://github.com/settings/applications/new" target="_blank">GitHub</a>
85
+ <a href="https://developers.facebook.com/apps" target="_blank">Facebook</a>
52
86
 
53
- # Facebook
54
- #ENV['FACEBOOK_APP_ID'] = "YOUR_APP_ID"
55
- #ENV['FACEBOOK_APP_SECRET'] = "YOUR_APP_SECRET"
56
- ```
87
+ ### Development Setting
57
88
 
58
- [ Production ]
59
- Edit: config/initializers/omniauth.rb
89
+ Edit: config/settings.local.yml
60
90
 
61
91
  ```ruby
62
- Rails.application.config.middleware.use OmniAuth::Builder do
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']
66
- end
92
+ # Twitter OAuth Local Setting
93
+ twitter_key: "TWITTER_KEY"
94
+ twitter_secret: "TWITTER_SECRET"
67
95
  ```
68
96
 
69
- [ Heroku ]
97
+ ### Production Setting For Heroku
98
+
70
99
  Twitter
71
100
 
72
- heroku config:add TWITTER_KEY=YOUR_CONSUMER_KEY
73
- heroku config:add TWITTER_SECRET=YOUR_CONSUMER_SECRET
101
+ ```
102
+ heroku config:add TWITTER_KEY=YOUR_CONSUMER_KEY
103
+ heroku config:add TWITTER_SECRET=YOUR_CONSUMER_SECRET
104
+ ```
74
105
 
75
106
  GitHub
76
107
 
77
- heroku config:add GITHUB_CLIENT_ID=YOUR_CLIENT_ID
78
- heroku config:add GITHUB_SECRET=YOUR_SECRET
108
+ ```
109
+ heroku config:add GITHUB_CLIENT_ID=YOUR_CLIENT_ID
110
+ heroku config:add GITHUB_SECRET=YOUR_SECRET
111
+ ```
79
112
 
80
113
  Facebook
81
114
 
82
- heroku config:add FACEBOOK_APP_ID=YOUR_APP_ID
83
- heroku config:add FACEBOOK_APP_SECRET=YOUR_APP_SECRET
115
+ ```
116
+ heroku config:add FACEBOOK_APP_ID=YOUR_APP_ID
117
+ heroku config:add FACEBOOK_APP_SECRET=YOUR_APP_SECRET
118
+ ```
84
119
 
85
- Migration:
120
+ ### Heroku Timezone Setting
86
121
 
87
- rake db:migrate
122
+ ```
123
+ heroku config:add TZ=Asia/Tokyo
124
+ ```
88
125
 
89
- Start Server:
126
+ ### Migration
90
127
 
91
- rails s
128
+ ```
129
+ rake db:migrate
130
+ ```
131
+
132
+ ### Start Server
133
+
134
+ ```
135
+ rails s
136
+ ```
92
137
 
93
138
  ## Contributing
94
139
 
@@ -97,7 +142,3 @@ Start Server:
97
142
  3. Commit your changes (`git commit -am 'Added some feature'`)
98
143
  4. Push to the branch (`git push origin my-new-feature`)
99
144
  5. Create new Pull Request
100
-
101
- ## Copyright
102
-
103
- 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
@@ -1,49 +1,2 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "omniauth-scaffold"
18
- gem.homepage = "http://github.com/shu0115/omniauth-scaffold"
19
- gem.license = "CC BY-NC-SA 2.1"
20
- gem.summary = "OmniAuth Scaffold"
21
- gem.description = "Scaffold for OmniAuth."
22
- gem.email = "s.matsumoto0115@gmail.com"
23
- gem.authors = ["Shun Matsumoto"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
- RSpec::Core::RakeTask.new(:spec) do |spec|
31
- spec.pattern = FileList['spec/**/*_spec.rb']
32
- end
33
-
34
- RSpec::Core::RakeTask.new(:rcov) do |spec|
35
- spec.pattern = 'spec/**/*_spec.rb'
36
- spec.rcov = true
37
- end
38
-
39
- task :default => :spec
40
-
41
- require 'rdoc/task'
42
- Rake::RDocTask.new do |rdoc|
43
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
-
45
- rdoc.rdoc_dir = 'rdoc'
46
- rdoc.title = "omniauth-scaffold #{version}"
47
- rdoc.rdoc_files.include('README*')
48
- rdoc.rdoc_files.include('lib/**/*.rb')
49
- end
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,80 @@
1
+ # APP_NAME
2
+
3
+ APP_DESCRIPTION.
4
+
5
+ ## Local Setting
6
+
7
+ ### GitHub上でFork
8
+
9
+ ```
10
+ https://github.com/USER_NAME/APP_NAME/
11
+ ```
12
+
13
+ ### リポジトリをローカルへ作成
14
+
15
+ ```
16
+ cd ~/WORK_DIRECTORY
17
+ git clone git@github.com:YOUR_USER_NAME/APP_NAME.git
18
+ cd APP_NAME
19
+ ```
20
+
21
+ ### ブランチ作成
22
+
23
+ ```
24
+ git checkout -b YOUR_NEW_BRANCH
25
+ ```
26
+
27
+ ### Twitterアプリ登録
28
+
29
+ <a href="https://dev.twitter.com/apps/new" target="_blank">Twitter Create an application</a>
30
+
31
+ ```
32
+ Name: [ (アプリケーションの名前) ]
33
+ Description: [ (アプリケーションの説明) ]
34
+ WebSite: [ http://0.0.0.0:3000/ ]
35
+ Callback URL: [ http://0.0.0.0:3000/ ] ※登録しないと動かない
36
+ □ Yes, I agree <= チェック
37
+ CAPTCHA入力後「Create your Twitter application」を押下
38
+ ```
39
+
40
+ ### ローカル用Twitterキー設定
41
+
42
+ Create: config/settings.local.yml
43
+
44
+ ```ruby
45
+ # Twitter OAuth Local Setting
46
+ twitter_key: "YOUR_CONSUMER_KEY"
47
+ twitter_secret: "YOUR_CONSUMER_SECRET"
48
+ ```
49
+
50
+ ※Twitterアプリ登録完了後に表示された「Consumer key」を「YOUR_CONSUMER_KEY」に、「Consumer secret」を「YOUR_CONSUMER_SECRET」にそれぞれ入力
51
+
52
+ ### Rails起動
53
+
54
+ Gemインストール
55
+
56
+ ```
57
+ bundle install --without production
58
+ ```
59
+
60
+ ローカルDB作成
61
+
62
+ ```
63
+ rake db:migrate
64
+ ```
65
+
66
+ ローカルサーバ起動
67
+
68
+ ```
69
+ bundle exec rails s
70
+ ```
71
+
72
+ ページアクセス
73
+
74
+ ```
75
+ http://0.0.0.0:3000/
76
+ ```
77
+
78
+ ## Copyright
79
+
80
+ 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,36 +1,36 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title><%= APP_NAME %></title>
4
+ <title><%= Settings.app_name %></title>
5
5
  <%= stylesheet_link_tag "application", :media => "all" %>
6
6
  <%= javascript_include_tag "application" %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
10
10
 
11
- <%# ----- 追加 ----- %>
12
11
  <% if current_user %>
13
12
  <%# ログイン済み %>
14
13
  <%= link_to_unless( current_user.screen_name.blank?, image_tag( current_user.image, size: "20x20" ), "https://twitter.com/#!/#{current_user.screen_name}", target: "_blank" ) %>
15
- <%= current_user.name %> :
14
+ <%= current_user.screen_name %> :
16
15
  || <%= link_to "Logout", logout_path %>
17
16
  <% else %>
18
17
  <%# 未ログイン %>
19
- <%= link_to "Login", "/auth/#{DEFAULT_PROVIDER}" %>
18
+ <%= link_to "Login", "/auth/#{Settings.provider}" %>
20
19
  <% end %>
21
20
 
22
21
  <%# 通知/エラーメッセージ %>
23
22
  <%= simple_format( flash[:notice], style: "color: green;" ) unless flash[:notice].blank? %>
24
23
  <%= simple_format( flash[:alert], style: "color: red;" ) unless flash[:alert].blank? %>
25
- <%# ----- /追加 ----- %>
26
24
 
27
25
  <%= yield %>
26
+
28
27
  <br />
29
28
  <br />
30
29
 
31
30
  <center>
32
- Developed by <a href="https://twitter.com/#!/PROGRAMMER_ID/" target="_blank">PROGRAMMER_NAME</a>, Designed by <a href="https://twitter.com/#!/DESIGNER_ID/" target="_blank">DESIGNER_NAME</a><br />
33
- Licence by <a href="http://creativecommons.org/licenses/by-nc-sa/2.1/jp/" target="_blank">CC BY-NC-SA 2.1</a>
31
+ Developed by <a href="https://twitter.com/#!/<%= Settings.programmer_twitter_id %>/" target="_blank">@<%= Settings.programmer_twitter_id %></a>,
32
+ Designed by <a href="https://twitter.com/#!/<%= Settings.designer_twitter_id %>/" target="_blank">@<%= Settings.designer_twitter_id %></a>,
33
+ Licence by <a href="https://creativecommons.org/licenses/by-nc-sa/2.1/jp/" target="_blank">CC BY-NC-SA 2.1</a>
34
34
  </center>
35
35
 
36
36
  </body>
@@ -2,18 +2,18 @@
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
4
  protect_from_forgery
5
-
5
+
6
6
  # httpsリダイレクト
7
7
  before_filter :ssl_redirect if Rails.env.production?
8
-
8
+
9
9
  # 未ログインリダイレクト
10
10
  before_filter :authorize
11
-
11
+
12
12
  # セッション有効期限延長
13
13
  before_filter :reset_session_expires
14
14
 
15
15
  private
16
-
16
+
17
17
  #--------------#
18
18
  # ssl_redirect #
19
19
  #--------------#
@@ -21,11 +21,11 @@ class ApplicationController < ActionController::Base
21
21
  def ssl_redirect
22
22
  unless request.env["HTTP_X_FORWARDED_PROTO"].to_s == "https"
23
23
  request.env["HTTP_X_FORWARDED_PROTO"] = "https"
24
-
24
+
25
25
  redirect_to request.url and return
26
26
  end
27
27
  end
28
-
28
+
29
29
  #-----------#
30
30
  # authorize #
31
31
  #-----------#
@@ -39,7 +39,7 @@ class ApplicationController < ActionController::Base
39
39
  end
40
40
  end
41
41
  end
42
-
42
+
43
43
  #-----------------------#
44
44
  # reset_session_expires #
45
45
  #-----------------------#
@@ -1,4 +1,3 @@
1
-
2
1
  /* テーブル */
3
2
  table, tr, th, td {
4
3
  border: 1px solid #aaa;
@@ -0,0 +1,2 @@
1
+
2
+ <h1>Welcome to <%= Settings.app_name %>.</h1>
@@ -10,7 +10,7 @@ ja:
10
10
  - 金
11
11
  - 土
12
12
  abbr_month_names:
13
- -
13
+ -
14
14
  - 1月
15
15
  - 2月
16
16
  - 3月
@@ -36,7 +36,7 @@ ja:
36
36
  long: ! '%Y年%m月%d日(%a)'
37
37
  short: ! '%m/%d'
38
38
  month_names:
39
- -
39
+ -
40
40
  - 1月
41
41
  - 2月
42
42
  - 3月
@@ -195,4 +195,4 @@ ja:
195
195
  <<: *errors
196
196
  activerecord:
197
197
  errors:
198
- <<: *errors
198
+ <<: *errors
@@ -0,0 +1,10 @@
1
+ Rails.application.config.middleware.use OmniAuth::Builder do
2
+ # --- Twitter - Default --- #
3
+ provider :twitter, Settings.twitter_key, Settings.twitter_secret
4
+
5
+ # --- Others --- #
6
+ # provider :developer unless Rails.env.production?
7
+ # provider :twitter, Settings.twitter_key, Settings.twitter_secret
8
+ # provider :github, Settings.github_client_id, Settings.github_secret
9
+ # provider :facebook, Settings.facebook_app_id, Settings.facebook_app_secret
10
+ end
@@ -0,0 +1,11 @@
1
+ # Twitter OAuth Setting
2
+ twitter_key: <%= ENV['TWITTER_KEY'] %>
3
+ twitter_secret: <%= ENV['TWITTER_SECRET'] %>
4
+
5
+ # GitHub OAuth Setting
6
+ github_client_id: <%= ENV['GITHUB_CLIENT_ID'] %>
7
+ github_secret: <%= ENV['GITHUB_SECRET'] %>
8
+
9
+ # Facebook OAuth Setting
10
+ facebook_app_id: <%= ENV['FACEBOOK_APP_ID'] %>
11
+ facebook_app_secret: <%= ENV['FACEBOOK_APP_SECRET'] %>
@@ -0,0 +1,3 @@
1
+ RailsConfig.setup do |config|
2
+ config.const_name = "Settings"
3
+ end
@@ -0,0 +1,3 @@
1
+ # Twitter OAuth Local Setting
2
+ twitter_key: "TWITTER_KEY"
3
+ twitter_secret: "TWITTER_SECRET"
@@ -0,0 +1,11 @@
1
+ # OmniAuth Provider
2
+ provider: "twitter"
3
+
4
+ # アプリケーション名
5
+ app_name: "YOUR_APP_NAME"
6
+
7
+ # プログラマTwitterID
8
+ programmer_twitter_id: "PROGRAMMER_TWITTER_ID"
9
+
10
+ # デザイナーTwitterID
11
+ designer_twitter_id: "DESIGNER_TWITTER_ID"
@@ -1,19 +1,26 @@
1
1
  body {
2
2
  background-color: #fff;
3
3
  color: #333;
4
- font-family: verdana, arial, helvetica, sans-serif;
5
- font-size: 13px;
6
- line-height: 18px; }
4
+ font-family: Courier, verdana, arial, helvetica, sans-serif;
5
+ font-size: 14px;
6
+ line-height: 18px;
7
+ }
7
8
 
8
9
  p, ol, ul, td {
9
- font-family: verdana, arial, helvetica, sans-serif;
10
- font-size: 13px;
11
- line-height: 18px; }
10
+ font-family: Courier, verdana, arial, helvetica, sans-serif;
11
+ font-size: 14px;
12
+ line-height: 18px;
13
+ }
14
+
15
+ textarea, pre {
16
+ font-family: Courier;
17
+ font-size: 14px;
18
+ }
12
19
 
13
20
  pre {
14
21
  background-color: #eee;
15
22
  padding: 10px;
16
- font-size: 11px; }
23
+ }
17
24
 
18
25
  a {
19
26
  color: #000;
@@ -21,19 +28,23 @@ a {
21
28
  color: #666; }
22
29
  &:hover {
23
30
  color: #fff;
24
- background-color: #000; } }
31
+ background-color: #000; }
32
+ }
25
33
 
26
34
  div {
27
35
  &.field, &.actions {
28
- margin-bottom: 10px; } }
36
+ margin-bottom: 10px; }
37
+ }
29
38
 
30
39
  #notice {
31
- color: green; }
40
+ color: green;
41
+ }
32
42
 
33
43
  .field_with_errors {
34
44
  padding: 2px;
35
45
  background-color: red;
36
- display: table; }
46
+ display: table;
47
+ }
37
48
 
38
49
  #error_explanation {
39
50
  width: 450px;
@@ -50,7 +61,10 @@ div {
50
61
  margin: -7px;
51
62
  margin-bottom: 0px;
52
63
  background-color: #c00;
53
- color: #fff; }
64
+ color: #fff;
65
+ }
54
66
  ul li {
55
67
  font-size: 12px;
56
- list-style: square; } }
68
+ list-style: square;
69
+ }
70
+ }
@@ -17,7 +17,7 @@ class User < ActiveRecord::Base
17
17
  user[:screen_name] = auth["info"]["nickname"]
18
18
  user[:image] = auth["info"]["image"]
19
19
  end
20
-
20
+
21
21
  unless auth["credentials"].blank?
22
22
  user.token = auth['credentials']['token']
23
23
  user.secret = auth['credentials']['secret']
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module Scaffold
3
+ VERSION = "0.1.11"
4
+ end
5
+ end