drydock 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +6 -0
- data/Rakefile +2 -2
- data/drydock.gemspec +3 -3
- data/lib/drydock.rb +18 -4
- metadata +2 -3
data/CHANGES.txt
CHANGED
@@ -10,6 +10,12 @@ DRYDOCK, CHANGES
|
|
10
10
|
* Motivation to stick to a single environment (just stage)
|
11
11
|
* Add convenience methods for system calls: sh, write, read
|
12
12
|
|
13
|
+
#### 0.5.1 (2009-03-15) #############################
|
14
|
+
|
15
|
+
* FIX: Prevent calling default command in at_exit when there's a LoadError.
|
16
|
+
* FIX: Exit gracefully when the application exits.
|
17
|
+
* FIX: Print command names with dashes rather than underscores
|
18
|
+
|
13
19
|
|
14
20
|
#### 0.5 (2009-03-11) ###############################
|
15
21
|
|
data/Rakefile
CHANGED
@@ -44,7 +44,7 @@ end
|
|
44
44
|
# Rubyforge Release / Publish Tasks ==================================
|
45
45
|
|
46
46
|
desc 'Publish website to rubyforge'
|
47
|
-
task 'publish:
|
47
|
+
task 'publish:rdoc' => 'doc/index.html' do
|
48
48
|
sh "scp -rp doc/* rubyforge.org:/var/www/gforge-projects/#{name}/"
|
49
49
|
end
|
50
50
|
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
Rake::RDocTask.new do |t|
|
60
60
|
t.rdoc_dir = 'doc'
|
61
61
|
t.title = @spec.summary
|
62
|
-
t.options << '--line-numbers' << '
|
62
|
+
t.options << '--line-numbers' << '-A cattr_accessor=object'
|
63
63
|
t.options << '--charset' << 'utf-8'
|
64
64
|
t.rdoc_files.include('LICENSE.txt')
|
65
65
|
t.rdoc_files.include('README.rdoc')
|
data/drydock.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = %q{drydock}
|
3
|
-
s.version = "0.5.
|
4
|
-
s.date = %q{2009-03-
|
3
|
+
s.version = "0.5.1"
|
4
|
+
s.date = %q{2009-03-15}
|
5
5
|
s.specification_version = 1 if s.respond_to? :specification_version=
|
6
6
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
7
7
|
|
@@ -27,7 +27,7 @@
|
|
27
27
|
s.has_rdoc = true
|
28
28
|
s.homepage = %q{http://github.com/delano/drydock}
|
29
29
|
s.extra_rdoc_files = %w[README.rdoc LICENSE.txt CHANGES.txt]
|
30
|
-
s.rdoc_options = ["--line-numbers", "--
|
30
|
+
s.rdoc_options = ["--line-numbers", "--title", "Drydock: #{s.description}", "--main", "README.rdoc"]
|
31
31
|
s.require_paths = ["lib"]
|
32
32
|
s.rubygems_version = %q{1.1.1}
|
33
33
|
s.rubyforge_project = "drydock"
|
data/lib/drydock.rb
CHANGED
@@ -16,6 +16,13 @@ module Drydock
|
|
16
16
|
self[#{@fields.size}]
|
17
17
|
end
|
18
18
|
end
|
19
|
+
def #{n}=(val)
|
20
|
+
if self.size > @fields.size && '#{n}'.to_sym == @fields.last
|
21
|
+
self[#{@fields.size}..-1] = val
|
22
|
+
else
|
23
|
+
self[#{@fields.size}] = val
|
24
|
+
end
|
25
|
+
end
|
19
26
|
RUBY
|
20
27
|
@fields << n
|
21
28
|
n
|
@@ -214,7 +221,7 @@ module Drydock
|
|
214
221
|
next
|
215
222
|
end
|
216
223
|
cmds[cmd][:desc] = Drydock.commands[cmd].desc
|
217
|
-
cmds[cmd][:pretty] =
|
224
|
+
cmds[cmd][:pretty] = pretty
|
218
225
|
end
|
219
226
|
|
220
227
|
cmds.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |cmd|
|
@@ -272,7 +279,7 @@ end
|
|
272
279
|
module Drydock
|
273
280
|
extend self
|
274
281
|
|
275
|
-
VERSION = 0.
|
282
|
+
VERSION = 0.5
|
276
283
|
|
277
284
|
@@project = nil
|
278
285
|
|
@@ -343,7 +350,9 @@ module Drydock
|
|
343
350
|
|
344
351
|
begin
|
345
352
|
require txt.downcase
|
346
|
-
rescue LoadError
|
353
|
+
rescue LoadError => ex
|
354
|
+
Drydock.run = false # Prevent execution at_exit
|
355
|
+
abort "Problem during require: #{ex.message}"
|
347
356
|
end
|
348
357
|
@@project = txt
|
349
358
|
end
|
@@ -584,7 +593,7 @@ module Drydock
|
|
584
593
|
#
|
585
594
|
# Drydock.run = false
|
586
595
|
def run=(v)
|
587
|
-
@@run = (v
|
596
|
+
@@run = (v.is_a?(TrueClass)) ? true : false
|
588
597
|
end
|
589
598
|
|
590
599
|
# Return true if a command has been executed.
|
@@ -809,8 +818,13 @@ trap ("SIGINT") do
|
|
809
818
|
end
|
810
819
|
|
811
820
|
|
821
|
+
|
812
822
|
at_exit {
|
813
823
|
begin
|
824
|
+
if $@
|
825
|
+
puts $@ if Drydock.debug?
|
826
|
+
exit 1
|
827
|
+
end
|
814
828
|
Drydock.run!(ARGV, STDIN) if Drydock.run? && !Drydock.has_run?
|
815
829
|
rescue => ex
|
816
830
|
STDERR.puts "ERROR: #{ex.message}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drydock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-15 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -36,7 +36,6 @@ homepage: http://github.com/delano/drydock
|
|
36
36
|
post_install_message:
|
37
37
|
rdoc_options:
|
38
38
|
- --line-numbers
|
39
|
-
- --inline-source
|
40
39
|
- --title
|
41
40
|
- "Drydock: A seaworthy DSL for writing command line apps"
|
42
41
|
- --main
|