vagrant-cookbook-fetcher 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +13 -0
- data/lib/vagrant_cookbook_fetcher.rb +13 -7
- metadata +8 -9
data/ChangeLog
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
2012-09-25 0.0.6 Clinton Wolfe <clintoncwolfe at gmail dot com>
|
3
|
+
|
4
|
+
* Add changelog
|
5
|
+
|
6
|
+
* Fix broken initial checkout bug introduced in 0.0.5 (Graham Knop)
|
7
|
+
|
8
|
+
2012-09-21 0.0.5 Clinton Wolfe <clintoncwolfe at gmail dot com>
|
9
|
+
|
10
|
+
* Add ability to specify a commit, not just a branch, in checkout lists (Graham Knop)
|
11
|
+
|
12
|
+
* Make databag combined symlinks properly descend one directory down (Clinton Wolfe)
|
13
|
+
|
@@ -96,11 +96,11 @@ class CookbookFetcher
|
|
96
96
|
unless system cmd then raise "Could not '#{cmd}'" end
|
97
97
|
cmd = "git fetch origin"
|
98
98
|
unless system cmd then raise "Could not '#{cmd}'" end
|
99
|
-
local_branch = `git rev-parse --verify --symbolic-full-name #{info[:branch]} 2> /dev/null
|
99
|
+
local_branch = `git rev-parse --verify --symbolic-full-name #{info[:branch]} 2> /dev/null`.rstrip
|
100
100
|
# no local branch
|
101
101
|
if ! $?.success? then
|
102
|
-
|
103
|
-
unless
|
102
|
+
cmd = "git rev-parse --verify -q --symbolic-full-name origin/#{info[:branch]}"
|
103
|
+
unless system cmd then raise "Could not find branch or commit #{info[:branch]}" end
|
104
104
|
cmd = "git checkout -b #{info[:branch]} origin/#{info[:branch]}"
|
105
105
|
unless system cmd then raise "Could not '#{cmd}'" end
|
106
106
|
# no branch
|
@@ -121,11 +121,17 @@ class CookbookFetcher
|
|
121
121
|
cmd = "git clone --no-checkout #{info[:repo]} #{info[:dir]}"
|
122
122
|
unless system cmd then raise "Could not '#{cmd}'" end
|
123
123
|
Dir.chdir(info[:dir]) do
|
124
|
-
|
124
|
+
cmd = "git rev-parse --verify -q origin/#{info[:branch]}"
|
125
125
|
# branch
|
126
|
-
if
|
127
|
-
|
128
|
-
|
126
|
+
if system cmd then
|
127
|
+
current_branch=`git symbolic-ref HEAD 2> /dev/null`.rstrip
|
128
|
+
if $?.success? && current_branch == "refs/heads/#{info[:branch]}" then
|
129
|
+
cmd = "git checkout #{info[:branch]}"
|
130
|
+
unless system cmd then raise "Could not '#{cmd}'" end
|
131
|
+
else
|
132
|
+
cmd = "git checkout -B #{info[:branch]} origin/#{info[:branch]}"
|
133
|
+
unless system cmd then raise "Could not '#{cmd}'" end
|
134
|
+
end
|
129
135
|
#commit
|
130
136
|
else
|
131
137
|
cmd = "git checkout #{info[:branch]}"
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-cookbook-fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
8
|
+
- 6
|
9
|
+
version: 0.0.6
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Clinton Wolfe
|
@@ -15,7 +14,8 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2012-09-
|
17
|
+
date: 2012-09-25 00:00:00 -04:00
|
18
|
+
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Whenever you run start, up, or provision, this plugin will dynamically fetch a list of checkouts from a URL; checkout each one; then create a combined roles directory, with symlinks.
|
@@ -27,10 +27,12 @@ extensions: []
|
|
27
27
|
extra_rdoc_files: []
|
28
28
|
|
29
29
|
files:
|
30
|
+
- ChangeLog
|
30
31
|
- LICENSE
|
31
32
|
- README.md
|
32
33
|
- lib/vagrant_init.rb
|
33
34
|
- lib/vagrant_cookbook_fetcher.rb
|
35
|
+
has_rdoc: true
|
34
36
|
homepage: https://github.com/clintoncwolfe/vagrant-cookbook-fetcher
|
35
37
|
licenses: []
|
36
38
|
|
@@ -44,7 +46,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
46
|
requirements:
|
45
47
|
- - ">="
|
46
48
|
- !ruby/object:Gem::Version
|
47
|
-
hash: 3
|
48
49
|
segments:
|
49
50
|
- 0
|
50
51
|
version: "0"
|
@@ -53,17 +54,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
54
|
requirements:
|
54
55
|
- - ">="
|
55
56
|
- !ruby/object:Gem::Version
|
56
|
-
hash: 3
|
57
57
|
segments:
|
58
58
|
- 0
|
59
59
|
version: "0"
|
60
60
|
requirements: []
|
61
61
|
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.7
|
63
|
+
rubygems_version: 1.3.7
|
64
64
|
signing_key:
|
65
65
|
specification_version: 3
|
66
66
|
summary: Fetch your Chef cookbooks whenever you provision
|
67
67
|
test_files: []
|
68
68
|
|
69
|
-
has_rdoc:
|