Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit e22253879564e34fdd1c5adff1a528083d7a9b82 1 parent a4c81b9
Joshua Clayton authored September 08, 2011
2  bin/kumade
@@ -2,4 +2,4 @@
2 2
 
3 3
 require 'kumade'
4 4
 
5  
-Kumade::Runner.run
  5
+Kumade::CLI.run
2  lib/kumade.rb
@@ -2,7 +2,7 @@ module Kumade
2 2
   autoload :Base,            "kumade/base"
3 3
   autoload :Git,             "kumade/git"
4 4
   autoload :Deployer,        "kumade/deployer"
5  
-  autoload :Runner,          "kumade/runner"
  5
+  autoload :CLI,             "kumade/cli"
6 6
   autoload :Railtie,         "kumade/railtie"
7 7
   autoload :DeploymentError, "kumade/deployment_error"
8 8
 end
2  lib/kumade/runner.rb → lib/kumade/cli.rb
@@ -2,7 +2,7 @@
2 2
 require 'stringio'
3 3
 
4 4
 module Kumade
5  
-  class Runner
  5
+  class CLI
6 6
     class << self
7 7
       attr_reader :environment
8 8
     end
4  lib/tasks/deploy.rake
@@ -2,7 +2,7 @@ namespace :deploy do
2 2
   Kumade::Git.environments.each do |environment|
3 3
     desc "Deploy to #{environment} environment"
4 4
     task environment do
5  
-      Kumade::Runner.run([environment])
  5
+      Kumade::CLI.run([environment])
6 6
     end
7 7
   end
8  
-end
  8
+end
14  spec/kumade/runner_spec.rb → spec/kumade/cli_spec.rb
... ...
@@ -1,7 +1,7 @@
1 1
 require 'spec_helper'
2 2
 
3  
-describe Kumade::Runner do
4  
-  subject { Kumade::Runner }
  3
+describe Kumade::CLI do
  4
+  subject { Kumade::CLI }
5 5
   let(:out){ StringIO.new }
6 6
   let(:environment){ 'my-environment' }
7 7
 
@@ -28,13 +28,13 @@
28 28
 
29 29
 end
30 30
 
31  
-describe Kumade::Runner do
  31
+describe Kumade::CLI do
32 32
   it 'does not let anything get printed' do
33 33
     stdout = $stdout
34 34
     stdout.should_not_receive(:print)
35 35
     output = StringIO.new
36 36
 
37  
-    Kumade::Runner.swapping_stdout_for(output) do
  37
+    Kumade::CLI.swapping_stdout_for(output) do
38 38
       $stdout.puts "Hello, you can't see me."
39 39
     end
40 40
 
@@ -47,7 +47,7 @@
47 47
     stdout.should_receive(:print)
48 48
     output = StringIO.new
49 49
 
50  
-    Kumade::Runner.swapping_stdout_for(output) do
  50
+    Kumade::CLI.swapping_stdout_for(output) do
51 51
       $stdout.puts "Hello, you can see me!"
52 52
       raise Kumade::DeploymentError.new("error")
53 53
     end
@@ -57,9 +57,9 @@
57 57
     stdout = $stdout
58 58
     stdout.should_receive(:puts)
59 59
     output = StringIO.new
60  
-    Kumade::Runner.should_receive(:pretending?).and_return(true)
  60
+    Kumade::CLI.should_receive(:pretending?).and_return(true)
61 61
 
62  
-    Kumade::Runner.swapping_stdout_for(output) do
  62
+    Kumade::CLI.swapping_stdout_for(output) do
63 63
       $stdout.puts "Hello, you can see me!"
64 64
     end
65 65
   end

1 note on commit e222538

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