alchemy_cms 6.0.11 → 6.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/models/alchemy/attachment/url.rb +1 -0
- data/lib/alchemy/install/tasks.rb +1 -3
- data/lib/alchemy/modules.rb +2 -2
- data/lib/alchemy/version.rb +1 -1
- data/lib/generators/alchemy/install/install_generator.rb +27 -3
- data/lib/generators/alchemy/module/templates/ability.rb.tt +2 -3
- data/lib/generators/alchemy/module/templates/module_config.rb.tt +16 -14
- data/package.json +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: 706ea8d8bb121be924f467a6d367104dae78cf131a1a86bca33c08c75f377239
|
4
|
+
data.tar.gz: 8e8d3603be2b6b507c39a010b6231b2b3b753babb6556453741258699635a400
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b2766205aba938284f4fef79e6d7e00c1271c243ab4b50faa63dff68e11cb47c2029bc4afd20f57c917966429083328a0ab9a3629ab9ede810793b60aa036a
|
7
|
+
data.tar.gz: ecfbc1794df353099fd1ec2454275c55d09c9521cb85591258f67707ed2cf6dc72f287ca99135373783710def1df11a3302066f51935772bcf84c56d94a8ba98
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 6.0.12 (2022-11-19)
|
2
|
+
|
3
|
+
- More installer options [#2385](https://github.com/AlchemyCMS/alchemy_cms/pull/2385) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Fix custom module installer [#2384](https://github.com/AlchemyCMS/alchemy_cms/pull/2384) ([tvdeyen](https://github.com/tvdeyen))
|
5
|
+
- Always provide format with attachment URLs [#2383](https://github.com/AlchemyCMS/alchemy_cms/pull/2383) ([mamhoff](https://github.com/mamhoff))
|
6
|
+
|
1
7
|
## 6.0.11 (2022-09-22)
|
2
8
|
|
3
9
|
- Do not touch pages when toggling element [#2377](https://github.com/AlchemyCMS/alchemy_cms/pull/2377) ([tvdeyen](https://github.com/tvdeyen))
|
@@ -18,12 +18,10 @@ module Alchemy
|
|
18
18
|
inject_into_file "./config/routes.rb", "\n mount Alchemy::Engine => '#{mountpoint}'\n", { after: sentinel, verbose: true }
|
19
19
|
end
|
20
20
|
|
21
|
-
def set_primary_language(auto_accept
|
22
|
-
code = "en"
|
21
|
+
def set_primary_language(code: "en", name: "English", auto_accept: false)
|
23
22
|
unless auto_accept
|
24
23
|
code = ask("- What is the language code of your site's primary language?", default: code)
|
25
24
|
end
|
26
|
-
name = "English"
|
27
25
|
unless auto_accept
|
28
26
|
name = ask("- What is the name of your site's primary language?", default: name)
|
29
27
|
end
|
data/lib/alchemy/modules.rb
CHANGED
@@ -32,13 +32,13 @@ module Alchemy
|
|
32
32
|
defined_controllers = [definition_hash["navigation"]["controller"]]
|
33
33
|
|
34
34
|
if definition_hash["navigation"]["sub_navigation"].is_a?(Array)
|
35
|
-
defined_controllers.concat(definition_hash["navigation"]["sub_navigation"].map{ |x| x["controller"] })
|
35
|
+
defined_controllers.concat(definition_hash["navigation"]["sub_navigation"].map { |x| x["controller"] })
|
36
36
|
end
|
37
37
|
|
38
38
|
validate_controllers_existence(defined_controllers)
|
39
39
|
end
|
40
40
|
|
41
|
-
@@alchemy_modules
|
41
|
+
@@alchemy_modules |= [definition_hash]
|
42
42
|
end
|
43
43
|
|
44
44
|
private
|
data/lib/alchemy/version.rb
CHANGED
@@ -26,7 +26,22 @@ module Alchemy
|
|
26
26
|
class_option :skip_db_create,
|
27
27
|
type: :boolean,
|
28
28
|
default: false,
|
29
|
-
desc: "Skip
|
29
|
+
desc: "Skip creating the database during install."
|
30
|
+
|
31
|
+
class_option :skip_mount,
|
32
|
+
type: :boolean,
|
33
|
+
default: false,
|
34
|
+
desc: "Skip mounting into routes.rb during install."
|
35
|
+
|
36
|
+
class_option :default_language_code,
|
37
|
+
type: :string,
|
38
|
+
default: "en",
|
39
|
+
desc: "The default language code of your site."
|
40
|
+
|
41
|
+
class_option :default_language_name,
|
42
|
+
type: :string,
|
43
|
+
default: "English",
|
44
|
+
desc: "The default language name of your site."
|
30
45
|
|
31
46
|
source_root File.expand_path("files", __dir__)
|
32
47
|
|
@@ -34,6 +49,11 @@ module Alchemy
|
|
34
49
|
header
|
35
50
|
say "Welcome to AlchemyCMS!"
|
36
51
|
say "Let's begin with some questions.\n\n"
|
52
|
+
end
|
53
|
+
|
54
|
+
def mount
|
55
|
+
return if options[:skip_mount]
|
56
|
+
|
37
57
|
install_tasks.inject_routes(options[:auto_accept])
|
38
58
|
end
|
39
59
|
|
@@ -108,13 +128,17 @@ module Alchemy
|
|
108
128
|
|
109
129
|
def set_primary_language
|
110
130
|
header
|
111
|
-
install_tasks.set_primary_language(
|
131
|
+
install_tasks.set_primary_language(
|
132
|
+
code: options[:default_language_code],
|
133
|
+
name: options[:default_language_name],
|
134
|
+
auto_accept: options[:auto_accept]
|
135
|
+
)
|
112
136
|
end
|
113
137
|
|
114
138
|
def setup_database
|
115
139
|
rake("db:create", abort_on_failure: true) unless options[:skip_db_create]
|
116
140
|
# We can't invoke this rake task, because Rails will use wrong engine names otherwise
|
117
|
-
rake("
|
141
|
+
rake("alchemy:install:migrations", abort_on_failure: true)
|
118
142
|
rake("db:migrate", abort_on_failure: true)
|
119
143
|
install_tasks.inject_seeder
|
120
144
|
rake("db:seed", abort_on_failure: true)
|
@@ -1,17 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
controller: '/admin/<%= @module_name %>',
|
7
|
-
action: 'index',
|
8
|
-
image: 'alchemy/<%= @module_name %>_module.png',
|
9
|
-
sub_navigation: [{
|
1
|
+
Rails.application.config.to_prepare do
|
2
|
+
Alchemy::Modules.register_module({
|
3
|
+
name: '<%= @module_name %>',
|
4
|
+
order: 1,
|
5
|
+
navigation: {
|
10
6
|
name: 'modules.<%= @module_name %>',
|
11
7
|
controller: '/admin/<%= @module_name %>',
|
12
|
-
action: 'index'
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
action: 'index',
|
9
|
+
image: 'alchemy/<%= @module_name %>_module.png',
|
10
|
+
sub_navigation: [{
|
11
|
+
name: 'modules.<%= @module_name %>',
|
12
|
+
controller: '/admin/<%= @module_name %>',
|
13
|
+
action: 'index'
|
14
|
+
}]
|
15
|
+
}
|
16
|
+
})
|
16
17
|
|
17
|
-
Alchemy.register_ability(<%= @
|
18
|
+
Alchemy.register_ability(<%= @controller_class %>Ability)
|
19
|
+
end
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2022-
|
16
|
+
date: 2022-11-19 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|