roby 0.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.
Files changed (240) hide show
  1. data/.gitignore +29 -0
  2. data/History.txt +4 -0
  3. data/License-fr.txt +519 -0
  4. data/License.txt +515 -0
  5. data/Manifest.txt +245 -0
  6. data/NOTES +4 -0
  7. data/README.txt +163 -0
  8. data/Rakefile +161 -0
  9. data/TODO.txt +146 -0
  10. data/app/README.txt +24 -0
  11. data/app/Rakefile +8 -0
  12. data/app/config/ROBOT.rb +5 -0
  13. data/app/config/app.yml +91 -0
  14. data/app/config/init.rb +7 -0
  15. data/app/config/roby.yml +3 -0
  16. data/app/controllers/.gitattributes +0 -0
  17. data/app/controllers/ROBOT.rb +2 -0
  18. data/app/data/.gitattributes +0 -0
  19. data/app/planners/ROBOT/main.rb +6 -0
  20. data/app/planners/main.rb +5 -0
  21. data/app/scripts/distributed +3 -0
  22. data/app/scripts/generate/bookmarks +3 -0
  23. data/app/scripts/replay +3 -0
  24. data/app/scripts/results +3 -0
  25. data/app/scripts/run +3 -0
  26. data/app/scripts/server +3 -0
  27. data/app/scripts/shell +3 -0
  28. data/app/scripts/test +3 -0
  29. data/app/tasks/.gitattributes +0 -0
  30. data/app/tasks/ROBOT/.gitattributes +0 -0
  31. data/bin/roby +210 -0
  32. data/bin/roby-log +168 -0
  33. data/bin/roby-shell +25 -0
  34. data/doc/images/event_generalization.png +0 -0
  35. data/doc/images/exception_propagation_1.png +0 -0
  36. data/doc/images/exception_propagation_2.png +0 -0
  37. data/doc/images/exception_propagation_3.png +0 -0
  38. data/doc/images/exception_propagation_4.png +0 -0
  39. data/doc/images/exception_propagation_5.png +0 -0
  40. data/doc/images/replay_handler_error.png +0 -0
  41. data/doc/images/replay_handler_error_0.png +0 -0
  42. data/doc/images/replay_handler_error_1.png +0 -0
  43. data/doc/images/roby_cycle_overview.png +0 -0
  44. data/doc/images/roby_replay_02.png +0 -0
  45. data/doc/images/roby_replay_03.png +0 -0
  46. data/doc/images/roby_replay_04.png +0 -0
  47. data/doc/images/roby_replay_event_representation.png +0 -0
  48. data/doc/images/roby_replay_first_state.png +0 -0
  49. data/doc/images/roby_replay_relations.png +0 -0
  50. data/doc/images/roby_replay_startup.png +0 -0
  51. data/doc/images/task_event_generalization.png +0 -0
  52. data/doc/papers.rdoc +11 -0
  53. data/doc/styles/allison.css +314 -0
  54. data/doc/styles/allison.js +316 -0
  55. data/doc/styles/allison.rb +276 -0
  56. data/doc/styles/jamis.rb +593 -0
  57. data/doc/tutorials/01-GettingStarted.rdoc +86 -0
  58. data/doc/tutorials/02-GoForward.rdoc +220 -0
  59. data/doc/tutorials/03-PlannedPath.rdoc +268 -0
  60. data/doc/tutorials/04-EventPropagation.rdoc +236 -0
  61. data/doc/tutorials/05-ErrorHandling.rdoc +319 -0
  62. data/doc/tutorials/06-Overview.rdoc +40 -0
  63. data/doc/videos.rdoc +69 -0
  64. data/ext/droby/dump.cc +175 -0
  65. data/ext/droby/extconf.rb +3 -0
  66. data/ext/graph/algorithm.cc +746 -0
  67. data/ext/graph/extconf.rb +7 -0
  68. data/ext/graph/graph.cc +529 -0
  69. data/ext/graph/graph.hh +183 -0
  70. data/ext/graph/iterator_sequence.hh +102 -0
  71. data/ext/graph/undirected_dfs.hh +226 -0
  72. data/ext/graph/undirected_graph.hh +421 -0
  73. data/lib/roby.rb +41 -0
  74. data/lib/roby/app.rb +870 -0
  75. data/lib/roby/app/rake.rb +56 -0
  76. data/lib/roby/app/run.rb +14 -0
  77. data/lib/roby/app/scripts/distributed.rb +13 -0
  78. data/lib/roby/app/scripts/generate/bookmarks.rb +162 -0
  79. data/lib/roby/app/scripts/replay.rb +31 -0
  80. data/lib/roby/app/scripts/results.rb +15 -0
  81. data/lib/roby/app/scripts/run.rb +26 -0
  82. data/lib/roby/app/scripts/server.rb +18 -0
  83. data/lib/roby/app/scripts/shell.rb +88 -0
  84. data/lib/roby/app/scripts/test.rb +40 -0
  85. data/lib/roby/basic_object.rb +151 -0
  86. data/lib/roby/config.rb +5 -0
  87. data/lib/roby/control.rb +747 -0
  88. data/lib/roby/decision_control.rb +17 -0
  89. data/lib/roby/distributed.rb +32 -0
  90. data/lib/roby/distributed/base.rb +440 -0
  91. data/lib/roby/distributed/communication.rb +871 -0
  92. data/lib/roby/distributed/connection_space.rb +592 -0
  93. data/lib/roby/distributed/distributed_object.rb +206 -0
  94. data/lib/roby/distributed/drb.rb +62 -0
  95. data/lib/roby/distributed/notifications.rb +539 -0
  96. data/lib/roby/distributed/peer.rb +550 -0
  97. data/lib/roby/distributed/protocol.rb +529 -0
  98. data/lib/roby/distributed/proxy.rb +343 -0
  99. data/lib/roby/distributed/subscription.rb +311 -0
  100. data/lib/roby/distributed/transaction.rb +498 -0
  101. data/lib/roby/event.rb +897 -0
  102. data/lib/roby/exceptions.rb +234 -0
  103. data/lib/roby/executives/simple.rb +30 -0
  104. data/lib/roby/graph.rb +166 -0
  105. data/lib/roby/interface.rb +390 -0
  106. data/lib/roby/log.rb +3 -0
  107. data/lib/roby/log/chronicle.rb +303 -0
  108. data/lib/roby/log/console.rb +72 -0
  109. data/lib/roby/log/data_stream.rb +197 -0
  110. data/lib/roby/log/dot.rb +279 -0
  111. data/lib/roby/log/event_stream.rb +151 -0
  112. data/lib/roby/log/file.rb +340 -0
  113. data/lib/roby/log/gui/basic_display.ui +83 -0
  114. data/lib/roby/log/gui/chronicle.rb +26 -0
  115. data/lib/roby/log/gui/chronicle_view.rb +40 -0
  116. data/lib/roby/log/gui/chronicle_view.ui +70 -0
  117. data/lib/roby/log/gui/data_displays.rb +172 -0
  118. data/lib/roby/log/gui/data_displays.ui +155 -0
  119. data/lib/roby/log/gui/notifications.rb +26 -0
  120. data/lib/roby/log/gui/relations.rb +248 -0
  121. data/lib/roby/log/gui/relations.ui +123 -0
  122. data/lib/roby/log/gui/relations_view.rb +185 -0
  123. data/lib/roby/log/gui/relations_view.ui +149 -0
  124. data/lib/roby/log/gui/replay.rb +327 -0
  125. data/lib/roby/log/gui/replay_controls.rb +200 -0
  126. data/lib/roby/log/gui/replay_controls.ui +259 -0
  127. data/lib/roby/log/gui/runtime.rb +130 -0
  128. data/lib/roby/log/hooks.rb +185 -0
  129. data/lib/roby/log/logger.rb +202 -0
  130. data/lib/roby/log/notifications.rb +244 -0
  131. data/lib/roby/log/plan_rebuilder.rb +470 -0
  132. data/lib/roby/log/relations.rb +1056 -0
  133. data/lib/roby/log/server.rb +550 -0
  134. data/lib/roby/log/sqlite.rb +47 -0
  135. data/lib/roby/log/timings.rb +164 -0
  136. data/lib/roby/plan-object.rb +247 -0
  137. data/lib/roby/plan.rb +762 -0
  138. data/lib/roby/planning.rb +13 -0
  139. data/lib/roby/planning/loops.rb +302 -0
  140. data/lib/roby/planning/model.rb +906 -0
  141. data/lib/roby/planning/task.rb +151 -0
  142. data/lib/roby/propagation.rb +562 -0
  143. data/lib/roby/query.rb +619 -0
  144. data/lib/roby/relations.rb +583 -0
  145. data/lib/roby/relations/conflicts.rb +70 -0
  146. data/lib/roby/relations/ensured.rb +20 -0
  147. data/lib/roby/relations/error_handling.rb +23 -0
  148. data/lib/roby/relations/events.rb +9 -0
  149. data/lib/roby/relations/executed_by.rb +193 -0
  150. data/lib/roby/relations/hierarchy.rb +239 -0
  151. data/lib/roby/relations/influence.rb +10 -0
  152. data/lib/roby/relations/planned_by.rb +63 -0
  153. data/lib/roby/robot.rb +7 -0
  154. data/lib/roby/standard_errors.rb +218 -0
  155. data/lib/roby/state.rb +5 -0
  156. data/lib/roby/state/events.rb +221 -0
  157. data/lib/roby/state/information.rb +55 -0
  158. data/lib/roby/state/pos.rb +110 -0
  159. data/lib/roby/state/shapes.rb +32 -0
  160. data/lib/roby/state/state.rb +353 -0
  161. data/lib/roby/support.rb +92 -0
  162. data/lib/roby/task-operations.rb +182 -0
  163. data/lib/roby/task.rb +1618 -0
  164. data/lib/roby/test/common.rb +399 -0
  165. data/lib/roby/test/distributed.rb +214 -0
  166. data/lib/roby/test/tasks/empty_task.rb +9 -0
  167. data/lib/roby/test/tasks/goto.rb +36 -0
  168. data/lib/roby/test/tasks/simple_task.rb +23 -0
  169. data/lib/roby/test/testcase.rb +519 -0
  170. data/lib/roby/test/tools.rb +160 -0
  171. data/lib/roby/thread_task.rb +87 -0
  172. data/lib/roby/transactions.rb +462 -0
  173. data/lib/roby/transactions/proxy.rb +292 -0
  174. data/lib/roby/transactions/updates.rb +139 -0
  175. data/plugins/fault_injection/History.txt +4 -0
  176. data/plugins/fault_injection/README.txt +37 -0
  177. data/plugins/fault_injection/Rakefile +18 -0
  178. data/plugins/fault_injection/TODO.txt +0 -0
  179. data/plugins/fault_injection/app.rb +52 -0
  180. data/plugins/fault_injection/fault_injection.rb +89 -0
  181. data/plugins/fault_injection/test/test_fault_injection.rb +84 -0
  182. data/plugins/subsystems/README.txt +40 -0
  183. data/plugins/subsystems/Rakefile +18 -0
  184. data/plugins/subsystems/app.rb +171 -0
  185. data/plugins/subsystems/test/app/README +24 -0
  186. data/plugins/subsystems/test/app/Rakefile +8 -0
  187. data/plugins/subsystems/test/app/config/app.yml +71 -0
  188. data/plugins/subsystems/test/app/config/init.rb +9 -0
  189. data/plugins/subsystems/test/app/config/roby.yml +3 -0
  190. data/plugins/subsystems/test/app/planners/main.rb +20 -0
  191. data/plugins/subsystems/test/app/scripts/distributed +3 -0
  192. data/plugins/subsystems/test/app/scripts/replay +3 -0
  193. data/plugins/subsystems/test/app/scripts/results +3 -0
  194. data/plugins/subsystems/test/app/scripts/run +3 -0
  195. data/plugins/subsystems/test/app/scripts/server +3 -0
  196. data/plugins/subsystems/test/app/scripts/shell +3 -0
  197. data/plugins/subsystems/test/app/scripts/test +3 -0
  198. data/plugins/subsystems/test/app/tasks/services.rb +15 -0
  199. data/plugins/subsystems/test/test_subsystems.rb +71 -0
  200. data/test/distributed/test_communication.rb +178 -0
  201. data/test/distributed/test_connection.rb +282 -0
  202. data/test/distributed/test_execution.rb +373 -0
  203. data/test/distributed/test_mixed_plan.rb +341 -0
  204. data/test/distributed/test_plan_notifications.rb +238 -0
  205. data/test/distributed/test_protocol.rb +516 -0
  206. data/test/distributed/test_query.rb +102 -0
  207. data/test/distributed/test_remote_plan.rb +491 -0
  208. data/test/distributed/test_transaction.rb +463 -0
  209. data/test/mockups/tasks.rb +27 -0
  210. data/test/planning/test_loops.rb +380 -0
  211. data/test/planning/test_model.rb +427 -0
  212. data/test/planning/test_task.rb +106 -0
  213. data/test/relations/test_conflicts.rb +42 -0
  214. data/test/relations/test_ensured.rb +38 -0
  215. data/test/relations/test_executed_by.rb +149 -0
  216. data/test/relations/test_hierarchy.rb +158 -0
  217. data/test/relations/test_planned_by.rb +54 -0
  218. data/test/suite_core.rb +24 -0
  219. data/test/suite_distributed.rb +9 -0
  220. data/test/suite_planning.rb +3 -0
  221. data/test/suite_relations.rb +8 -0
  222. data/test/test_bgl.rb +508 -0
  223. data/test/test_control.rb +399 -0
  224. data/test/test_event.rb +894 -0
  225. data/test/test_exceptions.rb +592 -0
  226. data/test/test_interface.rb +37 -0
  227. data/test/test_log.rb +114 -0
  228. data/test/test_log_server.rb +132 -0
  229. data/test/test_plan.rb +584 -0
  230. data/test/test_propagation.rb +210 -0
  231. data/test/test_query.rb +266 -0
  232. data/test/test_relations.rb +180 -0
  233. data/test/test_state.rb +414 -0
  234. data/test/test_support.rb +16 -0
  235. data/test/test_task.rb +938 -0
  236. data/test/test_testcase.rb +122 -0
  237. data/test/test_thread_task.rb +73 -0
  238. data/test/test_transactions.rb +569 -0
  239. data/test/test_transactions_proxy.rb +198 -0
  240. metadata +570 -0
data/bin/roby-log ADDED
@@ -0,0 +1,168 @@
1
+ #! /usr/bin/env ruby
2
+ require 'roby'
3
+ require 'optparse'
4
+
5
+ def usage
6
+ STDERR.puts <<-EOU
7
+ roby-log mode [options]
8
+ where the following modes are accepted:
9
+ list-servers lists the log servers available
10
+ upgrade-format upgrades an event log from an old format to the current one
11
+ rebuild-index rebuilds the index file for the given event log
12
+ stats displays statistics about the given event log
13
+ replay displays data saved in logged files
14
+ display displays live data received from log servers
15
+ help this help message
16
+
17
+ Call roby-log mode --help for more information about each mode
18
+ EOU
19
+ end
20
+
21
+ STDOUT.sync = true
22
+
23
+ SERVER_LIST_TIMEOUT = 5
24
+ SERVER_LIST_POLL = 0.1
25
+ case mode = ARGV.shift
26
+ when "list-servers"
27
+ DRb.start_service "druby://:0"
28
+
29
+ require 'roby/log/server'
30
+ puts "Finding available servers ... (#{SERVER_LIST_TIMEOUT} seconds)"
31
+
32
+ broadcast = if ARGV.empty? then ['localhost']
33
+ else ARGV
34
+ end
35
+
36
+ Roby::Log::Server.enable_discovery broadcast
37
+
38
+ begin
39
+ end_time = Time.now + SERVER_LIST_TIMEOUT
40
+ known_servers = []
41
+ while end_time > Time.now
42
+ sleep(SERVER_LIST_POLL)
43
+ Roby::Log::Server.available_servers.each do |server|
44
+ next if known_servers.include?(server)
45
+ known_servers << server
46
+
47
+ remote = Roby::Log::Client.new(server)
48
+ puts "#{server.__drburi}:"
49
+ remote.streams.each do |s|
50
+ puts " #{s.name} [#{s.type}]"
51
+ end
52
+ end
53
+ end
54
+ rescue Interrupt
55
+ end
56
+ exit(0)
57
+
58
+ when "upgrade-format"
59
+ require 'roby/log/file'
60
+ Roby::Log::FileLogger.to_new_format(ARGV[0])
61
+ exit(0)
62
+
63
+ when "rebuild-index"
64
+ require 'roby/log/file'
65
+
66
+ Roby::Log::Logfile.open(ARGV[0]) do |logfile|
67
+ logfile.rebuild_index
68
+ end
69
+ exit(0)
70
+
71
+ when "stats"
72
+ require 'roby/log/file'
73
+ require 'roby/log/timings'
74
+
75
+ filename = if ARGV[0] == "--csv"
76
+ do_csv = true
77
+ ARGV[1]
78
+ else
79
+ ARGV[0]
80
+ end
81
+ io = Roby::Log.open(filename)
82
+
83
+ cycle_count = io.index_data.size
84
+ puts "#{cycle_count} cycles between #{io.range.first.to_hms} and #{io.range.last.to_hms}"
85
+
86
+ if io.index_data.first.has_key?(:event_count)
87
+ min, max = nil
88
+ event_count = io.index_data.inject(0) do |total, cycle_info|
89
+ count = cycle_info[:event_count]
90
+ min = count if !min || min > count
91
+ max = count if !max || max < count
92
+ total + count
93
+ end
94
+ puts "#{event_count} events, #{event_count / cycle_count} events/cycle (min: #{min}, max: #{max})"
95
+ else
96
+ puts "event count unavailable, please rebuild the index"
97
+ end
98
+
99
+ timings = Roby::Log::Timings.new(io)
100
+ if do_csv
101
+ timings.display(false)
102
+ else
103
+ timings.stats
104
+ end
105
+ exit(0)
106
+
107
+ when "replay"
108
+ require 'roby/log/gui/replay'
109
+ app = Qt::Application.new(ARGV)
110
+
111
+ main = Replay.setup(ARGV) do |main, parser, remaining|
112
+ if remaining.empty?
113
+ if main.log_dir
114
+ streams = Roby.app.data_streams(main.log_dir)
115
+ streams.each do |stream|
116
+ stream.open
117
+ main.add_stream(stream)
118
+ end
119
+ else
120
+ STDERR.puts parser
121
+ exit(0)
122
+ end
123
+ else
124
+ remaining.each do |file|
125
+ if streams = Roby.app.data_streams_of([file])
126
+ streams.each do |s|
127
+ s.open
128
+ main.add_stream(s)
129
+ end
130
+ else
131
+ STDERR.puts "WARN: unknown file type for #{file}"
132
+ end
133
+ end
134
+ end
135
+ end
136
+
137
+ main.setup
138
+ begin
139
+ app.exec
140
+ rescue
141
+ STDERR.puts $!.full_message
142
+ end
143
+
144
+ when "display"
145
+ require 'roby/log/gui/runtime'
146
+ DRb.start_service "druby://:0"
147
+ Roby::Log::Server.logger.level = Logger::DEBUG
148
+
149
+ broadcast = if ARGV.empty? then ['localhost']
150
+ else ARGV
151
+ end
152
+
153
+ a = Qt::Application.new([])
154
+ w = RuntimeDisplay.new(broadcast, Roby::Log::Server::RING_PORT, 5)
155
+ w.show
156
+ a.exec
157
+ exit(0)
158
+
159
+ when "help"
160
+ usage
161
+ exit(0)
162
+
163
+ else
164
+ STDERR.puts "no such mode of operation #{mode}"
165
+ usage
166
+ exit(1)
167
+ end
168
+
data/bin/roby-shell ADDED
@@ -0,0 +1,25 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'drb'
4
+ require 'roby'
5
+ require 'irb'
6
+
7
+ uri = ARGV.shift
8
+
9
+ DRb.start_service
10
+ control = DRbObject.new nil, uri
11
+
12
+ IRB.setup(nil)
13
+
14
+ ws = IRB::WorkSpace.new(binding)
15
+ irb = IRB::Irb.new(ws)
16
+ IRB.conf[:MAIN_CONTEXT] = irb.context
17
+
18
+ trap("SIGINT") do
19
+ irb.signal_handle
20
+ end
21
+
22
+ catch(:IRB_EXIT) do
23
+ irb.eval_input
24
+ end
25
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/doc/papers.rdoc ADDED
@@ -0,0 +1,11 @@
1
+ = Papers
2
+
3
+ These are the papers which present Roby that I published the last years.
4
+
5
+ * A Software Component for Plan Management in Robotics
6
+ ({PhD thesis}[http://roby.rubyforge.org/papers/thesis-en.pdf], slides[http://roby.rubyforge.org/papers/thesis-slides.pdf])
7
+ * A Software Component for Simultaneous Plan Execution and Adaptation -
8
+ IROS2007 ({paper}[http://roby.rubyforge.org/papers/roby-2007-iros.pdf])
9
+ * A Plan Manager for Multi-Robot Systems - FSR2007
10
+ ({paper}[http://roby.rubyforge.org/papers/roby-2007-fsr.pdf], {slides}[http://roby.rubyforge.org/papers/roby-2007-fsr-slides.pdf])
11
+
@@ -0,0 +1,314 @@
1
+
2
+ /*
3
+ Allison 2 template
4
+ Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
5
+ */
6
+
7
+ /* default styles */
8
+
9
+ * {
10
+ margin: 0
11
+ padding: 0
12
+ border: none
13
+ }
14
+
15
+ @default = "#000"
16
+ @background = "#fff"
17
+ @very_light = "#e4ebed"
18
+ @light = "#ccd5dc"
19
+ @medium = "#304878"
20
+ @dark = "#181848"
21
+
22
+ @buffer = 6
23
+
24
+ .clear {
25
+ clear: both
26
+ }
27
+
28
+ a {
29
+ color: @medium
30
+ font-weight: bold
31
+ text-decoration: none
32
+ }
33
+
34
+ a:hover {
35
+ text-decoration: underline
36
+ }
37
+
38
+ html, body {
39
+ color: @default
40
+ font-size: @font_size = 13
41
+ font-family: helvetica, verdana, sans
42
+ background-color: @background
43
+ text-align: center
44
+ margin: 0
45
+ padding: 0
46
+ }
47
+
48
+ p, ul, ol {
49
+ line-height: @lineheight = 16
50
+ } li {
51
+ margin: @buffer / 2
52
+ _margin-left: 40px
53
+ } p, pre, table, ol, ul {
54
+ margin: @lineheight
55
+ } #item_name {
56
+ margin-top: -8px
57
+ }
58
+
59
+ h1 {
60
+ font-size: 22px
61
+ margin-top: @lineheight
62
+ } h2, h3 {
63
+ font-size: @medium_header_size = 18
64
+ margin: @buffer
65
+ margin-right: 0
66
+ padding-top: @buffer * 2
67
+ }
68
+
69
+ /* center everything */
70
+
71
+ #container {
72
+ margin: 20px auto 0 auto
73
+ width: @width = 900
74
+ text-align: left
75
+ }
76
+
77
+ /* header stuff */
78
+
79
+ #header {
80
+ padding: @buffer
81
+ padding-top: @buffer / 2
82
+ width: @width - @buffer * 2
83
+ height: @header_height = 64 - @buffer * 2
84
+ _height: @header_height + @buffer
85
+ margin-bottom: @buffer * 2
86
+ vertical-align: baseline
87
+ background-color: @dark
88
+ overflow: hidden
89
+ } .curve {
90
+ background-color: @dark
91
+ margin: 0
92
+ padding: 0
93
+ height: 1px
94
+ overflow: hidden /* again, ie problem */
95
+ }
96
+
97
+ def curve(div_id, curve_array, width); s = ""; curve_array.length.times {|n| s += "\n##{div_id}#{curve_array.length - 1 - n}{border-left: #{curve_array[n]}px solid #{@background}; border-right: #{curve_array[n]}px solid #{@background}; width: #{width - curve_array[n]*2}px; _width: #{width - 12}px; }"}; s; end
98
+ @curves = [1, 1, 2, 3, 4, 6]
99
+
100
+ curve("preheader_curve_", @curves, @width)
101
+
102
+ #header h1 {
103
+ color: @background
104
+ font-size: 30px
105
+ margin: 4px 0 0 0
106
+ } #header p {
107
+ margin: 0
108
+ padding: 0
109
+ padding-left: 3px
110
+ font-size: 16px
111
+ color: @background
112
+ } #header a {
113
+ color: @background
114
+ text-decoration: none
115
+ font-weight: bold
116
+ }
117
+
118
+ /* basic layout and navigation bars */
119
+
120
+ #left {
121
+ background-color: @dark
122
+ width: @left_width = 220
123
+ float: left
124
+ _width: @left_width - @buffer * 2
125
+ margin-bottom: @buffer * 4
126
+ } #left a {
127
+ line-height: 14px
128
+ }
129
+
130
+ /* navigation bar colors and text styles */
131
+
132
+ .navigation {
133
+ width: @left_width - @buffer * 4
134
+ margin: @buffer
135
+ padding: @buffer
136
+ text-align: left
137
+ background-color: @background
138
+ overflow: hidden
139
+ } .navigation h3 {
140
+ font-weight: bold
141
+ margin-bottom: 5px
142
+ } .navigation span, .navigation a {
143
+ margin-left: @buffer
144
+ } #includes .navigation span, #includes .navigation a {
145
+ margin-left: 0
146
+ } .darker {
147
+ background-color: @very_light
148
+ } #spacer {
149
+ background-color: @background
150
+ height: @buffer * 3
151
+ display: none
152
+ }
153
+
154
+ /* content area */
155
+
156
+ #content {
157
+ padding: @content_padding = 20
158
+ width: @width - @left_width - @content_padding * 2
159
+ float: left
160
+ min-height: 450px
161
+ margin: 0
162
+ margin-bottom: -4px
163
+ } #content img {
164
+ padding-top: @buffer
165
+ padding-bottom: @buffer * 2
166
+ }
167
+
168
+ #content h1, h2 {
169
+ border-top: 1px solid @very_light
170
+ } #content h1 {
171
+ padding-top: @buffer * 3
172
+ } #content #item_name { /* why does this need to be fully qualified? */
173
+ padding-top: 0
174
+ border: none
175
+ }
176
+
177
+ /* footer */
178
+
179
+ #footer {
180
+ text-align: center
181
+ background-color: @background
182
+ padding: @buffer * 3
183
+ border-top: 1px solid @very_light
184
+ color: @light
185
+ } #footer a {
186
+ font-weight: normal
187
+ color: @light
188
+ }
189
+
190
+ /* for that dumb redirect index page I can't avoid */
191
+
192
+ #redirect {
193
+ text-align: center
194
+ } #redirect a {
195
+ color: @dark
196
+ }
197
+
198
+ /* tables */
199
+
200
+ table {
201
+ width: @width - @left_width - 95
202
+ margin-right: 0
203
+ border-collapse: collapse
204
+ border: 1px solid @very_light
205
+ } td, th {
206
+ background-color: @background
207
+ text-align: left
208
+ padding: @buffer
209
+ line-height: 14px
210
+ font-size: @font_size
211
+ } td.normal {
212
+ font-family: @monospace = "Courier, Courier New, monospace"
213
+ font-size: @monospace_size = 12
214
+ } td.highlight {
215
+ color: @medium
216
+ }
217
+
218
+ /* method_block details */
219
+
220
+ div.method_block {
221
+ border-bottom: 1px solid @very_light
222
+ margin-left: 20px
223
+ margin-bottom: -17px
224
+ margin-top: 17px
225
+ } div.method_block h3 {
226
+ color: @dark
227
+ margin-left: 0
228
+ padding: 0
229
+ } #content div.method_block h1, #content #description h1 {
230
+ margin-left: @buffer
231
+ color: @light
232
+ } div.method_block a.small { /* where is this used? */
233
+ font-size: 3px
234
+ line-height: 3px
235
+ }
236
+
237
+ /* index includes on the navigation bar */
238
+
239
+ div.index a {
240
+ font-size: @font_size
241
+ } #method {
242
+ display: none
243
+ } #file, #class {
244
+ display: block
245
+ } div.list_header {
246
+ float: left
247
+ } div.list_header_link {
248
+ float: right
249
+ padding-top: 3px
250
+ } div.list_header_link a {
251
+ font-weight: normal
252
+ } div.navigation h3, .list_header_link {
253
+ margin: 0
254
+ margin-top: @buffer
255
+ margin-bottom: @buffer
256
+ padding: 0
257
+ }
258
+
259
+ .index label {
260
+ font-size: @font_size
261
+ } .index form input {
262
+ width: @left_width - @buffer * 14
263
+ } .index form {
264
+ margin-bottom: @buffer
265
+ }
266
+
267
+ ol, ul {
268
+ margin-left: @buffer
269
+ }
270
+
271
+ p.source_link a {
272
+ text-align: right
273
+ font-weight: normal
274
+ } div.source {
275
+ display: none
276
+ } pre, tt {
277
+ color: @dark
278
+ font-weight: normal
279
+ font-family: @monospace
280
+ font-size: @monospace_size
281
+ } pre {
282
+ line-height: 14px
283
+ margin-left: @buffer * 2
284
+ overflow: auto
285
+ /* next 4 lines because IE sucks */
286
+ _position: relative
287
+ _width: @width - @left_width - (@buffer * 15 + 3)
288
+ _overflow-x:scroll
289
+ _overflow-y:visible
290
+ } b tt, tt b {
291
+ font-weight: bold
292
+ } div.source g {
293
+ margin-left: 0
294
+ } p.source_link {
295
+ text-align: center
296
+ }
297
+
298
+ /* source code highlighting */
299
+
300
+ .source pre {
301
+ color: black
302
+ }
303
+ pre .ruby-value, pre .ruby-symbol {
304
+ color: @blue = "#1104bb"
305
+ } pre .ruby-value.str, pre .ruby-node {
306
+ color: @dark
307
+ } pre .ruby-ivar, pre .ruby-cvar {
308
+ } pre .ruby-comment {
309
+ color: @green = "#009500"
310
+ } pre .ruby-constant {
311
+ color: @orange = "#cd8802"
312
+ } pre .ruby-keyword {
313
+ color: @purple = "#8d04aa"
314
+ }