drydock 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGES.txt CHANGED
@@ -1,9 +1,9 @@
1
1
  DRYDOCK, CHANGES
2
2
 
3
- #### TODO ###############################
4
3
 
5
- * Support putting descriptions into resource file (or __END__)
4
+ #### 0.6.7 (2009-09-15) #############################
6
5
 
6
+ * ADDED: Drydock::Screen
7
7
 
8
8
  #### 0.6.6 (2009-06-24) #############################
9
9
 
data/README.rdoc CHANGED
@@ -23,7 +23,8 @@ Or for GitHub fans:
23
23
  See bin/example for more.
24
24
 
25
25
  require 'drydock'
26
-
26
+ extend Drydock
27
+
27
28
  default :welcome
28
29
 
29
30
  before do
@@ -67,7 +68,9 @@ See bin/example for more.
67
68
  command :ahoy! => JohnWestSmokedOysters
68
69
  # If you don't provide a block, Drydock will call JohnWestSmokedOysters#ahoy!
69
70
 
71
+ Drydock.run!
70
72
 
73
+
71
74
  == More Information
72
75
 
73
76
  * GitHub[http://github.com/delano/drydock]
data/bin/example CHANGED
@@ -206,3 +206,5 @@ module Example
206
206
  response
207
207
  end
208
208
  end
209
+
210
+ Drydock.run!
data/drydock.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = %q{drydock}
3
- s.version = "0.6.6"
3
+ s.version = "0.6.7"
4
4
  s.specification_version = 1 if s.respond_to? :specification_version=
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
 
@@ -23,6 +23,7 @@
23
23
  lib/drydock/mixins.rb
24
24
  lib/drydock/mixins/object.rb
25
25
  lib/drydock/mixins/string.rb
26
+ lib/drydock/screen.rb
26
27
  )
27
28
 
28
29
  # s.add_dependency ''
data/lib/drydock.rb CHANGED
@@ -2,7 +2,7 @@ require 'optparse'
2
2
  require 'ostruct'
3
3
  require 'stringio'
4
4
 
5
- require 'drydock/console'
5
+ require 'drydock/screen'
6
6
  require 'drydock/mixins'
7
7
 
8
8
  module Drydock
@@ -78,7 +78,7 @@ module Drydock
78
78
  # end
79
79
  #
80
80
  class Command
81
- VERSION = "0.6.6"
81
+ VERSION = "0.6.7"
82
82
  # The canonical name of the command (the one used in the command definition). If you
83
83
  # inherit from this class and add a method named +cmd+, you can leave omit the block
84
84
  # in the command definition. That method will be called instead. See bin/examples.
@@ -92,7 +92,7 @@ module Console #:nodoc:all
92
92
  props[:minus] = false unless props.has_key?(:minus)
93
93
  props[:x] = props[:x]-str.noatt.size if props[:x] && props[:minus] # Subtract the str length from the position
94
94
  Cursor.save
95
- Cursor.move = 0
95
+ Cursor.move = [props[:x], props[:y]]
96
96
  print str
97
97
  Cursor.restore
98
98
  }
@@ -0,0 +1,33 @@
1
+
2
+
3
+ module Drydock
4
+ module Screen
5
+ extend self
6
+
7
+ @@mutex = Mutex.new
8
+ @@output = StringIO.new
9
+ @@offset = 0
10
+
11
+ def print(*msg)
12
+ @@mutex.synchronize do
13
+ @@output.print *msg
14
+ end
15
+ end
16
+
17
+ def puts(*msg)
18
+ @@mutex.synchronize do
19
+ @@output.puts *msg
20
+ end
21
+ end
22
+
23
+ def flush
24
+ @@mutex.synchronize do
25
+ #return if @@offset == @@output.tell
26
+ @@output.seek @@offset
27
+ STDOUT.puts @@output.read unless @@output.eof?
28
+ @@offset = @@output.tell
29
+ end
30
+ end
31
+
32
+ end
33
+ end
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.6.6
4
+ version: 0.6.7
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-06-24 00:00:00 -04:00
12
+ date: 2009-09-15 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -35,6 +35,7 @@ files:
35
35
  - lib/drydock/mixins.rb
36
36
  - lib/drydock/mixins/object.rb
37
37
  - lib/drydock/mixins/string.rb
38
+ - lib/drydock/screen.rb
38
39
  has_rdoc: true
39
40
  homepage: http://github.com/delano/drydock
40
41
  licenses: []