serverkit-homebrew 0.0.2 → 0.0.3

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: 0ff09b6d9d4a03cbe54768d650c7fe55d7cdba05
4
- data.tar.gz: 61bde8f0a11c558298609c6a8e633da7ab781d6e
3
+ metadata.gz: d2bae282394e85dffefe7e797dd842ab3399cd41
4
+ data.tar.gz: 151ae1c7dca64c6ad10592989d05423642891a10
5
5
  SHA512:
6
- metadata.gz: c55717b3ef9aec0b9fc25053f4ce12d266bd05c9205234f5f228780c6df5f93857137252bf9847c177ea87c376eb047dde0f4e36a3a58e6d571d80b267231a98
7
- data.tar.gz: 7261fb4ebf27a819ae645640ac3039fa5711e824d9ede2fc978cfbc20f6ecc6310739e03ee3b6fa109cab19667083e679fc8a1c7b5f631cbad90cac976749b1d
6
+ metadata.gz: e3c334db0e4d37b7fd9de9d177e7fb6e9c0b26d2e5c0caf4aaf7178c9022c04eba431dddab0690e72ffcbd2922af777f4d7d883b6d878b64556c7486f4f29508
7
+ data.tar.gz: 91064a37421160a353a7c352d9af34c64d3b2e7482d9602ae53ee4c48a3942bdb52badd6c73b4c84ba702f4558d6064c488f60a3ec07c407abd0db9c75768ee6
@@ -1,3 +1,6 @@
1
+ ## 0.0.3
2
+ - Rename: status -> state
3
+
1
4
  ## 0.0.2
2
5
  - Support nested package name (e.g. caskroom/cask/brew-cask)
3
6
 
data/README.md CHANGED
@@ -1,7 +1,19 @@
1
- # Serverkit::Homebrew
1
+ # serverkit-homebrew
2
2
  [Serverkit](https://github.com/r7kamura/serverkit) plug-in for [Homebrew](http://brew.sh/).
3
3
 
4
- ## Installation
4
+ - [Installation](#installation)
5
+ - [Resource](#resource)
6
+ - [homebrew_package](#homebrew_package)
7
+ - [Attributes](#attributes)
8
+ - [Example](#example)
9
+ - [homebrew_cask_package](#homebrew_cask_package)
10
+ - [Attributes](#attributes-1)
11
+ - [Example](#example-1)
12
+ - [homebrew_tap](#homebrew_tap)
13
+ - [Attributes](#attributes-2)
14
+ - [Example](#example-2)
15
+
16
+ ## Install
5
17
  ```rb
6
18
  gem "serverkit-homebrew"
7
19
  ```
@@ -46,7 +58,7 @@ Make sure the specified GitHub repo is tapped (or untapped).
46
58
  #### Attributes
47
59
  - name - repository name (required)
48
60
  - options - command-line-options for `brew tap` and `brew untap`
49
- - status - pass `"untapped"` to make sure the repo is untapped
61
+ - state - pass `"untapped"` to make sure the repo is untapped
50
62
 
51
63
  #### Example
52
64
  ```yaml
@@ -55,5 +67,5 @@ resources:
55
67
  name: caskroom/cask
56
68
  - type: homebrew_tap
57
69
  name: homebrew/versions
58
- status: untapped
70
+ state: untapped
59
71
  ```
@@ -1,5 +1,5 @@
1
1
  module Serverkit
2
2
  module Homebrew
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ module Serverkit
4
4
  module Resources
5
5
  class HomebrewTap < Base
6
6
  attribute :name, required: true, type: String
7
- attribute :status, type: String, inclusion: { allow_nil: true, in: ["untapped"] }
7
+ attribute :state, type: String, inclusion: { allow_nil: true, in: ["untapped"] }
8
8
 
9
9
  # @note Override
10
10
  def apply
@@ -13,14 +13,14 @@ module Serverkit
13
13
 
14
14
  # @note Override
15
15
  def check
16
- has_untapped_status? ^ check_command("brew tap | grep -E '^#{name}$'")
16
+ has_untapped_state? ^ check_command("brew tap | grep -E '^#{name}$'")
17
17
  end
18
18
 
19
19
  private
20
20
 
21
21
  # @return [String]
22
22
  def applied_action_name
23
- if has_untapped_status?
23
+ if has_untapped_state?
24
24
  "untap"
25
25
  else
26
26
  "tap"
@@ -32,8 +32,8 @@ module Serverkit
32
32
  name
33
33
  end
34
34
 
35
- def has_untapped_status?
36
- status == "untapped"
35
+ def has_untapped_state?
36
+ state == "untapped"
37
37
  end
38
38
  end
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverkit-homebrew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura