aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb8
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb1
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb1
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl.rb1
-rw-r--r--Library/Homebrew/cask/lib/hbc/locations.rb6
-rw-r--r--Library/Homebrew/cask/test/cask/cli/options_test.rb14
-rw-r--r--Library/Homebrew/manpages/brew-cask.1.md3
-rw-r--r--completions/zsh/_brew_cask1
-rw-r--r--manpages/brew-cask.14
10 files changed, 41 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact.rb b/Library/Homebrew/cask/lib/hbc/artifact.rb
index ec808a614..8b4babdf6 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact.rb
@@ -2,6 +2,7 @@ require "hbc/artifact/app"
require "hbc/artifact/artifact" # generic 'artifact' stanza
require "hbc/artifact/binary"
require "hbc/artifact/colorpicker"
+require "hbc/artifact/dictionary"
require "hbc/artifact/font"
require "hbc/artifact/input_method"
require "hbc/artifact/installer"
@@ -38,6 +39,7 @@ module Hbc
Pkg,
Prefpane,
Qlplugin,
+ Dictionary,
Font,
Service,
StageOnly,
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb b/Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb
new file mode 100644
index 000000000..e017992f0
--- /dev/null
+++ b/Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb
@@ -0,0 +1,8 @@
+require "hbc/artifact/moved"
+
+module Hbc
+ module Artifact
+ class Dictionary < Moved
+ end
+ end
+end
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index 6249fbc7a..d062c6a7d 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -54,6 +54,7 @@ module Hbc
"--colorpickerdir=" => :colorpickerdir=,
"--prefpanedir=" => :prefpanedir=,
"--qlplugindir=" => :qlplugindir=,
+ "--dictionarydir=" => :dictionarydir=,
"--fontdir=" => :fontdir=,
"--servicedir=" => :servicedir=,
"--input_methoddir=" => :input_methoddir=,
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index dd802bc94..e5c04ee51 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -28,6 +28,7 @@ module Hbc
:artifact,
:prefpane,
:qlplugin,
+ :dictionary,
:font,
:service,
:colorpicker,
diff --git a/Library/Homebrew/cask/lib/hbc/dsl.rb b/Library/Homebrew/cask/lib/hbc/dsl.rb
index 1a8bbe3a0..c62873665 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl.rb
@@ -24,6 +24,7 @@ module Hbc
:audio_unit_plugin,
:binary,
:colorpicker,
+ :dictionary,
:font,
:input_method,
:internet_plugin,
diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb
index 40933911d..8f6c028ec 100644
--- a/Library/Homebrew/cask/lib/hbc/locations.rb
+++ b/Library/Homebrew/cask/lib/hbc/locations.rb
@@ -64,6 +64,12 @@ module Hbc
@qlplugindir ||= Pathname.new("~/Library/QuickLook").expand_path
end
+ attr_writer :dictionarydir
+
+ def dictionarydir
+ @dictionarydir ||= Pathname.new("~/Library/Dictionaries").expand_path
+ end
+
attr_writer :fontdir
def fontdir
diff --git a/Library/Homebrew/cask/test/cask/cli/options_test.rb b/Library/Homebrew/cask/test/cask/cli/options_test.rb
index 32bd2e2d7..d49e7827b 100644
--- a/Library/Homebrew/cask/test/cask/cli/options_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/options_test.rb
@@ -57,6 +57,20 @@ describe Hbc::CLI do
Hbc.colorpickerdir.must_equal Pathname("/some/path/bar")
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
Hbc::CLI.process_options %w[help --fontdir=/some/path/foo]
diff --git a/Library/Homebrew/manpages/brew-cask.1.md b/Library/Homebrew/manpages/brew-cask.1.md
index 244a98f3a..92c58ba29 100644
--- a/Library/Homebrew/manpages/brew-cask.1.md
+++ b/Library/Homebrew/manpages/brew-cask.1.md
@@ -155,6 +155,9 @@ in a future version.
* `--qlplugindir=<path>`:
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>`:
Target location for Fonts. The default value is `~/Library/Fonts`.
diff --git a/completions/zsh/_brew_cask b/completions/zsh/_brew_cask
index fb969ffe4..bb64a2e32 100644
--- a/completions/zsh/_brew_cask
+++ b/completions/zsh/_brew_cask
@@ -169,6 +169,7 @@ _brew_cask()
'--colorpickerdir=-:Target location for Color Pickers. The default value is ~/Library/ColorPickers.' \
'--prefpanedir=-:Target location for Preference Panes. The default value is ~/Library/PreferencePanes.' \
'--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.' \
'--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.' \
diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1
index 8b969221d..961b19007 100644
--- a/manpages/brew-cask.1
+++ b/manpages/brew-cask.1
@@ -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\.
.
.TP
+\fB\-\-dictionarydir=<path>\fR
+Target location for Dictionaries\. The default value is \fB~/Library/Dictionaries\fR\.
+.
+.TP
\fB\-\-fontdir=<path>\fR
Target location for Fonts\. The default value is \fB~/Library/Fonts\fR\.
.