vagrant-git 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5e17344b41ec7ac951df5fffadd2351fc36e9929
4
+ data.tar.gz: b2fbc96bcdda145d0c0cac873c1b333799d3749c
5
+ SHA512:
6
+ metadata.gz: f5cbbc7b89d5f3e5218f172e4322ccfd7af42e069f10f78b2f7ce38530e41a2000fb2c6e7b01d42b8564ead989cf34fe93f70c28844ad0e27efad0182a90ac81
7
+ data.tar.gz: 7670ecef4748e60ace2c152bc357cd585137a2994ceb60fd99240255b8fca1376c706b0ba3228eddce94ad46ba7fb96448e10a9782dfd1b46e1c66e37d823e89
data/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gemspec
4
-
5
3
  group :development do
6
- gem "vagrant", :git => 'git://github.com/Learnosity/vagrant.git'
4
+ gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
5
+ end
6
+
7
+ group :plugins do
8
+ gem "vagrant-git", path: "."
7
9
  end
@@ -14,8 +14,10 @@ module VagrantPlugins
14
14
  @env = env
15
15
 
16
16
  @vm = env[:machine]
17
+ errors = {}
17
18
 
18
19
  @vm.config.git.to_hash[:repos].each do |rc|
20
+ errors[rc.path] = []
19
21
  if not rc.clone_in_host
20
22
  raise 'NotImplemented: clone_in_host=>false'
21
23
  end
@@ -27,24 +29,47 @@ module VagrantPlugins
27
29
  end
28
30
  else
29
31
  p = Git::clone(rc.target, rc.path, {:branch => rc.branch})
32
+
30
33
  if p.success? and rc.set_upstream
31
34
  @vm.ui.info("Clone done - setting upstream of #{rc.path} to #{rc.set_upstream}")
32
35
  if not Git::set_upstream(rc.path, rc.set_upstream).success?
33
- @vm.ui.error("WARNING: Failed to change upstream to #{rc.set_upstream} in #{rc.path}")
36
+ err = "Failed to change upstream to #{rc.set_upstream} in #{rc.path}"
37
+ errors[rc.path].push(err)
38
+ @vm.ui.error(err)
34
39
  end
35
40
  else !p.success?
36
- @vm.ui.error("WARNING: Failed to clone #{rc.target} into #{rc.path}")
41
+ err = "Failed to clone #{rc.target} into #{rc.path}"
42
+ errors[rc.path].push(err)
43
+ @vm.ui.error(err)
37
44
  end
45
+
38
46
  if File.exist? "#{rc.path}/.gitmodules"
39
47
  p = Git::submodule(rc.path)
40
48
  if p.success?
41
49
  @vm.ui.info("Checked out submodules.")
42
50
  else
43
- @vm.ui.error("WARNING: Failed to check out submodules for #{path}")
51
+ err ="WARNING: Failed to check out submodules for #{path}"
52
+ errors[rc.path].push(err)
53
+ @vm.ui.error(err)
44
54
  end
45
55
  end
46
56
  end
47
57
  end
58
+
59
+ # Reprint any errors
60
+ errors = errors.reject { |k, v| v.length == 0 }
61
+ if errors.length > 0
62
+ @vm.ui.error("WARNING: Encountered errors when cloning repos.")
63
+ errors.each do |repo, errs|
64
+ @vm.ui.error("-- #{repo} --")
65
+ errs.each do |e|
66
+ @vm.ui.error(e)
67
+ end
68
+ end
69
+ @vm.ui.error("If these were due to transient network issues, try again with:")
70
+ @vm.ui.error("\tvagrant halt")
71
+ @vm.ui.error("\tvagrant up")
72
+ end
48
73
  end
49
74
  end
50
75
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VagrantGit
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Daniel Bryan
@@ -10,38 +9,34 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-03-01 00:00:00.000000000 Z
12
+ date: 2014-07-14 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: bundler
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: 1.2.0
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: 1.2.0
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: vagrant
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ">="
37
33
  - !ruby/object:Gem::Version
38
34
  version: '1.2'
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
41
  version: '1.2'
47
42
  description: A vagrant plugin to allow checking out git repositories as part of vagrant
@@ -53,7 +48,7 @@ executables: []
53
48
  extensions: []
54
49
  extra_rdoc_files: []
55
50
  files:
56
- - .gitignore
51
+ - ".gitignore"
57
52
  - Gemfile
58
53
  - LICENSE
59
54
  - README.md
@@ -69,28 +64,24 @@ files:
69
64
  homepage: https://github.com/Learnosity/vagrant-git
70
65
  licenses:
71
66
  - MIT
67
+ metadata: {}
72
68
  post_install_message:
73
69
  rdoc_options: []
74
70
  require_paths:
75
71
  - lib
76
72
  required_ruby_version: !ruby/object:Gem::Requirement
77
- none: false
78
73
  requirements:
79
- - - ! '>='
74
+ - - ">="
80
75
  - !ruby/object:Gem::Version
81
76
  version: '0'
82
- segments:
83
- - 0
84
- hash: 824780673788769625
85
77
  required_rubygems_version: !ruby/object:Gem::Requirement
86
- none: false
87
78
  requirements:
88
- - - ! '>='
79
+ - - ">="
89
80
  - !ruby/object:Gem::Version
90
81
  version: '0'
91
82
  requirements: []
92
83
  rubyforge_project:
93
- rubygems_version: 1.8.23
84
+ rubygems_version: 2.2.2
94
85
  signing_key:
95
86
  specification_version: 2
96
87
  summary: A vagrant plugin to allow checking out git repositories as part of vagrant