maglevcms 1.2.0 → 1.2.1

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: b23017be4bbbf4d06d99cf0f94ede1136e0e0ea343e0fbbef94edb6dc4d112d4
4
- data.tar.gz: b6e5d107a2ea7a18091ffdd084a3fed631d0726fe845e0ac0f7100f1fc3e2b60
3
+ metadata.gz: 9cf8c513d0eabb28620a1840c317be54a8f7df53ffe0e80af5a376a64a00d517
4
+ data.tar.gz: 01c55bf8aa7e8137e429a13aa4632f1214b2ba1e7e89dc8de962d4e344283678
5
5
  SHA512:
6
- metadata.gz: 1b579c11945ca3c28bb48f59d7efc0ea70a6d1608b7275cd507c3044cf30446bf3a342163ad9c468f0f3cf690386be137401e34f6426bbc016b4306af2d701ff
7
- data.tar.gz: d4257dfeb8ef1a210fc9147325e4cae5517c4a5f676b7c27637353573ee9c4ba315283edc4b0c97253d06b6327ba48b4fbf25199b4247f21913482b17f53777a
6
+ metadata.gz: 3dc2dbdffdb84d20cc8d3553554b62e1b028a44e685eaf8e3e1048eb62471aec2d68fd590173ade2031279ad33e760d0b46943b594cc6c78e7cbd4d7930d6e35
7
+ data.tar.gz: 1a9db5f6f77fecb91b374c15f51d514a324df6f1149f3b72ccac69f44ca1ad7cf178f9f2b84fb370ac4e735b9e0b0c4594f7c1956d90ddd666ea194804ead1a3
@@ -10,11 +10,10 @@ module Maglev
10
10
  private
11
11
 
12
12
  def maglev_authenticate
13
- username = maglev_config.admin_username
14
- password = maglev_config.admin_password
15
- return if !username || !password
13
+ return unless Maglev.config.admin_username.present? && Maglev.config.admin_password.present?
16
14
 
17
- redirect_to main_app.root_path unless authenticate_with_http_basic { |u, p| username == u && password == p }
15
+ http_basic_authenticate_or_request_with name: Maglev.config.admin_username,
16
+ password: Maglev.config.admin_password
18
17
  end
19
18
  end
20
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Maglev
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
@@ -74,8 +74,14 @@ namespace :maglev do
74
74
  desc 'Ensure build dependencies like Vite are installed before bundling'
75
75
  task install_dependencies: :environment do
76
76
  within_engine_folder do
77
+ install_dev_dependencies = ENV['VITE_RUBY_SKIP_INSTALL_DEV_DEPENDENCIES'] == 'true'
78
+ # rubocop:disable Style/StringHashKeys
79
+ install_env_args = install_dev_dependencies ? {} : { 'NODE_ENV' => 'development' }
80
+ # rubocop:enable Style/StringHashKeys
77
81
  cmd = Maglev::Engine.vite_ruby.commands.legacy_npm_version? ? 'npx ci --yes' : 'npx --yes ci'
78
- system({ 'NODE_ENV' => 'development' }, cmd)
82
+ result = system(install_env_args, cmd)
83
+ # Fallback to `yarn` if `npx` is not available.
84
+ system(install_env_args, 'yarn install --frozen-lockfile') if result.nil?
79
85
  end
80
86
  end
81
87
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maglevcms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-14 00:00:00.000000000 Z
11
+ date: 2023-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder