Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for internet_plugin artifact #5923

Merged
merged 1 commit into from
Aug 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/CASK_LANGUAGE_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Each Cask must declare one or more *artifacts* (i.e. something to install)
| `colorpicker` | yes | relative path to a ColorPicker plugin that should be linked into the `~/Library/ColorPickers` folder on installation
| `font` | yes | relative path to a font that should be linked into the `~/Library/Fonts` folder on installation
| `input_method` | yes | relative path to a input method that should be linked into the `~/Library/Input Methods` folder on installation
| `internet_plugin` | yes | relative path to a service that should be linked into the `~/Library/Internet Plug-Ins` folder on installation
| `prefpane` | yes | relative path to a preference pane that should be linked into the `~/Library/PreferencePanes` folder on installation
| `qlplugin` | yes | relative path to a QuickLook plugin that should be linked into the `~/Library/QuickLook` folder on installation
| `screen_saver` | yes | relative path to a Screen Saver that should be linked into the `~/Library/Screen Savers` folder on installation
Expand Down
3 changes: 3 additions & 0 deletions doc/src/brew-cask.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ in a future version.
* `--input_methoddir=<path>`:
Target location for Input Method links. The default value is `~/Library/Input Methods`.

* `--internet_plugindir=<path>`:
Target location for Internet Plugin links. The default value is `~/Library/Internet Plug-Ins`.

* `--screen_saverdir=<path>`:
Target location for Screen Saver links. The default value is `~/Library/Screen Savers`.

Expand Down
2 changes: 2 additions & 0 deletions lib/cask/artifact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module Cask::Artifact; end
require 'cask/artifact/service'
require 'cask/artifact/caskroom_only'
require 'cask/artifact/input_method'
require 'cask/artifact/internet_plugin'
require 'cask/artifact/screen_saver'
require 'cask/artifact/uninstall'
require 'cask/artifact/zap'
Expand All @@ -45,6 +46,7 @@ def self.artifacts
Cask::Artifact::CaskroomOnly,
Cask::Artifact::Binary,
Cask::Artifact::InputMethod,
Cask::Artifact::InternetPlugin,
Cask::Artifact::ScreenSaver,
Cask::Artifact::Uninstall,
Cask::Artifact::AfterBlock,
Expand Down
3 changes: 3 additions & 0 deletions lib/cask/artifact/internet_plugin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Cask::Artifact::InternetPlugin < Cask::Artifact::Symlinked

end
3 changes: 3 additions & 0 deletions lib/cask/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ def self.parser
opts.on("--input_methoddir=MANDATORY") do |v|
Cask.input_methoddir = Pathname(v).expand_path
end
opts.on("--internet_plugindir=MANDATORY") do |v|
Cask.internet_plugindir = Pathname(v).expand_path
end
opts.on("--screen_saverdir=MANDATORY") do |v|
Cask.screen_saverdir = Pathname(v).expand_path
end
Expand Down
1 change: 1 addition & 0 deletions lib/cask/cli/internal_stanza.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Cask::CLI::InternalStanza < Cask::CLI::InternalUseBase
:colorpicker,
:binary,
:input_method,
:internet_plugin,
:screen_saver,
:install,
:caskroom_only,
Expand Down
1 change: 1 addition & 0 deletions lib/cask/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def self.ordinary_artifact_types
:colorpicker,
:binary,
:input_method,
:internet_plugin,
:screen_saver,
:install, # deprecated
:pkg,
Expand Down
8 changes: 8 additions & 0 deletions lib/cask/locations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ def input_methoddir=(_input_methoddir)
@input_methoddir = _input_methoddir
end

def internet_plugindir
@internet_plugindir ||= Pathname.new('~/Library/Internet Plug-Ins').expand_path
end

def internet_plugindir=(_internet_plugindir)
@internet_plugindir = _internet_plugindir
end

def screen_saverdir
@screen_saverdir ||= Pathname.new('~/Library/Screen Savers').expand_path
end
Expand Down