vagrant-triggers 0.4.2 → 0.4.3

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: 20f85521449cec74e8c6c0947943879e3464e031
4
- data.tar.gz: 60dd75ac51dd416be9c09262b612bc9499d65ef8
3
+ metadata.gz: 159436e13aaf71caaa81c3a6a00da3c0fa8c25fd
4
+ data.tar.gz: e5e506a5a8f1e906684f64be70caa4aef254baa8
5
5
  SHA512:
6
- metadata.gz: 8bb36d46e8cd09f65e8bb0f7e3eb74d1ac3d92857a0a3b9ce51fb3d1a2d2b9849573597b5f3cdf64b34c26c90f29c9b841e1b5e5fe9672f0764ebcd9a0c95630
7
- data.tar.gz: 448e39b6038ef926e3d95c3d1abe7d7927b3b5e86e8062ea0a7fbc61f33673eb46c8787668f7c41fb4b674fa1ed4c62b82eca9d0ff62741bc682054d513f6008
6
+ metadata.gz: 64e9a96d651fe687502f7e5b86990ae568d945402677651247a2343bf6892a31c56abc890466dbe7694be09ea4e2969aaf70bd9e0307330b3f627a34587aa7e2
7
+ data.tar.gz: fe8b7755b9580968d0ad0ffeab537f30a5a69b166d3bacc665ead3d21530948493909ff65691b34ab7a6f8ebdac1d0f33becb681e860c866d42544557278a506
data/.travis.yml CHANGED
@@ -4,6 +4,7 @@ rvm:
4
4
  before_install:
5
5
  - gem update --system
6
6
  - rvm @global do gem uninstall -ax bundler
7
+ - gem uninstall -ax bundler
7
8
  - gem install bundler -v 1.5.3
8
9
  env:
9
10
  - VAGRANT_VERSION=v1.6.5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.4.3 (November 26, 2014)
2
+
3
+ BUG FIXES:
4
+
5
+ - Passing strings to ```:vm``` option now works [(#30)](https://github.com/emyl/vagrant-triggers/issues/30)
6
+ - Use Bundler.with_clean_env to remove bundler artifacts from environment [(#25)](https://github.com/emyl/vagrant-triggers/issues/25)
7
+
1
8
  ## 0.4.2 (September 12, 2014)
2
9
 
3
10
  IMPROVEMENTS:
@@ -39,7 +39,7 @@ module VagrantPlugins
39
39
  if trigger[:options][:vm]
40
40
  match = false
41
41
  Array(trigger[:options][:vm]).each do |pattern|
42
- match = true if trigger_env[:vm].match(pattern)
42
+ match = true if trigger_env[:vm].match(Regexp.new(pattern))
43
43
  end
44
44
  next unless match
45
45
  end
@@ -21,8 +21,11 @@ module VagrantPlugins
21
21
  command = Shellwords.shellsplit(raw_command)
22
22
  env_backup = ENV.to_hash
23
23
  begin
24
- build_environment
25
- result = Vagrant::Util::Subprocess.execute(command[0], *command[1..-1])
24
+ result = nil
25
+ Bundler.with_clean_env do
26
+ build_environment
27
+ result = Vagrant::Util::Subprocess.execute(command[0], *command[1..-1])
28
+ end
26
29
  rescue Vagrant::Errors::CommandUnavailable, Vagrant::Errors::CommandUnavailableWindows
27
30
  raise Errors::CommandUnavailable, :command => command[0]
28
31
  ensure
@@ -72,10 +75,6 @@ module VagrantPlugins
72
75
  ENV["PATH"] = new_path
73
76
  @logger.debug("PATH modified: #{ENV["PATH"]}")
74
77
 
75
- # Remove bundler settings from RUBYOPT
76
- ENV["RUBYOPT"] = (ENV["RUBYOPT"] || "").gsub(/-rbundler\/setup\s*/, "")
77
- @logger.debug("RUBYOPT modified: #{ENV["RUBYOPT"]}")
78
-
79
78
  # Add the VAGRANT_NO_TRIGGERS variable to avoid loops
80
79
  ENV["VAGRANT_NO_TRIGGERS"] = "1"
81
80
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Triggers
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
@@ -72,7 +72,7 @@ describe VagrantPlugins::Triggers::Action::Trigger do
72
72
 
73
73
  context ":vm option" do
74
74
  before do
75
- machine.stub(:name).and_return("vm1")
75
+ machine.stub(:name).and_return(:vm1)
76
76
  end
77
77
 
78
78
  it "should fire trigger when :vm option match" do
@@ -122,7 +122,7 @@ describe VagrantPlugins::Triggers::DSL do
122
122
  end
123
123
  end
124
124
 
125
- ["GEM_HOME", "GEM_PATH", "GEMRC"].each do |env_var|
125
+ ["BUNDLE_BIN_PATH", "BUNDLE_GEMFILE", "GEM_PATH", "GEMRC"].each do |env_var|
126
126
  it "should not pass #{env_var} to the executed command" do
127
127
  Vagrant::Util::Subprocess.should_receive(:execute) do |command|
128
128
  expect(ENV).not_to have_key(env_var)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-triggers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Ticci
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-12 00:00:00.000000000 Z
11
+ date: 2014-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler