Skip to content

Commit

Permalink
Just a few breaklines removed to trigger gem autobuild on github
Browse files Browse the repository at this point in the history
  • Loading branch information
aitor committed Sep 23, 2008
1 parent a28f2c7 commit 870f89a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app_generators/togify/togify_generator.rb
Expand Up @@ -21,11 +21,11 @@ def manifest

# Include tog rake tasks on the app
include_tog_rake_tasks("#{destination_root}/Rakefile")

# Install desert dependency
require_desert_on_environment("#{destination_root}/config/environment.rb")

# PLugins
# Install desert dependency
require_desert_on_environment("#{destination_root}/config/environment.rb")

# PLugins
plugins = install_default_plugins

# Migrations
Expand Down Expand Up @@ -64,7 +64,7 @@ def extract_options
# raw instance variable value.
# @author = options[:author]
end

def include_tog_rake_tasks(rakefile)
sentinel = "require 'tasks/rails'"
logger.create "require tog rake tasks"
Expand All @@ -73,9 +73,9 @@ def include_tog_rake_tasks(rakefile)
"#{match}\n\nrequire 'tasks/tog'\n"
end
end

end

def require_desert_on_environment(env_file)
sentinel = 'Rails::Initializer.run do |config|'
logger.create "require 'desert' on environment"
Expand All @@ -92,21 +92,21 @@ def default_plugins
plugins << "tog_user" unless options[:skip_tog_user]
plugins += %w{tog_social tog_mail}
end

def install_default_plugins
default_plugins.collect{|plugin|
plugin_path = "#{destination_root}/vendor/plugins/#{plugin}"
plugin_path = "#{destination_root}/vendor/plugins/#{plugin}"
checkout_code(plugin_path, plugin)
logger.create "vendor/plugins/#{plugin}"
route_from_plugins("#{destination_root}/config/routes.rb", plugin)
{:name => plugin,:current_migration => current_migration_number(plugin_path) }
}
end

def checkout_code(plugin_path, plugin)
repository = "git://github.com/tog/#{plugin}.git"
revision = "head"

FileUtils.rm_rf(plugin_path)
system("git clone #{repository} #{plugin_path}")
end
Expand All @@ -129,7 +129,7 @@ def route_from_plugins(routes_file, plugin)
def gsub_file(path, regexp, *args, &block)
content = File.read(path).gsub(regexp, *args, &block)
File.open(path, 'wb') { |file| file.write(content) }
end
end

BASEDIRS = %w(
config
Expand Down

0 comments on commit 870f89a

Please sign in to comment.