trusty-cms 7.0.1 → 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/boot.rb +1 -1
- data/lib/generators/extension_controller/extension_controller_generator.rb +1 -1
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +1 -1
- data/lib/generators/extension_model/extension_model_generator.rb +1 -1
- data/lib/generators/instance/instance_generator.rb +24 -20
- data/lib/generators/trusty_cms/templates/boot.rb.erb +1 -1
- data/lib/tasks/framework.rake +3 -3
- data/lib/trusty_cms/available_locales.rb +1 -1
- data/lib/trusty_cms/task_support.rb +1 -1
- data/lib/trusty_cms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12bc34679296612788dd5e4b30cc2bd2c454c326d4a309016e720f770770b1a3
|
4
|
+
data.tar.gz: 71f1f47c70c2a0dd3173248563847d77c25f394d0bcc29cf643dceccb35a51eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b292c598d59fbdcee257afb6967f6d0b614d5522894eb0702ca308ef5f77d0ea8580796bad3f9adad3ae70d6f979ff9e4e7f99ce9d339c3644f8f0fece180d90
|
7
|
+
data.tar.gz: 0f0f56c552540bb1997a82764722033b6ca66652af6a341a352c695ccd6a6900acba8a783210d0931a881804d1991e6b437ef6c9cc48a004bafc3132a184a380
|
data/config/boot.rb
CHANGED
@@ -71,7 +71,7 @@ class ExtensionControllerGenerator < ControllerGenerator
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def extension_uses_rspec?
|
74
|
-
File.
|
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.
|
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.
|
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
|
-
|
124
|
-
|
125
|
-
|
123
|
+
def banner
|
124
|
+
"Usage: #{$0} /path/to/trusty_cms/app [options]"
|
125
|
+
end
|
126
126
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
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
|
-
|
139
|
-
|
140
|
-
|
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
|
-
|
145
|
-
|
146
|
-
|
147
|
-
end
|
148
|
+
def radiant_root(filename = '')
|
149
|
+
File.join("..", "..", "..", "..", filename)
|
150
|
+
end
|
151
|
+
end
|
data/lib/tasks/framework.rake
CHANGED
@@ -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.
|
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.
|
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.
|
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.
|
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.
|
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
|
|
data/lib/trusty_cms/version.rb
CHANGED
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.
|
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
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage-validator
|