turnip_formatter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +20 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +3 -0
  5. data/Guardfile +5 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +54 -0
  8. data/Rakefile +1 -0
  9. data/lib/rspec/core/formatters/turnip_formatter.rb +61 -0
  10. data/lib/turnip_formatter/ext/turnip/builder.rb +46 -0
  11. data/lib/turnip_formatter/ext/turnip/rspec.rb +73 -0
  12. data/lib/turnip_formatter/formatter.css +159 -0
  13. data/lib/turnip_formatter/formatter.scss +225 -0
  14. data/lib/turnip_formatter/scenario/failure.rb +47 -0
  15. data/lib/turnip_formatter/scenario/pass.rb +19 -0
  16. data/lib/turnip_formatter/scenario/pending.rb +37 -0
  17. data/lib/turnip_formatter/scenario.rb +63 -0
  18. data/lib/turnip_formatter/step/failure.rb +21 -0
  19. data/lib/turnip_formatter/step/pending.rb +21 -0
  20. data/lib/turnip_formatter/step.rb +18 -0
  21. data/lib/turnip_formatter/template.rb +243 -0
  22. data/lib/turnip_formatter/version.rb +5 -0
  23. data/lib/turnip_formatter.rb +14 -0
  24. data/spec/examples/README.md +124 -0
  25. data/spec/examples/features/battle.feature +36 -0
  26. data/spec/examples/features/battle2.feature +17 -0
  27. data/spec/examples/features/battle3.feature +16 -0
  28. data/spec/examples/features/songs.feature +10 -0
  29. data/spec/examples/images/background.png +0 -0
  30. data/spec/examples/images/basic_step.png +0 -0
  31. data/spec/examples/images/failed_step.png +0 -0
  32. data/spec/examples/images/multiline.png +0 -0
  33. data/spec/examples/images/outline.png +0 -0
  34. data/spec/examples/images/pending_and_tagged_step.png +0 -0
  35. data/spec/examples/spec_helper.rb +8 -0
  36. data/spec/examples/steps/spell_steps.rb +5 -0
  37. data/spec/examples/steps/steps.rb +50 -0
  38. data/spec/rspec/core/formatters/turnip_formatter_spec.rb +101 -0
  39. data/spec/spec_helper.rb +17 -0
  40. data/spec/support/passed.feature +4 -0
  41. data/spec/support/shared_context_examples.rb +17 -0
  42. data/spec/turnip_formatter/scenario/failure_spec.rb +55 -0
  43. data/spec/turnip_formatter/scenario/pass_spec.rb +73 -0
  44. data/spec/turnip_formatter/scenario/pending_spec.rb +60 -0
  45. data/spec/turnip_formatter/step/failure_spec.rb +41 -0
  46. data/spec/turnip_formatter/step/pending_spec.rb +28 -0
  47. data/spec/turnip_formatter/step_spec.rb +32 -0
  48. data/spec/turnip_formatter/template_spec.rb +161 -0
  49. data/turnip_formatter.gemspec +26 -0
  50. metadata +206 -0
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ vendor/bundle
19
+ .sass-cache
20
+
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ script: bundle exec rspec
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,5 @@
1
+ guard 'rspec' do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Wataru MIYAGUNI
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ RSpec::Core::Formatters::TurnipFormatter
2
+ ========================================
3
+
4
+ TurnipFormatter is a pretty custom formatter for [Turnip](https://github.com/jnicklas/turnip).
5
+
6
+ [![Build Status](https://travis-ci.org/gongo/turnip_formatter.png?branch=master)](https://travis-ci.org/gongo/turnip_formatter)
7
+ [![Coverage Status](https://coveralls.io/repos/gongo/turnip_formatter/badge.png?branch=master)](https://coveralls.io/r/gongo/turnip_formatter)
8
+ [![Code Climate](https://codeclimate.com/github/gongo/turnip_formatter.png)](https://codeclimate.com/github/gongo/turnip_formatter)
9
+ [![Dependency Status](https://gemnasium.com/gongo/turnip_formatter.png)](https://gemnasium.com/gongo/turnip_formatter)
10
+
11
+ Requirements
12
+ --------------------
13
+
14
+ * Ruby
15
+ * `~> 1.9.3`
16
+ * `~> 2.0.0`
17
+
18
+ Installation
19
+ --------------------
20
+
21
+ ### RubyGems
22
+
23
+ $ gem install turnip_formatter
24
+
25
+ ### Bundler
26
+
27
+ Add this line to your application's Gemfile:
28
+
29
+ ```ruby
30
+ group :test do
31
+ gem 'turnip_formatter'
32
+ end
33
+ ```
34
+
35
+ And then execute:
36
+
37
+ $ bundle install
38
+
39
+ Usage
40
+ --------------------
41
+
42
+ Run this command.
43
+
44
+ $ rspec -r turnip_formatter --format RSpecTurnipFormatter --out report.html
45
+
46
+ Example
47
+ --------------------
48
+
49
+ see https://github.com/gongo/turnip_formatter/tree/master/spec/examples
50
+
51
+ License
52
+ --------------------
53
+
54
+ see LICENSE.txt
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,61 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'rspec/core/formatters/base_formatter'
4
+ require 'turnip_formatter/scenario/pass'
5
+ require 'turnip_formatter/scenario/failure'
6
+ require 'turnip_formatter/scenario/pending'
7
+ require 'turnip_formatter/template'
8
+
9
+ module RSpec
10
+ module Core
11
+ module Formatters
12
+ class TurnipFormatter < BaseFormatter
13
+
14
+ def initialize(output)
15
+ super(output)
16
+ @template = ::TurnipFormatter::Template.new
17
+ end
18
+
19
+ def start(example_count)
20
+ super(example_count)
21
+ output.puts @template.print_header
22
+ end
23
+
24
+ def dump_summary(duration, example_count, failure_count, pending_count)
25
+ output.puts @template.print_footer(example_count, failure_count, pending_count, duration)
26
+ end
27
+
28
+ def example_passed(example)
29
+ super(example)
30
+ scenario = ::TurnipFormatter::Scenario::Pass.new(example)
31
+ output_scenario(scenario)
32
+ end
33
+
34
+ def example_pending(example)
35
+ super(example)
36
+ scenario = ::TurnipFormatter::Scenario::Pending.new(example)
37
+ output_scenario(scenario)
38
+ end
39
+
40
+ def example_failed(example)
41
+ super(example)
42
+ scenario = ::TurnipFormatter::Scenario::Failure.new(example)
43
+ output_scenario(scenario)
44
+ end
45
+
46
+ private
47
+
48
+ def output_scenario(scenario)
49
+ scenario.validation
50
+ output.puts @template.print_scenario(scenario)
51
+ rescue => e
52
+ output_runtime_error(e)
53
+ end
54
+
55
+ def output_runtime_error(exception)
56
+ output.puts @template.print_runtime_error(examples.last, exception)
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,46 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'turnip/builder'
4
+
5
+ module Turnip
6
+ class Builder
7
+ class ScenarioOutline
8
+ def to_scenarios(examples)
9
+ rows = examples.rows.map(&:cells)
10
+ headers = rows.shift
11
+ rows.map do |row|
12
+ Scenario.new(@raw).tap do |scenario|
13
+ scenario.steps = steps.map do |step|
14
+ new_description = substitute(step.description, headers, row)
15
+ new_extra_args = step.extra_args.map do |ea|
16
+ next ea unless ea.instance_of?(Turnip::Table)
17
+ Turnip::Table.new(ea.map {|t_row| t_row.map {|t_col| substitute(t_col, headers, row) } })
18
+ end
19
+ Step1.new(new_description, new_extra_args, step.line, step.keyword)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ class Step1 < Struct.new(:description, :extra_args, :line, :keyword, :tags)
27
+ def split(*args)
28
+ self.to_s.split(*args)
29
+ end
30
+
31
+ def to_s
32
+ description
33
+ end
34
+ end
35
+
36
+ def step(step)
37
+ extra_args = []
38
+ if step.doc_string
39
+ extra_args.push step.doc_string.value
40
+ elsif step.rows
41
+ extra_args.push Turnip::Table.new(step.rows.map { |row| row.cells(&:value) })
42
+ end
43
+ @current_step_context.steps << Step1.new(step.name, extra_args, step.line, step.keyword)
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,73 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'turnip/rspec'
4
+
5
+ module Turnip
6
+ module RSpec
7
+ module Execute
8
+ def run_step(feature_file, step, index)
9
+ begin
10
+ step(step)
11
+ rescue Turnip::Pending
12
+ pending("No such step(#{index}): '#{step}'")
13
+ rescue StandardError => e
14
+ e.backtrace.push "#{feature_file}:#{step.line}:in step:#{index} `#{step.description}'"
15
+ raise e
16
+ end
17
+ end
18
+
19
+ def initialize_scenario_metadata
20
+ example.metadata[:steps] = {
21
+ descriptions: [],
22
+ docstrings: [],
23
+ keywords: [],
24
+ tags: [],
25
+ }
26
+ end
27
+
28
+ def push_scenario_metadata(scenario)
29
+ steps = scenario.steps
30
+ example.metadata[:steps].tap do |meta|
31
+ meta[:descriptions] += steps.map(&:description)
32
+ meta[:docstrings] += steps.map(&:extra_args)
33
+ meta[:keywords] += steps.map(&:keyword)
34
+ meta[:tags] = scenario.tags if scenario.respond_to?(:tags)
35
+ end
36
+ end
37
+ end
38
+
39
+ class << self
40
+ def run(feature_file)
41
+ Turnip::Builder.build(feature_file).features.each do |feature|
42
+ describe feature.name, feature.metadata_hash do
43
+ before do
44
+ example.metadata[:file_path] = feature_file
45
+ initialize_scenario_metadata
46
+
47
+ feature.backgrounds.each do |background|
48
+ push_scenario_metadata(background)
49
+ end
50
+
51
+ feature.backgrounds.map(&:steps).flatten.each.with_index do |step, index|
52
+ run_step(feature_file, step, index)
53
+ end
54
+ end
55
+ feature.scenarios.each do |scenario|
56
+ describe scenario.name, scenario.metadata_hash do
57
+ before do
58
+ push_scenario_metadata(scenario)
59
+ end
60
+
61
+ it scenario.steps.map(&:description).join(' -> ') do
62
+ scenario.steps.each.with_index do |step, index|
63
+ run_step(feature_file, step, index)
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,159 @@
1
+ body {
2
+ background-color: #586e75; }
3
+
4
+ div#report {
5
+ width: 90%;
6
+ margin: 0 auto;
7
+ padding: 2em;
8
+ background: black;
9
+ color: #aaffaa; }
10
+
11
+ div#main {
12
+ width: 90%;
13
+ margin: 0 auto;
14
+ padding: 2em;
15
+ background-color: #fff9f9; }
16
+
17
+ section.scenario {
18
+ margin: 1em 0em;
19
+ padding-left: 1em;
20
+ border: 2px solid green; }
21
+ section.scenario > header {
22
+ margin: 1em 0em; }
23
+ section.scenario > header span.scenario_name {
24
+ font-weight: bold;
25
+ font-size: 14px; }
26
+ section.scenario > header span.feature_name {
27
+ font-size: 13px;
28
+ color: #839496; }
29
+ section.scenario > header span.permalink {
30
+ margin-right: 1em;
31
+ font-size: 15px; }
32
+ section.scenario > header span.permalink a {
33
+ color: #268bd2; }
34
+ section.scenario > ul.tags {
35
+ font-size: 12px; }
36
+ section.scenario > ul.tags li {
37
+ color: #839496;
38
+ display: inline; }
39
+ section.scenario.passed {
40
+ border-color: green; }
41
+ section.scenario.passed > header .scenario_name {
42
+ color: #859900; }
43
+ section.scenario.passed > header .scenario_name:before {
44
+ content: "\2713\20"; }
45
+ section.scenario.failed {
46
+ border-color: #dc322f; }
47
+ section.scenario.failed > header .scenario_name {
48
+ color: #dc322f; }
49
+ section.scenario.failed > header .scenario_name:before {
50
+ content: "\2717\20"; }
51
+ section.scenario.pending {
52
+ border-color: #b58900; }
53
+ section.scenario.pending > header .scenario_name {
54
+ color: #b58900; }
55
+ section.scenario.pending > header .scenario_name:before {
56
+ content: "\d8\20"; }
57
+ section.scenario ul.steps {
58
+ font-size: 12px;
59
+ list-style-type: none; }
60
+ section.scenario ul.steps li.step {
61
+ padding: 0.5em;
62
+ font-weight: bold;
63
+ margin: 0.5em 0em; }
64
+ section.scenario ul.steps li.step > span {
65
+ padding: 0.5em;
66
+ background-color: #eeffee;
67
+ border: 1px solid #00aa00;
68
+ color: #00aa00; }
69
+ section.scenario ul.steps li.step > span:hover {
70
+ border-width: 3px; }
71
+ section.scenario ul.steps li.step > span ~ * {
72
+ margin-left: 2em; }
73
+ section.scenario ul.steps li.step div.args {
74
+ font-size: 11px; }
75
+ section.scenario ul.steps li.step.failure > span {
76
+ background-color: #ffdddd;
77
+ border: 1px solid #dd0000;
78
+ color: #dd0000; }
79
+ section.scenario ul.steps li.step.failure > span:hover {
80
+ border-width: 3px; }
81
+ section.scenario ul.steps li.step.failure > span ~ * {
82
+ margin-left: 2em; }
83
+ section.scenario ul.steps li.step.failure > div.args {
84
+ padding: 1em;
85
+ background-color: #ffeeee;
86
+ border: 1px solid #cc8888; }
87
+ section.scenario ul.steps li.step.failure ~ li > span {
88
+ background-color: #cccccc;
89
+ border: 1px solid #444444;
90
+ color: #333333; }
91
+ section.scenario ul.steps li.step.failure ~ li > span:hover {
92
+ border-width: 3px; }
93
+ section.scenario ul.steps li.step.failure ~ li > span ~ * {
94
+ margin-left: 2em; }
95
+ section.scenario ul.steps li.step.pending > span {
96
+ background-color: #ffffbb;
97
+ border: 1px solid #666600;
98
+ color: #666600; }
99
+ section.scenario ul.steps li.step.pending > span:hover {
100
+ border-width: 3px; }
101
+ section.scenario ul.steps li.step.pending > span ~ * {
102
+ margin-left: 2em; }
103
+ section.scenario ul.steps li.step.pending > div.args {
104
+ padding: 1em;
105
+ background-color: #ffffaa;
106
+ border: 1px solid #999944; }
107
+ section.scenario ul.steps li.step.pending ~ li > span {
108
+ background-color: #cccccc;
109
+ border: 1px solid #444444;
110
+ color: #333333; }
111
+ section.scenario ul.steps li.step.pending ~ li > span:hover {
112
+ border-width: 3px; }
113
+ section.scenario ul.steps li.step.pending ~ li > span ~ * {
114
+ margin-left: 2em; }
115
+ section.scenario ul.steps table.step_outline {
116
+ margin-top: 2em; }
117
+ section.scenario ul.steps table.step_outline tr:nth-child(odd) {
118
+ background-color: #ddddcc; }
119
+ section.scenario ul.steps table.step_outline tr:nth-child(even) {
120
+ background-color: #ccccdd; }
121
+ section.scenario ul.steps table.step_outline td {
122
+ border: 2px solid black;
123
+ padding: 0.3em 1em; }
124
+ section.scenario ul.steps pre.multiline {
125
+ margin-top: 2em;
126
+ font-size: 13px;
127
+ color: #586e75; }
128
+ section.scenario ul.steps div.step_exception {
129
+ margin: 1em 0em 1em 0em;
130
+ padding: 1em 0em 1em 1em;
131
+ border: 1px solid #999999;
132
+ background-color: #eee8d5;
133
+ color: #586e75; }
134
+ section.scenario ul.steps div.step_exception > pre {
135
+ margin-left: 1em; }
136
+ section.scenario ul.steps pre.source {
137
+ font-size: 12px;
138
+ font-family: monospace;
139
+ background-color: #073642;
140
+ color: #dddddd; }
141
+ section.scenario ul.steps pre.source code.ruby {
142
+ padding: 0.1em 0 0.2em 0; }
143
+ section.scenario ul.steps pre.source code.ruby .linenum {
144
+ width: 75px;
145
+ color: #fffbd3;
146
+ padding-right: 1em; }
147
+ section.scenario ul.steps pre.source code.ruby .offending {
148
+ background-color: gray; }
149
+
150
+ section.exception {
151
+ margin: 1em 0em;
152
+ border: 2px solid #268bd2;
153
+ padding: 2em; }
154
+ section.exception dt {
155
+ line-height: 2em;
156
+ font-size: 15px; }
157
+ section.exception dd {
158
+ line-height: 2em;
159
+ font-size: 14px; }
@@ -0,0 +1,225 @@
1
+ @mixin step_span {
2
+ &:hover { border-width: 3px; }
3
+ ~ * { margin-left: 2em; }
4
+ }
5
+
6
+ @mixin noop_step_span {
7
+ @include step_span;
8
+
9
+ background-color: #cccccc;
10
+ border: 1px solid #444444;
11
+ color: #333333;
12
+ }
13
+
14
+ body {
15
+ background-color: #586e75;
16
+ }
17
+
18
+ div#report {
19
+ width: 90%;
20
+ margin: 0 auto;
21
+ padding: 2em;
22
+ background: black;
23
+ color: #aaffaa;
24
+
25
+ }
26
+
27
+ div#main {
28
+ width: 90%;
29
+ margin: 0 auto;
30
+ padding: 2em;
31
+ background-color: #fff9f9;
32
+ }
33
+
34
+ section.scenario {
35
+ margin: 1em 0em;
36
+ padding-left: 1em;
37
+ border: 2px solid green;
38
+
39
+ > header {
40
+ margin: 1em 0em;
41
+
42
+ span.scenario_name {
43
+ font-weight: bold;
44
+ font-size: 14px;
45
+ }
46
+
47
+ span.feature_name {
48
+ font-size: 13px;
49
+ color: #839496;
50
+ }
51
+
52
+ span.permalink {
53
+ margin-right: 1em;
54
+ font-size: 15px;
55
+ a { color: #268bd2; }
56
+ }
57
+ }
58
+
59
+ > ul.tags {
60
+ font-size: 12px;
61
+
62
+ li {
63
+ color: #839496;
64
+ display: inline;
65
+ }
66
+ }
67
+
68
+ &.passed {
69
+ border-color: green;
70
+
71
+ > header .scenario_name {
72
+ color: #859900;
73
+ &:before { content: "\2713\20"; }
74
+ }
75
+ }
76
+
77
+ &.failed {
78
+ border-color: #dc322f;
79
+
80
+ > header .scenario_name {
81
+ color: #dc322f;
82
+ &:before { content: "\2717\20"; }
83
+ }
84
+ }
85
+
86
+ &.pending {
87
+ border-color: #b58900;
88
+
89
+ > header .scenario_name {
90
+ color: #b58900;
91
+ &:before { content: "\d8\20"; }
92
+ }
93
+ }
94
+
95
+ ul.steps {
96
+ font-size: 12px;
97
+ list-style-type: none;
98
+
99
+ li.step {
100
+ padding: 0.5em;
101
+ font-weight: bold;
102
+ margin: 0.5em 0em;
103
+
104
+ > span {
105
+ padding: 0.5em;
106
+ background-color: #eeffee;
107
+ border: 1px solid #00aa00;
108
+ color: #00aa00;
109
+
110
+ @include step_span;
111
+ }
112
+
113
+ div.args {
114
+ font-size: 11px;
115
+ }
116
+
117
+ &.failure {
118
+ > span {
119
+ background-color: #ffdddd;
120
+ border: 1px solid #dd0000;
121
+ color: #dd0000;
122
+
123
+ @include step_span;
124
+ }
125
+
126
+ > div.args {
127
+ padding: 1em;
128
+ background-color: #ffeeee;
129
+ border: 1px solid #cc8888;
130
+ }
131
+
132
+ ~ li > span { @include noop_step_span; }
133
+ }
134
+
135
+ &.pending {
136
+ > span {
137
+ background-color: #ffffbb;
138
+ border: 1px solid #666600;
139
+ color: #666600;
140
+
141
+ @include step_span;
142
+ }
143
+
144
+ > div.args {
145
+ padding: 1em;
146
+ background-color: #ffffaa;
147
+ border: 1px solid #999944;
148
+ }
149
+
150
+ ~ li > span { @include noop_step_span; }
151
+ }
152
+ }
153
+
154
+ table.step_outline {
155
+ margin-top: 2em;
156
+
157
+ tr:nth-child(odd) {
158
+ background-color: #ddddcc;
159
+ }
160
+
161
+ tr:nth-child(even) {
162
+ background-color: #ccccdd;
163
+ }
164
+
165
+ td {
166
+ border: 2px solid black;
167
+ padding: 0.3em 1em;
168
+ }
169
+ }
170
+
171
+ pre.multiline {
172
+ margin-top: 2em;
173
+ font-size: 13px;
174
+ color: #586e75;
175
+ }
176
+
177
+ div.step_exception {
178
+ margin: 1em 0em 1em 0em;
179
+ padding: 1em 0em 1em 1em;
180
+ border: 1px solid #999999;
181
+ background-color: #eee8d5;
182
+ color: #586e75;
183
+
184
+ > pre {
185
+ margin-left: 1em;
186
+ }
187
+ }
188
+
189
+ pre.source {
190
+ font-size: 12px;
191
+ font-family: monospace;
192
+ background-color: #073642;
193
+ color: #dddddd;
194
+
195
+ code.ruby {
196
+ padding: 0.1em 0 0.2em 0;
197
+
198
+ .linenum {
199
+ width: 75px;
200
+ color: #fffbd3;
201
+ padding-right: 1em;
202
+ }
203
+
204
+ .offending { background-color: gray; }
205
+ }
206
+ }
207
+
208
+ }
209
+ }
210
+
211
+ section.exception {
212
+ margin: 1em 0em;
213
+ border: 2px solid #268bd2;
214
+ padding: 2em;
215
+
216
+ dt {
217
+ line-height: 2em;
218
+ font-size: 15px;
219
+ }
220
+
221
+ dd {
222
+ line-height: 2em;
223
+ font-size: 14px;
224
+ }
225
+ }