scripting 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -40,7 +40,7 @@ module Scripting
40
40
 
41
41
  help do
42
42
  $stderr.puts "\nAvailable commands:"
43
- max_width = options.commands.keys.collect(&:length).max
43
+ max_width = options.commands.keys.collect { |key| key.to_s.length }.max
44
44
  options.commands.each do |k,v|
45
45
  $stderr.puts sprintf(" %*s: %s", max_width, k, v.description)
46
46
  end
data/scripting.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scripting}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["sdeming"]
@@ -47,21 +47,18 @@ describe Scripting::Commands::Command do
47
47
 
48
48
  it "should run the specified command" do
49
49
  @app.run! 'answer'
50
- @stdout.should include("42")
50
+ @stdout.should == "42\n"
51
51
  end
52
52
 
53
53
  it "should send arguments to the specified command" do
54
54
  @app.run! %w{add 4 8}
55
- @stdout.should include("12")
55
+ @stdout.should == "12.0\n"
56
56
  end
57
57
 
58
58
  it "should run the specified command as well as other work items" do
59
- @app.describe do
60
- work { puts "Hello world!" }
61
- end
59
+ @app.work { puts "Hello world!" }
62
60
  @app.run! %w{echo to infinity and beyond!}
63
- @stdout.should include("to infinity and beyond!")
64
- @stdout.should include("Hello world!")
61
+ @stdout.should == "to infinity and beyond!\nHello world!\n"
65
62
  end
66
63
 
67
64
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: scripting
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - sdeming
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- hash: 913442681717536161
95
+ hash: 4148192804319844985
96
96
  segments:
97
97
  - 0
98
98
  version: "0"