mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Add dictionary artifact
This commit is contained in:
parent
773d20fb0c
commit
0b176f9cc8
@ -2,6 +2,7 @@ require "hbc/artifact/app"
|
|||||||
require "hbc/artifact/artifact" # generic 'artifact' stanza
|
require "hbc/artifact/artifact" # generic 'artifact' stanza
|
||||||
require "hbc/artifact/binary"
|
require "hbc/artifact/binary"
|
||||||
require "hbc/artifact/colorpicker"
|
require "hbc/artifact/colorpicker"
|
||||||
|
require "hbc/artifact/dictionary"
|
||||||
require "hbc/artifact/font"
|
require "hbc/artifact/font"
|
||||||
require "hbc/artifact/input_method"
|
require "hbc/artifact/input_method"
|
||||||
require "hbc/artifact/installer"
|
require "hbc/artifact/installer"
|
||||||
@ -38,6 +39,7 @@ module Hbc
|
|||||||
Pkg,
|
Pkg,
|
||||||
Prefpane,
|
Prefpane,
|
||||||
Qlplugin,
|
Qlplugin,
|
||||||
|
Dictionary,
|
||||||
Font,
|
Font,
|
||||||
Service,
|
Service,
|
||||||
StageOnly,
|
StageOnly,
|
||||||
|
8
Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb
Normal file
8
Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
require "hbc/artifact/moved"
|
||||||
|
|
||||||
|
module Hbc
|
||||||
|
module Artifact
|
||||||
|
class Dictionary < Moved
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -54,6 +54,7 @@ module Hbc
|
|||||||
"--colorpickerdir=" => :colorpickerdir=,
|
"--colorpickerdir=" => :colorpickerdir=,
|
||||||
"--prefpanedir=" => :prefpanedir=,
|
"--prefpanedir=" => :prefpanedir=,
|
||||||
"--qlplugindir=" => :qlplugindir=,
|
"--qlplugindir=" => :qlplugindir=,
|
||||||
|
"--dictionarydir=" => :dictionarydir=,
|
||||||
"--fontdir=" => :fontdir=,
|
"--fontdir=" => :fontdir=,
|
||||||
"--servicedir=" => :servicedir=,
|
"--servicedir=" => :servicedir=,
|
||||||
"--input_methoddir=" => :input_methoddir=,
|
"--input_methoddir=" => :input_methoddir=,
|
||||||
|
@ -28,6 +28,7 @@ module Hbc
|
|||||||
:artifact,
|
:artifact,
|
||||||
:prefpane,
|
:prefpane,
|
||||||
:qlplugin,
|
:qlplugin,
|
||||||
|
:dictionary,
|
||||||
:font,
|
:font,
|
||||||
:service,
|
:service,
|
||||||
:colorpicker,
|
:colorpicker,
|
||||||
|
@ -24,6 +24,7 @@ module Hbc
|
|||||||
:audio_unit_plugin,
|
:audio_unit_plugin,
|
||||||
:binary,
|
:binary,
|
||||||
:colorpicker,
|
:colorpicker,
|
||||||
|
:dictionary,
|
||||||
:font,
|
:font,
|
||||||
:input_method,
|
:input_method,
|
||||||
:internet_plugin,
|
:internet_plugin,
|
||||||
|
@ -64,6 +64,12 @@ module Hbc
|
|||||||
@qlplugindir ||= Pathname.new("~/Library/QuickLook").expand_path
|
@qlplugindir ||= Pathname.new("~/Library/QuickLook").expand_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
attr_writer :dictionarydir
|
||||||
|
|
||||||
|
def dictionarydir
|
||||||
|
@dictionarydir ||= Pathname.new("~/Library/Dictionaries").expand_path
|
||||||
|
end
|
||||||
|
|
||||||
attr_writer :fontdir
|
attr_writer :fontdir
|
||||||
|
|
||||||
def fontdir
|
def fontdir
|
||||||
|
@ -57,6 +57,20 @@ describe Hbc::CLI do
|
|||||||
Hbc.colorpickerdir.must_equal Pathname("/some/path/bar")
|
Hbc.colorpickerdir.must_equal Pathname("/some/path/bar")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "supports setting the dictionarydir" do
|
||||||
|
Hbc::CLI.process_options %w[help --dictionarydir=/some/path/foo]
|
||||||
|
|
||||||
|
Hbc.dictionarydir.must_equal Pathname("/some/path/foo")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "supports setting the dictionarydir from ENV" do
|
||||||
|
ENV["HOMEBREW_CASK_OPTS"] = "--dictionarydir=/some/path/bar"
|
||||||
|
|
||||||
|
Hbc::CLI.process_options %w[help]
|
||||||
|
|
||||||
|
Hbc.dictionarydir.must_equal Pathname("/some/path/bar")
|
||||||
|
end
|
||||||
|
|
||||||
it "supports setting the fontdir" do
|
it "supports setting the fontdir" do
|
||||||
Hbc::CLI.process_options %w[help --fontdir=/some/path/foo]
|
Hbc::CLI.process_options %w[help --fontdir=/some/path/foo]
|
||||||
|
|
||||||
|
@ -155,6 +155,9 @@ in a future version.
|
|||||||
* `--qlplugindir=<path>`:
|
* `--qlplugindir=<path>`:
|
||||||
Target location for QuickLook Plugins. The default value is `~/Library/QuickLook`.
|
Target location for QuickLook Plugins. The default value is `~/Library/QuickLook`.
|
||||||
|
|
||||||
|
* `--dictionarydir=<path>`:
|
||||||
|
Target location for Dictionaries. The default value is `~/Library/Dictionaries`.
|
||||||
|
|
||||||
* `--fontdir=<path>`:
|
* `--fontdir=<path>`:
|
||||||
Target location for Fonts. The default value is `~/Library/Fonts`.
|
Target location for Fonts. The default value is `~/Library/Fonts`.
|
||||||
|
|
||||||
|
@ -169,6 +169,7 @@ _brew_cask()
|
|||||||
'--colorpickerdir=-:Target location for Color Pickers. The default value is ~/Library/ColorPickers.' \
|
'--colorpickerdir=-:Target location for Color Pickers. The default value is ~/Library/ColorPickers.' \
|
||||||
'--prefpanedir=-:Target location for Preference Panes. The default value is ~/Library/PreferencePanes.' \
|
'--prefpanedir=-:Target location for Preference Panes. The default value is ~/Library/PreferencePanes.' \
|
||||||
'--qlplugindir=-:Target location for QuickLook Plugins. The default value is ~/Library/QuickLook.' \
|
'--qlplugindir=-:Target location for QuickLook Plugins. The default value is ~/Library/QuickLook.' \
|
||||||
|
'--dictionarydir=-:Target location for Dictionaries. The default value is ~/Library/Dictionaries.' \
|
||||||
'--fontdir=-:Target location for Fonts. The default value is ~/Library/Fonts.' \
|
'--fontdir=-:Target location for Fonts. The default value is ~/Library/Fonts.' \
|
||||||
'--servicedir=-:Target location for Services. The default value is ~/Library/Services.' \
|
'--servicedir=-:Target location for Services. The default value is ~/Library/Services.' \
|
||||||
'--input_methoddir=-:Target location for Input Methods. The default value is ~/Library/Input Methods.' \
|
'--input_methoddir=-:Target location for Input Methods. The default value is ~/Library/Input Methods.' \
|
||||||
|
@ -162,6 +162,10 @@ Target location for Preference Panes\. The default value is \fB~/Library/Prefere
|
|||||||
Target location for QuickLook Plugins\. The default value is \fB~/Library/QuickLook\fR\.
|
Target location for QuickLook Plugins\. The default value is \fB~/Library/QuickLook\fR\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-dictionarydir=<path>\fR
|
||||||
|
Target location for Dictionaries\. The default value is \fB~/Library/Dictionaries\fR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fB\-\-fontdir=<path>\fR
|
\fB\-\-fontdir=<path>\fR
|
||||||
Target location for Fonts\. The default value is \fB~/Library/Fonts\fR\.
|
Target location for Fonts\. The default value is \fB~/Library/Fonts\fR\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user