Module: Refinery

Defined in:
lib/base/refinery.rb,
lib/refinery/version.rb,
lib/refinerycms-base.rb

Defined Under Namespace

Modules: Base Classes: Version

Constant Summary collapse

WINDOWS =
!!(RbConfig::CONFIG['host_os'] =~ %r!(msdos|mswin|djgpp|mingw)!) unless

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.base_cache_keyObject

Returns the value of attribute base_cache_key.



10
11
12
# File 'lib/base/refinery.rb', line 10

def base_cache_key
  @base_cache_key
end

.gemsObject

Returns the value of attribute gems.



10
11
12
# File 'lib/base/refinery.rb', line 10

def gems
  @gems
end

.rescue_not_foundObject

Returns the value of attribute rescue_not_found.



10
11
12
# File 'lib/base/refinery.rb', line 10

def rescue_not_found
  @rescue_not_found
end

.rootObject

Returns the value of attribute root.



10
11
12
# File 'lib/base/refinery.rb', line 10

def root
  @root
end

.roots(engine_name = nil) ⇒ Object

Returns the value of attribute roots.



10
11
12
# File 'lib/base/refinery.rb', line 10

def roots
  @roots
end

.s3_backendObject

Returns the value of attribute s3_backend.



10
11
12
# File 'lib/base/refinery.rb', line 10

def s3_backend
  @s3_backend
end

Class Method Details

.deprecate(options = {}) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/base/refinery.rb', line 16

def deprecate(options = {})
  # Build a warning.
  warning = "\n-- DEPRECATION WARNING --"
  warning << "\nThe use of '#{options[:what]}' is deprecated"
  warning << " and will be removed at version #{options[:when]}." if options[:when]
  warning << "\nPlease use #{options[:replacement]} instead." if options[:replacement]

  # See if we can trace where this happened
  if options[:caller]
    whos_calling = options[:caller].detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first
    warning << "\nCalled from: #{whos_calling}\n"
  end

  # Give stern talking to.
  warn warning
end

.enginesObject



33
34
35
# File 'lib/base/refinery.rb', line 33

def engines
  @engines ||= []
end

.i18n_enabled?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/base/refinery.rb', line 37

def i18n_enabled?
  !!(defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?)
end

.versionObject



63
64
65
# File 'lib/base/refinery.rb', line 63

def version
  ::Refinery::Version.to_s
end