komenda 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/komenda/process_builder.rb +7 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65a139b027294e09563bf3d7f73a1b412b5c642c
|
4
|
+
data.tar.gz: 5923bb68d00d878c85d2dff63af29b91d772463e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db2036b069b6e9ef3612241984ce32b186f9dbd4e0335818e55d610b8b4d452a41788171218574f6b73ffeacb6771afc51164527e827f4a04c5ce5a7f440cb1
|
7
|
+
data.tar.gz: ba890be61d9563a5acd4a1e285eda09f3a8e3788c2ecd18cf06a7c0e127ffcdf04b4734b518d252f1c3229b593a181cc220dde7df9204b2133f96970dcab2f44
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ result.output # => "hello"
|
|
32
32
|
|
33
33
|
The `run()` method has a second argument `options`, which accepts these optional keys:
|
34
34
|
- **`env`** (Hash): Additional environment variables to set.
|
35
|
-
- **`
|
35
|
+
- **`use_bundler_env`** (Boolean): Use the environment variable of the current [bundle](http://bundler.io/). Defaults to `false`.
|
36
36
|
- **`cwd`** (String): Directory to change to before running the process.
|
37
37
|
|
38
38
|
### Advanced usage
|
@@ -3,7 +3,7 @@ module Komenda
|
|
3
3
|
attr_reader :command
|
4
4
|
|
5
5
|
attr_reader :env
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :use_bundler_env
|
7
7
|
attr_reader :cwd
|
8
8
|
attr_reader :events
|
9
9
|
|
@@ -12,7 +12,7 @@ module Komenda
|
|
12
12
|
def initialize(command, options = {})
|
13
13
|
defaults = {
|
14
14
|
env: {},
|
15
|
-
|
15
|
+
use_bundler_env: false,
|
16
16
|
cwd: nil,
|
17
17
|
events: {}
|
18
18
|
}
|
@@ -20,7 +20,7 @@ module Komenda
|
|
20
20
|
|
21
21
|
self.command = command
|
22
22
|
self.env = options[:env]
|
23
|
-
self.
|
23
|
+
self.use_bundler_env = options[:use_bundler_env]
|
24
24
|
self.cwd = options[:cwd]
|
25
25
|
self.events = options[:events]
|
26
26
|
end
|
@@ -44,9 +44,9 @@ module Komenda
|
|
44
44
|
@env = Hash[env.to_hash.map { |k, v| [String(k), String(v)] }]
|
45
45
|
end
|
46
46
|
|
47
|
-
# @param [Boolean]
|
48
|
-
def
|
49
|
-
@
|
47
|
+
# @param [Boolean] use_bundler_env
|
48
|
+
def use_bundler_env=(use_bundler_env)
|
49
|
+
@use_bundler_env = use_bundler_env ? true : false
|
50
50
|
end
|
51
51
|
|
52
52
|
# @param [String] cwd
|
@@ -61,7 +61,7 @@ module Komenda
|
|
61
61
|
|
62
62
|
# @return [Hash]
|
63
63
|
def env_final
|
64
|
-
if
|
64
|
+
if !use_bundler_env && Object.const_defined?('Bundler')
|
65
65
|
env_original = bundler_clean_env
|
66
66
|
else
|
67
67
|
env_original = ENV.to_hash
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: komenda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: events
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.5.1
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Convenience wrapper around `Open3` to run shell commands in Ruby.
|