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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80c7a7ea911cf08c74bd57d47c5d29f2e3200b66
4
- data.tar.gz: f78bddae9c9776b3103c0c488447416ffc86cebf
3
+ metadata.gz: 65a139b027294e09563bf3d7f73a1b412b5c642c
4
+ data.tar.gz: 5923bb68d00d878c85d2dff63af29b91d772463e
5
5
  SHA512:
6
- metadata.gz: 41ca723a231269e4b5c67d715a8f9415ef15cbfadc3a45bdb84aa8540d4b8fd1784e9ffe63ca25f5edefb3c1745a64f3ef770b20f92c2a43058b29694a31fc23
7
- data.tar.gz: 355cb97d2e3d2c9aafcf09e423358c09883ab8c1ce06bb980777cb5cb4c0aadb8111fc3118985aa466bfe0434323d99d19d6faa2eae2f9cc676e592a1cb13ca8
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
- - **`reset_bundler_env`** (Boolean): Reset environment variables from your current Ruby bundle using `Bundler.clean_env`. Defaults to `true`.
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 :reset_bundler_env
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
- reset_bundler_env: true,
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.reset_bundler_env = options[:reset_bundler_env]
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] reset
48
- def reset_bundler_env=(reset)
49
- @reset_bundler_env = reset ? true : false
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 reset_bundler_env && Object.const_defined?('Bundler')
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
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-18 00:00:00.000000000 Z
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.6.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.