coque 0.7.0 → 0.7.1

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: 7f24fa9416a64dc742a217e43ef53cbb6d6fc3b0
4
- data.tar.gz: 0bc4970fa99aeac4190fd30c4752a40a890ba96e
3
+ metadata.gz: 6df60f837355fa035e81e14eff31a1df0f462408
4
+ data.tar.gz: 5f044bde907269b17ee5279969f13a01840066aa
5
5
  SHA512:
6
- metadata.gz: e0029d5784e6afc64595e38461fbb44c7003d0782fe9bc78864c57289dda090a1e943dac0d134e26870f041274aad223563916bb0825cc3a8dfcee20e1c38fa6
7
- data.tar.gz: 2c6f2e2d665b75341081ac6d1cf7a924a41dcab2088da3d3c2d95096c8bfcda37a44bc3be4388fe588cd341a87f062a13147de506e8e1ff67900faea18d9a7fe
6
+ metadata.gz: 4b89af30708ef7db84f92238f1a50eefc1bbba04ff1726c746c5a39ba228cd768958e738cc39bb7e4cbca12b0575beb918ce95f4a4892b3f5bedcb5c27e310a9
7
+ data.tar.gz: 2b4c7d528d05b415704c1dd33090b2b1e0f70b673d9c8a726ec99d6fad5cfc8a71e915c785c972e1301d610ccd9bfe7fed168a4221847506034b932af9a19fc8
@@ -1,5 +1,4 @@
1
- sudo: false
2
1
  language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.16.1
2
+ before_install:
3
+ - gem update --system
4
+ - gem install bundler
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coque (0.6.0)
4
+ coque (0.7.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Coque
2
2
 
3
+ [![Build Status](https://travis-ci.org/worace/coque.svg?branch=master)](https://travis-ci.org/worace/coque)
4
+ [![Gem Version](https://badge.fury.io/rb/coque.svg)](https://badge.fury.io/rb/coque)
5
+
3
6
  Create, manage, and interop with shell pipelines from Ruby. Like [Plumbum](https://plumbum.readthedocs.io/en/latest/), for Ruby, with native (Ruby) code streaming integration.
4
7
 
5
8
  ## Installation
@@ -99,15 +102,6 @@ Coque also includes a `Coque.source` helper for feeding Ruby enumerables into sh
99
102
  # => ["500"]
100
103
  ```
101
104
 
102
- #### Logging
103
-
104
- You can set a logger for Coque, which will be used to output messages when commands are executed:
105
-
106
- ```rb
107
- Coque.logger = Logger.new(STDOUT)
108
- (Coque["echo", "hi"] | Coque["wc", "-c"]).run!
109
- ```
110
-
111
105
  #### Named (Non-Operator) Method Alternatives
112
106
 
113
107
  The main piping and redirection methods also include named alternatives:
@@ -125,6 +119,15 @@ So these 2 invocations are equivalent:
125
119
  Coque["echo", "hi"].pipe(Coque["wc", "-c"]).out(STDERR).run!
126
120
  ```
127
121
 
122
+ #### Logging
123
+
124
+ You can set a logger for Coque, which will be used to output messages when commands are executed:
125
+
126
+ ```rb
127
+ Coque.logger = Logger.new(STDOUT)
128
+ (Coque["echo", "hi"] | Coque["wc", "-c"]).run!
129
+ ```
130
+
128
131
  Will log:
129
132
 
130
133
  ```
@@ -16,17 +16,7 @@ module Coque
16
16
 
17
17
  def run
18
18
  log_start
19
- start_time = Time.now
20
- result = get_result
21
- end_time = Time.now
22
- log_end(end_time - start_time)
23
- result
24
- end
25
-
26
- def log_end(seconds)
27
- if Coque.logger
28
- Coque.logger.info("Coque Command: #{self.to_s} finished in #{seconds} seconds.")
29
- end
19
+ get_result
30
20
  end
31
21
 
32
22
  def log_start
@@ -1,3 +1,3 @@
1
1
  module Coque
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horace Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-21 00:00:00.000000000 Z
11
+ date: 2019-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.6.14.1
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Shell command utilities with easy integration with Ruby code.