refinerycms-base 0.9.9.22 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/base/refinery.rb +21 -0
- data/lib/refinery/version.rb +4 -4
- data/refinerycms-base.gemspec +2 -2
- metadata +2 -2
data/lib/base/refinery.rb
CHANGED
@@ -13,10 +13,31 @@ module Refinery
|
|
13
13
|
@base_cache_key ||= :refinery
|
14
14
|
end
|
15
15
|
|
16
|
+
def deprecate(options = {})
|
17
|
+
# Build a warning.
|
18
|
+
warning = "\n-- DEPRECATION WARNING --"
|
19
|
+
warning << "\nThe use of '#{options[:what]}' is deprecated"
|
20
|
+
warning << " and will be removed at version #{options[:when]}." if options[:when]
|
21
|
+
warning << "\nPlease use #{options[:replacement]} instead." if options[:replacement]
|
22
|
+
|
23
|
+
# See if we can trace where this happened
|
24
|
+
if options[:caller]
|
25
|
+
whos_calling = options[:caller].detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first
|
26
|
+
warning << "\nCalled from: #{whos_calling}\n"
|
27
|
+
end
|
28
|
+
|
29
|
+
# Give stern talking to.
|
30
|
+
warn warning
|
31
|
+
end
|
32
|
+
|
16
33
|
def engines
|
17
34
|
@engines ||= []
|
18
35
|
end
|
19
36
|
|
37
|
+
def i18n_enabled?
|
38
|
+
defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?
|
39
|
+
end
|
40
|
+
|
20
41
|
def rescue_not_found
|
21
42
|
!!@rescue_not_found
|
22
43
|
end
|
data/lib/refinery/version.rb
CHANGED
data/refinerycms-base.gemspec
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{refinerycms-base}
|
5
|
-
s.version = %q{0.
|
5
|
+
s.version = %q{1.0.0}
|
6
6
|
s.summary = %q{Base engine for Refinery CMS}
|
7
7
|
s.description = %q{This provides a base for Refinery CMS which handles things like settings on the Refinery namespace.}
|
8
|
-
s.date = %q{2011-05-
|
8
|
+
s.date = %q{2011-05-28}
|
9
9
|
s.email = %q{info@refinerycms.com}
|
10
10
|
s.homepage = %q{http://refinerycms.com}
|
11
11
|
s.rubyforge_project = %q{refinerycms}
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: refinerycms-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Resolve Digital
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2011-05-
|
16
|
+
date: 2011-05-28 00:00:00 +12:00
|
17
17
|
default_executable:
|
18
18
|
dependencies: []
|
19
19
|
|