From dd64614fffda370786cce009909ac7584cd070c0 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Wed, 16 Sep 2015 22:11:35 +0100 Subject: [PATCH] More Rubocop --- .rubocop.yml | 2 +- app/controllers/admin/admin_controller.rb | 24 ++--- .../admin/admin_users_controller.rb | 96 +++++++++---------- .../admin/categories_controller.rb | 76 +++++++-------- .../admin/confirmations_controller.rb | 90 ++++++++--------- app/controllers/admin/dashboard_controller.rb | 4 +- app/controllers/admin/pages_controller.rb | 88 ++++++++--------- app/controllers/admin/passwords_controller.rb | 6 +- app/controllers/admin/photos_controller.rb | 86 +++++++++-------- .../admin/registrations_controller.rb | 6 +- app/controllers/admin/sessions_controller.rb | 16 ++-- app/controllers/admin/unlocks_controller.rb | 6 +- app/helpers/admin/admin_helper.rb | 14 +-- app/helpers/admin/dashboard_helper.rb | 2 - app/helpers/admin/downloads_helper.rb | 2 - app/helpers/admin/unlocks_helper.rb | 2 - app/mailers/notifier.rb | 4 +- app/middleware/heartbeat.rb | 6 +- app/models/admin_user.rb | 4 +- app/models/contact.rb | 7 +- app/models/photo.rb | 14 ++- app/presenters/page_presenter.rb | 2 +- app/validators/email_validator.rb | 7 +- script/about | 4 - script/console | 3 - script/dbconsole | 3 - script/destroy | 3 - script/generate | 3 - script/performance/benchmarker | 3 - script/performance/profiler | 3 - script/plugin | 3 - script/rails | 6 -- script/runner | 3 - script/server | 3 - 34 files changed, 282 insertions(+), 319 deletions(-) delete mode 100644 app/helpers/admin/dashboard_helper.rb delete mode 100644 app/helpers/admin/downloads_helper.rb delete mode 100644 app/helpers/admin/unlocks_helper.rb delete mode 100755 script/about delete mode 100755 script/console delete mode 100755 script/dbconsole delete mode 100755 script/destroy delete mode 100755 script/generate delete mode 100755 script/performance/benchmarker delete mode 100755 script/performance/profiler delete mode 100755 script/plugin delete mode 100755 script/rails delete mode 100755 script/runner delete mode 100755 script/server diff --git a/.rubocop.yml b/.rubocop.yml index 91acef6..0b022cd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ Metrics/LineLength: - Max: 99 + Max: 120 Documentation: Enabled: false diff --git a/app/controllers/admin/admin_controller.rb b/app/controllers/admin/admin_controller.rb index 5a3ab5b..47f884e 100644 --- a/app/controllers/admin/admin_controller.rb +++ b/app/controllers/admin/admin_controller.rb @@ -1,15 +1,17 @@ -class Admin::AdminController < ApplicationController - layout 'admin/layouts/admin' - before_filter :authenticate_admin_user! - before_filter :admin_menu +module Admin + class AdminController < ApplicationController + layout 'admin/layouts/admin' + before_filter :authenticate_admin_user! + before_filter :admin_menu - force_ssl host: APP_CONFIG[:ssl_hostname] + force_ssl host: APP_CONFIG[:ssl_hostname] - def admin_menu - @admin_menu = { dashboard: '', - admin_users: '', - categories: '', - photos: '', - pages: '' } + def admin_menu + @admin_menu = { dashboard: '', + admin_users: '', + categories: '', + photos: '', + pages: '' } + end end end diff --git a/app/controllers/admin/admin_users_controller.rb b/app/controllers/admin/admin_users_controller.rb index 6e2f56e..e07bef0 100644 --- a/app/controllers/admin/admin_users_controller.rb +++ b/app/controllers/admin/admin_users_controller.rb @@ -1,66 +1,64 @@ -class Admin::AdminUsersController < Admin::AdminController - - def index - @admin_users = AdminUser.all - end - - def new - @admin_user = AdminUser.new - end - - def edit - @admin_user = AdminUser.find(params[:id]) - end - - def update - @admin_user = AdminUser.find(params[:id]) - - if @admin_user.update_attributes(permitted_params) - redirect_to admin_admin_users_path, notice: 'Admin User was successfully updated.' - else - render :edit +module Admin + class AdminUsersController < Admin::AdminController + def index + @admin_users = AdminUser.all end - end - def create - @admin_user = AdminUser.new(permitted_params) + def new + @admin_user = AdminUser.new + end + + def edit + @admin_user = AdminUser.find(params[:id]) + end + + def update + @admin_user = AdminUser.find(params[:id]) + + if @admin_user.update_attributes(permitted_params) + redirect_to admin_admin_users_path, notice: 'Admin User was successfully updated.' + else + render :edit + end + end + + def create + @admin_user = AdminUser.new(permitted_params) - respond_to do |format| if @admin_user.save redirect_to admin_admin_users_path, notice: 'Admin User was successfully added.' else render :edit end end - end - def destroy - @admin_user = AdminUser.find(params[:id]) - @admin_user.destroy + def destroy + @admin_user = AdminUser.find(params[:id]) + @admin_user.destroy - redirect_to admin_admin_users_path, notice: 'Admin User was deleted.' - end + redirect_to admin_admin_users_path, notice: 'Admin User was deleted.' + end - # Allow the current logged in user to change their password - def edit_password - @admin_user = current_admin_user - end + # Allow the current logged in user to change their password + def edit_password + @admin_user = current_admin_user + end - def update_password - @admin_user = current_admin_user + def update_password + @admin_user = current_admin_user - if @admin_user.update_with_password(permitted_params) - sign_in @admin_user, bypass: true - redirect_to admin_dashboard_path, notice: "Password updated!" - else - render :edit_password + if @admin_user.update_with_password(permitted_params) + sign_in @admin_user, bypass: true + redirect_to admin_dashboard_path, notice: 'Password updated!' + else + render :edit_password + end + end + + private + + def permitted_params + params.require(:admin_user).permit(:email, :password, :password_confirmable, :remember_me) end end - - private - - def permitted_params - params.require(:admin_user).permit(:email, :password, :password_confirmable, :remember_me) - end - end diff --git a/app/controllers/admin/categories_controller.rb b/app/controllers/admin/categories_controller.rb index 93d7b06..16ce1b9 100644 --- a/app/controllers/admin/categories_controller.rb +++ b/app/controllers/admin/categories_controller.rb @@ -1,48 +1,48 @@ -class Admin::CategoriesController < Admin::AdminController - - def index - @categories = Category.all - end - - def new - @category = Category.new - end - - def edit - @category = Category.find(params[:id]) - end - - def update - @category = Category.find(params[:id]) - - if @category.update_attributes(permitted_params) - redirect_to admin_categories_path, notice: 'Category was successfully updated.' - else - render :edit +module Admin + class CategoriesController < Admin::AdminController + def index + @categories = Category.all end - end - def create - @category = Category.new(permitted_params) + def new + @category = Category.new + end + + def edit + @category = Category.find(params[:id]) + end + + def update + @category = Category.find(params[:id]) + + if @category.update_attributes(permitted_params) + redirect_to admin_categories_path, notice: 'Category was successfully updated.' + else + render :edit + end + end + + def create + @category = Category.new(permitted_params) if @category.save redirect_to admin_categories_path, notice: 'Category was successfully added.' else render :edit end + end + + def destroy + @category = Category.find(params[:id]) + @category.destroy + + redirect_to admin_categories_path, notice: 'Category was deleted.' + end + + private + + def permitted_params + params.require(:category).permit(:name, :slug, :description, :base_colour, :sort) + end end - - def destroy - @category = Category.find(params[:id]) - @category.destroy - - redirect_to admin_categories_path, notice: 'Category was deleted.' - end - - private - - def permitted_params - params.require(:category).permit(:name, :slug, :description, :base_colour, :sort) - end - end diff --git a/app/controllers/admin/confirmations_controller.rb b/app/controllers/admin/confirmations_controller.rb index 12d4761..3b3e5c4 100644 --- a/app/controllers/admin/confirmations_controller.rb +++ b/app/controllers/admin/confirmations_controller.rb @@ -1,60 +1,64 @@ -class Admin::ConfirmationsController < ::Devise::PasswordsController - layout "admin/layouts/login" +module Admin + class ConfirmationsController < ::Devise::PasswordsController + layout 'admin/layouts/login' - skip_before_filter(:authenticate_user!) + skip_before_filter(:authenticate_user!) - def update - with_unconfirmed_confirmable do - if @confirmable.has_no_password? - @confirmable.attempt_set_password(params[:admin_user]) - if @confirmable.valid? - do_confirm + def update + with_unconfirmed_confirmable do + if @confirmable.has_no_password? + update_password else - do_show - @confirmable.errors.clear #so that we wont render :new + self.class.add_error_on(self, :email, :password_already_set) end - else - self.class.add_error_on(self, :email, :password_allready_set) end + + render_with_scope :new unless confirmable.errors.empty? end - if !@confirmable.errors.empty? - render_with_scope :new - end - end + def show + with_unconfirmed_confirmable do + if @confirmable.has_no_password? + do_show + else + do_confirm + end + end - def show - with_unconfirmed_confirmable do - if @confirmable.has_no_password? - do_show - else + render_with_scope :new unless @confirmable.errors.empty? + end + + private + + def update_password + @confirmable.attempt_set_password(params[:admin_user]) + if @confirmable.valid? do_confirm + else + do_show + @confirmable.errors.clear # so that we won't render :new end end - if !@confirmable.errors.empty? - render_with_scope :new + + protected + + def with_unconfirmed_confirmable + @confirmable = AdminUser.find_or_initialize_with_error_by(:confirmation_token, params[:confirmation_token]) + + @confirmable.only_if_unconfirmed { yield } unless @confirmable.new_record? end - end - protected - - def with_unconfirmed_confirmable - @confirmable = AdminUser.find_or_initialize_with_error_by(:confirmation_token, params[:confirmation_token]) - if !@confirmable.new_record? - @confirmable.only_if_unconfirmed {yield} + def do_show + @confirmation_token = params[:confirmation_token] + @requires_password = true + self.resource = @confirmable + render_with_scope :show end - end - def do_show - @confirmation_token = params[:confirmation_token] - @requires_password = true - self.resource = @confirmable - render_with_scope :show - end - - def do_confirm - @confirmable.confirm! - set_flash_message :notice, :confirmed - sign_in_and_redirect(resource_name, @confirmable) + def do_confirm + @confirmable.confirm! + set_flash_message :notice, :confirmed + sign_in_and_redirect(resource_name, @confirmable) + end end end diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index a4ecb27..3057bd3 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -1,2 +1,4 @@ -class Admin::DashboardController < Admin::AdminController +module Admin + class DashboardController < Admin::AdminController + end end diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 64e157b..79ab815 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -1,53 +1,53 @@ -class Admin::PagesController < Admin::AdminController +module Admin + class PagesController < Admin::AdminController + def index + @pages = Page.all + end - def index - @pages = Page.all - end + def new + @page = Page.new + end - def new - @page = Page.new - end + def edit + @page = Page.find(params[:id]) + end - def edit - @page = Page.find(params[:id]) - end + def show + page = Page.find(params[:id]) + @page = PagePresenter.new(page) + end - def show - page = Page.find(params[:id]) - @page = PagePresenter.new(page) - end + def update + @page = Page.find(params[:id]) - def update - @page = Page.find(params[:id]) + if @page.update_attributes(permitted_params) + redirect_to admin_pages_path, notice: 'Page was successfully updated.' + else + render :edit + end + end - if @page.update_attributes(permitted_params) - redirect_to admin_pages_path, notice: 'Page was successfully updated.' - else - render :edit + def create + @page = Page.new(permitted_params) + + if @page.save + redirect_to admin_pages_path, notice: 'Page was successfully added.' + else + render :edit + end + end + + def destroy + @page = Page.find(params[:id]) + @page.destroy + + redirect_to admin_pages_path, notice: 'Page was deleted.' + end + + private + + def permitted_params + params.require(:page).permit(:name, :title, :content) end end - - def create - @page = Page.new(permitted_params) - - if @page.save - redirect_to admin_pages_path, notice: 'Page was successfully added.' - else - render :edit - end - end - - def destroy - @page = Page.find(params[:id]) - @page.destroy - - redirect_to admin_pages_path, notice: 'Page was deleted.' - end - - private - - def permitted_params - params.require(:page).permit(:name, :title, :content) - end - end diff --git a/app/controllers/admin/passwords_controller.rb b/app/controllers/admin/passwords_controller.rb index 1fdcc20..6b0b2d9 100644 --- a/app/controllers/admin/passwords_controller.rb +++ b/app/controllers/admin/passwords_controller.rb @@ -1,3 +1,5 @@ -class Admin::PasswordsController < ::Devise::PasswordsController - layout "admin/layouts/login" +module Admin + class PasswordsController < ::Devise::PasswordsController + layout 'admin/layouts/login' + end end diff --git a/app/controllers/admin/photos_controller.rb b/app/controllers/admin/photos_controller.rb index 41041c5..f2d5fe9 100644 --- a/app/controllers/admin/photos_controller.rb +++ b/app/controllers/admin/photos_controller.rb @@ -1,53 +1,55 @@ -class Admin::PhotosController < Admin::AdminController - before_filter :get_categories +module Admin + class PhotosController < Admin::AdminController + before_filter :categories - def index - @photos = Photo.paginate(page: params[:page], per_page: 16) - end - - def new - @photo = Photo.new - end - - def edit - @photo = Photo.find(params[:id]) - end - - def update - @photo = Photo.find(params[:id]) - - if @photo.update_attributes(permitted_params) - redirect_to admin_photos_path, notice: 'Photo was successfully updated.' - else - render :edit + def index + @photos = Photo.paginate(page: params[:page], per_page: 16) end - end - def create - @photo = Photo.new(permitted_params) + def new + @photo = Photo.new + end + + def edit + @photo = Photo.find(params[:id]) + end + + def update + @photo = Photo.find(params[:id]) + + if @photo.update_attributes(permitted_params) + redirect_to admin_photos_path, notice: 'Photo was successfully updated.' + else + render :edit + end + end + + def create + @photo = Photo.new(permitted_params) if @photo.save redirect_to admin_photos_path, notice: 'Photo was successfully added.' else render :edit end + end + + def destroy + @photo = Photo.find(params[:id]) + @photo.destroy + + redirect_to :back, notice: 'Photo was deleted.' + end + + private + + def categories + @categories = Category.all + end + + def permitted_params + params.require(:photo).permit(:image, :title, :description, :flickr_url, :featured, + :enabled, :taken_at, category_ids: []) + end end - - def destroy - @photo = Photo.find(params[:id]) - @photo.destroy - - redirect_to :back, notice: 'Photo was deleted.' - end - - private - - def get_categories - @categories = Category.all - end - - def permitted_params - params.require(:photo).permit(:image, :title, :description, :flickr_url, :featured, :enabled, :taken_at, category_ids: []) - end - end diff --git a/app/controllers/admin/registrations_controller.rb b/app/controllers/admin/registrations_controller.rb index c8d47ad..059b7a5 100644 --- a/app/controllers/admin/registrations_controller.rb +++ b/app/controllers/admin/registrations_controller.rb @@ -1,3 +1,5 @@ -class Admin::RegistrationsController < ::Devise::RegistrationsController - layout "admin/layouts/login" +module Admin + class RegistrationsController < ::Devise::RegistrationsController + layout 'admin/layouts/login' + end end diff --git a/app/controllers/admin/sessions_controller.rb b/app/controllers/admin/sessions_controller.rb index c85228d..81cc512 100644 --- a/app/controllers/admin/sessions_controller.rb +++ b/app/controllers/admin/sessions_controller.rb @@ -1,12 +1,14 @@ -class Admin::SessionsController < ::Devise::SessionsController - layout "admin/layouts/login" +module Admin + class SessionsController < ::Devise::SessionsController + layout 'admin/layouts/login' - before_filter :check_https + before_filter :check_https - private + private - def check_https - secure_link = url_for(protocol: 'https') - flash[:alert] = I18n.t('insecure_alert', secure_link: secure_link).html_safe unless request.scheme == 'https' + def check_https + secure_link = url_for(protocol: 'https') + flash[:alert] = I18n.t('insecure_alert', secure_link: secure_link).html_safe unless request.scheme == 'https' + end end end diff --git a/app/controllers/admin/unlocks_controller.rb b/app/controllers/admin/unlocks_controller.rb index a399b7d..1753ffd 100644 --- a/app/controllers/admin/unlocks_controller.rb +++ b/app/controllers/admin/unlocks_controller.rb @@ -1,3 +1,5 @@ -class Admin::UnlocksController < ::Devise::UnlocksController - layout "admin/layouts/login" +module Admin + class UnlocksController < ::Devise::UnlocksController + layout 'admin/layouts/login' + end end diff --git a/app/helpers/admin/admin_helper.rb b/app/helpers/admin/admin_helper.rb index 113a48e..c2d80e8 100644 --- a/app/helpers/admin/admin_helper.rb +++ b/app/helpers/admin/admin_helper.rb @@ -1,9 +1,11 @@ -module Admin::AdminHelper - def inputs_field_set &block - field_set_tag nil, class: :inputs, &block - end +module Admin + module AdminHelper + def inputs_field_set(&block) + field_set_tag nil, class: :inputs, &block + end - def actions_field_set &block - field_set_tag nil, class: :actions, &block + def actions_field_set(&block) + field_set_tag nil, class: :actions, &block + end end end diff --git a/app/helpers/admin/dashboard_helper.rb b/app/helpers/admin/dashboard_helper.rb deleted file mode 100644 index 4052b7c..0000000 --- a/app/helpers/admin/dashboard_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Admin::DashboardHelper -end diff --git a/app/helpers/admin/downloads_helper.rb b/app/helpers/admin/downloads_helper.rb deleted file mode 100644 index 5d6e8d9..0000000 --- a/app/helpers/admin/downloads_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Admin::DownloadsHelper -end diff --git a/app/helpers/admin/unlocks_helper.rb b/app/helpers/admin/unlocks_helper.rb deleted file mode 100644 index 3367487..0000000 --- a/app/helpers/admin/unlocks_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Admin::UnlocksHelper -end diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index fb736f6..53f097d 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -3,8 +3,6 @@ class Notifier < ActionMailer::Base def contact_notification(sender) @sender = sender - mail( to: 'enquiries@danbarberphoto.com', - from: sender.email, - subject: sender.subject) + mail(to: 'enquiries@danbarberphoto.com', from: sender.email, subject: sender.subject) end end diff --git a/app/middleware/heartbeat.rb b/app/middleware/heartbeat.rb index 56afdcd..f4452a5 100644 --- a/app/middleware/heartbeat.rb +++ b/app/middleware/heartbeat.rb @@ -5,11 +5,7 @@ class Heartbeat def call(env) if env['PATH_INFO'] == '/heartbeat' - [ - 200, - {"Content-Type" => "text/plain"}, - ["OK"] - ] + [200, { 'Content-Type' => 'text/plain' }, ['OK']] else @app.call(env) end diff --git a/app/models/admin_user.rb b/app/models/admin_user.rb index decb448..f9b66f2 100644 --- a/app/models/admin_user.rb +++ b/app/models/admin_user.rb @@ -10,8 +10,8 @@ class AdminUser < ActiveRecord::Base end # new function to return whether a password has been set - def has_no_password? - self.encrypted_password.blank? + def no_password? + encrypted_password.blank? end # new function to provide access to protected method unless_confirmed diff --git a/app/models/contact.rb b/app/models/contact.rb index 646fa97..b36d8d3 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -9,12 +9,12 @@ class Contact def initialize(attributes = {}) attributes.each do |key, value| - self.send("#{key}=", value) + send("#{key}=", value) end end def read_attribute_for_validation(key) - self.send(key) + send(key) end def save @@ -22,7 +22,6 @@ class Contact Notifier.contact_notification(self).deliver return true end - return false + false end - end diff --git a/app/models/photo.rb b/app/models/photo.rb index fd6f3f9..c58a5d6 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -1,5 +1,4 @@ class Photo < ActiveRecord::Base - has_and_belongs_to_many :categories dragonfly_accessor :image @@ -8,25 +7,24 @@ class Photo < ActiveRecord::Base @@per_page = 11 - scope :enabled, lambda { where(enabled: true) } + scope :enabled, -> { where(enabled: true) } - scope :featured, lambda { enabled.where(featured: true) } + scope :featured, -> { enabled.where(featured: true) } def to_s - self.title + title end def name - self.title + title end def log_view - if self.views.nil? + if views.nil? self.views = 1 else self.views += 1 end - self.save + save end - end diff --git a/app/presenters/page_presenter.rb b/app/presenters/page_presenter.rb index ff46816..4c90c78 100644 --- a/app/presenters/page_presenter.rb +++ b/app/presenters/page_presenter.rb @@ -4,6 +4,6 @@ class PagePresenter < SimpleDelegator end def self.markdown - @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = {}) + @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions: {}) end end diff --git a/app/validators/email_validator.rb b/app/validators/email_validator.rb index f0dc9d9..008c2ec 100644 --- a/app/validators/email_validator.rb +++ b/app/validators/email_validator.rb @@ -1,10 +1,7 @@ # lib/email_validator.rb class EmailValidator < ActiveModel::EachValidator - def validate_each(object, attribute, value) - unless value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i - object.errors[attribute] << (options[:message] || "is not valid") - end + return if value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i + object.errors[attribute] << (options[:message] || 'is not valid') end - end diff --git a/script/about b/script/about deleted file mode 100755 index 1eeb6eb..0000000 --- a/script/about +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" -require 'commands/about' diff --git a/script/console b/script/console deleted file mode 100755 index 235a1f2..0000000 --- a/script/console +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/console' diff --git a/script/dbconsole b/script/dbconsole deleted file mode 100755 index 83c8436..0000000 --- a/script/dbconsole +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/dbconsole' diff --git a/script/destroy b/script/destroy deleted file mode 100755 index 88d295f..0000000 --- a/script/destroy +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/destroy' diff --git a/script/generate b/script/generate deleted file mode 100755 index 62a8a4c..0000000 --- a/script/generate +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/generate' diff --git a/script/performance/benchmarker b/script/performance/benchmarker deleted file mode 100755 index 3bff809..0000000 --- a/script/performance/benchmarker +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../../config/boot', __FILE__) -require 'commands/performance/benchmarker' diff --git a/script/performance/profiler b/script/performance/profiler deleted file mode 100755 index 0764057..0000000 --- a/script/performance/profiler +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../../config/boot', __FILE__) -require 'commands/performance/profiler' diff --git a/script/plugin b/script/plugin deleted file mode 100755 index b82201f..0000000 --- a/script/plugin +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/plugin' diff --git a/script/rails b/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/script/runner b/script/runner deleted file mode 100755 index be4c5d4..0000000 --- a/script/runner +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/runner' diff --git a/script/server b/script/server deleted file mode 100755 index b9fcb71..0000000 --- a/script/server +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../../config/boot', __FILE__) -require 'commands/server'