47 lines
727 B
Ruby
47 lines
727 B
Ruby
require "rails-assets-notifyjs/version"
|
|
|
|
|
|
module RailsAssetsNotifyjs
|
|
|
|
def self.gem_path
|
|
Pathname(File.realpath(__FILE__)).join('../..')
|
|
end
|
|
|
|
def self.gem_spec
|
|
Gem::Specification::load(
|
|
gem_path.join("rails-assets-notifyjs.gemspec").to_s
|
|
)
|
|
end
|
|
|
|
def self.load_paths
|
|
gem_path.join('app/assets').each_child.to_a
|
|
end
|
|
|
|
def self.dependencies
|
|
[
|
|
|
|
]
|
|
end
|
|
|
|
if defined?(Rails)
|
|
class Engine < ::Rails::Engine
|
|
# Rails -> use app/assets directory.
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
class RailsAssets
|
|
@components ||= []
|
|
|
|
class << self
|
|
attr_accessor :components
|
|
|
|
def load_paths
|
|
components.flat_map(&:load_paths)
|
|
end
|
|
end
|
|
end
|
|
|
|
RailsAssets.components << RailsAssetsNotifyjs
|