Commit 98cf0ae3384afa34a417766f46a7b3171dc40279
1 parent
07aa6e59
Exists in
master
and in
4 other branches
Correct indentation in readme, fixed display of social accounts in profile
Showing
3 changed files
with
15 additions
and
9 deletions
Show diff stats
README.md
... | ... | @@ -83,24 +83,24 @@ Each month on the 22nd a new version is released together with an upgrade guide. |
83 | 83 | |
84 | 84 | ### Run in production mode |
85 | 85 | |
86 | - The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually: | |
86 | +The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually: | |
87 | 87 | |
88 | - sudo service gitlab start | |
88 | + sudo service gitlab start | |
89 | 89 | |
90 | - or by directly calling the script | |
90 | +or by directly calling the script | |
91 | 91 | |
92 | - sudo /etc/init.d/gitlab start | |
92 | + sudo /etc/init.d/gitlab start | |
93 | 93 | |
94 | 94 | ### Run in development mode |
95 | 95 | |
96 | 96 | Start it with [Foreman](https://github.com/ddollar/foreman) |
97 | 97 | |
98 | - bundle exec foreman start -p 3000 | |
98 | + bundle exec foreman start -p 3000 | |
99 | 99 | |
100 | - or start each component separately | |
100 | +or start each component separately | |
101 | 101 | |
102 | - bundle exec rails s | |
103 | - bundle exec rake sidekiq:start | |
102 | + bundle exec rails s | |
103 | + bundle exec rake sidekiq:start | |
104 | 104 | |
105 | 105 | ### Run the tests |
106 | 106 | ... | ... |
app/helpers/oauth_helper.rb
... | ... | @@ -10,4 +10,10 @@ module OauthHelper |
10 | 10 | def enabled_oauth_providers |
11 | 11 | Devise.omniauth_providers |
12 | 12 | end |
13 | + | |
14 | + def enabled_social_providers | |
15 | + enabled_oauth_providers.select do |name| | |
16 | + [:twitter, :github, :google_oauth2].include?(name.to_sym) | |
17 | + end | |
18 | + end | |
13 | 19 | end | ... | ... |
app/views/profiles/account.html.haml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | %legend Social Accounts |
5 | 5 | .oauth_select_holder |
6 | 6 | %p.hint Tip: Click on icon to activate sigin with one of the following services |
7 | - - User.omniauth_providers.each do |provider| | |
7 | + - enabled_social_providers.each do |provider| | |
8 | 8 | %span{class: oauth_active_class(provider) } |
9 | 9 | = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider) |
10 | 10 | ... | ... |