alchemy_cms 6.0.0.pre.b5 → 6.0.0.pre.rc3

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
  SHA256:
3
- metadata.gz: c960938b7e577abd1031dc1ff066eea2bc9636f2a94d61cab753ae42e1058768
4
- data.tar.gz: d3dff1ab8a69b2dcfc2374aa78ecbbaad3c76d97fe66c23ede57d33e8f019f49
3
+ metadata.gz: 21260eb0f68590cfe400b34ba5cbfe8d18551ed9fd2f6cc206bb5c7ed2aebb66
4
+ data.tar.gz: 870421eb1bbaf3c7b246de59379297f63f3719da3601e1ac07f8bb72877d6c0a
5
5
  SHA512:
6
- metadata.gz: 73e65f16a6c35dd438645b36f359745db42d657ca6d7de7082714f879105c97ac296861790dc15f6c3411f25970519f2d01dc5c3b2525e88e8fc25a2fca38b80
7
- data.tar.gz: 78dedcd0ca764496af5abc4a8800675205ef6f78deb511bf8cf2f4bb5025f4e6cfe7315dc9a4d54d114a33efbb6d5ad2b53fc4de881686c8df158c7d7dfa83dd
6
+ metadata.gz: 8056e9a0e2cebea3069b47405f60339e4dbb1af55399323a32f7298976e918318ec7e790674a273d84825c0416c6658127dba68c5596562e0f8687bb9cbcd56e
7
+ data.tar.gz: 438ee71b5721ccf34a713a9c6469c5cc1a383a1dd75f7534348cb25b9ef9f9dd668e59821e7d3c087c1f3cc3d86fbf121d5e7b0c07905dfcb2f4cd431005f13d
@@ -0,0 +1,46 @@
1
+ # This workflow integrates Brakeman with GitHub's Code Scanning feature
2
+ # Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications
3
+
4
+ name: Brakeman Scan
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+ pull_request:
10
+ # The branches below must be a subset of the branches above
11
+ branches: [ main ]
12
+ schedule:
13
+ - cron: '40 4 * * 2'
14
+
15
+ jobs:
16
+ brakeman-scan:
17
+ name: Brakeman Scan
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ # Checkout the repository to the GitHub Actions runner
21
+ - name: Checkout
22
+ uses: actions/checkout@v2
23
+
24
+ # Customize the ruby version depending on your needs
25
+ - name: Setup Ruby
26
+ uses: actions/setup-ruby@v1
27
+ with:
28
+ ruby-version: '2.7'
29
+
30
+ - name: Setup Brakeman
31
+ env:
32
+ BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+
33
+ run: |
34
+ gem install brakeman --version $BRAKEMAN_VERSION
35
+
36
+ # Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis
37
+ - name: Scan
38
+ continue-on-error: true
39
+ run: |
40
+ brakeman -f sarif -o output.sarif.json .
41
+
42
+ # Upload the SARIF file generated in the previous step
43
+ - name: Upload SARIF
44
+ uses: github/codeql-action/upload-sarif@v1
45
+ with:
46
+ sarif_file: output.sarif.json
@@ -10,10 +10,11 @@ jobs:
10
10
  matrix:
11
11
  rails:
12
12
  - '6.0'
13
+ - '6.1'
13
14
  ruby:
14
- - '2.6.6'
15
- - '2.7.2'
16
- - '3.0.0'
15
+ - '2.6.8'
16
+ - '2.7.4'
17
+ - '3.0.2'
17
18
  database:
18
19
  - mysql
19
20
  - postgresql
data/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## 6.0.0-rc3 (2021-11-24)
2
+
3
+ ### Changes
4
+
5
+ - Set stampable user_class_name without root identifier [#2215](https://github.com/AlchemyCMS/alchemy_cms/pull/2215) ([tvdeyen](https://github.com/tvdeyen))
6
+ - Allow all possible args in tagged_with method [#2211](https://github.com/AlchemyCMS/alchemy_cms/pull/2211) ([robinboening](https://github.com/robinboening))
7
+
8
+ ### Fixes
9
+
10
+ - fix(ImageCropper): Add dom ids to picture crop fields [#2219](https://github.com/AlchemyCMS/alchemy_cms/pull/2219) ([tvdeyen](https://github.com/tvdeyen))
11
+ - Adjust tinymce skin assets urls again [#2218](https://github.com/AlchemyCMS/alchemy_cms/pull/2218) ([tvdeyen](https://github.com/tvdeyen))
12
+ - Use relative path for tinymce font-face [#2214](https://github.com/AlchemyCMS/alchemy_cms/pull/2214) ([tvdeyen](https://github.com/tvdeyen))
13
+
14
+ ### Misc
15
+
16
+ - Install correct npm package [#2204](https://github.com/AlchemyCMS/alchemy_cms/pull/2204) ([tvdeyen](https://github.com/tvdeyen))
17
+ - Switch to cuprite for system testing [#2203](https://github.com/AlchemyCMS/alchemy_cms/pull/2203) ([tvdeyen](https://github.com/tvdeyen))
18
+ - Upgrade webdrivers to version 5.0.0 [#2201](https://github.com/AlchemyCMS/alchemy_cms/pull/2201) ([depfu](https://github.com/apps/depfu))
19
+
20
+ ## 6.0.0-rc2 (2021-10-13)
21
+
22
+ - Fix init link dialog if used in tinymce [#2200](https://github.com/AlchemyCMS/alchemy_cms/pull/2200) ([tvdeyen](https://github.com/tvdeyen))
23
+
24
+ ## 6.0.0-rc1 (2021-09-12)
25
+
26
+ - Allow Rails 6.1 [#2047](https://github.com/AlchemyCMS/alchemy_cms/pull/2047) ([robinboening](https://github.com/robinboening))
27
+
28
+ ## 6.0.0-b6 (2021-09-02)
29
+
30
+ - Fix element with ingredients preview text [#2187](https://github.com/AlchemyCMS/alchemy_cms/pull/2187) ([tvdeyen](https://github.com/tvdeyen))
31
+ - Do not validate element during toggle fold and create [#2186](https://github.com/AlchemyCMS/alchemy_cms/pull/2186) ([tvdeyen](https://github.com/tvdeyen))
1
32
  ## 6.0.0-b5 (2021-08-27)
2
33
 
3
34
  - Remove spec that tests default data store value [#2184](https://github.com/AlchemyCMS/alchemy_cms/pull/2184) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
3
3
 
4
4
  gemspec
5
5
 
6
- rails_version = ENV.fetch("RAILS_VERSION", 6.0).to_f
6
+ rails_version = ENV.fetch("RAILS_VERSION", 6.1).to_f
7
7
  gem "rails", "~> #{rails_version}.0"
8
8
 
9
9
  if ENV["DB"].nil? || ENV["DB"] == "sqlite"
@@ -40,3 +40,8 @@ group :development, :test do
40
40
  gem "brakeman", require: false
41
41
  end
42
42
  end
43
+
44
+ # Necessary for system tests in Rails 6.0
45
+ if ENV["RAILS_VERSION"] == "6.0"
46
+ gem "selenium-webdriver"
47
+ end
data/README.md CHANGED
@@ -18,7 +18,7 @@ Alchemy is an open source CMS engine written in Ruby on Rails.
18
18
 
19
19
  Read more about Alchemy on the [website](https://alchemy-cms.com) and in the [guidelines](https://guides.alchemy-cms.com).
20
20
 
21
- **CAUTION: This main branch is a development branch that *can* contain bugs. For productive environments you should use the [current Ruby gem version](https://rubygems.org/gems/alchemy_cms), or the [latest stable branch (5.0-stable)](https://github.com/AlchemyCMS/alchemy_cms/tree/5.0-stable).**
21
+ **CAUTION: This main branch is a development branch that *can* contain bugs. For productive environments you should use the [current Ruby gem version](https://rubygems.org/gems/alchemy_cms), or the [latest stable branch (5.2-stable)](https://github.com/AlchemyCMS/alchemy_cms/tree/5.2-stable).**
22
22
 
23
23
 
24
24
  ## ✅ Features
data/SECURITY.md ADDED
@@ -0,0 +1,13 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We support the current major and last minor version of the previous major version with security fixes.
6
+
7
+ ## Reporting a Vulnerability
8
+
9
+ Please send a preferably encrypted email to hello@alchemy-cms.com
10
+
11
+ PGP public key finger print
12
+
13
+ 52D3 2070 4BF3 E5C5 035C  BC71 17E9 E620 A96B 4CE0
data/alchemy_cms.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
29
29
  activesupport
30
30
  railties
31
31
  ].each do |rails_gem|
32
- gem.add_runtime_dependency rails_gem, [">= 6.0", "< 6.1"]
32
+ gem.add_runtime_dependency rails_gem, [">= 6.0", "< 6.2"]
33
33
  end
34
34
 
35
35
  gem.add_runtime_dependency "active_model_serializers", ["~> 0.10.0"]
@@ -57,13 +57,13 @@ Gem::Specification.new do |gem|
57
57
 
58
58
  gem.add_development_dependency "capybara", ["~> 3.0"]
59
59
  gem.add_development_dependency "capybara-screenshot", ["~> 1.0"]
60
+ gem.add_development_dependency "cuprite", ["~> 0.13"]
60
61
  gem.add_development_dependency "factory_bot_rails", ["~> 6.0"]
61
62
  gem.add_development_dependency "puma", ["~> 5.0"]
62
63
  gem.add_development_dependency "rails-controller-testing", ["~> 1.0"]
63
64
  gem.add_development_dependency "rspec-activemodel-mocks", ["~> 1.0"]
64
65
  gem.add_development_dependency "rspec-rails", [">= 4.0.0.beta2"]
65
66
  gem.add_development_dependency "simplecov", ["~> 0.20"]
66
- gem.add_development_dependency "webdrivers", ["~> 4.0"]
67
67
  gem.add_development_dependency "webmock", ["~> 3.3"]
68
68
  gem.add_development_dependency "shoulda-matchers", ["~> 5.0"]
69
69
  gem.add_development_dependency "timecop", ["~> 0.9"]
@@ -4,12 +4,13 @@
4
4
  class window.Alchemy.LinkDialog extends Alchemy.Dialog
5
5
 
6
6
  constructor: (@link_object) ->
7
- parent_selector = @link_object.dataset.parentSelector
8
- parent = document.querySelector(parent_selector)
9
- @link_value_field = parent.querySelector("[data-link-value]")
10
- @link_title_field = parent.querySelector("[data-link-title]")
11
- @link_target_field = parent.querySelector("[data-link-target]")
12
- @link_class_field = parent.querySelector("[data-link-class]")
7
+ if @link_object.dataset
8
+ parent_selector = @link_object.dataset.parentSelector
9
+ parent = document.querySelector(parent_selector)
10
+ @link_value_field = parent.querySelector("[data-link-value]")
11
+ @link_title_field = parent.querySelector("[data-link-title]")
12
+ @link_target_field = parent.querySelector("[data-link-target]")
13
+ @link_class_field = parent.querySelector("[data-link-class]")
13
14
  @url = Alchemy.routes.link_admin_pages_path
14
15
  @$link_object = $(@link_object)
15
16
  @options =
@@ -30,7 +30,7 @@ td,th {
30
30
 
31
31
  .mce-object {
32
32
  border: 1px dotted #3a3a3a;
33
- background: #d5d5d5 url(img/object.gif) no-repeat center;
33
+ background: #d5d5d5 url('tinymce/skins/alchemy/fonts/img/object.gif') no-repeat center;
34
34
  }
35
35
 
36
36
  .mce-pagebreak {
@@ -55,7 +55,7 @@ td,th {
55
55
  width: 9px!important;
56
56
  height: 9px!important;
57
57
  border: 1px dotted #3a3a3a;
58
- background: #d5d5d5 url(img/anchor.gif) no-repeat center;
58
+ background: #d5d5d5 url('tinymce/skins/alchemy/fonts/img/anchor.gif') no-repeat center;
59
59
  }
60
60
 
61
61
  .mce-nbsp {
@@ -77,7 +77,7 @@ hr {
77
77
  }
78
78
 
79
79
  .mce-spellchecker-word {
80
- background: url(img/wline.gif) repeat-x bottom left;
80
+ background: url('tinymce/skins/alchemy/fonts/img/wline.gif') repeat-x bottom left;
81
81
  cursor: default;
82
82
  }
83
83
 
@@ -1561,23 +1561,23 @@ i.mce-i-resize {
1561
1561
  opacity: 0.6;
1562
1562
  filter: alpha(opacity=60);
1563
1563
  zoom: 1;
1564
- background: #fff url('img/loader.gif') no-repeat center center;
1564
+ background: #fff url('tinymce/skins/alchemy/fonts/img/loader.gif') no-repeat center center;
1565
1565
  }
1566
1566
 
1567
1567
  @font-face {
1568
1568
  font-family: 'tinymce';
1569
- src: url('fonts/tinymce.woff') format('woff'),
1570
- url('fonts/tinymce.ttf') format('truetype'),
1571
- url('fonts/tinymce.svg#tinymce') format('svg');
1569
+ src: url('tinymce/skins/alchemy/fonts/tinymce.woff') format('woff'),
1570
+ url('tinymce/skins/alchemy/fonts/tinymce.ttf') format('truetype'),
1571
+ url('tinymce/skins/alchemy/fonts/tinymce.svg#tinymce') format('svg');
1572
1572
  font-weight: normal;
1573
1573
  font-style: normal;
1574
1574
  }
1575
1575
 
1576
1576
  @font-face {
1577
1577
  font-family: 'tinymce-small';
1578
- src: url('fonts/tinymce-small.woff') format('woff'),
1579
- url('fonts/tinymce-small.ttf') format('truetype'),
1580
- url('fonts/tinymce-small.svg#tinymce') format('svg');
1578
+ src: url('tinymce/skins/alchemy/fonts/tinymce-small.woff') format('woff'),
1579
+ url('tinymce/skins/alchemy/fonts/tinymce-small.ttf') format('truetype'),
1580
+ url('tinymce/skins/alchemy/fonts/tinymce-small.svg#tinymce') format('svg');
1581
1581
  font-weight: normal;
1582
1582
  font-style: normal;
1583
1583
  }
@@ -32,14 +32,14 @@ module Alchemy
32
32
  if @paste_from_clipboard = params[:paste_from_clipboard].present?
33
33
  @element = paste_element_from_clipboard
34
34
  else
35
- @element = Element.create(create_element_params)
35
+ @element = Element.new(create_element_params)
36
36
  end
37
37
  if @page.definition["insert_elements_at"] == "top"
38
38
  @insert_at_top = true
39
- @element.move_to_top
39
+ @element.position = 1
40
40
  end
41
41
  end
42
- if @element.valid?
42
+ if @element.save
43
43
  render :create
44
44
  else
45
45
  @element.page_version = @page_version
@@ -91,10 +91,14 @@ module Alchemy
91
91
  end
92
92
  end
93
93
 
94
+ # Toggle fodls the element and persists the state in the db
95
+ #
96
+ # Ingredient validations might make the element invalid.
97
+ # In this case we are just toggling a UI state and do not care about the validations.
94
98
  def fold
95
99
  @page = @element.page
96
100
  @element.folded = !@element.folded
97
- @element.save
101
+ @element.save(validate: false)
98
102
  end
99
103
 
100
104
  private
@@ -28,7 +28,7 @@ module Alchemy
28
28
  after_assign { |f| write_attribute(:file_mime_type, f.mime_type) }
29
29
  end
30
30
 
31
- stampable stamper_class_name: Alchemy.user_class_name
31
+ stampable stamper_class_name: Alchemy.user_class.name
32
32
 
33
33
  has_many :essence_files, class_name: "Alchemy::EssenceFile", foreign_key: "attachment_id"
34
34
  has_many :contents, through: :essence_files
@@ -99,12 +99,12 @@ module Alchemy
99
99
  # The ingredient that's used for element's preview text.
100
100
  #
101
101
  # It tries to find one of element's ingredients that is defined +as_element_title+.
102
- # Takes element's first ingredient if no ingredient is defined +as_element_title+.
102
+ # Takes element's first defined ingredient if no ingredient is defined +as_element_title+.
103
103
  #
104
104
  # @return (Alchemy::Ingredient)
105
105
  #
106
106
  def preview_ingredient
107
- @_preview_ingredient ||= ingredients.detect(&:preview_ingredient?) || ingredients.first
107
+ @_preview_ingredient ||= ingredients.detect(&:preview_ingredient?) || first_ingredient_by_definition
108
108
  end
109
109
 
110
110
  private
@@ -122,6 +122,13 @@ module Alchemy
122
122
  def preview_text_from_preview_ingredient(maxlength)
123
123
  preview_ingredient&.preview_text(maxlength)
124
124
  end
125
+
126
+ def first_ingredient_by_definition
127
+ return if ingredient_definitions.empty?
128
+
129
+ role = ingredient_definitions.first["role"]
130
+ ingredients.detect { |ingredient| ingredient.role == role }
131
+ end
125
132
  end
126
133
  end
127
134
  end
@@ -57,7 +57,7 @@ module Alchemy
57
57
  #
58
58
  acts_as_list scope: [:page_version_id, :fixed, :parent_element_id]
59
59
 
60
- stampable stamper_class_name: Alchemy.user_class_name
60
+ stampable stamper_class_name: Alchemy.user_class.name
61
61
 
62
62
  has_many :contents, dependent: :destroy, inverse_of: :element
63
63
 
@@ -7,7 +7,7 @@ module Alchemy
7
7
  before_destroy :check_if_related_essence_nodes_present
8
8
 
9
9
  acts_as_nested_set scope: "language_id", touch: true
10
- stampable stamper_class_name: Alchemy.user_class_name
10
+ stampable stamper_class_name: Alchemy.user_class.name
11
11
 
12
12
  belongs_to :language, class_name: "Alchemy::Language"
13
13
  belongs_to :page, class_name: "Alchemy::Page", optional: true, inverse_of: :nodes
@@ -88,7 +88,7 @@ module Alchemy
88
88
 
89
89
  acts_as_nested_set(dependent: :destroy, scope: [:layoutpage, :language_id])
90
90
 
91
- stampable stamper_class_name: Alchemy.user_class_name
91
+ stampable stamper_class_name: Alchemy.user_class.name
92
92
 
93
93
  belongs_to :language
94
94
 
@@ -110,7 +110,7 @@ module Alchemy
110
110
  case_sensitive: false,
111
111
  message: Alchemy.t("not a valid image")
112
112
 
113
- stampable stamper_class_name: Alchemy.user_class_name
113
+ stampable stamper_class_name: Alchemy.user_class.name
114
114
 
115
115
  scope :named, ->(name) { where("#{table_name}.name LIKE ?", "%#{name}%") }
116
116
  scope :recent, -> { where("#{table_name}.created_at > ?", Time.current - 24.hours).order(:created_at) }
@@ -54,7 +54,7 @@
54
54
  <%= f.hidden_field :link_title, data: { link_title: true }, id: nil %>
55
55
  <%= f.hidden_field :link_class_name, data: { link_class: true }, id: nil %>
56
56
  <%= f.hidden_field :link_target, data: { link_target: true }, id: nil %>
57
- <%= f.hidden_field :crop_from, data: { crop_from: true }, id: nil %>
58
- <%= f.hidden_field :crop_size, data: { crop_size: true }, id: nil %>
57
+ <%= f.hidden_field :crop_from, data: { crop_from: true }, id: picture_editor.form_field_id(:crop_from) %>
58
+ <%= f.hidden_field :crop_size, data: { crop_size: true }, id: picture_editor.form_field_id(:crop_size) %>
59
59
  <% end %>
60
60
  <% end %>
@@ -58,7 +58,7 @@
58
58
  "check_name": "MassAssignment",
59
59
  "message": "Specify exact keys allowed for mass assignment instead of using `permit!` which allows any keys",
60
60
  "file": "app/controllers/alchemy/admin/resources_controller.rb",
61
- "line": 136,
61
+ "line": 209,
62
62
  "link": "https://brakemanscanner.org/docs/warning_types/mass_assignment/",
63
63
  "code": "params.require(resource_handler.namespaced_resource_name).permit!",
64
64
  "render_path": null,
@@ -86,7 +86,7 @@
86
86
  "type": "controller",
87
87
  "class": "Alchemy::Admin::ElementsController",
88
88
  "method": "fold",
89
- "line": 97,
89
+ "line": 102,
90
90
  "file": "app/controllers/alchemy/admin/elements_controller.rb",
91
91
  "rendered": {
92
92
  "name": "alchemy/admin/elements/fold",
@@ -109,7 +109,7 @@
109
109
  "check_name": "MassAssignment",
110
110
  "message": "Specify exact keys allowed for mass assignment instead of using `permit!` which allows any keys",
111
111
  "file": "app/controllers/alchemy/admin/elements_controller.rb",
112
- "line": 150,
112
+ "line": 155,
113
113
  "link": "https://brakemanscanner.org/docs/warning_types/mass_assignment/",
114
114
  "code": "params.fetch(:contents, {}).permit!",
115
115
  "render_path": null,
@@ -122,6 +122,26 @@
122
122
  "confidence": "Medium",
123
123
  "note": "`Alchemy::Content` is a polymorphic association of any kind of model extending `Alchemy::Essence`. Since we can't know the attributes of all potential essences we need to permit all attributes. As this all happens inside the password protected /admin namespace this can be considered a false positive."
124
124
  },
125
+ {
126
+ "warning_type": "Command Injection",
127
+ "warning_code": 14,
128
+ "fingerprint": "6addfcb9d23d2d6f699f2f3542169744ff749dc4d0a97f8ac783ab92593e1d84",
129
+ "check_name": "Execute",
130
+ "message": "Possible command injection",
131
+ "file": "lib/alchemy/upgrader.rb",
132
+ "line": 30,
133
+ "link": "https://brakemanscanner.org/docs/warning_types/command_injection/",
134
+ "code": "`yarn add @alchemy_cms/admin@~#{Alchemy.version}`",
135
+ "render_path": null,
136
+ "location": {
137
+ "type": "method",
138
+ "class": "Alchemy::Upgrader",
139
+ "method": "update_npm_package"
140
+ },
141
+ "user_input": "Alchemy.version",
142
+ "confidence": "Medium",
143
+ "note": "The alchemy version is safe"
144
+ },
125
145
  {
126
146
  "warning_type": "Cross-Site Scripting",
127
147
  "warning_code": 4,
@@ -255,6 +275,6 @@
255
275
  "note": ""
256
276
  }
257
277
  ],
258
- "updated": "2021-06-29 20:56:10 +0200",
259
- "brakeman_version": "5.0.1"
278
+ "updated": "2021-10-26 21:44:59 +0200",
279
+ "brakeman_version": "5.1.1"
260
280
  }
@@ -40,7 +40,7 @@ module Alchemy
40
40
  if Alchemy.user_class
41
41
  ActiveSupport.on_load(:active_record) do
42
42
  Alchemy.user_class.model_stamper
43
- Alchemy.user_class.stampable(stamper_class_name: Alchemy.user_class_name)
43
+ Alchemy.user_class.stampable(stamper_class_name: Alchemy.user_class.name)
44
44
  end
45
45
  end
46
46
  end
@@ -22,13 +22,20 @@ module Alchemy
22
22
  end
23
23
 
24
24
  module ClassMethods
25
- # Find all records matching all of the given tags.
26
- # Separate multiple tags by comma.
27
- def tagged_with(names)
25
+ def tagged_with(names = [], **args)
28
26
  if names.is_a? String
29
27
  names = names.split(/,\s*/)
30
28
  end
31
- super(names: names, match: :all)
29
+
30
+ unless args[:match]
31
+ args.merge!(match: :all)
32
+ end
33
+
34
+ if names.any?
35
+ args.merge!(names: names)
36
+ end
37
+
38
+ super(args)
32
39
  end
33
40
 
34
41
  # Returns all unique tags
@@ -24,6 +24,12 @@ module Alchemy
24
24
  todo "Check the default configuration file (./config/alchemy/config.yml.defaults) for new configuration options and insert them into your config file.", "Configuration has changed"
25
25
  end
26
26
  end
27
+
28
+ def update_npm_package
29
+ desc "Install new npm package."
30
+ `yarn add @alchemy_cms/admin@~#{Alchemy.version}`
31
+ log "Installed new npm package."
32
+ end
27
33
  end
28
34
  end
29
35
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "6.0.0-b5"
4
+ VERSION = "6.0.0-rc3"
5
5
 
6
6
  def self.version
7
7
  VERSION
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require "rails/generators"
3
3
  require "alchemy/install/tasks"
4
+ require "alchemy/version"
4
5
 
5
6
  module Alchemy
6
7
  module Generators
@@ -88,7 +89,7 @@ module Alchemy
88
89
  end
89
90
 
90
91
  def add_npm_package
91
- run "yarn add @alchemy_cms/admin"
92
+ run "yarn add @alchemy_cms/admin@~#{Alchemy.version}"
92
93
  end
93
94
 
94
95
  def copy_alchemy_entry_point
@@ -17,6 +17,7 @@ namespace :alchemy do
17
17
  task prepare: [
18
18
  "alchemy:upgrade:database",
19
19
  "alchemy:upgrade:config",
20
+ "alchemy:upgrade:package",
20
21
  ]
21
22
 
22
23
  desc "Alchemy Upgrader: Prepares the database."
@@ -30,6 +31,11 @@ namespace :alchemy do
30
31
  Alchemy::Upgrader.copy_new_config_file
31
32
  end
32
33
 
34
+ desc "Alchemy Upgrader: Install new Node package."
35
+ task package: [:environment] do
36
+ Alchemy::Upgrader.update_npm_package
37
+ end
38
+
33
39
  desc "Upgrade Alchemy to v5.0"
34
40
  task "5.0" => [
35
41
  "alchemy:upgrade:prepare",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy_cms/admin",
3
- "version": "6.0.0-b5",
3
+ "version": "6.0.0-rc3",
4
4
  "description": "AlchemyCMS",
5
5
  "browser": "package/admin.js",
6
6
  "files": [
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.0.pre.b5
4
+ version: 6.0.0.pre.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -10,10 +10,10 @@ authors:
10
10
  - Hendrik Mans
11
11
  - Carsten Fregin
12
12
  - Martin Meyerhoff
13
- autorequire:
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2021-08-27 00:00:00.000000000 Z
16
+ date: 2021-11-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: '6.0'
25
25
  - - "<"
26
26
  - !ruby/object:Gem::Version
27
- version: '6.1'
27
+ version: '6.2'
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '6.0'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '6.1'
37
+ version: '6.2'
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: actionpack
40
40
  requirement: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '6.0'
45
45
  - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: '6.1'
47
+ version: '6.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '6.0'
55
55
  - - "<"
56
56
  - !ruby/object:Gem::Version
57
- version: '6.1'
57
+ version: '6.2'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: actionview
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -64,7 +64,7 @@ dependencies:
64
64
  version: '6.0'
65
65
  - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '6.1'
67
+ version: '6.2'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  version: '6.0'
75
75
  - - "<"
76
76
  - !ruby/object:Gem::Version
77
- version: '6.1'
77
+ version: '6.2'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: activejob
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  version: '6.0'
85
85
  - - "<"
86
86
  - !ruby/object:Gem::Version
87
- version: '6.1'
87
+ version: '6.2'
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ dependencies:
94
94
  version: '6.0'
95
95
  - - "<"
96
96
  - !ruby/object:Gem::Version
97
- version: '6.1'
97
+ version: '6.2'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: activemodel
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -104,7 +104,7 @@ dependencies:
104
104
  version: '6.0'
105
105
  - - "<"
106
106
  - !ruby/object:Gem::Version
107
- version: '6.1'
107
+ version: '6.2'
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  version: '6.0'
115
115
  - - "<"
116
116
  - !ruby/object:Gem::Version
117
- version: '6.1'
117
+ version: '6.2'
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: activerecord
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +124,7 @@ dependencies:
124
124
  version: '6.0'
125
125
  - - "<"
126
126
  - !ruby/object:Gem::Version
127
- version: '6.1'
127
+ version: '6.2'
128
128
  type: :runtime
129
129
  prerelease: false
130
130
  version_requirements: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '6.0'
135
135
  - - "<"
136
136
  - !ruby/object:Gem::Version
137
- version: '6.1'
137
+ version: '6.2'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: activesupport
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: '6.0'
145
145
  - - "<"
146
146
  - !ruby/object:Gem::Version
147
- version: '6.1'
147
+ version: '6.2'
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  version: '6.0'
155
155
  - - "<"
156
156
  - !ruby/object:Gem::Version
157
- version: '6.1'
157
+ version: '6.2'
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: railties
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '6.0'
165
165
  - - "<"
166
166
  - !ruby/object:Gem::Version
167
- version: '6.1'
167
+ version: '6.2'
168
168
  type: :runtime
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
@@ -174,7 +174,7 @@ dependencies:
174
174
  version: '6.0'
175
175
  - - "<"
176
176
  - !ruby/object:Gem::Version
177
- version: '6.1'
177
+ version: '6.2'
178
178
  - !ruby/object:Gem::Dependency
179
179
  name: active_model_serializers
180
180
  requirement: !ruby/object:Gem::Requirement
@@ -571,6 +571,20 @@ dependencies:
571
571
  - - "~>"
572
572
  - !ruby/object:Gem::Version
573
573
  version: '1.0'
574
+ - !ruby/object:Gem::Dependency
575
+ name: cuprite
576
+ requirement: !ruby/object:Gem::Requirement
577
+ requirements:
578
+ - - "~>"
579
+ - !ruby/object:Gem::Version
580
+ version: '0.13'
581
+ type: :development
582
+ prerelease: false
583
+ version_requirements: !ruby/object:Gem::Requirement
584
+ requirements:
585
+ - - "~>"
586
+ - !ruby/object:Gem::Version
587
+ version: '0.13'
574
588
  - !ruby/object:Gem::Dependency
575
589
  name: factory_bot_rails
576
590
  requirement: !ruby/object:Gem::Requirement
@@ -655,20 +669,6 @@ dependencies:
655
669
  - - "~>"
656
670
  - !ruby/object:Gem::Version
657
671
  version: '0.20'
658
- - !ruby/object:Gem::Dependency
659
- name: webdrivers
660
- requirement: !ruby/object:Gem::Requirement
661
- requirements:
662
- - - "~>"
663
- - !ruby/object:Gem::Version
664
- version: '4.0'
665
- type: :development
666
- prerelease: false
667
- version_requirements: !ruby/object:Gem::Requirement
668
- requirements:
669
- - - "~>"
670
- - !ruby/object:Gem::Version
671
- version: '4.0'
672
672
  - !ruby/object:Gem::Dependency
673
673
  name: webmock
674
674
  requirement: !ruby/object:Gem::Requirement
@@ -724,6 +724,7 @@ files:
724
724
  - ".github/ISSUE_TEMPLATE/Bug_report.md"
725
725
  - ".github/ISSUE_TEMPLATE/Feature_request.md"
726
726
  - ".github/PULL_REQUEST_TEMPLATE.md"
727
+ - ".github/workflows/brakeman-analysis.yml"
727
728
  - ".github/workflows/ci.yml"
728
729
  - ".github/workflows/stale.yml"
729
730
  - ".gitignore"
@@ -739,6 +740,7 @@ files:
739
740
  - LICENSE
740
741
  - README.md
741
742
  - Rakefile
743
+ - SECURITY.md
742
744
  - alchemy_cms.gemspec
743
745
  - app/assets/config/alchemy_manifest.js
744
746
  - app/assets/images/alchemy/alchemy-logo.png
@@ -1517,7 +1519,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1517
1519
  requirements:
1518
1520
  - ImageMagick (libmagick), v6.6 or greater.
1519
1521
  rubygems_version: 3.1.6
1520
- signing_key:
1522
+ signing_key:
1521
1523
  specification_version: 4
1522
1524
  summary: A powerful, userfriendly and flexible CMS for Rails
1523
1525
  test_files: []
1526
+ ...