alchemy_cms 6.1.2 → 6.1.3

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: f2f303fbee5eb7ba00c41042f4a2c435e345621eae81768d8c66f86dad04d23d
4
- data.tar.gz: e2ad0dfb05e0412676eb203c0ac7829d4945c8e8db879c8393748bb40089ce19
3
+ metadata.gz: 3f4631fa484db8a523e27e3200b1e1911b145d10dbd3dd2ff065f97b72dbf6d4
4
+ data.tar.gz: 5ccb79a30a2f55110e954b9a19632f2dd73862b202e237d46afc120f0cad45f1
5
5
  SHA512:
6
- metadata.gz: 1ec82e1628873bcfb3f1e16826087289ab1dcefe4bb98598ad320bce329c3f1481dc0df28fdbd0570a3fb79f6325de4a9eee510dd4dc6a981f3cc82565bd908b
7
- data.tar.gz: 10c17180fbff27a83a2c6f052c200a9723858dea973f547206c9ca094e46b18bdc7130f5914e006acd058296b6783b4adafa47bc2bad87fca29ca6774673a973
6
+ metadata.gz: 92bd96d81e63b05fbf655009f84d14c3007fd06fdee71331871ae53e28bfc28a457ac0942fd735671790ed10317421bac695418a45a52b004bb5d869ef2259c2
7
+ data.tar.gz: 1624a01a069cae4153859a9140df190e0de942ddcc739572b7c3efcd08c74242e326fba6a43fe89d97467a92cfeff838a7f505514f2f79d8d32b827d8125067a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.1.3 (2023-03-29)
4
+
5
+ - Fix installer: Add seeds file if not exists [#2446](https://github.com/AlchemyCMS/alchemy_cms/pull/2446) ([tvdeyen](https://github.com/tvdeyen))
6
+ - Integrate non_stupid_digest_assets gem [#2430](https://github.com/AlchemyCMS/alchemy_cms/pull/2430) ([afdev82](https://github.com/afdev82))
7
+
3
8
  ## 6.1.2 (2023-02-27)
4
9
 
5
10
  - [6.1] Fix thumbnail writing for multi-concurrent and multi-db setups [#2434](https://github.com/AlchemyCMS/alchemy_cms/pull/2434) ([tvdeyen](https://github.com/tvdeyen))
data/alchemy_cms.gemspec CHANGED
@@ -45,7 +45,6 @@ Gem::Specification.new do |gem|
45
45
  gem.add_runtime_dependency "jquery-ui-rails", ["~> 6.0"]
46
46
  gem.add_runtime_dependency "kaminari", ["~> 1.1"]
47
47
  gem.add_runtime_dependency "originator", ["~> 3.1"]
48
- gem.add_runtime_dependency "non-stupid-digest-assets", ["~> 1.0.8"]
49
48
  gem.add_runtime_dependency "ransack", [">= 1.8", "< 4.0"]
50
49
  gem.add_runtime_dependency "request_store", ["~> 1.2"]
51
50
  gem.add_runtime_dependency "responders", [">= 2.0", "< 4.0"]
@@ -31,7 +31,13 @@ module Alchemy
31
31
  end
32
32
 
33
33
  def inject_seeder
34
- append_file "./db/seeds.rb", "Alchemy::Seeder.seed!\n"
34
+ seed_file = Rails.root.join("db", "seeds.rb")
35
+ args = [seed_file, "Alchemy::Seeder.seed!\n"]
36
+ if File.exist?(seed_file)
37
+ append_file(*args)
38
+ else
39
+ add_file(*args)
40
+ end
35
41
  end
36
42
  end
37
43
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "6.1.2"
4
+ VERSION = "6.1.3"
5
5
 
6
6
  def self.version
7
7
  VERSION
data/lib/alchemy_cms.rb CHANGED
@@ -15,7 +15,7 @@ require "handlebars_assets"
15
15
  require "jquery-rails"
16
16
  require "jquery-ui-rails"
17
17
  require "kaminari"
18
- require "non-stupid-digest-assets"
18
+ require "non_stupid_digest_assets"
19
19
  require "ransack"
20
20
  require "request_store"
21
21
  require "responders"
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sprockets/manifest"
4
+ require "active_support/core_ext/module/attribute_accessors"
5
+
6
+ module NonStupidDigestAssets
7
+ mattr_accessor :whitelist
8
+ @@whitelist = []
9
+
10
+ class << self
11
+ def assets(assets)
12
+ return assets if whitelist.empty?
13
+
14
+ whitelisted_assets(assets)
15
+ end
16
+
17
+ private
18
+
19
+ def whitelisted_assets(assets)
20
+ assets.select do |logical_path, _digest_path|
21
+ whitelist.any? do |item|
22
+ item =~ logical_path
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+ module CompileWithNonDigest
29
+ def compile(*args)
30
+ paths = super
31
+ NonStupidDigestAssets.assets(assets).each do |(logical_path, digest_path)|
32
+ full_digest_path = File.join dir, digest_path
33
+ full_digest_gz_path = "#{full_digest_path}.gz"
34
+ full_non_digest_path = File.join dir, logical_path
35
+ full_non_digest_gz_path = "#{full_non_digest_path}.gz"
36
+
37
+ if File.exist? full_digest_path
38
+ logger.debug "Writing #{full_non_digest_path}"
39
+ FileUtils.copy_file full_digest_path, full_non_digest_path, :preserve_attributes
40
+ else
41
+ logger.debug "Could not find: #{full_digest_path}"
42
+ end
43
+ if File.exist? full_digest_gz_path
44
+ logger.debug "Writing #{full_non_digest_gz_path}"
45
+ FileUtils.copy_file full_digest_gz_path, full_non_digest_gz_path, :preserve_attributes
46
+ else
47
+ logger.debug "Could not find: #{full_digest_gz_path}"
48
+ end
49
+ end
50
+ paths
51
+ end
52
+ end
53
+ end
54
+
55
+ Sprockets::Manifest.prepend NonStupidDigestAssets::CompileWithNonDigest
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy_cms/admin",
3
- "version": "6.1.2",
3
+ "version": "6.1.3",
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.1.2
4
+ version: 6.1.3
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: 2023-02-27 00:00:00.000000000 Z
16
+ date: 2023-03-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -387,20 +387,6 @@ dependencies:
387
387
  - - "~>"
388
388
  - !ruby/object:Gem::Version
389
389
  version: '3.1'
390
- - !ruby/object:Gem::Dependency
391
- name: non-stupid-digest-assets
392
- requirement: !ruby/object:Gem::Requirement
393
- requirements:
394
- - - "~>"
395
- - !ruby/object:Gem::Version
396
- version: 1.0.8
397
- type: :runtime
398
- prerelease: false
399
- version_requirements: !ruby/object:Gem::Requirement
400
- requirements:
401
- - - "~>"
402
- - !ruby/object:Gem::Version
403
- version: 1.0.8
404
390
  - !ruby/object:Gem::Dependency
405
391
  name: ransack
406
392
  requirement: !ruby/object:Gem::Requirement
@@ -1432,6 +1418,7 @@ files:
1432
1418
  - lib/generators/alchemy/site_layouts/templates/layout.html.haml
1433
1419
  - lib/generators/alchemy/site_layouts/templates/layout.html.slim
1434
1420
  - lib/generators/alchemy/views/views_generator.rb
1421
+ - lib/non_stupid_digest_assets.rb
1435
1422
  - lib/tasks/alchemy/db.rake
1436
1423
  - lib/tasks/alchemy/install.rake
1437
1424
  - lib/tasks/alchemy/thumbnails.rake