wunderbar 1.0.25 → 1.0.26

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: 710438973a47536b061e65bf8f1f89a553d7f126
4
- data.tar.gz: 73abd223735d22b5601042e665509179865012ef
3
+ metadata.gz: f72ccafe732fc27dc2c30b1e6f02bace6bb05863
4
+ data.tar.gz: 75a7092019d7bb7fe2eff0e73274929081dd78e8
5
5
  SHA512:
6
- metadata.gz: 22402975a71fd1c0d527b2de27c02793fb9cb3ed80641075955a4597b88bca0b4f9dcecb51ebba5752e02fee6b65fe69c657d70a1be1d7e05cb5cf5f3b1f01e1
7
- data.tar.gz: b2905a43b6d2881dbc48415edf69b84616c6e34bbac2d7f3bc5eef254b7688ac956dcdd87be9c3dbf13bf0cbdd1ef7180c1d4eb11c43bfbee038be258817d4dd
6
+ metadata.gz: 9f981407064c0c282a516b1bb9e39d6d528e644c47fa8b9e00c2dc705e21060072cb60b7d5f42a30136192f9282c339d3689de385fccbe808f4b627a2b0f5473
7
+ data.tar.gz: b5ebbdbdd58b0b72df5d6264abe25209fb85d221e90455dba0fb1c61d40dc38f750f373ac788f85e53b9e525d3b4535f3eb3b4ccd63a2107c69835904c2d39bb
@@ -40,7 +40,12 @@ module Wunderbar
40
40
  end
41
41
 
42
42
  # execute a system command, echoing stdin, stdout, and stderr
43
- def system(command, opts={})
43
+ def system(*args)
44
+ opts = {}
45
+ opts = args.pop if Hash === args.last
46
+ command = args
47
+ command = args.first if args.length == 1 and Array === args.first
48
+
44
49
  if command.respond_to? :flatten
45
50
  flat = command.flatten
46
51
  secret = command - flat
@@ -282,7 +287,12 @@ module Wunderbar
282
287
  end
283
288
 
284
289
  # execute a system command, echoing stdin, stdout, and stderr
285
- def system(command, opts={})
290
+ def system(*args)
291
+ opts = {}
292
+ opts = args.pop if Hash === args.last
293
+ command = args
294
+ command = args.first if args.length == 1 and Array === args.first
295
+
286
296
  tag = opts[:tag] || 'pre'
287
297
  output_class = opts[:class] || {}
288
298
  output_class[:stdin] ||= '_stdin'
@@ -438,7 +448,12 @@ module Wunderbar
438
448
  end
439
449
 
440
450
  # execute a system command, echoing stdin, stdout, and stderr
441
- def system(command, opts={})
451
+ def system(*args)
452
+ opts = {}
453
+ opts = args.pop if Hash === args.last
454
+ command = args
455
+ command = args.first if args.length == 1 and Array === args.first
456
+
442
457
  output_prefix = opts[:prefix] || {}
443
458
  output_prefix[:stdin] ||= '$ '
444
459
 
@@ -554,17 +569,36 @@ module Wunderbar
554
569
  end
555
570
 
556
571
  # execute a system command, echoing stdin, stdout, and stderr
557
- def system(command, opts={})
572
+ def system(*args)
573
+ opts = {}
574
+ opts = args.pop if Hash === args.last
575
+ command = args
576
+ command = args.first if args.length == 1 and Array === args.first
577
+
558
578
  transcript = opts[:transcript] || 'transcript'
559
579
  output_prefix = opts[:prefix] || {}
560
580
  output_prefix[:stdin] ||= '$ '
561
- @_target[transcript] ||= []
581
+
582
+ if @_target[transcript]
583
+ @_target[transcript] << ''
584
+ else
585
+ @_target[transcript] = []
586
+ end
562
587
 
563
588
  super do |kind, line|
564
589
  @_target[transcript] << "#{output_prefix[kind]}#{line}"
565
590
  end
566
591
  end
567
592
 
593
+ # execute a system command, ensuring the result is a success
594
+ def system!(*args)
595
+ rc = system(args)
596
+
597
+ raise RuntimeError.new("exit code: #{rc}") if rc != 0
598
+
599
+ rc
600
+ end
601
+
568
602
  def target!
569
603
  begin
570
604
  JSON.pretty_generate(@_target)+ "\n"
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 25
5
+ TINY = 26
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/wunderbar.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: wunderbar 1.0.25 ruby lib
2
+ # stub: wunderbar 1.0.26 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "wunderbar"
6
- s.version = "1.0.25"
6
+ s.version = "1.0.26"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Sam Ruby"]
11
- s.date = "2016-09-08"
11
+ s.date = "2016-09-11"
12
12
  s.description = " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML, Unicode\n (utf-8), consistently indented, readable applications.'\n"
13
13
  s.email = "rubys@intertwingly.net"
14
14
  s.files = ["COPYING", "README.md", "lib/wunderbar", "lib/wunderbar.rb", "lib/wunderbar/angularjs", "lib/wunderbar/angularjs.rb", "lib/wunderbar/angularjs/resource.rb", "lib/wunderbar/angularjs/route.rb", "lib/wunderbar/asset.rb", "lib/wunderbar/backtick.rb", "lib/wunderbar/bootstrap", "lib/wunderbar/bootstrap.rb", "lib/wunderbar/bootstrap/theme.rb", "lib/wunderbar/builder.rb", "lib/wunderbar/cgi-methods.rb", "lib/wunderbar/coderay.rb", "lib/wunderbar/coffeescript.rb", "lib/wunderbar/cssproxy.rb", "lib/wunderbar/environment.rb", "lib/wunderbar/eventsource.rb", "lib/wunderbar/html-methods.rb", "lib/wunderbar/installation.rb", "lib/wunderbar/job-control.rb", "lib/wunderbar/jquery", "lib/wunderbar/jquery.rb", "lib/wunderbar/jquery/filter.rb", "lib/wunderbar/jquery/stupidtable.rb", "lib/wunderbar/listen.rb", "lib/wunderbar/logger.rb", "lib/wunderbar/markdown.rb", "lib/wunderbar/marked.rb", "lib/wunderbar/node.rb", "lib/wunderbar/pagedown.rb", "lib/wunderbar/polymer.rb", "lib/wunderbar/rack.rb", "lib/wunderbar/rails.rb", "lib/wunderbar/react.rb", "lib/wunderbar/script.rb", "lib/wunderbar/server.rb", "lib/wunderbar/sinatra.rb", "lib/wunderbar/underscore.rb", "lib/wunderbar/vendor", "lib/wunderbar/vendor/Markdown.Converter.js", "lib/wunderbar/vendor/angular-resource.min.js", "lib/wunderbar/vendor/angular-route.min.js", "lib/wunderbar/vendor/angular.min.js", "lib/wunderbar/vendor/bootstrap-theme.min.css", "lib/wunderbar/vendor/bootstrap.min.css", "lib/wunderbar/vendor/bootstrap.min.js", "lib/wunderbar/vendor/eventsource.min.js", "lib/wunderbar/vendor/jquery-1.11.2.min.js", "lib/wunderbar/vendor/marked.min.js", "lib/wunderbar/vendor/polymer-v0.0.20131003.min.js", "lib/wunderbar/vendor/react-dom.min.js", "lib/wunderbar/vendor/react-with-addons.min.js", "lib/wunderbar/vendor/stupidtable.min.js", "lib/wunderbar/vendor/underscore-min.js", "lib/wunderbar/version.rb", "lib/wunderbar/websocket.rb", "wunderbar.gemspec"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wunderbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.25
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-08 00:00:00.000000000 Z
11
+ date: 2016-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json