launchy 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +8 -1
- data/Manifest.txt +3 -16
- data/exe/launchy +5 -0
- data/launchy.gemspec +32 -0
- data/lib/launchy/application.rb +24 -21
- data/lib/launchy/applications/browser.rb +68 -63
- data/lib/launchy/argv.rb +11 -6
- data/lib/launchy/cli.rb +29 -29
- data/lib/launchy/descendant_tracker.rb +14 -12
- data/lib/launchy/detect/host_os.rb +21 -18
- data/lib/launchy/detect/host_os_family.rb +94 -53
- data/lib/launchy/detect/nix_desktop_environment.rb +74 -69
- data/lib/launchy/detect.rb +7 -3
- data/lib/launchy/error.rb +2 -0
- data/lib/launchy/os_family.rb +2 -0
- data/lib/launchy/runner.rb +25 -17
- data/lib/launchy/version.rb +7 -5
- data/lib/launchy.rb +69 -65
- metadata +10 -103
- data/Rakefile +0 -29
- data/bin/launchy +0 -4
- data/spec/application_spec.rb +0 -43
- data/spec/applications/browser_spec.rb +0 -73
- data/spec/cli_spec.rb +0 -74
- data/spec/detect/host_os_family_spec.rb +0 -42
- data/spec/detect/host_os_spec.rb +0 -19
- data/spec/detect/nix_desktop_environment_spec.rb +0 -27
- data/spec/launchy_spec.rb +0 -142
- data/spec/mock_application.rb +0 -13
- data/spec/spec_helper.rb +0 -8
- data/spec/tattle-host-os.yaml +0 -427
- data/spec/version_spec.rb +0 -11
- data/tasks/default.rake +0 -250
- data/tasks/this.rb +0 -208
- /data/{LICENSE → LICENSE.txt} +0 -0
data/spec/tattle-host-os.yaml
DELETED
@@ -1,427 +0,0 @@
|
|
1
|
-
# SOURCE: http://tattle.rubygarden.org
|
2
|
-
---
|
3
|
-
ruby_version:
|
4
|
-
1.8.4: 506
|
5
|
-
1.8.5: 842
|
6
|
-
1.8.6: 270
|
7
|
-
1.9.0: 1
|
8
|
-
1.8.1: 9
|
9
|
-
1.8.2: 36
|
10
|
-
host_vendor:
|
11
|
-
"": 1
|
12
|
-
mandrake: 1
|
13
|
-
sun: 18
|
14
|
-
apple: 619
|
15
|
-
mandriva: 1
|
16
|
-
slackware: 1
|
17
|
-
portbld: 27
|
18
|
-
pc: 858
|
19
|
-
ibm: 1
|
20
|
-
suse: 5
|
21
|
-
Apple Computer, Inc.: 13
|
22
|
-
Sun Microsystems Inc.: 6
|
23
|
-
unknown: 45
|
24
|
-
redhat: 70
|
25
|
-
ruby_install_name:
|
26
|
-
jruby.bat: 2
|
27
|
-
ruby185: 1
|
28
|
-
jruby: 17
|
29
|
-
ruby18: 175
|
30
|
-
ruby1.8: 222
|
31
|
-
ruby1.8.4: 1
|
32
|
-
ruby: 1248
|
33
|
-
build:
|
34
|
-
sparc-sun-solaris2.9: 8
|
35
|
-
i686-apple-darwin8.6.1: 81
|
36
|
-
i686-apple-darwin8.5.2: 11
|
37
|
-
java1.5: 3
|
38
|
-
i386-unknown-freebsd4.11: 1
|
39
|
-
powerpc-apple-darwin8.2.0: 3
|
40
|
-
i386-pc-solaris2.8: 2
|
41
|
-
x86_64-suse-linux-gnu: 2
|
42
|
-
x86_64-pc-linux-gnu: 89
|
43
|
-
i686-apple-darwin8.7.1: 31
|
44
|
-
i686-apple-darwin8.6.2: 15
|
45
|
-
java1.6: 6
|
46
|
-
i686-apple-darwin8.5.3: 4
|
47
|
-
i686-pc-mswin32: 375
|
48
|
-
i386-pc-linux-gnu: 2
|
49
|
-
i386-pc-linux: 3
|
50
|
-
powerpc-apple-darwin8.3.0: 3
|
51
|
-
i686-apple-darwin8.8.1: 140
|
52
|
-
i686-redhat-linux-gnu: 30
|
53
|
-
i686-apple-darwin8.7.2: 2
|
54
|
-
powerpc-apple-darwin8.4.0: 6
|
55
|
-
amd64-portbld-freebsd6: 2
|
56
|
-
i686-apple-darwin8.8.2: 53
|
57
|
-
i686-apple-darwin8.9.1: 27
|
58
|
-
i686-apple-darwin8.7.3: 3
|
59
|
-
x86_64-unknown-linux-gnu: 29
|
60
|
-
i686-suse-linux-gnu: 2
|
61
|
-
powerpc-apple-darwin8.10.0: 2
|
62
|
-
i686-apple-darwin8.8.3: 15
|
63
|
-
powerpc-apple-darwin7.9.0: 12
|
64
|
-
powerpc-apple-darwin8.5.0: 8
|
65
|
-
i386-mingw32: 1
|
66
|
-
i686-apple-darwin8.9.3: 1
|
67
|
-
i686-apple-darwin8.8.4: 5
|
68
|
-
x86_64-redhat-linux-gnu: 7
|
69
|
-
powerpc-apple-darwin8.6.0: 25
|
70
|
-
sparc-sun-solaris2.10: 7
|
71
|
-
i686-apple-darwin8.9.4: 3
|
72
|
-
i686-apple-darwin8.8.5: 3
|
73
|
-
powerpc-apple-darwin8.7.0: 39
|
74
|
-
powerpc-apple-darwin8.11.0: 1
|
75
|
-
powerpc-ibm-aix5.3.0.0: 1
|
76
|
-
powerpc-apple-darwin8.8.0: 53
|
77
|
-
i386-unknown-netbsdelf3.1.: 1
|
78
|
-
powerpc-unknown-linux-gnu: 3
|
79
|
-
powerpc-apple-darwin8.8.1: 1
|
80
|
-
i486-slackware-linux: 1
|
81
|
-
i386-pc-solaris2.10: 7
|
82
|
-
powerpc-apple-darwin8.9.0: 8
|
83
|
-
i686-pc-cygwin: 14
|
84
|
-
x86_64-unknown-openbsd4.0: 4
|
85
|
-
i686-pc-linux-gnu: 343
|
86
|
-
java: 8
|
87
|
-
i586-mandrake-linux-gnu: 1
|
88
|
-
i386-redhat-linux-gnu: 33
|
89
|
-
i686-apple-darwin9.0: 29
|
90
|
-
i586-mandriva-linux-gnu: 1
|
91
|
-
i386-portbld-freebsd5: 3
|
92
|
-
powerpc-apple-darwin8.0: 10
|
93
|
-
i386-unknown-freebsd6.0: 2
|
94
|
-
i486-pc-linux-gnu: 22
|
95
|
-
i686-suse-linux: 1
|
96
|
-
i686-apple-darwin: 1
|
97
|
-
i386-portbld-freebsd6: 20
|
98
|
-
powerpc-apple-darwin9.0: 5
|
99
|
-
i386-unknown-freebsd6.1: 1
|
100
|
-
x86_64-unknown-openbsd3.9: 1
|
101
|
-
i686-apple-darwin8.10.1: 13
|
102
|
-
i386-portbld-freebsd7: 2
|
103
|
-
i686-apple-darwin9.1.0: 1
|
104
|
-
i686-apple-darwin8.4.1: 1
|
105
|
-
i686-apple-darwin8.11.1: 2
|
106
|
-
powerpc64-unknown-linux-gnu: 2
|
107
|
-
i686-apple-darwin8.5.1: 1
|
108
|
-
i686-apple-darwin8.10.3: 1
|
109
|
-
java1.4: 2
|
110
|
-
sparc-sun-solaris2.8: 3
|
111
|
-
i386-unknown-openbsd4.0: 2
|
112
|
-
arch:
|
113
|
-
x86-java1.5: 1
|
114
|
-
i686-darwin8.8.1: 140
|
115
|
-
i686-darwin8.7.2: 2
|
116
|
-
i386-mswin32: 375
|
117
|
-
i686-darwin8.8.2: 53
|
118
|
-
i686-darwin8.9.1: 27
|
119
|
-
i686-darwin8.7.3: 3
|
120
|
-
x86-java1.6: 1
|
121
|
-
i686-darwin8.8.3: 15
|
122
|
-
i686-darwin8.9.3: 1
|
123
|
-
i686-darwin8.8.4: 5
|
124
|
-
amd64-freebsd6: 2
|
125
|
-
sparc-solaris2.8: 3
|
126
|
-
x86_64-openbsd4.0: 4
|
127
|
-
powerpc-aix5.3.0.0: 1
|
128
|
-
powerpc-darwin8.2.0: 3
|
129
|
-
sparc-solaris2.9: 8
|
130
|
-
i386-netbsdelf: 1
|
131
|
-
i386-mingw32: 1
|
132
|
-
powerpc-darwin8.3.0: 3
|
133
|
-
i686-darwin8.9.4: 3
|
134
|
-
i686-darwin8.8.5: 3
|
135
|
-
i386-linux-gnu: 8
|
136
|
-
powerpc-darwin8.10.0: 2
|
137
|
-
i586-linux-gnu: 2
|
138
|
-
powerpc-darwin8.4.0: 6
|
139
|
-
powerpc-darwin8.11.0: 1
|
140
|
-
powerpc-darwin8.5.0: 8
|
141
|
-
i386-freebsd5: 3
|
142
|
-
powerpc-darwin8.6.0: 25
|
143
|
-
i386-linux: 71
|
144
|
-
i386-freebsd6: 20
|
145
|
-
powerpc-darwin8.7.0: 39
|
146
|
-
i486-linux: 188
|
147
|
-
x86_64-linux: 127
|
148
|
-
i386-freebsd7: 2
|
149
|
-
powerpc-darwin8.8.0: 53
|
150
|
-
i586-linux: 3
|
151
|
-
java: 8
|
152
|
-
i386-freebsd4.11: 1
|
153
|
-
powerpc-darwin8.9.0: 8
|
154
|
-
powerpc-darwin8.8.1: 1
|
155
|
-
x86_64-openbsd3.9: 1
|
156
|
-
i686-darwin: 1
|
157
|
-
powerpc-darwin8.0: 7
|
158
|
-
sparc-solaris2.10: 7
|
159
|
-
universal-darwin8.0: 5
|
160
|
-
powerpc-linux: 3
|
161
|
-
i386-freebsd6.0: 2
|
162
|
-
powerpc64-linux: 2
|
163
|
-
universal-darwin9.0: 34
|
164
|
-
i386-cygwin: 14
|
165
|
-
powerpc-darwin7.9.0: 12
|
166
|
-
i386-freebsd6.1: 1
|
167
|
-
i386-solaris2.10: 7
|
168
|
-
i386-java1.5: 2
|
169
|
-
i386-openbsd4.0: 2
|
170
|
-
i686-darwin8.4.1: 1
|
171
|
-
i686-darwin8.10.1: 11
|
172
|
-
i386-solaris2.8: 2
|
173
|
-
i686-darwin9.1.0: 1
|
174
|
-
i686-darwin8.5.1: 1
|
175
|
-
i686-darwin8.11.1: 2
|
176
|
-
i386-java1.6: 7
|
177
|
-
i686-darwin8.6.1: 81
|
178
|
-
i686-darwin8.5.2: 11
|
179
|
-
i686-darwin8.10.3: 1
|
180
|
-
i686-linux: 167
|
181
|
-
i686-darwin8.7.1: 31
|
182
|
-
i686-darwin8.6.2: 15
|
183
|
-
i686-darwin8.5.3: 4
|
184
|
-
target_cpu:
|
185
|
-
x86: 2
|
186
|
-
powerpc64: 2
|
187
|
-
i686: 610
|
188
|
-
powerpc: 180
|
189
|
-
amd64: 2
|
190
|
-
x86_64: 132
|
191
|
-
i386: 527
|
192
|
-
i486: 188
|
193
|
-
i586: 5
|
194
|
-
sparc: 18
|
195
|
-
host_os:
|
196
|
-
freebsd6.1: 1
|
197
|
-
darwin8.11.1: 2
|
198
|
-
darwin8.5.3: 4
|
199
|
-
solaris2.9: 8
|
200
|
-
darwin7.9.0: 12
|
201
|
-
darwin8.6.2: 15
|
202
|
-
darwin8.7.1: 31
|
203
|
-
darwin8.8.0: 53
|
204
|
-
darwin8.10.3: 1
|
205
|
-
freebsd4.11: 1
|
206
|
-
darwin9.1.0: 1
|
207
|
-
darwin8.7.2: 2
|
208
|
-
darwin8.9.0: 8
|
209
|
-
darwin8.0: 10
|
210
|
-
darwin8.8.1: 141
|
211
|
-
darwin8.7.3: 3
|
212
|
-
linux: 9
|
213
|
-
darwin8.9.1: 27
|
214
|
-
darwin9.0: 34
|
215
|
-
darwin8.8.2: 53
|
216
|
-
openbsd3.9: 1
|
217
|
-
Windows XP: 2
|
218
|
-
cygwin: 14
|
219
|
-
darwin8.8.3: 15
|
220
|
-
darwin8.9.3: 1
|
221
|
-
darwin8.2.0: 3
|
222
|
-
darwin8.8.4: 5
|
223
|
-
darwin8.8.5: 3
|
224
|
-
darwin8.9.4: 3
|
225
|
-
darwin8.3.0: 3
|
226
|
-
openbsd4.0: 6
|
227
|
-
Mac OS X: 13
|
228
|
-
aix5.3.0.0: 1
|
229
|
-
darwin: 1
|
230
|
-
freebsd5: 3
|
231
|
-
darwin8.4.0: 6
|
232
|
-
darwin8.4.1: 1
|
233
|
-
darwin8.10.0: 2
|
234
|
-
darwin8.5.0: 8
|
235
|
-
freebsd6: 22
|
236
|
-
netbsdelf: 1
|
237
|
-
darwin8.5.1: 1
|
238
|
-
darwin8.11.0: 1
|
239
|
-
freebsd7: 2
|
240
|
-
darwin8.10.1: 13
|
241
|
-
darwin8.6.0: 25
|
242
|
-
freebsd6.0: 2
|
243
|
-
solaris2.8: 5
|
244
|
-
darwin8.5.2: 11
|
245
|
-
solaris2.10: 14
|
246
|
-
darwin8.7.0: 39
|
247
|
-
darwin8.6.1: 81
|
248
|
-
mswin32: 376
|
249
|
-
linux-gnu: 566
|
250
|
-
rubygems_version:
|
251
|
-
1.1.0: 11
|
252
|
-
0.9.3: 11
|
253
|
-
0.9.0.8: 16
|
254
|
-
1.0.1: 71
|
255
|
-
0.8.5: 2
|
256
|
-
0.8.10: 12
|
257
|
-
1.1.1: 16
|
258
|
-
0.9.0.9: 21
|
259
|
-
0.9.4: 95
|
260
|
-
0.9.5: 6
|
261
|
-
0.8.11: 235
|
262
|
-
0.9.4.7: 1
|
263
|
-
0.8.8: 1
|
264
|
-
0.9.0.10: 5
|
265
|
-
0.9.0: 912
|
266
|
-
0.9.1: 78
|
267
|
-
0.9.0.6: 5
|
268
|
-
0.9.2: 162
|
269
|
-
0.9.0.7: 2
|
270
|
-
1.0.0: 2
|
271
|
-
SHELL:
|
272
|
-
/bin/bash: 75
|
273
|
-
/bin/sh: 1212
|
274
|
-
$(COMSPEC): 375
|
275
|
-
cmd.exe: 2
|
276
|
-
/usr/local/bin/bash: 2
|
277
|
-
host_cpu:
|
278
|
-
powerpc64: 2
|
279
|
-
x86: 2
|
280
|
-
i686: 1208
|
281
|
-
powerpc: 180
|
282
|
-
amd64: 2
|
283
|
-
x86_64: 132
|
284
|
-
i386: 97
|
285
|
-
i486: 23
|
286
|
-
i586: 2
|
287
|
-
sparc: 18
|
288
|
-
LIBRUBY:
|
289
|
-
libruby.so.1.8.6: 9
|
290
|
-
libruby1.8.4.1.8.4.dylib: 1
|
291
|
-
libruby18.so.1.8.4: 3
|
292
|
-
libruby185-static.a: 1
|
293
|
-
libruby1.8.so.1.8.2: 7
|
294
|
-
libruby18.so.1.8.5: 127
|
295
|
-
libruby18.so.1.8.6: 17
|
296
|
-
libruby.1.8.5.dylib: 166
|
297
|
-
jruby: 8
|
298
|
-
libruby.1.8.6.dylib: 41
|
299
|
-
libruby.so.1.9.0: 1
|
300
|
-
libruby.so.1.8.1: 8
|
301
|
-
libruby1.8.so.1.8.4: 125
|
302
|
-
libruby.so.1.8.2: 1
|
303
|
-
libruby18.so.18.5: 1
|
304
|
-
libruby.so.1.84: 2
|
305
|
-
jruby.jar: 11
|
306
|
-
libruby1.8.so.1.8.5: 62
|
307
|
-
libmsvcrt-ruby18.dll.a: 1
|
308
|
-
libruby.so.1.85: 1
|
309
|
-
libruby1.8-static.a: 1
|
310
|
-
libruby.so.1: 4
|
311
|
-
libruby.1.8.2.dylib: 5
|
312
|
-
libruby1.8.so.1.8.6: 26
|
313
|
-
libruby.dll.a: 14
|
314
|
-
libruby.so.1.8.4: 15
|
315
|
-
libruby.1.dylib: 43
|
316
|
-
libruby-static.a: 454
|
317
|
-
libruby.1.8.4.dylib: 50
|
318
|
-
libruby.so.1.8.5: 59
|
319
|
-
msvcrt-ruby18.lib: 375
|
320
|
-
libruby18.so.18: 27
|
321
|
-
LIBRUBY_SO:
|
322
|
-
libruby.so.1.8.6: 47
|
323
|
-
libruby1.8.4.1.8.4.dylib: 1
|
324
|
-
libruby18.so.1.8.4: 3
|
325
|
-
libruby1.8.so.1.8.2: 7
|
326
|
-
libruby18.so.1.8.5: 127
|
327
|
-
libruby18.so.1.8.6: 17
|
328
|
-
libruby.1.8.5.dylib: 166
|
329
|
-
jruby: 8
|
330
|
-
libruby.1.8.6.dylib: 41
|
331
|
-
libruby.so.1.9.0: 1
|
332
|
-
libruby.so.1.8.1: 9
|
333
|
-
libruby1.8.so.1.8.4: 125
|
334
|
-
libruby18.so.18.5: 1
|
335
|
-
libruby.so.1.84: 2
|
336
|
-
libruby.so.1.8.2: 3
|
337
|
-
jruby.jar: 11
|
338
|
-
libruby1.8.so.1.8.5: 63
|
339
|
-
libruby.so.1.85: 1
|
340
|
-
libruby.so.1: 4
|
341
|
-
libruby.1.8.2.dylib: 5
|
342
|
-
libruby1.8.so.1.8.6: 26
|
343
|
-
libruby185.so.1.8.5: 1
|
344
|
-
cygruby18.dll: 14
|
345
|
-
libruby.1.dylib: 43
|
346
|
-
libruby.so.1.8.4: 253
|
347
|
-
msvcrt-ruby18.dll: 376
|
348
|
-
libruby.1.8.4.dylib: 50
|
349
|
-
libruby.so.1.8.5: 234
|
350
|
-
libruby18.so.18: 27
|
351
|
-
target:
|
352
|
-
sparc-sun-solaris2.9: 8
|
353
|
-
i686-apple-darwin8.6.1: 81
|
354
|
-
i686-apple-darwin8.5.2: 11
|
355
|
-
i386--netbsdelf: 1
|
356
|
-
powerpc-apple-darwin8.2.0: 3
|
357
|
-
i386-unknown-freebsd4.11: 1
|
358
|
-
i386-pc-solaris2.8: 2
|
359
|
-
x86_64-pc-linux-gnu: 105
|
360
|
-
i686-apple-darwin8.7.1: 31
|
361
|
-
i686-apple-darwin8.6.2: 15
|
362
|
-
i686-apple-darwin8.5.3: 4
|
363
|
-
x86_64-suse-linux: 2
|
364
|
-
i386-pc-linux-gnu: 2
|
365
|
-
i386-pc-linux: 15
|
366
|
-
powerpc-apple-darwin8.3.0: 3
|
367
|
-
i686-apple-darwin8.8.1: 140
|
368
|
-
i686-apple-darwin8.7.2: 2
|
369
|
-
powerpc-apple-darwin8.4.0: 6
|
370
|
-
amd64-portbld-freebsd6: 2
|
371
|
-
i686-apple-darwin8.8.2: 53
|
372
|
-
i686-apple-darwin8.9.1: 27
|
373
|
-
i686-apple-darwin8.7.3: 3
|
374
|
-
x86_64-unknown-linux-gnu: 13
|
375
|
-
powerpc-apple-darwin8.10.0: 2
|
376
|
-
i686-apple-darwin8.8.3: 15
|
377
|
-
powerpc-apple-darwin7.9.0: 12
|
378
|
-
powerpc-apple-darwin8.5.0: 8
|
379
|
-
i386-mingw32: 1
|
380
|
-
i686-apple-darwin8.9.3: 1
|
381
|
-
i586-suse-linux: 3
|
382
|
-
i686-apple-darwin8.8.4: 5
|
383
|
-
x86_64-redhat-linux-gnu: 7
|
384
|
-
powerpc-apple-darwin8.6.0: 25
|
385
|
-
powerpc-apple-darwin8.11.0: 1
|
386
|
-
sparc-sun-solaris2.10: 7
|
387
|
-
i686-apple-darwin8.9.4: 3
|
388
|
-
i686-apple-darwin8.8.5: 3
|
389
|
-
powerpc-apple-darwin8.7.0: 39
|
390
|
-
powerpc-ibm-aix5.3.0.0: 1
|
391
|
-
i386-redhat-linux: 1
|
392
|
-
powerpc-apple-darwin8.8.0: 53
|
393
|
-
powerpc-unknown-linux-gnu: 3
|
394
|
-
i486-slackware-linux: 1
|
395
|
-
i386-pc-solaris2.10: 7
|
396
|
-
powerpc-apple-darwin8.9.0: 8
|
397
|
-
powerpc-apple-darwin8.8.1: 1
|
398
|
-
i686-pc-cygwin: 14
|
399
|
-
x86_64-unknown-openbsd4.0: 4
|
400
|
-
i686-pc-linux-gnu: 166
|
401
|
-
java: 8
|
402
|
-
i586-mandrake-linux-gnu: 1
|
403
|
-
i386-redhat-linux-gnu: 61
|
404
|
-
i586-mandriva-linux-gnu: 1
|
405
|
-
i686-apple-darwin9.0: 29
|
406
|
-
i386-portbld-freebsd5: 3
|
407
|
-
powerpc-apple-darwin8.0: 10
|
408
|
-
i386-unknown-freebsd6.0: 2
|
409
|
-
i486-pc-linux-gnu: 187
|
410
|
-
i686-apple-darwin: 1
|
411
|
-
i386-portbld-freebsd6: 20
|
412
|
-
powerpc-apple-darwin9.0: 5
|
413
|
-
i386-unknown-freebsd6.1: 1
|
414
|
-
x86_64-unknown-openbsd3.9: 1
|
415
|
-
i686-redhat-linux: 1
|
416
|
-
i686-apple-darwin8.10.1: 13
|
417
|
-
i386-portbld-freebsd7: 2
|
418
|
-
i686-apple-darwin9.1.0: 1
|
419
|
-
i686-apple-darwin8.4.1: 1
|
420
|
-
i686-apple-darwin8.11.1: 2
|
421
|
-
powerpc64-unknown-linux-gnu: 2
|
422
|
-
i386-pc-mswin32: 375
|
423
|
-
i686-apple-darwin8.5.1: 1
|
424
|
-
java1.4: 11
|
425
|
-
sparc-sun-solaris2.8: 3
|
426
|
-
i386-unknown-openbsd4.0: 2
|
427
|
-
i686-apple-darwin8.10.3: 1
|
data/spec/version_spec.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe 'Launchy::VERSION' do
|
4
|
-
it "should have a #.#.# format" do
|
5
|
-
_(Launchy::VERSION).must_match( /\d+\.\d+\.\d+/ )
|
6
|
-
_(Launchy::Version.to_s).must_match( /\d+\.\d+\.\d+/ )
|
7
|
-
Launchy::Version.to_a.each do |n|
|
8
|
-
_(n.to_i).must_be :>=, 0
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
data/tasks/default.rake
DELETED
@@ -1,250 +0,0 @@
|
|
1
|
-
# vim: syntax=ruby
|
2
|
-
require 'rake/clean'
|
3
|
-
require 'digest'
|
4
|
-
#------------------------------------------------------------------------------
|
5
|
-
# If you want to Develop on this project just run 'rake develop' and you'll
|
6
|
-
# have all you need to get going. If you want to use bundler for development,
|
7
|
-
# then run 'rake develop:using_bundler'
|
8
|
-
#------------------------------------------------------------------------------
|
9
|
-
namespace :develop do
|
10
|
-
|
11
|
-
# Install all the development and runtime dependencies of this gem using the
|
12
|
-
# gemspec.
|
13
|
-
task :default => 'Gemfile' do
|
14
|
-
require 'rubygems/dependency_installer'
|
15
|
-
installer = ::Gem::DependencyInstaller.new
|
16
|
-
puts "Installing bundler..."
|
17
|
-
installer.install 'bundler'
|
18
|
-
sh 'bundle install'
|
19
|
-
puts "\n\nNow run 'rake test'"
|
20
|
-
end
|
21
|
-
|
22
|
-
# Create a Gemfile that just references the gemspec
|
23
|
-
file 'Gemfile' => :gemspec do
|
24
|
-
File.open( "Gemfile", "w+" ) do |f|
|
25
|
-
f.puts "# DO NOT EDIT - This file is automatically generated"
|
26
|
-
f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
|
27
|
-
f.puts 'source "https://rubygems.org"'
|
28
|
-
f.puts 'gemspec'
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
desc "Bootstrap development"
|
33
|
-
task :develop => "develop:default"
|
34
|
-
|
35
|
-
#------------------------------------------------------------------------------
|
36
|
-
# Minitest - standard TestTask
|
37
|
-
#------------------------------------------------------------------------------
|
38
|
-
begin
|
39
|
-
require 'minitest/test_task'
|
40
|
-
Minitest::TestTask.create( :test) do |t|
|
41
|
-
t.libs << "lib"
|
42
|
-
t.libs << "spec"
|
43
|
-
t.libs << "test"
|
44
|
-
t.warning = true
|
45
|
-
t.test_globs = "{test,spec}/**/{test_*,*_spec}.rb"
|
46
|
-
end
|
47
|
-
|
48
|
-
task :test_requirements
|
49
|
-
task :test => :test_requirements
|
50
|
-
task :default => :test
|
51
|
-
rescue LoadError
|
52
|
-
This.task_warning( 'test' )
|
53
|
-
end
|
54
|
-
|
55
|
-
#------------------------------------------------------------------------------
|
56
|
-
# RDoc - standard rdoc rake task, although we must make sure to use a more
|
57
|
-
# recent version of rdoc since it is the one that has 'tomdoc' markup
|
58
|
-
#------------------------------------------------------------------------------
|
59
|
-
begin
|
60
|
-
gem 'rdoc' # otherwise we get the wrong task from stdlib
|
61
|
-
require 'rdoc/task'
|
62
|
-
RDoc::Task.new do |t|
|
63
|
-
t.markup = 'tomdoc'
|
64
|
-
t.rdoc_dir = 'doc'
|
65
|
-
t.main = 'README.md'
|
66
|
-
t.title = "#{This.name} #{This.version}"
|
67
|
-
t.rdoc_files.include( FileList['*.{rdoc,md,txt}'], FileList['ext/**/*.c'],
|
68
|
-
FileList['lib/**/*.rb'] )
|
69
|
-
end
|
70
|
-
rescue StandardError, LoadError
|
71
|
-
This.task_warning( 'rdoc' )
|
72
|
-
end
|
73
|
-
|
74
|
-
#------------------------------------------------------------------------------
|
75
|
-
# Coverage - optional code coverage, rcov for 1.8 and simplecov for 1.9, so
|
76
|
-
# for the moment only rcov is listed.
|
77
|
-
#------------------------------------------------------------------------------
|
78
|
-
begin
|
79
|
-
require 'simplecov'
|
80
|
-
desc 'Run tests with code coverage'
|
81
|
-
task :coverage do
|
82
|
-
ENV['COVERAGE'] = 'true'
|
83
|
-
Rake::Task[:test].execute
|
84
|
-
end
|
85
|
-
CLOBBER << 'coverage' if File.directory?( 'coverage' )
|
86
|
-
rescue LoadError
|
87
|
-
This.task_warning( 'simplecov' )
|
88
|
-
end
|
89
|
-
|
90
|
-
#------------------------------------------------------------------------------
|
91
|
-
# Manifest - We want an explicit list of thos files that are to be packaged in
|
92
|
-
# the gem. Most of this is from Hoe.
|
93
|
-
#------------------------------------------------------------------------------
|
94
|
-
namespace 'manifest' do
|
95
|
-
desc "Check the manifest"
|
96
|
-
task :check => :clean do
|
97
|
-
files = FileList["**/*", ".*"].exclude( This.exclude_from_manifest ).to_a.sort
|
98
|
-
files = files.select{ |f| File.file?( f ) }
|
99
|
-
|
100
|
-
tmp = "Manifest.tmp"
|
101
|
-
File.open( tmp, 'w' ) do |f|
|
102
|
-
f.puts files.join("\n")
|
103
|
-
end
|
104
|
-
|
105
|
-
begin
|
106
|
-
sh "diff -du Manifest.txt #{tmp}"
|
107
|
-
ensure
|
108
|
-
rm tmp
|
109
|
-
end
|
110
|
-
puts "Manifest looks good"
|
111
|
-
end
|
112
|
-
|
113
|
-
desc "Generate the manifest"
|
114
|
-
task :generate => :clean do
|
115
|
-
files = %x[ git ls-files ].split("\n").sort
|
116
|
-
files.reject! { |f| f =~ This.exclude_from_manifest }
|
117
|
-
File.open( "Manifest.txt", "w" ) do |f|
|
118
|
-
f.puts files.join("\n")
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
#------------------------------------------------------------------------------
|
124
|
-
# Fixme - look for fixmes and report them
|
125
|
-
#------------------------------------------------------------------------------
|
126
|
-
namespace :fixme do
|
127
|
-
task :default => 'manifest:check' do
|
128
|
-
This.manifest.each do |file|
|
129
|
-
next if file == __FILE__
|
130
|
-
next unless file =~ %r/(txt|rb|md|rdoc|css|html|xml|css)\Z/
|
131
|
-
puts "FIXME: Rename #{file}" if file =~ /fixme/i
|
132
|
-
IO.readlines( file ).each_with_index do |line, idx|
|
133
|
-
prefix = "FIXME: #{file}:#{idx+1}".ljust(42)
|
134
|
-
puts "#{prefix} => #{line.strip}" if line =~ /fixme/i
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
def fixme_project_root
|
140
|
-
This.project_path( '../fixme' )
|
141
|
-
end
|
142
|
-
|
143
|
-
def fixme_project_path( subtree )
|
144
|
-
fixme_project_root.join( subtree )
|
145
|
-
end
|
146
|
-
|
147
|
-
def local_fixme_files
|
148
|
-
local_files = This.manifest.select { |p| p =~ %r|^tasks/| }
|
149
|
-
local_files.concat( Dir.glob( ".semaphore/*" ) )
|
150
|
-
end
|
151
|
-
|
152
|
-
def outdated_fixme_files
|
153
|
-
local_fixme_files.select do |local|
|
154
|
-
upstream = fixme_project_path( local )
|
155
|
-
if upstream.exist? then
|
156
|
-
if File.exist?( local ) then
|
157
|
-
( Digest::SHA256.file( local ) != Digest::SHA256.file( upstream ) )
|
158
|
-
else
|
159
|
-
true
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def fixme_up_to_date?
|
166
|
-
outdated_fixme_files.empty?
|
167
|
-
end
|
168
|
-
|
169
|
-
desc "See if the fixme tools are outdated"
|
170
|
-
task :outdated do
|
171
|
-
if fixme_up_to_date? then
|
172
|
-
puts "Fixme files are up to date."
|
173
|
-
else
|
174
|
-
outdated_fixme_files.each do |f|
|
175
|
-
puts "#{f} is outdated"
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
desc "Update outdated fixme files"
|
181
|
-
task :update do
|
182
|
-
if fixme_up_to_date? then
|
183
|
-
puts "Fixme files are already up to date."
|
184
|
-
else
|
185
|
-
puts "Updating fixme files:"
|
186
|
-
outdated_fixme_files.each do |local|
|
187
|
-
upstream = fixme_project_path( local )
|
188
|
-
puts " * #{local}"
|
189
|
-
FileUtils.cp( upstream, local )
|
190
|
-
end
|
191
|
-
puts "Use your git commands as appropriate."
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
desc "Look for fixmes and report them"
|
196
|
-
task :fixme => "fixme:default"
|
197
|
-
|
198
|
-
#------------------------------------------------------------------------------
|
199
|
-
# Gem Specification
|
200
|
-
#------------------------------------------------------------------------------
|
201
|
-
# Really this is only here to support those who use bundler
|
202
|
-
desc "Build the #{This.name}.gemspec file"
|
203
|
-
task :gemspec do
|
204
|
-
File.open( This.gemspec_file, "wb+" ) do |f|
|
205
|
-
f.puts "# DO NOT EDIT - This file is automatically generated"
|
206
|
-
f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
|
207
|
-
f.write This.platform_gemspec.to_ruby
|
208
|
-
end
|
209
|
-
end
|
210
|
-
|
211
|
-
# .rbc files from ruby 2.0
|
212
|
-
CLOBBER << "**/*.rbc"
|
213
|
-
|
214
|
-
# The standard gem packaging task, everyone has it.
|
215
|
-
require 'rubygems/package_task'
|
216
|
-
::Gem::PackageTask.new( This.platform_gemspec ) do
|
217
|
-
# nothing
|
218
|
-
end
|
219
|
-
|
220
|
-
#------------------------------------------------------------------------------
|
221
|
-
# Release - the steps we go through to do a final release, this is pulled from
|
222
|
-
# a compbination of mojombo's rakegem, hoe and hoe-git
|
223
|
-
#
|
224
|
-
# 1) make sure we are on the main branch
|
225
|
-
# 2) make sure there are no uncommitted items
|
226
|
-
# 3) check the manifest and make sure all looks good
|
227
|
-
# 4) build the gem
|
228
|
-
# 5) do an empty commit to have the commit message of the version
|
229
|
-
# 6) tag that commit as the version
|
230
|
-
# 7) push main
|
231
|
-
# 8) push the tag
|
232
|
-
# 7) pus the gem
|
233
|
-
#------------------------------------------------------------------------------
|
234
|
-
task :release_check do
|
235
|
-
unless `git branch` =~ /^\* main/
|
236
|
-
abort "You must be on the main branch to release!"
|
237
|
-
end
|
238
|
-
unless `git status` =~ /^nothing to commit/m
|
239
|
-
abort "Nope, sorry, you have unfinished business"
|
240
|
-
end
|
241
|
-
end
|
242
|
-
|
243
|
-
desc "Create tag v#{This.version}, build and push #{This.platform_gemspec.full_name} to rubygems.org"
|
244
|
-
task :release => [ :release_check, 'manifest:check', :gem ] do
|
245
|
-
sh "git commit --allow-empty -a -m 'Release #{This.version}'"
|
246
|
-
sh "git tag -a -m 'v#{This.version}' v#{This.version}"
|
247
|
-
sh "git push origin main"
|
248
|
-
sh "git push origin v#{This.version}"
|
249
|
-
sh "gem push pkg/#{This.platform_gemspec.full_name}.gem"
|
250
|
-
end
|