vagrant-saltdeps 1.0.3 → 1.0.4

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: 9c3385ebff36389fd3b03ca93e2dc2558e8cc579
4
- data.tar.gz: 48075e3ee445f6747a45d40b1f46077386cca5f8
3
+ metadata.gz: a084e08cb862e706875409f3a247fd55b6145f61
4
+ data.tar.gz: 1fd41fb43515be16d54a97296d884ee5bd0dae47
5
5
  SHA512:
6
- metadata.gz: 9a899f21de185ea70d1360dcf37e211d999250b4c19d94a51dc3f4644cb2d9f052a449b9bdfd4b32cd5e059a5d29ddae26f7976dd56c0d25d420d73d4baf86d9
7
- data.tar.gz: 8183c8f4e318ff4dab188260f92d32986483440f144e26fc8d839bd22d2a50208b561afbb71d282264e2c6483be905627e7e0576969cfc83caa7bbe7220082e2
6
+ metadata.gz: add517692243b15c96a32e829ab2bb3c055233378f442edea940ebb3dd7c8b69d244b8dd869ac46bb959f7196027c518e8a9da6f479e3e16d07af9f22aee733f
7
+ data.tar.gz: e92e89b63f028237bfa101fd0d431b1a5f52629b3a68b2531f889f76d33b88515f15f82fdd5a59248a46910101372a169f05d1be050a97df0ef4b83a434663fb
data/.gitignore CHANGED
@@ -32,3 +32,6 @@ build/
32
32
 
33
33
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
34
  .rvmrc
35
+
36
+ .idea/
37
+ *.iml
data/CHANGLOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.0.4 (2015-04-03)
2
+
3
+ ErrorHandling:
4
+
5
+ - exit on error if the branch defined in saltdeps.yml does not exist in the repository.
6
+
7
+ ## 1.0.3 (2015-04-03)
8
+
9
+ Bugfixes:
10
+
11
+ - when a branch is defined for a repository in saltdeps.yml, do a checkout of the remote branch.
12
+
1
13
  ## 1.0.2 (2015-03-31)
2
14
 
3
15
  Bugfixes:
@@ -0,0 +1,12 @@
1
+
2
+
3
+ module VagrantPlugins
4
+ module Saltdeps
5
+ class GitCheckoutError < Vagrant::Errors::VagrantError
6
+ error_key "git_checkout_error"
7
+ end
8
+ class UnknownException < Vagrant::Errors::VagrantError
9
+ error_key "unknown_error"
10
+ end
11
+ end
12
+ end
@@ -3,7 +3,7 @@ require 'vagrant'
3
3
  require 'git'
4
4
  require 'fileutils'
5
5
  require "log4r"
6
-
6
+ require_relative 'errors'
7
7
 
8
8
  module VagrantPlugins
9
9
  module Saltdeps
@@ -40,8 +40,12 @@ module VagrantPlugins
40
40
  else
41
41
  g = Git.clone(uri, name, path: @checkout_path)
42
42
  end
43
- g.checkout(branch)
44
- g.pull
43
+ begin
44
+ g.checkout(branch)
45
+ g.pull
46
+ rescue Git::GitExecuteError => e
47
+ raise GitCheckoutError.new :branch => branch, :message => e.message
48
+ end
45
49
  end
46
50
  end
47
51
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Saltdeps
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
@@ -6,6 +6,6 @@ module VagrantPlugins
6
6
  def self.source_root
7
7
  @source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
8
8
  end
9
-
10
- end
9
+ I18n.load_path += Dir[File.expand_path("../../locales/*{rb,yml}", __FILE__)]
10
+ end
11
11
  end
data/locales/en.yml ADDED
@@ -0,0 +1,15 @@
1
+ en:
2
+ vagrant:
3
+ errors:
4
+ git_checkout_error: |-
5
+ Saltdeps experienced a git error checking out branch '%{branch}'.
6
+ Are you sure that branch defined in saltdeps.yml exists in the repository?
7
+
8
+ git returned:
9
+
10
+ %{message}
11
+
12
+ unknown_error: |-
13
+ Saldeps experienced an unknown error. The message was:
14
+
15
+ %{message}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-saltdeps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Hughes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-03 00:00:00.000000000 Z
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -83,9 +83,11 @@ files:
83
83
  - Rakefile
84
84
  - lib/vagrant-saltdeps.rb
85
85
  - lib/vagrant-saltdeps/config.rb
86
+ - lib/vagrant-saltdeps/errors.rb
86
87
  - lib/vagrant-saltdeps/plugin.rb
87
88
  - lib/vagrant-saltdeps/provisioner.rb
88
89
  - lib/vagrant-saltdeps/version.rb
90
+ - locales/en.yml
89
91
  - vagrant-saltdeps.gemspec
90
92
  homepage: https://github.com/joshughes/vagrant-Saltdeps
91
93
  licenses: