appear 1.2.0 → 1.2.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: 67b9aebb07fd1277e44209ecc142ce4266b2a614
4
- data.tar.gz: e234f31f3e772957cf50967eae4ceb633ee1951c
3
+ metadata.gz: 06f3377e33bf7264a25c75c3ceec4ce97bea846c
4
+ data.tar.gz: b62b27ac5b1b73bd78b320aa3ad0b20fc3f87c21
5
5
  SHA512:
6
- metadata.gz: 0caad8654c99c2d4b98fe759fb37ad8919443ce332d638af1459494f3614887336ecaf38550ba733bd4a85558c0672e479e2762d16dd1e0619c6b70d1d5ee2d7
7
- data.tar.gz: 3c98564f230a8a7271920b122d583628155411fa76c0e62b2a49efc9fa677b36b8c49f9ba4dcb30f1a2e6f75f65ed372ec08a7ee4521fa0ec87ef55d003274e0
6
+ metadata.gz: d65c29cc3207905923ccc4fdb1ca5612d0ee309404b021b7f071731605c8f31fc83d20c4cf39166c6df0c358262568c29d0147bec3cbe340a823c684deeb2a24
7
+ data.tar.gz: e26b8e290c6b94b5f8f1fb8a7590023d831c894b8276ac0b689cb07bc24cd7ef63e595d351781d8877746291cd7690b369a81df733e2bfe41feed70f3b2b7302
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1
4
+
5
+ - Override == method for CommandBuilder class to make it more test friendly.
6
+
3
7
  ## 1.2.0
4
8
 
5
9
  - new experimental feature: `appear --edit nvim FILES...` to edit files in Nvim inside Tmux
data/README.md CHANGED
@@ -36,7 +36,7 @@ Options:
36
36
 
37
37
  Exit status:
38
38
  0 if successfully revealed something,
39
- 1 if an exception occured,
39
+ 1 if an exception occurred,
40
40
  2 if there were no errors, but nothing was revealed.
41
41
  ```
42
42
 
@@ -55,7 +55,7 @@ module Appear
55
55
  o.separator ''
56
56
  o.separator 'Exit status:'
57
57
  o.separator ' 0 if successfully revealed something,'
58
- o.separator ' 1 if an exception occured,'
58
+ o.separator ' 1 if an exception occurred,'
59
59
  o.separator ' 2 if there were no errors, but nothing was revealed.'
60
60
  end
61
61
  end
@@ -2,7 +2,7 @@ require 'pathname'
2
2
 
3
3
  module Appear
4
4
  # the version of Appear
5
- VERSION = '1.2.0'
5
+ VERSION = '1.2.1'
6
6
 
7
7
  # root error for our library; all other errors inherit from this one.
8
8
  class Error < StandardError; end
@@ -22,7 +22,7 @@ module Appear
22
22
  #
23
23
  # I put this in my zshrc:
24
24
  # `export NVIM_LISTEN_ADDRESS="$HOME/.vim/sockets/vim-zsh-$$.sock"`
25
- # this opens a seperate nvim socket for each new Zsh shell. You'll still
25
+ # this opens a separate nvim socket for each new Zsh shell. You'll still
26
26
  # get nvims trying to open the same socket if you use ctrl-z and fg and
27
27
  # stuff to manage 'em, but overall this solves needing command a bunch of
28
28
  # different things.
@@ -23,7 +23,7 @@ module Appear
23
23
  # @param method_name [String, Symbol] check the source of macOS-helper.js for method names.
24
24
  # @param data [Any, nil] json-able data to pass to the named method.
25
25
  # @return [Any] json data returned from the helper
26
- # @raise [MacToolError] if an error occured
26
+ # @raise [MacToolError] if an error occurred
27
27
  def call_method(method_name, data = nil)
28
28
  command = [SCRIPT, method_name.to_s]
29
29
  command << data.to_json unless data.nil?
@@ -53,7 +53,7 @@ module Appear
53
53
  services.processes.pgrep(app_name).length > 0
54
54
  end
55
55
 
56
- # Enumerate the panes (seperate interactive sessions) that this terminal
56
+ # Enumerate the panes (separate interactive sessions) that this terminal
57
57
  # program has.
58
58
  #
59
59
  # @abstract subclasses must implement this method.
@@ -64,7 +64,7 @@ module Appear
64
64
  end
65
65
 
66
66
  # Add arguments to this command. Arguments always come after flags, and
67
- # may be seperated from flags with -- if you pass :dashdash_after_flags
67
+ # may be separated from flags with -- if you pass :dashdash_after_flags
68
68
  # option in the constructor.
69
69
  #
70
70
  # @param args [Array<#to_s>] args to add
@@ -132,6 +132,19 @@ module Appear
132
132
  self.class.new(@command.dup, opts)
133
133
  end
134
134
 
135
+ # Override the == method
136
+ def ==(other)
137
+ other.class == self.class && other.state == self.state
138
+ end
139
+
140
+ protected
141
+
142
+ # Return all the instance variables in an array. This method is used
143
+ # by the == method.
144
+ def state
145
+ self.instance_variables.map { |variable| self.instance_variable_get variable }
146
+ end
147
+
135
148
  private
136
149
 
137
150
  # @param flag [#to_s]
@@ -3,8 +3,8 @@ module Appear
3
3
  # Class for joining objects based on hash value or method value.
4
4
  # @see Join.join
5
5
  class Join
6
- # Join objects or hashes together where thier field values match. This
7
- # method is analogous to a JOIN in SQL, althought the behavior is not
6
+ # Join objects or hashes together where their field values match. This
7
+ # method is analogous to a JOIN in SQL, although the behavior is not
8
8
  # exactly the same.
9
9
  #
10
10
  # @example
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appear
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Teton-Landis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2017-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler