Merge pull request #403 from openSUSE/review_140730_proceed_with_styling
[Review] Request from 'kalabiyau' @ 'openSUSE/osem/review_140730_proceed_with_styling'
This commit is contained in:
commit
d39d10d3f7
10 changed files with 50 additions and 59 deletions
28
.rubocop.yml
28
.rubocop.yml
|
|
@ -80,6 +80,34 @@ Lint/UselessAssignment:
|
||||||
Lint/Void:
|
Lint/Void:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Align the elements of a hash literal if they span more than one line
|
||||||
|
Style/AlignHash:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# Align the parameters of a method call if they span more than one line
|
||||||
|
Style/AlignParameters:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# Use && instead of and, use || instead of or
|
||||||
|
Style/AndOr:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# avoid deep blocks nesting
|
||||||
|
Style/BlockNesting:
|
||||||
|
Max: 4
|
||||||
|
|
||||||
|
# use do instead of {...} in multiline blocks
|
||||||
|
Style/Blocks:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# avoid redundunt curly braces when it is obvious that hash is used
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
#
|
||||||
|
Style/CaseEquality:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
Include:
|
Include:
|
||||||
- '**/Rakefile'
|
- '**/Rakefile'
|
||||||
|
|
|
||||||
|
|
@ -5,42 +5,6 @@
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
# Offense count: 10
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
|
||||||
Style/AlignHash:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
||||||
Style/AlignParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 2
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/AndOr:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
Style/BlockNesting:
|
|
||||||
Max: 4
|
|
||||||
|
|
||||||
# Offense count: 2
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/Blocks:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 2
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
||||||
Style/BracesAroundHashParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
Style/CaseEquality:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 20
|
# Offense count: 20
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
|
||||||
helper_method :date_string
|
helper_method :date_string
|
||||||
|
|
||||||
def store_location
|
def store_location
|
||||||
session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions"
|
session[:return_to] = request.fullpath if request.get? && controller_name != "user_sessions" && controller_name != "sessions"
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_sign_in_path_for(resource)
|
def after_sign_in_path_for(resource)
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,11 @@ class EventAttachmentsController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @upload.save
|
if @upload.save
|
||||||
format.html {
|
format.html do
|
||||||
render json: [@upload.to_jq_upload].to_json,
|
render json: [@upload.to_jq_upload].to_json,
|
||||||
content_type: 'text/html',
|
content_type: 'text/html',
|
||||||
layout: false
|
layout: false
|
||||||
}
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render json: [@upload.to_jq_upload].to_json, status: :created,
|
render json: [@upload.to_jq_upload].to_json, status: :created,
|
||||||
location: conference_proposal_event_attachment_path(@upload.event.conference.short_title, @upload.event, @upload)
|
location: conference_proposal_event_attachment_path(@upload.event.conference.short_title, @upload.event, @upload)
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ class ScheduleController < ApplicationController
|
||||||
layout "application"
|
layout "application"
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@conference = Conference.includes(:rooms, {events: [:speakers, :track, :event_type]}).where("conferences.short_title" => params[:conference_id]).first
|
@conference = Conference.includes(:rooms, events: [:speakers, :track, :event_type]).where("conferences.short_title" => params[:conference_id]).first
|
||||||
@rooms = @conference.rooms
|
@rooms = @conference.rooms
|
||||||
@events = @conference.events
|
@events = @conference.events
|
||||||
@dates = @conference.start_date..@conference.end_date
|
@dates = @conference.start_date..@conference.end_date
|
||||||
|
|
||||||
if @dates === Date.current
|
if @dates == Date.current
|
||||||
@today = Date.current.strftime("%Y-%m-%d")
|
@today = Date.current.strftime("%Y-%m-%d")
|
||||||
else
|
else
|
||||||
@today = @conference.start_date.strftime("%Y-%m-%d")
|
@today = @conference.start_date.strftime("%Y-%m-%d")
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ Devise.setup do |config|
|
||||||
# Pass each provider to User model in :omniauth_providers (for open_id providers use their name)
|
# Pass each provider to User model in :omniauth_providers (for open_id providers use their name)
|
||||||
|
|
||||||
config.omniauth :open_id, name: 'novell', identifier: 'http://www.opensuse.org/openid/user'
|
config.omniauth :open_id, name: 'novell', identifier: 'http://www.opensuse.org/openid/user'
|
||||||
config.omniauth :google_oauth2, Rails.application.secrets.google_key, Rails.application.secrets.google_secret, {
|
config.omniauth :google_oauth2, Rails.application.secrets.google_key, Rails.application.secrets.google_secret,
|
||||||
name: 'google',
|
name: 'google',
|
||||||
scope: 'email' }
|
scope: 'email'
|
||||||
config.omniauth :facebook, Rails.application.secrets.facebook_key, Rails.application.secrets.facebook_secret
|
config.omniauth :facebook, Rails.application.secrets.facebook_key, Rails.application.secrets.facebook_secret
|
||||||
|
|
||||||
# ==> Mailer Configuration
|
# ==> Mailer Configuration
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@ describe Admin::ConferenceController do
|
||||||
context 'valid attributes' do
|
context 'valid attributes' do
|
||||||
|
|
||||||
it 'locates the requested conference' do
|
it 'locates the requested conference' do
|
||||||
patch :update, id: conference.short_title, conference:
|
patch :update, id: conference.short_title, conference: attributes_for(:conference, title: 'Example Con')
|
||||||
attributes_for(:conference, title: 'Example Con')
|
|
||||||
expect(assigns(:conference)).to eq(conference)
|
expect(assigns(:conference)).to eq(conference)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue