Module: DiscourseVoiceAssets
- Defined in:
- lib/discourse_voice_assets.rb,
lib/discourse_voice_assets/version.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- DIRECTORIES =
Asset directories served by the consuming plugin under its public javascripts dir. Each maps 1:1 to a directory under vendor/.
%w[dfn3 dtln livekit mediapipe rnnoise stt].freeze
- VERSION =
"0.1.0"
Class Method Summary collapse
- .gem_root ⇒ Object
-
.vendor_path(*segments) ⇒ Object
Absolute path to a vendored asset (or asset directory when called with no arguments beyond the directory name).
Class Method Details
.gem_root ⇒ Object
13 14 15 |
# File 'lib/discourse_voice_assets.rb', line 13 def self.gem_root @gem_root ||= File.("../..", __FILE__) end |
.vendor_path(*segments) ⇒ Object
Absolute path to a vendored asset (or asset directory when called with no arguments beyond the directory name). Filenames are stable across releases: the consuming plugin serves the tree from a URL stamped with this gem's version, so cache busting comes from version bumps.
21 22 23 |
# File 'lib/discourse_voice_assets.rb', line 21 def self.vendor_path(*segments) File.join(gem_root, "vendor", *segments) end |