trusty-cms 4.1.2 → 4.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +25 -25
- data/Rakefile +7 -7
- data/app/assets/stylesheets/admin/partials/_content.scss +1 -2
- data/app/controllers/admin/assets_controller.rb +22 -21
- data/app/controllers/admin/configuration_controller.rb +9 -11
- data/app/controllers/admin/extensions_controller.rb +3 -3
- data/app/controllers/admin/layouts_controller.rb +3 -4
- data/app/controllers/admin/page_attachments_controller.rb +5 -5
- data/app/controllers/admin/page_fields_controller.rb +3 -4
- data/app/controllers/admin/page_parts_controller.rb +4 -5
- data/app/controllers/admin/pages_controller.rb +55 -56
- data/app/controllers/admin/references_controller.rb +1 -1
- data/app/controllers/admin/resource_controller.rb +132 -130
- data/app/controllers/admin/sites_controller.rb +4 -4
- data/app/controllers/admin/snippets_controller.rb +3 -4
- data/app/controllers/admin/users_controller.rb +16 -16
- data/app/controllers/application_controller.rb +47 -48
- data/app/controllers/site_controller.rb +51 -48
- data/app/controllers/social_mailer_controller.rb +13 -16
- data/app/helpers/admin/configuration_helper.rb +19 -20
- data/app/helpers/admin/layouts_helper.rb +0 -1
- data/app/helpers/admin/node_helper.rb +27 -24
- data/app/helpers/admin/pages_helper.rb +2 -2
- data/app/helpers/admin/preferences_helper.rb +0 -1
- data/app/helpers/admin/references_helper.rb +9 -10
- data/app/helpers/admin/regions_helper.rb +3 -3
- data/app/helpers/application_helper.rb +32 -33
- data/app/helpers/rad_social_helper.rb +8 -11
- data/app/helpers/scoped_helper.rb +1 -3
- data/app/helpers/sites_helper.rb +4 -4
- data/app/mailers/devise_mailer.rb +3 -4
- data/app/mailers/rad_social_mailer.rb +8 -8
- data/app/models/asset.rb +62 -63
- data/app/models/asset_type.rb +38 -39
- data/app/models/deprecated_tags.rb +3 -4
- data/app/models/file_not_found_page.rb +1 -3
- data/app/models/haml_filter.rb +1 -1
- data/app/models/layout.rb +4 -5
- data/app/models/legacy_user.rb +2 -2
- data/app/models/menu_renderer.rb +16 -18
- data/app/models/page.rb +96 -93
- data/app/models/page_attachment.rb +1 -2
- data/app/models/page_context.rb +11 -12
- data/app/models/page_part.rb +3 -4
- data/app/models/rails_page.rb +10 -12
- data/app/models/site.rb +22 -21
- data/app/models/snippet.rb +6 -8
- data/app/models/snippet_finder.rb +3 -3
- data/app/models/snippet_tags.rb +4 -4
- data/app/models/standard_tags.rb +258 -252
- data/app/models/status.rb +8 -8
- data/app/models/trusty_cms/config.rb +25 -25
- data/app/models/trusty_cms/page_response_cache_director.rb +2 -3
- data/app/models/user.rb +15 -14
- data/app/models/user_action_observer.rb +3 -3
- data/bin/rails +4 -4
- data/bin/trusty_cms +3 -5
- data/config.ru +1 -1
- data/config/application.rb +14 -15
- data/config/boot.rb +1 -2
- data/config/environment.rb +1 -1
- data/config/environments/production.rb +0 -1
- data/config/environments/test.rb +1 -2
- data/config/initializers/devise.rb +1 -1
- data/config/initializers/kraken.rb +2 -2
- data/config/initializers/tmp.rb +1 -1
- data/config/initializers/trusty_cms_config.rb +48 -48
- data/config/routes.rb +6 -6
- data/lib/active_record_extensions/active_record_extensions.rb +1 -2
- data/lib/annotatable.rb +3 -5
- data/lib/configuration_extensions/configuration_extensions.rb +1 -1
- data/lib/inheritable_class_attributes.rb +13 -9
- data/lib/login_system.rb +73 -73
- data/lib/method_observer.rb +13 -12
- data/lib/ostruct.rb +7 -10
- data/lib/simpleton.rb +0 -4
- data/lib/string_extensions/string_extensions.rb +3 -3
- data/lib/symbol_extensions/symbol_extensions.rb +1 -1
- data/lib/tasks/database.rake +28 -28
- data/lib/tasks/extensions.rake +18 -18
- data/lib/tasks/framework.rake +68 -68
- data/lib/tasks/radiant_config.rake +4 -4
- data/lib/tasks/snippets_extension_tasks.rake +11 -11
- data/lib/tasks/translate.rake +14 -14
- data/lib/tasks/upgrade_to_devise.rake +1 -1
- data/lib/translation_support.rb +22 -22
- data/lib/trusty_cms.rb +2 -2
- data/lib/trusty_cms/admin_ui.rb +19 -16
- data/lib/trusty_cms/admin_ui/region_partials.rb +4 -3
- data/lib/trusty_cms/admin_ui/region_set.rb +4 -5
- data/lib/trusty_cms/available_locales.rb +2 -4
- data/lib/trusty_cms/config/definition.rb +11 -8
- data/lib/trusty_cms/engine.rb +14 -14
- data/lib/trusty_cms/extension.rb +14 -16
- data/lib/trusty_cms/extension_loader.rb +6 -6
- data/lib/trusty_cms/extension_migrator.rb +42 -41
- data/lib/trusty_cms/extension_path.rb +20 -19
- data/lib/trusty_cms/initializer.rb +5 -8
- data/lib/trusty_cms/pagination/controller.rb +7 -10
- data/lib/trusty_cms/pagination/link_renderer.rb +2 -2
- data/lib/trusty_cms/resource_responses.rb +3 -3
- data/lib/trusty_cms/setup.rb +130 -132
- data/lib/trusty_cms/taggable.rb +19 -22
- data/lib/trusty_cms/task_support.rb +9 -6
- data/public/dispatch.fcgi +1 -1
- data/public/dispatch.rb +2 -2
- data/script/extension +1 -1
- data/script/rails +2 -2
- data/trusty_cms.gemspec +23 -23
- metadata +32 -32
@@ -8,15 +8,17 @@ module TrustyCms
|
|
8
8
|
ActiveRecord::Base.establish_connection(env_connection)
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
11
12
|
def config_export(path = "#{Rails.root}/config/trusty_config.yml")
|
12
|
-
|
13
|
+
establish_connection
|
13
14
|
FileUtils.mkdir_p(File.dirname(path))
|
14
|
-
if File.open(File.expand_path(path), 'w') { |f| YAML.dump(TrustyCms::Config.to_hash.to_yaml,f) }
|
15
|
+
if File.open(File.expand_path(path), 'w') { |f| YAML.dump(TrustyCms::Config.to_hash.to_yaml, f) }
|
15
16
|
puts "TrustyCms::Config saved to #{path}"
|
16
17
|
end
|
17
18
|
end
|
19
|
+
|
18
20
|
def config_import(path = "#{Rails.root}/config/trusty_config.yml", clear = nil)
|
19
|
-
|
21
|
+
establish_connection
|
20
22
|
if File.exist?(path)
|
21
23
|
begin
|
22
24
|
TrustyCms::Config.transaction do
|
@@ -40,12 +42,13 @@ module TrustyCms
|
|
40
42
|
# Write the combined content of files in dir into cache_file in the same dir.
|
41
43
|
#
|
42
44
|
def cache_files(dir, files, cache_file)
|
43
|
-
cache_content = files.collect
|
44
|
-
File.read(File.join(dir, f))
|
45
|
+
cache_content = files.collect do |f|
|
46
|
+
File.read(File.join(dir, f))
|
47
|
+
end .join("\n\n")
|
45
48
|
|
46
49
|
cache_path = File.join(dir, cache_file)
|
47
50
|
File.delete(cache_path) if File.exists?(cache_path)
|
48
|
-
File.open(cache_path,
|
51
|
+
File.open(cache_path, 'w+') { |f| f.write(cache_content) }
|
49
52
|
end
|
50
53
|
|
51
54
|
# Reads through the layout file and returns an array of JS filenames
|
data/public/dispatch.fcgi
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
# # Custom log path, normal GC behavior.
|
19
19
|
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
|
20
20
|
#
|
21
|
-
require File.dirname(__FILE__) +
|
21
|
+
require File.dirname(__FILE__) + '/../config/environment'
|
22
22
|
require 'fcgi_handler'
|
23
23
|
|
24
24
|
RailsFCGIHandler.process!
|
data/public/dispatch.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/home/rails/bin/ruby
|
2
2
|
|
3
|
-
require File.dirname(__FILE__) +
|
3
|
+
require File.dirname(__FILE__) + '/../config/environment' unless defined?(Rails.root)
|
4
4
|
|
5
5
|
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
|
6
6
|
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
|
7
|
-
require
|
7
|
+
require 'dispatcher'
|
8
8
|
|
9
9
|
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
|
10
10
|
Dispatcher.dispatch
|
data/script/extension
CHANGED
data/script/rails
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
3
|
|
4
|
-
APP_PATH = File.expand_path('
|
5
|
-
require File.expand_path('
|
4
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
5
|
+
require File.expand_path('../config/boot', __dir__)
|
6
6
|
require 'rails/commands'
|
data/trusty_cms.gemspec
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
|
2
3
|
require File.expand_path(__FILE__ + '/../lib/trusty_cms.rb')
|
3
4
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
+
s.name = 'trusty-cms'
|
5
6
|
s.version = TrustyCms::VERSION
|
6
7
|
s.platform = Gem::Platform::RUBY
|
7
8
|
|
8
|
-
s.required_rubygems_version = Gem::Requirement.new(
|
9
|
-
s.authors = [
|
10
|
-
s.description =
|
9
|
+
s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
|
10
|
+
s.authors = ['TrustyCms CMS dev team']
|
11
|
+
s.description = 'TrustyCms is a simple and powerful publishing system designed for small teams.
|
11
12
|
It is built with Rails and is similar to Textpattern or MovableType, but is
|
12
|
-
a general purpose content managment system--not merely a blogging engine.
|
13
|
-
s.email =
|
14
|
-
s.executables = [
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
s.files = Dir['**/*','.gitignore', 'public/.htaccess', 'log/.keep', 'vendor/extensions/.keep']
|
17
|
-
s.homepage =
|
18
|
-
s.rdoc_options = [
|
19
|
-
s.require_paths = [
|
20
|
-
s.rubygems_version =
|
21
|
-
s.summary =
|
22
|
-
s.license =
|
23
|
-
s.test_files = Dir[
|
13
|
+
a general purpose content managment system--not merely a blogging engine.'
|
14
|
+
s.email = 'saalon@gmail.com'
|
15
|
+
s.executables = ['trusty_cms']
|
16
|
+
s.extra_rdoc_files = ['README.md', 'INSTALL.md', 'LICENSE.md']
|
17
|
+
s.files = Dir['**/*', '.gitignore', 'public/.htaccess', 'log/.keep', 'vendor/extensions/.keep']
|
18
|
+
s.homepage = 'https://github.com/pgharts/trusty-cms'
|
19
|
+
s.rdoc_options = ['--title', 'TrustyCms -- Content Management You Can Trust', '--line-numbers', '--main', 'README', '--exclude', 'app', '--exclude', 'bin', '--exclude', 'config', '--exclude', 'db', '--exclude', 'features', '--exclude', 'lib', '--exclude', 'log', '--exclude', 'pkg', '--exclude', 'public', '--exclude', 'script', '--exclude', 'spec', '--exclude', 'test', '--exclude', 'tmp', '--exclude', 'vendor']
|
20
|
+
s.require_paths = ['lib']
|
21
|
+
s.rubygems_version = '1.3.7'
|
22
|
+
s.summary = 'A no-fluff content management system designed for small teams.'
|
23
|
+
s.license = 'MIT'
|
24
|
+
s.test_files = Dir['spec/**/*']
|
24
25
|
|
25
26
|
s.add_dependency 'acts_as_list', '>= 0.9.5', '< 1.1.0'
|
26
27
|
s.add_dependency 'acts_as_tree', '>= 2.6.1', '< 2.9.0'
|
@@ -32,22 +33,21 @@ a general purpose content managment system--not merely a blogging engine.}
|
|
32
33
|
s.add_dependency 'haml-rails', '~> 1.0.0'
|
33
34
|
s.add_dependency 'highline', '>= 1.7.8', '< 2.1.0'
|
34
35
|
s.add_dependency 'kraken-io'
|
35
|
-
s.add_dependency 'mysql2'
|
36
36
|
s.add_dependency 'mini_racer'
|
37
|
+
s.add_dependency 'mysql2'
|
37
38
|
s.add_dependency 'paperclip', '> 5.2'
|
38
39
|
s.add_dependency 'rack', '~> 2.0.1'
|
39
40
|
s.add_dependency 'rack-cache', '~> 1.7'
|
40
|
-
s.add_dependency 'rails'
|
41
|
-
s.add_dependency 'rdoc', '>= 5.1', '< 7.0'
|
42
41
|
s.add_dependency 'radius', '~> 0.7'
|
43
|
-
s.add_dependency '
|
42
|
+
s.add_dependency 'rails'
|
44
43
|
s.add_dependency 'rake', '< 13.0'
|
44
|
+
s.add_dependency 'rdoc', '>= 5.1', '< 7.0'
|
45
|
+
s.add_dependency 'RedCloth', '4.3.2'
|
45
46
|
s.add_dependency 'roadie-rails'
|
46
47
|
s.add_dependency 'sassc-rails'
|
47
48
|
s.add_dependency 'stringex', '>= 2.7.1', '< 2.9.0'
|
48
49
|
s.add_dependency 'tzinfo', '>= 1.2.3', '< 2.1.0'
|
49
50
|
s.add_dependency 'uglifier', '>= 3.2', '< 5.0'
|
50
|
-
s.add_dependency 'uuidtools',
|
51
|
-
s.add_dependency 'will_paginate',
|
52
|
-
|
51
|
+
s.add_dependency 'uuidtools', '~> 2.1.5'
|
52
|
+
s.add_dependency 'will_paginate', '~> 3.0'
|
53
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TrustyCms CMS dev team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_list
|
@@ -181,7 +181,7 @@ dependencies:
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
|
-
name:
|
184
|
+
name: mini_racer
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
@@ -195,7 +195,7 @@ dependencies:
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
- !ruby/object:Gem::Dependency
|
198
|
-
name:
|
198
|
+
name: mysql2
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
@@ -250,6 +250,20 @@ dependencies:
|
|
250
250
|
- - "~>"
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '1.7'
|
253
|
+
- !ruby/object:Gem::Dependency
|
254
|
+
name: radius
|
255
|
+
requirement: !ruby/object:Gem::Requirement
|
256
|
+
requirements:
|
257
|
+
- - "~>"
|
258
|
+
- !ruby/object:Gem::Version
|
259
|
+
version: '0.7'
|
260
|
+
type: :runtime
|
261
|
+
prerelease: false
|
262
|
+
version_requirements: !ruby/object:Gem::Requirement
|
263
|
+
requirements:
|
264
|
+
- - "~>"
|
265
|
+
- !ruby/object:Gem::Version
|
266
|
+
version: '0.7'
|
253
267
|
- !ruby/object:Gem::Dependency
|
254
268
|
name: rails
|
255
269
|
requirement: !ruby/object:Gem::Requirement
|
@@ -265,39 +279,39 @@ dependencies:
|
|
265
279
|
- !ruby/object:Gem::Version
|
266
280
|
version: '0'
|
267
281
|
- !ruby/object:Gem::Dependency
|
268
|
-
name:
|
282
|
+
name: rake
|
269
283
|
requirement: !ruby/object:Gem::Requirement
|
270
284
|
requirements:
|
271
|
-
- - ">="
|
272
|
-
- !ruby/object:Gem::Version
|
273
|
-
version: '5.1'
|
274
285
|
- - "<"
|
275
286
|
- !ruby/object:Gem::Version
|
276
|
-
version: '
|
287
|
+
version: '13.0'
|
277
288
|
type: :runtime
|
278
289
|
prerelease: false
|
279
290
|
version_requirements: !ruby/object:Gem::Requirement
|
280
291
|
requirements:
|
281
|
-
- - ">="
|
282
|
-
- !ruby/object:Gem::Version
|
283
|
-
version: '5.1'
|
284
292
|
- - "<"
|
285
293
|
- !ruby/object:Gem::Version
|
286
|
-
version: '
|
294
|
+
version: '13.0'
|
287
295
|
- !ruby/object:Gem::Dependency
|
288
|
-
name:
|
296
|
+
name: rdoc
|
289
297
|
requirement: !ruby/object:Gem::Requirement
|
290
298
|
requirements:
|
291
|
-
- - "
|
299
|
+
- - ">="
|
292
300
|
- !ruby/object:Gem::Version
|
293
|
-
version: '
|
301
|
+
version: '5.1'
|
302
|
+
- - "<"
|
303
|
+
- !ruby/object:Gem::Version
|
304
|
+
version: '7.0'
|
294
305
|
type: :runtime
|
295
306
|
prerelease: false
|
296
307
|
version_requirements: !ruby/object:Gem::Requirement
|
297
308
|
requirements:
|
298
|
-
- - "
|
309
|
+
- - ">="
|
299
310
|
- !ruby/object:Gem::Version
|
300
|
-
version: '
|
311
|
+
version: '5.1'
|
312
|
+
- - "<"
|
313
|
+
- !ruby/object:Gem::Version
|
314
|
+
version: '7.0'
|
301
315
|
- !ruby/object:Gem::Dependency
|
302
316
|
name: RedCloth
|
303
317
|
requirement: !ruby/object:Gem::Requirement
|
@@ -312,20 +326,6 @@ dependencies:
|
|
312
326
|
- - '='
|
313
327
|
- !ruby/object:Gem::Version
|
314
328
|
version: 4.3.2
|
315
|
-
- !ruby/object:Gem::Dependency
|
316
|
-
name: rake
|
317
|
-
requirement: !ruby/object:Gem::Requirement
|
318
|
-
requirements:
|
319
|
-
- - "<"
|
320
|
-
- !ruby/object:Gem::Version
|
321
|
-
version: '13.0'
|
322
|
-
type: :runtime
|
323
|
-
prerelease: false
|
324
|
-
version_requirements: !ruby/object:Gem::Requirement
|
325
|
-
requirements:
|
326
|
-
- - "<"
|
327
|
-
- !ruby/object:Gem::Version
|
328
|
-
version: '13.0'
|
329
329
|
- !ruby/object:Gem::Dependency
|
330
330
|
name: roadie-rails
|
331
331
|
requirement: !ruby/object:Gem::Requirement
|