omnibus 2.0.0.rc1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/lib/omnibus/cli/application.rb +1 -1
- data/lib/omnibus/exceptions.rb +3 -0
- data/lib/omnibus/fetchers/git_fetcher.rb +15 -2
- data/lib/omnibus/version.rb +1 -1
- data/spec/fetchers/git_fetcher_spec.rb +9 -6
- metadata +29 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 615ef0c044c0b061d63bfb1f38967c858ebdf06d
|
4
|
+
data.tar.gz: 68330f662a2f3e117645930ba0ac28cc2e0ea72c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 564d392decbcb7449a32dc8670f59ca89c8d672e731e447e9e6b0fb34580976cbe564660723722ce70c5af61e379990ae2e73b4d6062e59966a486af57a9949b
|
7
|
+
data.tar.gz: d3fcf09a23440d44a7f77a1e0735814a81fe7522070232d55f0660590ac112da13719ebd6e1a44bc2f912e36dab9b35e95d9dc3d3393f61c6d3f5f8e3ca84f2c
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Omnibus Ruby CHANGELOG
|
2
2
|
======================
|
3
3
|
|
4
|
-
v2.0.0 (
|
5
|
-
|
4
|
+
v2.0.0 (March, 12, 2014)
|
5
|
+
------------------------
|
6
6
|
Major changes:
|
7
7
|
- `version` is now `default_version`
|
8
8
|
- Added support for multiple software versions and version overrides
|
9
9
|
- Added support for project-specific overrides
|
10
|
-
- Added Mac
|
10
|
+
- Added Mac .pkg packaging functionality (DMG coming soon)
|
11
11
|
- Require Mixlib::Config 2.0
|
12
12
|
|
13
13
|
Minor changes:
|
@@ -118,7 +118,7 @@ module Omnibus
|
|
118
118
|
super
|
119
119
|
rescue => e
|
120
120
|
error_msg = 'Something went wrong...the Omnibus just ran off the road!'
|
121
|
-
error_msg << "\n\nError raised was:\n\n\t#{
|
121
|
+
error_msg << "\n\nError raised was:\n\n\t#{e}"
|
122
122
|
error_msg << "\n\nBacktrace:\n\n\t#{e.backtrace.join("\n\t") }"
|
123
123
|
if e.respond_to?(:original) && e.original
|
124
124
|
error_msg << "\n\nOriginal Error:\n\n\t#{e.original}"
|
data/lib/omnibus/exceptions.rb
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
+
require 'omnibus/exceptions'
|
19
|
+
|
18
20
|
module Omnibus
|
19
21
|
# Fetcher implementation for projects in git.
|
20
22
|
class GitFetcher < Fetcher
|
@@ -156,12 +158,23 @@ E
|
|
156
158
|
shell.run_command
|
157
159
|
shell.error!
|
158
160
|
commit_ref = process_remote_list(shell.stdout, ref)
|
159
|
-
|
161
|
+
|
162
|
+
unless commit_ref
|
163
|
+
fail UnresolvableGitReference.new("Could not resolve `#{ref}' to a SHA.")
|
164
|
+
end
|
160
165
|
commit_ref
|
166
|
+
rescue UnresolvableGitReference => e # skip retries
|
167
|
+
ErrorReporter.new(e, self).explain(<<-E)
|
168
|
+
Command `#{cmd}' did not find a commit for reference `#{ref}'.
|
169
|
+
The tag or branch you're looking for doesn't exist on the remote repo.
|
170
|
+
If your project uses version tags like v1.2.3, include the 'v' in your
|
171
|
+
software's version.
|
172
|
+
E
|
173
|
+
raise
|
161
174
|
rescue Exception => e
|
162
175
|
if retries >= 3
|
163
176
|
ErrorReporter.new(e, self).explain("Failed to find any commits for the ref '#{ref}'")
|
164
|
-
|
177
|
+
fail
|
165
178
|
else
|
166
179
|
# Deal with github failing all the time :(
|
167
180
|
time_to_sleep = 5 * (2**retries)
|
data/lib/omnibus/version.rb
CHANGED
@@ -76,22 +76,25 @@ describe Omnibus::GitFetcher do
|
|
76
76
|
|
77
77
|
context 'when the ref does not exist' do
|
78
78
|
let(:git_ls_remote_out) { '' }
|
79
|
+
let(:error_reporter) { double('ErrorReporter', explain: nil) }
|
80
|
+
|
81
|
+
before { Omnibus::Fetcher::ErrorReporter.stub(:new).and_return(error_reporter) }
|
79
82
|
|
80
83
|
it 'should clone the Git repository and then fail while retrying 3 times' do
|
84
|
+
expect(error_reporter).to receive(:explain)
|
85
|
+
.with(%|Failed to fetch git repository 'git@example.com:test/project.git'|)
|
86
|
+
|
81
87
|
4.times do
|
82
88
|
expect_git_clone
|
83
|
-
4.times do
|
84
|
-
expect_git_ls_remote
|
85
|
-
end
|
86
89
|
end
|
87
90
|
|
88
|
-
|
89
|
-
|
91
|
+
expect_git_ls_remote
|
92
|
+
|
90
93
|
expect(subject).to receive(:log).with(/git ls\-remote failed/).at_least(1).times
|
91
94
|
expect(subject).to receive(:log).with(/git clone\/fetch failed/).at_least(1).times
|
92
95
|
# Prevent sleeping to run the spec fast
|
93
96
|
subject.stub(:sleep)
|
94
|
-
expect { subject.fetch }.to raise_error(
|
97
|
+
expect { subject.fetch }.to raise_error(Omnibus::UnresolvableGitReference)
|
95
98
|
end
|
96
99
|
end
|
97
100
|
end
|
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnibus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-config
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ohai
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '6.12'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '6.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: fpm
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.0.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: uber-s3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: thor
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.16.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.16.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '2.14'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.14'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0.18'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.18'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: bundler
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: Omnibus helps you build self-installing, full-stack software builds.
|
@@ -157,9 +157,9 @@ executables:
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
-
- .gitignore
|
161
|
-
- .rubocop.yml
|
162
|
-
- .travis.yml
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rubocop.yml"
|
162
|
+
- ".travis.yml"
|
163
163
|
- CHANGELOG.md
|
164
164
|
- Gemfile
|
165
165
|
- LICENSE
|
@@ -250,17 +250,17 @@ require_paths:
|
|
250
250
|
- lib
|
251
251
|
required_ruby_version: !ruby/object:Gem::Requirement
|
252
252
|
requirements:
|
253
|
-
- -
|
253
|
+
- - ">="
|
254
254
|
- !ruby/object:Gem::Version
|
255
255
|
version: 1.9.1
|
256
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
257
|
requirements:
|
258
|
-
- -
|
258
|
+
- - ">="
|
259
259
|
- !ruby/object:Gem::Version
|
260
|
-
version:
|
260
|
+
version: '0'
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.2.
|
263
|
+
rubygems_version: 2.2.2
|
264
264
|
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: Omnibus helps you build self-installing, full-stack software builds.
|