lite-commands 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82235a0ddfa9ee5215ac9893ebf3f2481fbe53a5614732fbd2480208ffd86473
4
- data.tar.gz: 2e8ec6a4f115ae7bee71381ac4f79f1908e8ea9048e175de3d3df976a69b58ac
3
+ metadata.gz: 2fc7d29d75673dbb7be77a000783c113010f0c452123eaa3437fef7249d38314
4
+ data.tar.gz: b78edae41c8c35303130271ac1e8e79798b2e8c01b9f8d9a6c37e6aaee088846
5
5
  SHA512:
6
- metadata.gz: 9fee64eb1c5df1aab5cee544a080973db262e06c9e529c0a1d56678e7a24d96e4286a17ee58c821266e3d39e90a3171604e3036bcef414a265b2ea2359fdb810
7
- data.tar.gz: 22c2b7c08df74710d7084ecf75a711d2c9da0a7265c441a7887d2067e45e9086fded1eb0e465a6971e55b4f01f86712f08c0a28e53af3cb5675109bb47784e1f
6
+ metadata.gz: a48bd23d4ff184f245a7c7da840fd23c6b6cf94cf721f1cf8163508fba542882e6a923918e4e799dd7b049a353096516f19d9fcae19bb7449a830e3da70522ad
7
+ data.tar.gz: 74daa10bed9ebba872e97bec2320bfc9ee6f1300131637b34103e4cac9e4e4b0b0cfd8a7f1584d132a0af9a1941fbe19a86e55c217498765bc05e6236d1a4dad
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2019-08-05
10
+ ### Added
11
+ - Added status method to errors mixin
12
+
9
13
  ## [1.0.1] - 2019-07-31
10
14
  ### Added
11
15
  - Added perform method to errors mixin
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-commands (1.0.1)
4
+ lite-commands (1.0.2)
5
5
  lite-errors
6
6
  lite-memoize
7
7
 
@@ -44,7 +44,7 @@ GEM
44
44
  unicode-display_width (>= 1.4.0, < 1.7)
45
45
  rubocop-performance (1.4.1)
46
46
  rubocop (>= 0.71.0)
47
- rubocop-rspec (1.34.1)
47
+ rubocop-rspec (1.35.0)
48
48
  rubocop (>= 0.60.0)
49
49
  ruby-progressbar (1.10.1)
50
50
  ruby_parser (3.13.1)
data/README.md CHANGED
@@ -137,6 +137,7 @@ commands.valid? #=> Alias for validate!
137
137
  commands.errored? #=> false
138
138
  commands.success? #=> true
139
139
  commands.failure? #=> Checks that it has been called and has errors
140
+ commands.status #=> :failure
140
141
 
141
142
  commands.result! #=> Raises Lite::Commands::ValidationError if it has any errors, if not it returns the result
142
143
  ```
@@ -48,6 +48,12 @@ module Lite
48
48
  result if valid?
49
49
  end
50
50
 
51
+ def status
52
+ return :pending unless called?
53
+
54
+ success? ? :success : :failure
55
+ end
56
+
51
57
  def success?
52
58
  called? && !errored?
53
59
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Commands
5
5
 
6
- VERSION ||= '1.0.1'
6
+ VERSION ||= '1.0.2'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-01 00:00:00.000000000 Z
11
+ date: 2019-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lite-errors