closer 0.2.1 → 0.2.2

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: 4064901db19cc84cda7b9fcd7c25adcfa1a76ee5
4
- data.tar.gz: 7a47b1db4381357c332c8ba29180da2ba5fb1eb0
3
+ metadata.gz: dd6497b4dfce9e201c19934bf6b55d1686c87512
4
+ data.tar.gz: 6d859e56a93a327f20fba9409cd6a562e763b5db
5
5
  SHA512:
6
- metadata.gz: 9b72ae61d99ce338ebca230e5d622e3696b6707a679c7b5c2beb380825e7aff02ddddbd985ef4ca554b74ff1b12a991552625b3b30754684be71aec6bee95b1d
7
- data.tar.gz: fb1622c2eb7f4c5ebd1eb2c52bceed9438300567737b342b01ec2aa1f5f25b73920fc0615d4f8aa24a03b0d60e41f17b1d0808971d8d719b4b078a7705396cd4
6
+ metadata.gz: 144a603cdff973fb9f04884bb776f15a7c1424c57b91d0164116a44a1ea00041d5f6cd96adf135b64dcb585e594e7427854ea9dc934783a515cd31f18922c3a5
7
+ data.tar.gz: 235c9f4e7e92bc743ad520161fc4808ee15a5f800a9332c1f6ec8338cb581935530ec36f4344036daf1033dbe0e083a3c9cca91d3f7c2c94d2e9c1223af0c37f
@@ -1,9 +1,9 @@
1
1
  function toggle_feature_dir(feature_dir) {
2
- $(feature_dir).parent('div.feature_dir').nextUntil('div.feature_dir').toggle(250);
2
+ $(feature_dir).parent('div.feature_dir').nextUntil('div.feature_dir').toggle(100);
3
3
  };
4
4
 
5
5
  function toggle_step_file(step_file) {
6
- $(step_file).closest('li').next('.step_contents').toggle(250);
6
+ $(step_file).closest('li').next('.step_contents').toggle(100);
7
7
  event.stopPropagation();
8
8
  };
9
9
 
@@ -11,8 +11,8 @@ $(document).ready(function() {
11
11
  $('li.step').each(function() {
12
12
  var messages = $(this).nextUntil('li.step').filter('.message');
13
13
  if (messages.length > 0) {
14
- $(this).css('cursor', 'pointer').click(function() {
15
- messages.toggle(250);
14
+ $(this).find('.val').css('cursor', 'pointer').click(function() {
15
+ messages.toggle(100);
16
16
  });
17
17
  }
18
18
  });
@@ -24,8 +24,6 @@ module Closer
24
24
 
25
25
  split = feature.file.split(File::SEPARATOR)
26
26
  split.reverse[1..-2].each_with_index do |dir, i|
27
- break if dir == '仕様書' or dir == '開発日記'
28
-
29
27
  if i == 0
30
28
  if short
31
29
  ret = dir.split('.').first + '.'
@@ -96,8 +96,8 @@ module Closer
96
96
  @builder.p('',:id => 'totals')
97
97
  @builder.p('',:id => 'duration')
98
98
  @builder.div(:id => 'expand-collapse') do
99
- @builder.p('Expand All', :id => 'expander')
100
- @builder.p('Collapse All', :id => 'collapser')
99
+ @builder.p('Expand All', :id => 'expander', :style => 'cursor: pointer;')
100
+ @builder.p('Collapse All', :id => 'collapser', :style => 'cursor: pointer;')
101
101
  end
102
102
  end
103
103
  end
@@ -223,7 +223,7 @@ module Closer
223
223
 
224
224
  lines = name.split("\n")
225
225
  @builder.h3(:id => scenario_id) do
226
- @builder.span(lines[0], :class => 'val')
226
+ @builder.span(lines[0], :class => 'val', :style => 'cursor: pointer;')
227
227
  end
228
228
 
229
229
  if lines.size > 1
@@ -550,20 +550,20 @@ module Closer
550
550
  def build_cell(cell_type, value, attributes)
551
551
  @builder.__send__(cell_type, attributes) do
552
552
  @builder.div do
553
- @builder.span(value,:class => 'step param')
553
+ @builder.span(value, :class => 'step param')
554
554
  end
555
555
  end
556
556
  end
557
557
 
558
558
  def inline_css
559
- @builder.style(:type => 'text/css') do
559
+ @builder.style do
560
560
  @builder << File.read(File.dirname(__FILE__) + '/cucumber.css')
561
561
  @builder << File.read(File.dirname(__FILE__) + '/closer.css')
562
562
  end
563
563
  end
564
564
 
565
565
  def inline_js
566
- @builder.script(:type => 'text/javascript') do
566
+ @builder.script do
567
567
  @builder << inline_jquery
568
568
  @builder << inline_js_content
569
569
  @builder << inline_closer
@@ -596,20 +596,17 @@ module Closer
596
596
  SCENARIOS = "h3[id^='scenario_'],h3[id^=background_]";
597
597
 
598
598
  $(document).ready(function() {
599
- $(SCENARIOS).css('cursor', 'pointer');
600
- $(SCENARIOS).click(function() {
601
- $(this).siblings().toggle(250);
599
+ $(SCENARIOS).delegate('.val', 'click', function() {
600
+ $(this).parent().siblings().toggle(100);
602
601
  });
603
602
 
604
- $("#collapser").css('cursor', 'pointer');
605
603
  $("#collapser").click(function() {
606
- $(SCENARIOS).siblings().hide();
607
- $('li.message').hide();
604
+ $(SCENARIOS).siblings().hide(100);
605
+ $('li.message').hide(100);
608
606
  });
609
607
 
610
- $("#expander").css('cursor', 'pointer');
611
608
  $("#expander").click(function() {
612
- $(SCENARIOS).siblings().show();
609
+ $(SCENARIOS).siblings().show(100);
613
610
  });
614
611
  })
615
612
 
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -10,10 +10,10 @@ end
10
10
  task :close => dependencies do |t, args|
11
11
  features = []
12
12
  ARGV[1..-1].each do |arg|
13
- unless arg.index('=')
14
- task arg.to_sym do ; end
15
- features << arg.gsub(/:/, '\:')
16
- end
13
+ next if arg.start_with?('-') or arg.index('=')
14
+
15
+ task arg.to_sym do ; end
16
+ features << arg.gsub(/:/, '\:')
17
17
  end
18
18
 
19
19
  feature_dir = 'features'
@@ -45,9 +45,9 @@ task :close => dependencies do |t, args|
45
45
  '--quiet',
46
46
  '--no-multiline',
47
47
  '--format pretty',
48
- additional_format,
49
- features.join(' ')
50
- ].join(' ')
48
+ additional_format
49
+ ]
50
+ args << '--dry-run' if ENV['DRY_RUN'] or ENV['DR']
51
51
 
52
52
  options = [
53
53
  'DRIVER=' + (ENV['DRIVER'] || 'poltergeist'),
@@ -56,10 +56,10 @@ task :close => dependencies do |t, args|
56
56
  'ACCEPTANCE_TEST=true',
57
57
  'EXPAND=' + (ENV['EXPAND'] || 'true'),
58
58
  'COMMAND_NAME=' + (ENV['COMMAND_NAME'] || feature_dir.split('_').map{|a| a.capitalize }.join)
59
- ].join(' ')
59
+ ]
60
60
 
61
61
  report_dir = File.join(feature_dir, 'reports')
62
62
  fail unless system("mkdir -p #{report_dir}")
63
63
  fail unless system("rm -Rf #{report_dir}/*")
64
- fail unless system("bundle exec cucumber #{args} #{options}")
64
+ fail unless system("bundle exec cucumber #{args.join(' ')} #{options.join(' ')} #{features.join(' ')}")
65
65
  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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber