Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Runner didn't really make sense to me, but I do know what a CLI is!

  • Loading branch information...
commit e22253879564e34fdd1c5adff1a528083d7a9b82 1 parent a4c81b9
@joshuaclayton joshuaclayton authored
View
2  bin/kumade
@@ -2,4 +2,4 @@
require 'kumade'
-Kumade::Runner.run
+Kumade::CLI.run
View
2  lib/kumade.rb
@@ -2,7 +2,7 @@ module Kumade
autoload :Base, "kumade/base"
autoload :Git, "kumade/git"
autoload :Deployer, "kumade/deployer"
- autoload :Runner, "kumade/runner"
+ autoload :CLI, "kumade/cli"
autoload :Railtie, "kumade/railtie"
autoload :DeploymentError, "kumade/deployment_error"
end
View
2  lib/kumade/runner.rb → lib/kumade/cli.rb
@@ -2,7 +2,7 @@
require 'stringio'
module Kumade
- class Runner
+ class CLI
class << self
attr_reader :environment
end
View
4 lib/tasks/deploy.rake
@@ -2,7 +2,7 @@ namespace :deploy do
Kumade::Git.environments.each do |environment|
desc "Deploy to #{environment} environment"
task environment do
- Kumade::Runner.run([environment])
+ Kumade::CLI.run([environment])
end
end
-end
+end
View
14 spec/kumade/runner_spec.rb → spec/kumade/cli_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
-describe Kumade::Runner do
- subject { Kumade::Runner }
+describe Kumade::CLI do
+ subject { Kumade::CLI }
let(:out){ StringIO.new }
let(:environment){ 'my-environment' }
@@ -28,13 +28,13 @@
end
-describe Kumade::Runner do
+describe Kumade::CLI do
it 'does not let anything get printed' do
stdout = $stdout
stdout.should_not_receive(:print)
output = StringIO.new
- Kumade::Runner.swapping_stdout_for(output) do
+ Kumade::CLI.swapping_stdout_for(output) do
$stdout.puts "Hello, you can't see me."
end
@@ -47,7 +47,7 @@
stdout.should_receive(:print)
output = StringIO.new
- Kumade::Runner.swapping_stdout_for(output) do
+ Kumade::CLI.swapping_stdout_for(output) do
$stdout.puts "Hello, you can see me!"
raise Kumade::DeploymentError.new("error")
end
@@ -57,9 +57,9 @@
stdout = $stdout
stdout.should_receive(:puts)
output = StringIO.new
- Kumade::Runner.should_receive(:pretending?).and_return(true)
+ Kumade::CLI.should_receive(:pretending?).and_return(true)
- Kumade::Runner.swapping_stdout_for(output) do
+ Kumade::CLI.swapping_stdout_for(output) do
$stdout.puts "Hello, you can see me!"
end
end

1 comment on commit e222538

@tapajos

+1

Please sign in to comment.
Something went wrong with that request. Please try again.