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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d821a5f79999239bb2350a3ab13b30b3c76e002
4
- data.tar.gz: b9466b1623251bf432c310d28e3136752de2c8fa
3
+ metadata.gz: 615ef0c044c0b061d63bfb1f38967c858ebdf06d
4
+ data.tar.gz: 68330f662a2f3e117645930ba0ac28cc2e0ea72c
5
5
  SHA512:
6
- metadata.gz: f5702d3ac8776901b5f47bc2dfeb5b2755b7a50b296d0184a8003c8c27c662f16eb74a3b3e4c099760228f042a3449ba8630debbe93d5eeaa28cda1236c8e1a3
7
- data.tar.gz: cba2accc31f58449f0eac9e4ccee20d1e82b9bf228809ddd9b47c2be21d697d64c924c0087c036a2b481c1f4aa2b5129b9bb11dfb1ed53502b128aeb7c06778d
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 (Unreleased)
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 DMG packaging functionality
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#{$ERROR_INFO}"
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}"
@@ -189,4 +189,7 @@ module Omnibus
189
189
  E
190
190
  end
191
191
  end
192
+
193
+ class UnresolvableGitReference < RuntimeError
194
+ end
192
195
  end
@@ -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
- fail 'Could not parse SHA reference' unless commit_ref
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
- raise
177
+ fail
165
178
  else
166
179
  # Deal with github failing all the time :(
167
180
  time_to_sleep = 5 * (2**retries)
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module Omnibus
19
- VERSION = '2.0.0.rc1'
19
+ VERSION = '2.0.0'
20
20
  end
@@ -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
- expect_any_instance_of(Omnibus::Fetcher::ErrorReporter).to receive(:explain)
89
- .with(%q|Failed to find any commits for the ref '0.0.1'|)
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(/Could not parse SHA reference/)
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.rc1
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-02-28 00:00:00.000000000 Z
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: 1.3.1
260
+ version: '0'
261
261
  requirements: []
262
262
  rubyforge_project:
263
- rubygems_version: 2.2.1
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.