Permalink
Browse files

Bourbon can now be force installed using --force

  • Loading branch information...
1 parent fe9443b commit 3c8c7e43f835601b4d4b25fe6b7767ad697373d9 @sikachu sikachu committed with Phil LaPier Oct 5, 2012
Showing with 8 additions and 2 deletions.
  1. +6 −0 features/install.feature
  2. +2 −2 lib/bourbon/generator.rb
@@ -25,3 +25,9 @@ Feature: Install bourbon files
And the master bourbon partial should have been generated within "custom_path" directory
And the lib files should have been generated within "custom_path" directory
And the output should contain "Bourbon files installed to custom_path/bourbon/"
+
+ Scenario: Forcing install of bourbon
+ Given bourbon is already installed
+ When I run `bundle exec bourbon install --force`
+ Then the output from "bundle exec bourbon install --force" should contain "Bourbon files installed to bourbon/"
+ And the output should not contain "Bourbon files already installed, doing nothing."
@@ -4,9 +4,9 @@
module Bourbon
class Generator < Thor
desc 'install', 'Install Bourbon into your project'
- method_options :path => :string
+ method_options :path => :string, :force => :boolean
def install
- if bourbon_files_already_exist?
+ if bourbon_files_already_exist? && !options[:force]
puts "Bourbon files already installed, doing nothing."
else
install_files

0 comments on commit 3c8c7e4

Please sign in to comment.