Skip to content

Commit

Permalink
Fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Winsor committed Oct 11, 2011
1 parent fab00b2 commit 2b7cb74
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion authentication/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# For Devise routes, see: https://github.com/plataformatec/devise
scope(:module => 'refinery') do
devise_for :refinery_user, :class_name => "::Refinery::User", :path => "refinery/users", :module => 'refinery', :controllers => {
:registrations => 'refinery/users',
:registrations => 'refinery/users',
},
:skip => [:registrations],
:path_names => {
Expand Down
2 changes: 1 addition & 1 deletion authentication/lib/refinerycms-authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def factory_paths
@factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ]
end
end

class Engine < ::Rails::Engine
isolate_namespace ::Refinery

Expand Down
2 changes: 1 addition & 1 deletion core/config/initializers/will_paginate_monkeypatch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def url(page)
end
end
end
end
end
16 changes: 8 additions & 8 deletions core/lib/refinery/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ module Refinery
module Core
class Engine < ::Rails::Engine
isolate_namespace ::Refinery
def self.load_decorators

def self.load_decorators
Dir.glob(File.join(Rails.root, "app/decorators/**/*_decorator.rb")) do |c|
Rails.application.config.cache_classes ? require(c) : load(c)
end
end

config.autoload_paths += %W( #{config.root}/lib )

# Attach ourselves to the Rails application.
config.before_configuration do
::Refinery::Core.attach_to_application!
end

refinery.after_inclusion &method(:load_decorators).to_proc

# Wrap errors in spans and cache vendored assets.
Expand Down Expand Up @@ -76,10 +76,10 @@ def self.load_decorators

initializer "refinery.assets.precompile" do |app|
app.config.assets.precompile += [
"refinery/*",
"refinery/icons/*",
"wymeditor/lang/*",
"wymeditor/skins/refinery/*",
"refinery/*",
"refinery/icons/*",
"wymeditor/lang/*",
"wymeditor/skins/refinery/*",
"wymeditor/skins/refinery/**/*",
"modernizr-min.js",
"dd_belatedpng.js"
Expand Down
4 changes: 2 additions & 2 deletions core/lib/refinery/generators/cms/cms_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def generate
# Massage environment files
%w(development test production).map{|e| "config/environments/#{e}.rb"}.each do |env|
next unless destination_path.join(env).file?

gsub_file env, "config.assets.compile = false", "config.assets.compile = true", :verbose => false

unless (env_file_contents = destination_path.join(env).read) =~ %r{Refinery.rescue_not_found}
Expand Down Expand Up @@ -101,7 +101,7 @@ def generate
}.sort.each do |path|
copy_file path, path.to_s.gsub(self.class.source_root.to_s, destination_path.to_s)
end

# Create decorator directories
['controllers', 'models'].each do |decorator_namespace|
src_file_path = "app/decorators/#{decorator_namespace}/refinery/.gitkeep"
Expand Down
2 changes: 1 addition & 1 deletion images/lib/refinerycms-images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class << self
def root
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
end

def factory_paths
@factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ]
end
Expand Down
2 changes: 1 addition & 1 deletion pages/lib/refinerycms-pages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def use_marketable_urls?
def use_marketable_urls=(value)
::Refinery::Setting.set(:use_marketable_urls, :value => value, :scoping => 'pages')
end

def factory_paths
@factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ]
end
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/refinerycms-resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class << self
def root
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
end

def factory_paths
@factory_paths ||= [ File.expand_path("../../spec/factories", __FILE__) ]
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setup_environment
ENV["RAILS_ENV"] ||= 'test'
# simplecov should be loaded _before_ models, controllers, etc are loaded.
setup_simplecov unless ENV["SKIP_COV"] || !defined?(SimpleCov)

require File.expand_path("../../config/environment", __FILE__)

require 'rspec/rails'
Expand All @@ -41,7 +41,7 @@ def setup_environment

def each_run
FactoryGirl.reload

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories including factories.
([Rails.root] | ::Refinery::Plugins.registered.pathnames).map{|p|
Expand Down
4 changes: 2 additions & 2 deletions testing/lib/refinery/generators/files/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def setup_environment
require 'rspec/rails'
require 'capybara/rspec'
require 'factory_girl_rails'

Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }

Rails.backtrace_cleaner.remove_silencers!
Expand All @@ -24,7 +24,7 @@ def setup_environment

def each_run
FactoryGirl.reload

Dir[Rails.root.join('spec/factories/**/*.rb')].each { |f| require f }
end

Expand Down
6 changes: 3 additions & 3 deletions testing/lib/refinery/generators/testing_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def generate
copy_file src_path, destination_path.join(src_path.relative_path_from(files_path))
end
end

def dummy_app
self.silence_puts = true

# Run Refinery generators to build dummy app
dummy_app_destination = destination_path.join("spec", "dummy")
[
Expand All @@ -38,7 +38,7 @@ def dummy_app
end

private

# Return destination application's name from it's gemfile
def gem_name
return @gem_name if @gem_name
Expand Down
8 changes: 4 additions & 4 deletions testing/lib/refinerycms-testing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'factory_girl_rails'

module Refinery
module Testing
module Testing
autoload :ControllerMacros, 'refinery/testing/controller_macros'
autoload :RequestMacros, 'refinery/testing/request_macros'

Expand All @@ -12,10 +12,10 @@ class << self
def root
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
end

# Load the factories of all currently loaded engines
def load_factories
Refinery.engines.each do |engine|
Refinery.engines.each do |engine|
engine_const = "Refinery::#{engine.camelize}".constantize
if engine_const.respond_to?(:factory_paths)
engine_const.send(:factory_paths).each do |path|
Expand All @@ -29,7 +29,7 @@ def load_factories

class Engine < ::Rails::Engine
isolate_namespace ::Refinery

config.after_initialize do
::Refinery::Plugin.register do |plugin|
plugin.pathname = root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
module Refinery
describe Generators::TestingGenerator do
include GeneratorSpec::TestCase

destination File.expand_path("../../../../../tmp/vendor/engines/rspec_engine_tests", __FILE__)

before(:each) do
prepare_destination
quietly do
args = %w{ rspec_engine_test title:string description:text image:image brochure:resource }
Refinery::Generators::EngineGenerator.new(args, { :force => true },
Refinery::Generators::EngineGenerator.new(args, { :force => true },
{ :destination_root => File.expand_path("../../../../../tmp", __FILE__) }
).generate
end

run_generator
end

specify :focus => true do
destination_root.should have_structure {
directory "spec" do
Expand Down

0 comments on commit 2b7cb74

Please sign in to comment.