ruby_cms 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c51e2bcca3bdc826fa4876db0709f8e0528be4534f2b336d9349430f7286e6c
4
- data.tar.gz: 96028a6acf6db9942132779bd45de972ae73e67d105a64e5726f1135f3e6d4b7
3
+ metadata.gz: f44433fd9e94400ce208e14151bf0a79f79f35a4c03a9e52699fd83483ce735f
4
+ data.tar.gz: e99a049b39263d8cbfe4c1eaf05071652428401abd5fa1fec554c72286556dd5
5
5
  SHA512:
6
- metadata.gz: 5c4b45df852da2fb69cf5842643f9e520128dd383ba951023139abd69e354587f3b0cd2460e8fa28fe19ec18765a3f0bf056f8b4bfba77f491e7f54226010894
7
- data.tar.gz: 26ae563187beb44f6af36d3926b643b3c70dd8d4495537608febf4f4fb56196a6681eeb438dc8ed72c52dd122827d56d02cef9572796279985f492780d1e758b
6
+ metadata.gz: c3873c8aa83f4ff9beaf7d6f819a4e823a97518a4d68c7d15f3d9193204ab27b6f6b157944b7c8f2c1bcf7573709011598a2d025951a25e513e8f8a3ce50f1c1
7
+ data.tar.gz: 57a96a51c5e91ce0e8602cde488851e023e4d5966e90b7f021b046bd2db992538bdf669fee5c7fd12018c26514adb70d5a16c976e13a5d72858ee9cc6fc0b815
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.1] - 2026-06-29
4
+
5
+ ### Fixed
6
+
7
+ - Installer resolves the passkeys/webauthn vs `bitwarden-sdk-secrets` `WebAuthn` constant clash by patching the host Gemfile to load `bitwarden-sdk-secrets` with `require: false` (`GemSetup#resolve_conflicts!`)
8
+
3
9
  ## [1.0.0] - 2026-06-29
4
10
 
5
11
  First public release of the modular install-only admin scaffolding gem.
@@ -71,8 +71,37 @@ module RubyCms
71
71
  added
72
72
  end
73
73
 
74
+ # Patch known Gemfile declarations that break optional modules (e.g. passkeys +
75
+ # webauthn vs bitwarden-sdk-secrets both defining `WebAuthn`).
76
+ # Returns true when the Gemfile was modified.
77
+ def resolve_conflicts!(modules: [])
78
+ return false unless @gemfile.exist?
79
+ return false unless modules.any? { |mod| mod.key == :passkeys }
80
+
81
+ content = @gemfile.read
82
+ patched = patch_bitwarden_require_false(content)
83
+ return false if patched == content
84
+
85
+ @gemfile.write(patched)
86
+ true
87
+ end
88
+
74
89
  private
75
90
 
91
+ BITWARDEN_GEM_LINE = /
92
+ ^\s*gem\s+["']bitwarden-sdk-secrets["']
93
+ (?<opts>[^\n]*)
94
+ \n
95
+ /x
96
+
97
+ def patch_bitwarden_require_false(content)
98
+ content.gsub(BITWARDEN_GEM_LINE) do |line|
99
+ next line if line.match?(/require:\s*false/)
100
+
101
+ line.sub(/(\n)\z/, ", require: false\\1")
102
+ end
103
+ end
104
+
76
105
  def gem_present?(content, name)
77
106
  content.match?(/^\s*gem\s+["']#{Regexp.escape(name)}["']/)
78
107
  end
@@ -44,8 +44,13 @@ module RubyCms
44
44
 
45
45
  # Gems first: base + module gems on a fresh install; on `--add`, only the newly
46
46
  # selected modules' own gems (so e.g. adding passkeys pulls in webauthn).
47
- added = GemSetup.new(app_root: @app_root).ensure_gems!(modules: modules, include_base: framework_setup)
48
- run_critical("bundle install") if added.any?
47
+ gem_setup = GemSetup.new(app_root: @app_root)
48
+ added = gem_setup.ensure_gems!(modules: modules, include_base: framework_setup)
49
+ conflicts_patched = gem_setup.resolve_conflicts!(modules: modules)
50
+ if conflicts_patched
51
+ @shell.ok("bitwarden-sdk-secrets", hint: "set require: false (conflicts with webauthn passkeys)")
52
+ end
53
+ run_critical("bundle install") if added.any? || conflicts_patched
49
54
 
50
55
  # Framework scaffolding runs on the still-vanilla app, fresh install only, so the
51
56
  # Rails generators don't collide with (and interactively prompt about) gem files.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCms
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codebyjob