closer 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd6497b4dfce9e201c19934bf6b55d1686c87512
4
- data.tar.gz: 6d859e56a93a327f20fba9409cd6a562e763b5db
3
+ metadata.gz: b7df1d1e2ba8af431c71eabf94f33d80ec3f8813
4
+ data.tar.gz: ecae58a8843e10d29d30c4b182e1a03005f0e67b
5
5
  SHA512:
6
- metadata.gz: 144a603cdff973fb9f04884bb776f15a7c1424c57b91d0164116a44a1ea00041d5f6cd96adf135b64dcb585e594e7427854ea9dc934783a515cd31f18922c3a5
7
- data.tar.gz: 235c9f4e7e92bc743ad520161fc4808ee15a5f800a9332c1f6ec8338cb581935530ec36f4344036daf1033dbe0e083a3c9cca91d3f7c2c94d2e9c1223af0c37f
6
+ metadata.gz: 1e3d6290b096567d028cccdbd03ba7c0420665793f515121033bd63eac60b8e7490d37b32608bf6acf1296e385d918298b6191ed02eeea9a7186a887b2639c39
7
+ data.tar.gz: 99983c21d145fa3fcddfcf73f67fa6a39d3bf8308c86258cc5eda5498ce42829975d187524981652a83cc3a43953d8856b9236a956aa17d6d252d4ba98343f55
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.required_ruby_version = '~> 2.0'
21
21
 
22
- spec.add_runtime_dependency 'cucumber', '~> 2.0'
22
+ spec.add_runtime_dependency 'cucumber', '~> 2.1'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
@@ -14,6 +14,11 @@
14
14
  color: #000000;
15
15
  }
16
16
 
17
+ .cucumber ol li.step {
18
+ padding: 3px 0 3px 0;
19
+ margin: 5px 0 5px 0;
20
+ }
21
+
17
22
  .cucumber ol li.passed,
18
23
  td ol li.passed,
19
24
  th ol li.passed,
@@ -71,7 +76,7 @@ div.contents {
71
76
  }
72
77
 
73
78
  div.feature .narrative {
74
- margin: 10px 21px;
79
+ margin: 10px 2em;
75
80
  line-height: 1.5em;
76
81
  }
77
82
 
@@ -103,7 +108,7 @@ div.scenario.pending .scenario_file {
103
108
 
104
109
  div.scenario ol {
105
110
  margin-top: 1em;
106
- margin-left: 5px;
111
+ margin-left: 2em;
107
112
  }
108
113
 
109
114
  div.scenario table {
@@ -68,6 +68,10 @@ module Closer
68
68
  end
69
69
  end
70
70
 
71
+ def indent_size(text)
72
+ text.to_s[/\A */].size
73
+ end
74
+
71
75
  end
72
76
  end
73
77
  end
@@ -22,7 +22,7 @@ module Closer
22
22
  include CloserHtml
23
23
 
24
24
  def initialize(runtime, path_or_io, options)
25
- @io = ensure_io(path_or_io, "html")
25
+ @io = ensure_io(path_or_io)
26
26
  @runtime = runtime
27
27
  @options = options
28
28
  @buffer = {}
@@ -222,13 +222,15 @@ module Closer
222
222
  end
223
223
 
224
224
  lines = name.split("\n")
225
+ title = lines.shift
225
226
  @builder.h3(:id => scenario_id) do
226
- @builder.span(lines[0], :class => 'val', :style => 'cursor: pointer;')
227
+ @builder.span(title, :class => 'val', :style => 'cursor: pointer;')
227
228
  end
228
229
 
229
- if lines.size > 1
230
+ if lines.size > 0
230
231
  @builder.pre(:class => 'narrative', :style => 'display: none;') do
231
- @builder << lines[1..-1].join("\n")
232
+ trim_size = indent_size(lines.first)
233
+ @builder << lines.map{|line| line[trim_size..-1] }.join("\n")
232
234
  end
233
235
  end
234
236
  end
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.2.2'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement