alchemy_cms 6.0.0.pre.rc2 → 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: aa6425ce6e3aa16df7d9df57ac4d098093cc6707f95856f4a7030204b82cb7b9
4
- data.tar.gz: ea96e420624ff64d60dccaa6e9e425354f85aa47e2a8602a20799414adf37096
3
+ metadata.gz: 21260eb0f68590cfe400b34ba5cbfe8d18551ed9fd2f6cc206bb5c7ed2aebb66
4
+ data.tar.gz: 870421eb1bbaf3c7b246de59379297f63f3719da3601e1ac07f8bb72877d6c0a
5
5
  SHA512:
6
- metadata.gz: 8842fb9afc57ca77301e7658c3b00ca96306d5de1eda7827ba114d8fa0501fb9d520416ba8e9d100b785c9555be4b0d8f277dde4b44124539c9a9dbe2756d0b7
7
- data.tar.gz: d18b971bd54abf71a988e78751ce104d6ba7ea8ad24fd809cdc44e7c4564c65b4f777971819ca7df14ab23162dfeeb5c0ab5936f58097139277fd72fb22567f2
6
+ metadata.gz: 8056e9a0e2cebea3069b47405f60339e4dbb1af55399323a32f7298976e918318ec7e790674a273d84825c0416c6658127dba68c5596562e0f8687bb9cbcd56e
7
+ data.tar.gz: 438ee71b5721ccf34a713a9c6469c5cc1a383a1dd75f7534348cb25b9ef9f9dd668e59821e7d3c087c1f3cc3d86fbf121d5e7b0c07905dfcb2f4cd431005f13d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
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
+
1
20
  ## 6.0.0-rc2 (2021-10-13)
2
21
 
3
22
  - Fix init link dialog if used in tinymce [#2200](https://github.com/AlchemyCMS/alchemy_cms/pull/2200) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -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/alchemy_cms.gemspec CHANGED
@@ -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"]
@@ -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
  }
@@ -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
@@ -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-rc2"
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-rc2",
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.rc2
4
+ version: 6.0.0.pre.rc3
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: 2021-10-13 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
@@ -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
@@ -1518,7 +1518,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1518
1518
  version: 1.3.1
1519
1519
  requirements:
1520
1520
  - ImageMagick (libmagick), v6.6 or greater.
1521
- rubygems_version: 3.2.28
1521
+ rubygems_version: 3.1.6
1522
1522
  signing_key:
1523
1523
  specification_version: 4
1524
1524
  summary: A powerful, userfriendly and flexible CMS for Rails