Skip to content

Commit

Permalink
Careless with copying and pasting.... This proves the need to modular…
Browse files Browse the repository at this point in the history
…ize the Powder CLI. I'll work on that tomorrow. Closes #1
  • Loading branch information
phil-monroe committed Nov 27, 2011
1 parent 8a3a96d commit ef3bf80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions bin/powser
Expand Up @@ -4,9 +4,9 @@ require 'rubygems'
require 'thor'
require 'fileutils'
require 'net/https'
require 'powder/version'
require 'powser/version'

module Powder
module Powser
class CLI < Thor
include Thor::Actions
default_task :help
Expand Down Expand Up @@ -46,7 +46,7 @@ module Powder

desc "version", "Shows the version."
def version
say "powser #{Powder::VERSION}"
say "powser #{Powser::VERSION}"
end

private
Expand Down Expand Up @@ -97,6 +97,16 @@ module Powder
return false
end
end

def is_rails2_app?
File.exists?('config/environment.rb') &&
!`grep RAILS_GEM_VERSION config/environment.rb`.empty? ? 'Rails 2' : nil
end

def is_radiant_app?
File.exists?('config/environment.rb') &&
!`grep Radiant::Initializer config/environment.rb`.empty? ? 'Radiant' : nil
end
end
end
Powder::CLI.start
Powser::CLI.start
2 changes: 1 addition & 1 deletion lib/powser/version.rb
@@ -1,3 +1,3 @@
module Powser
VERSION = "0.0.1"
VERSION = "0.0.2"
end

0 comments on commit ef3bf80

Please sign in to comment.