blob: f685f5e2c5fec9cfc0a0c6dd065f4fa712b3af0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
  | 
require 'formula'
class TestBall < Formula
  # name parameter required for some Formula::factory
  def initialize name=nil
    @homepage = 'http://example.com/'
    @stable ||= SoftwareSpec.new
    @stable.url "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
    super "testball"
  end
  def install
    prefix.install "bin"
    prefix.install "libexec"
  end
end
class TestBallWithRealPath < TestBall
  def initialize name=nil
    super "testballwithrealpath"
    @path = Pathname.new(__FILE__)
  end
end
class TestBallWithMirror < Formula
  url "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz"
  mirror "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
  def initialize name=nil
    super "testballwithmirror"
  end
end
class ConfigureFails < Formula
  # name parameter required for some Formula::factory
  url "file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz"
  version '1.0.0'
  sha1 'b36c65e5de86efef1b3a7e9cf78a98c186b400b3'
  def initialize name=nil
    super "configurefails"
  end
  def install
    system "./configure"
  end
end
class TestCompilerFailures < Formula
  def initialize name=nil
    @stable = SoftwareSpec.new "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
    super "compilerfailures"
  end
end
class TestAllCompilerFailures < TestCompilerFailures
  fails_with :clang
  fails_with :llvm
  fails_with :gcc
end
class TestNoCompilerFailures < TestCompilerFailures
  fails_with(:clang) { build 42 }
  fails_with(:llvm) { build 42 }
  fails_with(:gcc) { build 42 }
end
class TestLLVMFailure < TestCompilerFailures
  fails_with :llvm
end
class TestMixedCompilerFailures < TestCompilerFailures
  fails_with(:clang) { build MacOS.clang_build_version }
  fails_with(:llvm) { build 42 }
  fails_with(:gcc) { build 5666 }
end
class TestMoreMixedCompilerFailures < TestCompilerFailures
  fails_with(:clang) { build 42 }
  fails_with(:llvm) { build 2336 }
  fails_with(:gcc) { build 5666 }
end
class TestEvenMoreMixedCompilerFailures < TestCompilerFailures
  fails_with :clang
  fails_with(:llvm) { build 2336 }
  fails_with(:gcc) { build 5648 }
end
class TestBlockWithoutBuildCompilerFailure < TestCompilerFailures
  fails_with :clang do
    cause "failure"
  end
end
class SpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  mirror 'file:///foo.org/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  head 'https://github.com/mxcl/homebrew.git', :tag => 'foo'
  devel do
    url 'file:///foo.com/testball-0.2.tbz'
    mirror 'file:///foo.org/testball-0.2.tbz'
    sha256 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
  end
  bottle do
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard_32
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
    sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
    sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion
  end
  def initialize name=nil
    super "spectestball"
  end
end
class ExplicitVersionSpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-stable.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  version '0.3'
  devel do
    url 'file:///foo.com/testball-devel.tbz'
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
    version '0.4'
  end
  bottle do
    version '1'
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
    sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
    sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion
  end
  def initialize name=nil
    super "explicitversionspectestball"
  end
end
class HeadOnlySpecTestBall < Formula
  homepage 'http://example.com'
  head 'https://github.com/mxcl/homebrew.git'
  def initialize name=nil
    super "headyonlyspectestball"
  end
end
class IncompleteStableSpecTestBall < Formula
  homepage 'http://example.com'
  head 'https://github.com/mxcl/homebrew.git'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  def initialize name=nil
    super "incompletestablespectestball"
  end
end
class HeadOnlyWithVersionSpecTestBall < Formula
  homepage 'http://example.com'
  head 'https://github.com/mxcl/homebrew.git'
  version '0.3'
  def initialize name=nil
    super "headonlywithversionspectestball"
  end
end
class ExplicitStrategySpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-stable', :using => :hg, :tag => '0.2'
  head 'file:///foo.com/testball-head', :using => :svn
  devel do
    url 'file:///foo.com/testball-devel', :using => :bzr, :tag => '0.3'
  end
  def initialize name=nil
    super "explicitstrategyspectestball"
  end
end
class SnowLeopardBottleSpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  bottle do
    cellar :any
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
  end
  def initialize name=nil
    super "snowleopardbottlespectestball"
  end
end
class LionBottleSpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  bottle do
    cellar :any
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :lion
  end
  def initialize name=nil
    super "lionbottlespectestball"
  end
end
class AllCatsBottleSpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  bottle do
    prefix '/private/tmp/testbrew/prefix'
    cellar '/private/tmp/testbrew/cellar'
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard_32
    sha1 'faceb00cfaceb00cfaceb00cfaceb00cfaceb00c' => :snow_leopard
    sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
    sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion
  end
  def initialize name=nil
    super "allcatsbottlespectestball"
  end
end
class RevisedBottleSpecTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  bottle do
    revision 1
    sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard_32
    sha1 'faceb00cfaceb00cfaceb00cfaceb00cfaceb00c' => :snow_leopard
    sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
    sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion
  end
  def initialize name=nil
    super "revisedbottlespectestball"
  end
end
class CustomVersionScheme < Version
end
class CustomVersionSchemeTestBall < Formula
  homepage 'http://example.com'
  url 'file:///foo.com/testball-0.1.tbz'
  sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
  version '1.0' => CustomVersionScheme
  def initialize name=nil
    super "customversionschemetestball"
  end
end
  |