itamae-plugin-resource-cask 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fd8f0e6681bc8914170c15863fdf1484c1a4491
4
- data.tar.gz: cffa00826da556e326847469f505d8292f38f484
3
+ metadata.gz: 001dd5d35bd9cd923aa7de96be736c96775531a7
4
+ data.tar.gz: a64b4e37838a19c975571e435236033cac68bfd6
5
5
  SHA512:
6
- metadata.gz: 5ee10dcb8866e211eee8858d336d9903516babcfb21175e3dff06a0e1554a9402858c259a927801983f15dd6a6a5ee9710be4c3537a4b319896737c0530ac3af
7
- data.tar.gz: 086c972167ea0aa22d205c7c94426ff27c4b633aeb8abbaf06f808b02b91fe767649746c35419d30b91485937828e6a2dd3df47c71b3c7c3c7ba8be59055ed97
6
+ metadata.gz: a85ea6ab04eca5b15fef4c17a2ded3e89fa55b5f320167a63462c23484a3560452ce6858db1e0c59af1a9b19eb49b6a3f20b008addbaaeb2b4772788636cb844
7
+ data.tar.gz: dc88b59c1d56d9a34fd005702388b281eec3d0f377bd1cc92bd7af52a4b66aa448303aae842e34d98abb4d4940eec02befa7fdd0139061dc8614ff27ee96e655
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "itamae-plugin-resource-cask"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.1.1"
8
8
  spec.authors = ["Takashi Kokubun"]
9
9
  spec.email = ["takashikkbn@gmail.com"]
10
10
  spec.summary = %q{Itamae resource plugin to manage homebrew cask packages.}
@@ -4,7 +4,7 @@ module Itamae
4
4
  module Plugin
5
5
  module Resource
6
6
  class Cask < Itamae::Resource::Base
7
- BREW = '/usr/local/bin/brew'
7
+ BREW_CASK = '/usr/local/bin/brew-cask'
8
8
 
9
9
  define_attribute :action, default: :install
10
10
  define_attribute :target, type: String, default_name: true
@@ -14,24 +14,24 @@ module Itamae
14
14
  super
15
15
  ensure_brew_cask_availability
16
16
 
17
- result = run_command("#{BREW} cask list | grep '#{attributes.target}$'", error: false)
17
+ result = run_command("#{BREW_CASK} list | grep '#{attributes.target}$'", error: false)
18
18
  current.exist = result.exit_status == 0
19
19
  end
20
20
 
21
21
  def action_install(options)
22
22
  unless current.exist
23
- run_command([BREW, "cask", "install", attributes.target])
23
+ run_command([BREW_CASK, "install", attributes.target])
24
24
  end
25
25
  end
26
26
 
27
27
  def action_alfred(options)
28
- run_command([BREW, "cask", "alfred", attributes.target])
28
+ run_command([BREW_CASK, "alfred", attributes.target])
29
29
  end
30
30
 
31
31
  private
32
32
 
33
33
  def ensure_brew_cask_availability
34
- if run_command("#{BREW} cask > /dev/null", error: false).exit_status != 0
34
+ if run_command("#{BREW_CASK} > /dev/null", error: false).exit_status != 0
35
35
  raise "`brew cask` command is not available. Please install brew cask."
36
36
  end
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-resource-cask
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun