Merge pull request #432 from differentreality/style_module

enable style ClassAndModuleChildren
This commit is contained in:
Artem Chernikov 2014-08-11 10:26:23 +02:00
commit ac25561523
23 changed files with 615 additions and 566 deletions

View file

@ -8,7 +8,7 @@
# Offense count: 20
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false
Enabled: true
# Offense count: 3
# Cop supports --auto-correct.

View file

@ -1,4 +1,5 @@
class Admin::CallforpapersController < ApplicationController
module Admin
class CallforpapersController < ApplicationController
before_filter :verify_organizer
def show
@ -50,3 +51,4 @@ class Admin::CallforpapersController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::CommercialsController < ApplicationController
module Admin
class CommercialsController < ApplicationController
before_action :set_conference
before_action :set_commercial, only: [:edit, :update, :destroy]
@ -55,3 +56,4 @@ class Admin::CommercialsController < ApplicationController
params[:commercial]
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::ConferenceController < ApplicationController
module Admin
class ConferenceController < ApplicationController
before_filter :verify_organizer
def index
@ -173,3 +174,4 @@ class Admin::ConferenceController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::ContactsController < ApplicationController
module Admin
class ContactsController < ApplicationController
before_action :set_conference
before_action :set_contact, only: [:show, :edit, :update, :destroy]
@ -42,3 +43,4 @@ class Admin::ContactsController < ApplicationController
params[:contact]
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::DietchoicesController < ApplicationController
module Admin
class DietchoicesController < ApplicationController
before_filter :verify_organizer
def show
@ -14,3 +15,4 @@ class Admin::DietchoicesController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::DifficultyLevelsController < ApplicationController
module Admin
class DifficultyLevelsController < ApplicationController
before_filter :verify_organizer
def index
@ -27,3 +28,4 @@ class Admin::DifficultyLevelsController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::EmailsController < ApplicationController
module Admin
class EmailsController < ApplicationController
before_filter :verify_organizer
def update
@ -12,3 +13,4 @@ class Admin::EmailsController < ApplicationController
@settings = @conference.email_settings
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::EventtypesController < ApplicationController
module Admin
class EventtypesController < ApplicationController
before_filter :verify_organizer
def show
@ -16,3 +17,4 @@ class Admin::EventtypesController < ApplicationController
alert: "Event types update failed: #{e.message}")
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::QuestionsController < ApplicationController
module Admin
class QuestionsController < ApplicationController
before_filter :verify_organizer
def index
@ -40,7 +41,6 @@ class Admin::QuestionsController < ApplicationController
# PUT questions/1
def update
@conference = Conference.find_by(short_title: params[:conference_id])
@question = Question.find(params[:id])
@ -94,3 +94,4 @@ class Admin::QuestionsController < ApplicationController
@questions_conference = @conference.questions
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::RoomsController < ApplicationController
module Admin
class RoomsController < ApplicationController
before_filter :verify_organizer
def show
@ -17,3 +18,4 @@ class Admin::RoomsController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::SocialEventsController < ApplicationController
module Admin
class SocialEventsController < ApplicationController
before_filter :verify_organizer
def show
@ -13,3 +14,4 @@ class Admin::SocialEventsController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::SupporterLevelsController < ApplicationController
module Admin
class SupporterLevelsController < ApplicationController
before_filter :verify_organizer
def show
@ -14,3 +15,4 @@ class Admin::SupporterLevelsController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::SupportersController < ApplicationController
module Admin
class SupportersController < ApplicationController
before_filter :verify_organizer
def index
@ -14,3 +15,4 @@ class Admin::SupportersController < ApplicationController
redirect_to(admin_conference_supporters_path(conference_id: @conference.short_title), notice: "Supporter added")
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::TracksController < ApplicationController
module Admin
class TracksController < ApplicationController
before_filter :verify_organizer
def show
@ -20,3 +21,4 @@ class Admin::TracksController < ApplicationController
end
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::VenueController < ApplicationController
module Admin
class VenueController < ApplicationController
before_filter :verify_organizer
def index
@ -28,3 +29,4 @@ class Admin::VenueController < ApplicationController
render :venue_info
end
end
end

View file

@ -1,4 +1,5 @@
class Admin::VolunteersController < ApplicationController
module Admin
class VolunteersController < ApplicationController
def index
@conference = Conference.find_by(short_title: params[:conference_id])
render :index
@ -23,3 +24,4 @@ class Admin::VolunteersController < ApplicationController
end
end
end
end

View file

@ -1,3 +1,5 @@
class Api::BaseController < ActionController::Base
module Api
class BaseController < ActionController::Base
protect_from_forgery
end
end

View file

@ -1,4 +1,6 @@
class Api::V1::ConferencesController < Api::BaseController
module Api
module V1
class ConferencesController < Api::BaseController
respond_to :json
def index
@ -10,3 +12,5 @@ class Api::V1::ConferencesController < Api::BaseController
render json: conferences, serializer: ConferencesArraySerializer
end
end
end
end

View file

@ -1,4 +1,6 @@
class Api::V1::RoomsController < Api::BaseController
module Api
module V1
class RoomsController < Api::BaseController
respond_to :json
def index
@ -11,3 +13,5 @@ class Api::V1::RoomsController < Api::BaseController
respond_with rooms
end
end
end
end

View file

@ -1,4 +1,6 @@
class Api::V1::TracksController < Api::BaseController
module Api
module V1
class TracksController < Api::BaseController
respond_to :json
def index
@ -11,3 +13,5 @@ class Api::V1::TracksController < Api::BaseController
respond_with tracks
end
end
end
end

View file

@ -1,3 +1,5 @@
class Ahoy::Store < Ahoy::Stores::ActiveRecordStore
module Ahoy
class Store < Ahoy::Stores::ActiveRecordStore
# customize here
end
end

View file

@ -1,4 +1,5 @@
class ActiveRecord::Base
module ActiveRecord
class Base
mattr_accessor :shared_connection
@@shared_connection = nil
@ -6,5 +7,6 @@ class ActiveRecord::Base
@@shared_connection || retrieve_connection
end
end
end
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection