imagine_cms 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7658b9addaabd953d8c18db700bc5f7427e1cbf
|
4
|
+
data.tar.gz: 28c763b3918693f7dcb478fc50ff78ef50b8dee4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0162958281fff2fd3cca5d8565bdfaefbbb389abf383a1c5afbf19bf429569e79fd76ddc3791974fcb0c0bd6d6757018175d26f1bf96fc0f184c90c2c24de1e1
|
7
|
+
data.tar.gz: 6212bc0fd92158503fe5149f1ee28d3e4fe59dd81df2af39f1270279ab4cab4b6bfbe20936bf9af5627b886af0dfdf4325b21db11d8f1954ec21ae70d9b8d829
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module ActionControllerCachingExtensions
|
2
|
+
|
3
|
+
module ClassMethods
|
4
|
+
|
5
|
+
def expire_page(path)
|
6
|
+
return unless perform_caching
|
7
|
+
|
8
|
+
path = Pathname.new(page_cache_path(path)).relative_path_from(Pathname.new(Rails.root))
|
9
|
+
Dir.chdir Rails.root
|
10
|
+
|
11
|
+
instrument_page_cache :expire_page, path do
|
12
|
+
Dir.glob(path, File::FNM_CASEFOLD).each { |f| File.delete(f) }
|
13
|
+
Dir.glob(path + '.gz', File::FNM_CASEFOLD).each { |f| File.delete(f) }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -277,23 +277,3 @@ EOT
|
|
277
277
|
end
|
278
278
|
|
279
279
|
end
|
280
|
-
|
281
|
-
module ActionControllerCachingExtensions
|
282
|
-
|
283
|
-
module ClassMethods
|
284
|
-
|
285
|
-
def expire_page(path)
|
286
|
-
return unless perform_caching
|
287
|
-
|
288
|
-
path = Pathname.new(page_cache_path(path)).relative_path_from(Pathname.new(Rails.root))
|
289
|
-
Dir.chdir Rails.root
|
290
|
-
|
291
|
-
instrument_page_cache :expire_page, path do
|
292
|
-
Dir.glob(path, File::FNM_CASEFOLD).each { |f| File.delete(f) }
|
293
|
-
Dir.glob(path + '.gz', File::FNM_CASEFOLD).each { |f| File.delete(f) }
|
294
|
-
end
|
295
|
-
end
|
296
|
-
|
297
|
-
end
|
298
|
-
|
299
|
-
end
|
data/lib/imagine_cms/engine.rb
CHANGED
@@ -16,10 +16,46 @@ module ImagineCms
|
|
16
16
|
ActionController::Base.send :include, CmsApplicationHelper
|
17
17
|
end
|
18
18
|
|
19
|
-
initializer 'imagine_cms.
|
19
|
+
initializer 'imagine_cms.action_controller_extensions' do |app|
|
20
|
+
require 'extensions/action_controller_extensions'
|
21
|
+
ActionController::Base.send :extend, ActionControllerExtensions::ClassMethods
|
22
|
+
ActionController::Base.send :include, ActionControllerExtensions::InstanceMethods
|
23
|
+
|
24
|
+
require 'extensions/action_controller_caching_extensions'
|
20
25
|
ActionController::Base.send :extend, ActionControllerCachingExtensions::ClassMethods
|
26
|
+
|
27
|
+
ActionController::Base.send :helper_method, :user_has_permission?
|
28
|
+
ActionController::Base.send :helper_method, :user_has_permissions?
|
29
|
+
ActionController::Base.send :helper_method, :insert_object, :text_editor, :texteditor, :page_list, :pagelist, :snippet
|
30
|
+
|
31
|
+
# before_filter :create_settings_object, :set_default_session_values, :check_ssl_requirement, :expire_session_data
|
32
|
+
ActionController::Base.send :before_filter, :expire_session_data
|
33
|
+
end
|
34
|
+
|
35
|
+
initializer 'imagine_cms.prototype_legacy_helper' do |app|
|
36
|
+
require 'prototype_legacy_helper/lib/prototype_legacy_helper'
|
37
|
+
ActionController::Base.send :include, PrototypeHelper
|
38
|
+
ActionController::Base.send :helper, PrototypeHelper
|
21
39
|
end
|
22
40
|
|
41
|
+
initializer 'imagine_cms.acts_as_versioned' do |app|
|
42
|
+
require 'acts_as_versioned/lib/acts_as_versioned'
|
43
|
+
end
|
44
|
+
|
45
|
+
initializer 'imagine_cms.upload_progress' do |app|
|
46
|
+
require 'upload_progress/lib/multipart_progress'
|
47
|
+
require 'upload_progress/lib/progress'
|
48
|
+
require 'upload_progress/lib/upload_progress'
|
49
|
+
require 'upload_progress/lib/upload_progress_helper'
|
50
|
+
ActionController::Base.send(:include, UploadProgress)
|
51
|
+
ActionView::Base.send(:include, UploadProgress::UploadProgressHelper)
|
52
|
+
end
|
53
|
+
|
54
|
+
initializer 'imagine_cms.auto_link_email_addresses' do |app|
|
55
|
+
require 'auto_link_email_addresses'
|
56
|
+
end
|
57
|
+
|
58
|
+
|
23
59
|
def self.activate
|
24
60
|
Dir.glob(File.join(Rails.root, "app/overrides/*.rb")) do |c|
|
25
61
|
Rails.application.config.cache_classes ? require(c) : load(c)
|
@@ -51,19 +87,6 @@ module ImagineCms
|
|
51
87
|
require 'mini_magick'
|
52
88
|
require 'non-stupid-digest-assets'
|
53
89
|
|
54
|
-
#
|
55
|
-
# rails plugins
|
56
|
-
#
|
57
|
-
require 'acts_as_versioned/lib/acts_as_versioned'
|
58
|
-
require 'prototype_legacy_helper/lib/prototype_legacy_helper'
|
59
|
-
|
60
|
-
require 'upload_progress/lib/multipart_progress'
|
61
|
-
require 'upload_progress/lib/progress'
|
62
|
-
require 'upload_progress/lib/upload_progress'
|
63
|
-
require 'upload_progress/lib/upload_progress_helper'
|
64
|
-
|
65
|
-
require 'auto_link_email_addresses'
|
66
|
-
|
67
90
|
#
|
68
91
|
# load provided classes
|
69
92
|
#
|
@@ -74,27 +97,6 @@ module ImagineCms
|
|
74
97
|
# load extensions
|
75
98
|
#
|
76
99
|
require 'extensions/array_extensions'
|
77
|
-
|
78
|
-
ActiveSupport.on_load(:action_controller) do
|
79
|
-
require 'extensions/action_controller_extensions'
|
80
|
-
extend ActionControllerExtensions::ClassMethods
|
81
|
-
include ActionControllerExtensions::InstanceMethods
|
82
|
-
|
83
|
-
include UploadProgress
|
84
|
-
helper UploadProgress::UploadProgressHelper
|
85
|
-
|
86
|
-
# include + helper: allow use both in controllers and views
|
87
|
-
|
88
|
-
include PrototypeHelper # from prototype_legacy_helper
|
89
|
-
helper PrototypeHelper
|
90
|
-
|
91
|
-
helper_method :user_has_permission?
|
92
|
-
helper_method :user_has_permissions?
|
93
|
-
helper_method :insert_object, :text_editor, :texteditor, :page_list, :pagelist, :snippet
|
94
|
-
|
95
|
-
# before_filter :create_settings_object, :set_default_session_values, :check_ssl_requirement, :expire_session_data
|
96
|
-
before_filter :expire_session_data
|
97
|
-
end
|
98
100
|
end
|
99
101
|
|
100
102
|
end
|
data/lib/imagine_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imagine_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Namba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -507,6 +507,7 @@ files:
|
|
507
507
|
- lib/acts_as_versioned/test/versioned_test.rb
|
508
508
|
- lib/auto_link_email_addresses.rb
|
509
509
|
- lib/dynamic_methods.rb
|
510
|
+
- lib/extensions/action_controller_caching_extensions.rb
|
510
511
|
- lib/extensions/action_controller_extensions.rb
|
511
512
|
- lib/extensions/array_extensions.rb
|
512
513
|
- lib/hash_object.rb
|