continue 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: 4ec3202831f2580e0637920a023eecf9f6933972
4
- data.tar.gz: db5e64bc2a6c2c621abc3497699b1e96aa02609a
3
+ metadata.gz: d86a9b6513f72556e4dc7edc98f555dedb795a66
4
+ data.tar.gz: 87ee3372b70da67680051577fd0d1d23a48f5925
5
5
  SHA512:
6
- metadata.gz: 6f125ed53eeed89f071fb8716e7506252b8f71f3cd2bbaef89b225b24371a66da0b368432cd7f372aad1a28f2914fa875aefe10393242d55974fc09435ffdb0d
7
- data.tar.gz: c45c452da1b2ff445f4829c623db19b695b07c4e61d5e0e6f75a21463ac4c1217f3cf801fa60ae5d9192c691cef6a58781b34054aad37d0cee8377d57a88eeb7
6
+ metadata.gz: ddac7aad0bfd4538a4ff5dca6a36f0e3338bd305b620f5823e49bd0722f5513dcae5b5a30b89e75d7bbf0c52b0cc9772bc6f0058b6a06f1929ef87720207358b
7
+ data.tar.gz: d42f9df3cb458ba818a30e4018cf397cf22d62107df564917d9159bf364141918d7edcdbb04749081a7310f9ea4e2a6e80dda82698e6253f8bcb5813c99fa24a
data/README.md CHANGED
@@ -1,15 +1,16 @@
1
+ [![Build Status](https://travis-ci.org/carld/continue.svg?branch=master)](https://travis-ci.org/carld/continue)
2
+
1
3
  # Continue
2
4
 
3
5
  This gem was created to help with situations where a chain or pipeline of
4
- commands are run. Where a command encounters an error, it can call an error proc
5
- and the remaining commands are not run.
6
+ commands are run. Where a command encounters an error it can prevent remaining commands from being run.
6
7
 
7
8
  For example,
8
9
 
9
10
  ```ruby
10
11
  Continue::Run [
11
- Continue::Command() {|err| err.call unless do_something_ok },
12
- Continue::Command() {|err| do_something_else }
12
+ Continue::Command() {|val| do_something_ok ? true : false },
13
+ Continue::Command() {|val| do_something_else; true }
13
14
  ]
14
15
  ```
15
16
 
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["105003+carld@users.noreply.github.com"]
11
11
 
12
12
  spec.summary = %q{A simple command chain}
13
- spec.description = %q{Invokes a list of lambdas, halting execution on error}
14
- spec.homepage = ""
13
+ spec.description = %q{Run a series of commands, preventing execution of remaining commands on a error}
14
+ spec.homepage = "https://github.com/carld/continue"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -15,7 +15,7 @@ module Continue
15
15
  end
16
16
 
17
17
  def self.Command(&block)
18
- ->(s,e,v) { block.call(e,v); s.call }
18
+ ->(s,e,v) { block.call(v) ? s.call : e.call }
19
19
  end
20
20
 
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Continue
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: continue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Douglas
@@ -52,7 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: Invokes a list of lambdas, halting execution on error
55
+ description: Run a series of commands, preventing execution of remaining commands
56
+ on a error
56
57
  email:
57
58
  - 105003+carld@users.noreply.github.com
58
59
  executables: []
@@ -72,7 +73,7 @@ files:
72
73
  - continue.gemspec
73
74
  - lib/continue.rb
74
75
  - lib/continue/version.rb
75
- homepage: ''
76
+ homepage: https://github.com/carld/continue
76
77
  licenses:
77
78
  - MIT
78
79
  metadata: {}
@@ -92,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  version: '0'
93
94
  requirements: []
94
95
  rubyforge_project:
95
- rubygems_version: 2.4.5.2
96
+ rubygems_version: 2.6.8
96
97
  signing_key:
97
98
  specification_version: 4
98
99
  summary: A simple command chain