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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/ruby_cms/gem_setup.rb +29 -0
- data/lib/ruby_cms/installer.rb +7 -2
- data/lib/ruby_cms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f44433fd9e94400ce208e14151bf0a79f79f35a4c03a9e52699fd83483ce735f
|
|
4
|
+
data.tar.gz: e99a049b39263d8cbfe4c1eaf05071652428401abd5fa1fec554c72286556dd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
data/lib/ruby_cms/gem_setup.rb
CHANGED
|
@@ -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
|
data/lib/ruby_cms/installer.rb
CHANGED
|
@@ -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
|
-
|
|
48
|
-
|
|
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.
|
data/lib/ruby_cms/version.rb
CHANGED