trusty-cms 7.0.0 → 7.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b3802881abb33e2454e530e6b1aa7838cab378ba6ac81b1d31d4e297a9ae081
4
- data.tar.gz: 3c72c52104564e1e710efcebbd613c4be325e449a2ac40a10dee6d0c6b80e5af
3
+ metadata.gz: 12bc34679296612788dd5e4b30cc2bd2c454c326d4a309016e720f770770b1a3
4
+ data.tar.gz: 71f1f47c70c2a0dd3173248563847d77c25f394d0bcc29cf643dceccb35a51eb
5
5
  SHA512:
6
- metadata.gz: c6126687648d0a06c411260365aff15bd8c20cbd3f33ff948bbd9deed7306dbd2b05d8b77c42c9b964d8319ff21001e94cd056790ceed4bdbef70ea4090b14fa
7
- data.tar.gz: de66fd547414f87175a969b081b490af5c10966f37c4604cfb2aa84cfce70dffd3c11645231ba7bea7b68bfae53081e8206eaf605a48125e600c6d8142e445f8
6
+ metadata.gz: b292c598d59fbdcee257afb6967f6d0b614d5522894eb0702ca308ef5f77d0ea8580796bad3f9adad3ae70d6f979ff9e4e7f99ce9d339c3644f8f0fece180d90
7
+ data.tar.gz: 0f0f56c552540bb1997a82764722033b6ca66652af6a341a352c695ccd6a6900acba8a783210d0931a881804d1991e6b437ef6c9cc48a004bafc3132a184a380
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (7.0.0)
4
+ trusty-cms (7.0.1)
5
5
  RedCloth (= 4.3.3)
6
6
  activestorage-validator
7
7
  acts_as_list (>= 0.9.5, < 1.3.0)
@@ -1,7 +1,7 @@
1
1
  $(function () {
2
- var fileUpload = $('#asset_asset');
3
- var fileChosen = $('#file-chosen');
4
- fileUpload.on('change', function() {
5
- fileChosen.text(this.files[0].name)
6
- })
2
+ const fileUpload = $('#asset_asset');
3
+ const fileChosen = $('#file-chosen');
4
+ fileUpload.on('change', function () {
5
+ fileChosen.text(this.files[0].name)
6
+ })
7
7
  });
@@ -35,7 +35,7 @@ class Admin::AssetsController < Admin::ResourceController
35
35
  @assets = []
36
36
  @page_attachments = []
37
37
  compress = current_site.try(:compress).nil? ? true : current_site.compress
38
- asset_params[:asset][:asset].to_a.each do |uploaded_asset|
38
+ asset_params[:asset][:asset].reject(&:blank?).each do |uploaded_asset|
39
39
  if uploaded_asset.content_type == 'application/octet-stream'
40
40
  flash[:notice] = 'Please only upload assets that have a valid extension in the name.'
41
41
  else
@@ -90,6 +90,6 @@ class Admin::AssetsController < Admin::ResourceController
90
90
  end
91
91
 
92
92
  def asset_params
93
- params.permit(:id, :for_attachment, asset: [:caption, :for_attachment, asset: []])
93
+ params.permit(:id, :for_attachment, asset: [:for_attachment, { asset: [] }])
94
94
  end
95
95
  end
@@ -5,7 +5,7 @@ module Admin::ReferencesHelper
5
5
  String.new.tap do |output|
6
6
  class_of_page.tag_descriptions.sort.each do |tag_name, description|
7
7
  value = t("desc.#{tag_name.gsub(':', '-')}").match('desc') ? description : t("desc.#{tag_name.gsub(':', '-')}")
8
- output << render(partial: 'admin/references/tag_reference.haml',
8
+ output << render(partial: 'admin/references/tag_reference',
9
9
  locals: { tag_name: tag_name,
10
10
  description: RedCloth.new(TrustyCms::Taggable::Util.strip_leading_whitespace(value)).to_html })
11
11
  end
@@ -35,8 +35,8 @@ module Admin::ReferencesHelper
35
35
 
36
36
  def filter
37
37
  @filter ||= begin
38
- TextFilter.find_descendant(params[:filter_name])
39
- end
38
+ TextFilter.find_descendant(params[:filter_name])
39
+ end
40
40
  end
41
41
 
42
42
  def class_of_page
@@ -8,7 +8,6 @@
8
8
 
9
9
  - main.edit_form do
10
10
  - form_for :asset, :url => admin_assets_path, :html => { :method => "post", :multipart => true } do |f|
11
- = render :partial => "form", :locals => { :f => f }
12
11
  %fieldset
13
12
  %label.custom-file-upload
14
13
  = t("clipped_extension.choose_file")
data/config/boot.rb CHANGED
@@ -4,4 +4,4 @@
4
4
  # Set up gems listed in the Gemfile.
5
5
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
6
6
 
7
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
@@ -71,7 +71,7 @@ class ExtensionControllerGenerator < ControllerGenerator
71
71
  end
72
72
 
73
73
  def extension_uses_rspec?
74
- File.exists?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
74
+ File.exist?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
75
75
  end
76
76
 
77
77
  def add_options!(opt)
@@ -55,7 +55,7 @@ class ExtensionMailerGenerator < MailerGenerator
55
55
  end
56
56
 
57
57
  def extension_uses_rspec?
58
- File.exists?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
58
+ File.exist?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
59
59
  end
60
60
 
61
61
  def add_options!(opt)
@@ -55,7 +55,7 @@ class ExtensionModelGenerator < ModelGenerator
55
55
  end
56
56
 
57
57
  def extension_uses_rspec?
58
- File.exists?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
58
+ File.exist?(File.join(destination_root, 'spec')) && !options[:with_test_unit]
59
59
  end
60
60
 
61
61
  def add_options!(opt)
@@ -120,28 +120,32 @@ class InstanceGenerator < Rails::Generator::Base
120
120
 
121
121
  protected
122
122
 
123
- def banner
124
- "Usage: #{$0} /path/to/trusty_cms/app [options]"
125
- end
123
+ def banner
124
+ "Usage: #{$0} /path/to/trusty_cms/app [options]"
125
+ end
126
126
 
127
- def add_options!(opt)
128
- opt.separator ''
129
- opt.separator 'Options:'
130
- opt.on("-r", "--ruby=path", String,
131
- "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
132
- "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v }
133
- opt.on("-d", "--database=name", String,
134
- "Preconfigure for selected database (options: #{DATABASES.join(", ")}).",
135
- "Default: sqlite3") { |v| options[:db] = v }
136
- end
127
+ def add_options!(opt)
128
+ opt.separator ''
129
+ opt.separator 'Options:'
130
+ opt.on(
131
+ "-r", "--ruby=path", String,
132
+ "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
133
+ "Default: #{DEFAULT_SHEBANG}"
134
+ ) { |v| options[:shebang] = v }
135
+ opt.on(
136
+ "-d", "--database=name", String,
137
+ "Preconfigure for selected database (options: #{DATABASES.join(", ")}).",
138
+ "Default: sqlite3"
139
+ ) { |v| options[:db] = v }
140
+ end
137
141
 
138
- def mysql_socket_location
139
- RUBY_PLATFORM =~ /mswin32/ ? MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } : nil
140
- end
142
+ def mysql_socket_location
143
+ RUBY_PLATFORM =~ /mswin32/ ? MYSQL_SOCKET_LOCATIONS.find { |f| File.exist?(f) } : nil
144
+ end
141
145
 
142
146
  private
143
147
 
144
- def radiant_root(filename = '')
145
- File.join("..", "..", "..", "..", filename)
146
- end
147
- end
148
+ def radiant_root(filename = '')
149
+ File.join("..", "..", "..", "..", filename)
150
+ end
151
+ end
@@ -6,4 +6,4 @@ require 'rubygems'
6
6
  # Set up gems listed in the Gemfile.
7
7
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
8
8
 
9
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
9
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
@@ -98,7 +98,7 @@ unless File.directory? "#{Rails.root}/app"
98
98
  task :javascripts do
99
99
  FileUtils.mkdir_p("#{Rails.root}/public/javascripts/admin/")
100
100
  copy_javascripts = proc do |project_dir, scripts|
101
- scripts.reject! { |s| File.basename(s) == 'overrides.js' } if File.exists?(project_dir + 'overrides.js')
101
+ scripts.reject! { |s| File.basename(s) == 'overrides.js' } if File.exist?(project_dir + 'overrides.js')
102
102
  FileUtils.cp(scripts, project_dir)
103
103
  end
104
104
  copy_javascripts[Rails.root + '/public/javascripts/', Dir["#{File.dirname(__FILE__)}/../../public/javascripts/*.js"]]
@@ -228,7 +228,7 @@ the new files: #{warning}"
228
228
  project_dir = Rails.root + '/public/stylesheets/admin/'
229
229
 
230
230
  copy_stylesheets = proc do |project_dir, styles|
231
- styles.reject! { |s| File.basename(s) == 'overrides.css' } if File.exists?(project_dir + 'overrides.css')
231
+ styles.reject! { |s| File.basename(s) == 'overrides.css' } if File.exist?(project_dir + 'overrides.css')
232
232
  FileUtils.cp(styles, project_dir)
233
233
  end
234
234
  copy_stylesheets[Rails.root + '/public/stylesheets/admin/', Dir["#{File.dirname(__FILE__)}/../../public/stylesheets/admin/*.css"]]
@@ -237,7 +237,7 @@ the new files: #{warning}"
237
237
  desc 'Update admin sass files from your current trusty install'
238
238
  task :sass do
239
239
  copy_sass = proc do |project_dir, sass_files|
240
- sass_files.reject! { |s| File.basename(s) == 'overrides.sass' } if File.exists?(project_dir + 'overrides.sass') || File.exists?(project_dir + '../overrides.css')
240
+ sass_files.reject! { |s| File.basename(s) == 'overrides.sass' } if File.exist?(project_dir + 'overrides.sass') || File.exist?(project_dir + '../overrides.css')
241
241
  sass_files.reject! { |s| File.directory?(s) }
242
242
  FileUtils.mkpath(project_dir)
243
243
  FileUtils.cp(sass_files, project_dir)
@@ -4,7 +4,7 @@ module TrustyCms::AvailableLocales
4
4
  def self.locales
5
5
  available_locales = {}
6
6
  TrustyCms.configuration.i18n.load_path.each do |path|
7
- if File.exists?(path) && path !~ /_available_tags/
7
+ if File.exist?(path) && path !~ /_available_tags/
8
8
  locale_yaml = YAML.load_file(path)
9
9
  stem = File.basename(path, '.yml')
10
10
  if locale_yaml[stem] && lang = locale_yaml[stem]['this_file_language']
@@ -47,7 +47,7 @@ module TrustyCms
47
47
  end.join("\n\n")
48
48
 
49
49
  cache_path = File.join(dir, cache_file)
50
- File.delete(cache_path) if File.exists?(cache_path)
50
+ File.delete(cache_path) if File.exist?(cache_path)
51
51
  File.open(cache_path, 'w+') { |f| f.write(cache_content) }
52
52
  end
53
53
 
@@ -1,4 +1,4 @@
1
1
  module TrustyCms
2
- VERSION = '7.0.0'.freeze
2
+ VERSION = '7.0.2'.freeze
3
3
  end
4
4
 
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: 7.0.0
4
+ version: 7.0.2
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: 2024-10-11 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator