Skip to content

Commit

Permalink
Merge pull request refinery#1517 from resolve/logical_dependencies
Browse files Browse the repository at this point in the history
Made dependencies more logical.
  • Loading branch information
ugisozols committed Mar 27, 2012
2 parents 128829c + 1aa992c commit 5dfb482
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 18 deletions.
Expand Up @@ -12,6 +12,7 @@ Gem::Specification.new do |s|

# Runtime dependencies
s.add_dependency 'refinerycms-core', '~> <%= Refinery::Version %>'
s.add_dependency 'acts_as_indexed', '~> 0.7'

# Development dependencies (usually used for testing)
s.add_development_dependency 'refinerycms-testing', '~> <%= Refinery::Version %>'
Expand Down
Expand Up @@ -13,6 +13,7 @@ Gem::Specification.new do |s|
# Runtime dependencies
s.add_dependency 'refinerycms-core', '~> <%= Refinery::Version %>'
s.add_dependency 'refinerycms-settings', '~> 2.0.0'
s.add_dependency 'acts_as_indexed', '~> 0.7'

# Development dependencies (usually used for testing)
s.add_development_dependency 'refinerycms-testing', '~> <%= Refinery::Version %>'
Expand Down
11 changes: 0 additions & 11 deletions core/lib/refinery/core/engine.rb
Expand Up @@ -84,17 +84,6 @@ def refinery_inclusion!
].flatten
end

initializer "refinery.acts_as_indexed" do
ActiveSupport.on_load(:active_record) do
require 'acts_as_indexed'
ActsAsIndexed.configure do |config|
config.index_file = Rails.root.join('tmp', 'index')
config.index_file_depth = 3
config.min_word_size = 3
end
end
end

# set the manifests and assets to be precompiled
initializer "refinery.assets.precompile" do |app|
app.config.assets.precompile += [
Expand Down
3 changes: 0 additions & 3 deletions core/refinerycms-core.gemspec
Expand Up @@ -21,9 +21,6 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")

s.add_dependency 'acts_as_indexed', '~> 0.7.7'
s.add_dependency 'friendly_id', '~> 4.0.1'
s.add_dependency 'globalize3', '~> 0.2.0'
s.add_dependency 'awesome_nested_set', '~> 2.1.0'
s.add_dependency 'railties', rails_version
s.add_dependency 'activerecord', rails_version
Expand Down
Expand Up @@ -6,7 +6,7 @@ module Admin
refinery_login_with :refinery_user

it "should update the plugin positions" do
plugins = refinery_user.plugins.reverse.collect(&:name)
plugins = logged_in_user.plugins.reverse.collect(&:name)

post 'update_plugin_positions', :menu => plugins

Expand Down
1 change: 1 addition & 0 deletions images/app/models/refinery/image.rb
@@ -1,4 +1,5 @@
require 'dragonfly'
require 'acts_as_indexed'

module Refinery
class Image < Refinery::Core::BaseModel
Expand Down
3 changes: 2 additions & 1 deletion images/refinerycms-images.gemspec
Expand Up @@ -16,11 +16,12 @@ Gem::Specification.new do |s|
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.license = %q{MIT}
s.require_paths = %w(lib)

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")

s.add_dependency 'dragonfly', '~> 0.9.8'
s.add_dependency 'rack-cache', '>= 0.5.3'
s.add_dependency 'acts_as_indexed', '~> 0.7.7'
s.add_dependency 'refinerycms-core', version
end
15 changes: 13 additions & 2 deletions pages/lib/refinery/pages/engine.rb
Expand Up @@ -18,7 +18,7 @@ class Engine < ::Rails::Engine
Refinery::AdminController.send :include, Refinery::Pages::Admin::InstanceMethods
end

initializer "register refinery_pages plugin" do
initializer "refinery.pages register plugin" do
Refinery::Plugin.register do |plugin|
plugin.pathname = root
plugin.name = 'refinery_pages'
Expand All @@ -29,7 +29,18 @@ class Engine < ::Rails::Engine
end
end

initializer "append marketable routes", :after => :set_routes_reloader_hook do
initializer "refinery.pages acts_as_indexed" do
ActiveSupport.on_load(:active_record) do
require 'acts_as_indexed'
ActsAsIndexed.configure do |config|
config.index_file = Rails.root.join('tmp', 'index')
config.index_file_depth = 3
config.min_word_size = 3
end
end
end

initializer "refinery.pages append marketable routes", :after => :set_routes_reloader_hook do
append_marketable_routes if Refinery::Pages.marketable_urls
end

Expand Down
3 changes: 3 additions & 0 deletions pages/refinerycms-pages.gemspec
Expand Up @@ -21,6 +21,9 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")

s.add_dependency 'acts_as_indexed', '~> 0.7.7'
s.add_dependency 'friendly_id', '~> 4.0.4'
s.add_dependency 'globalize3', '~> 0.2.0'
s.add_dependency 'awesome_nested_set', '~> 2.1.0'
s.add_dependency 'seo_meta', '~> 1.3.0'
s.add_dependency 'refinerycms-core', version
Expand Down
1 change: 1 addition & 0 deletions resources/app/models/refinery/resource.rb
@@ -1,4 +1,5 @@
require 'dragonfly'
require 'acts_as_indexed'

module Refinery
class Resource < Refinery::Core::BaseModel
Expand Down
1 change: 1 addition & 0 deletions resources/refinerycms-resources.gemspec
Expand Up @@ -23,5 +23,6 @@ Gem::Specification.new do |s|

s.add_dependency 'dragonfly', '~> 0.9.8'
s.add_dependency 'rack-cache', '>= 0.5.3'
s.add_dependency 'acts_as_indexed', '~> 0.7.7'
s.add_dependency 'refinerycms-core', version
end

0 comments on commit 5dfb482

Please sign in to comment.