Permalink
Browse files

beginnings of an install rake task, some ui stuff as well

  • Loading branch information...
1 parent fbd929e commit 291407f1204155f90b72daed1811599c97300f5b Bruno Bornsztein committed May 22, 2008
View
@@ -13,6 +13,7 @@ Requirements:
htmlentities
redcloth
rake 0.8.1
+ mysql
GETTING COMMUNITY ENGINE RUNNING
==================================================================
@@ -88,6 +88,7 @@ def preview
def new
@user = User.find(params[:user_id])
@post = Post.new(params[:post])
+ @post.published_as = 'live'
end
# GET /posts/1;edit
@@ -5,7 +5,7 @@
- when 'Favorite'
= image_tag 'icons/heart.png', :plugin => 'community_engine'
- when 'Photo'
- = image_tag 'icons/photo.png', :plugin => 'community_engine'
+ = image_tag 'icons/picture.png', :plugin => 'community_engine'
- when 'Comment'
= image_tag 'icons/comment.png', :plugin => 'community_engine'
- when 'Clipping'
@@ -1,5 +1,4 @@
.poll_excerpt
- %h4.question
- = poll.question
- = link_to "Vote Now!", new_vote_path(:post_id => poll.post.id), {:title => 'Log in to vote', :class => 'vote'}
-
+ =image_tag 'icons/poll.png', :plugin => 'community_engine'
+ = poll.question
+ = link_to "Vote Now!", new_vote_path(:post_id => poll.post.id), {:title => 'Log in to vote', :class => 'vote'}
@@ -43,7 +43,7 @@
%h3= random_greeting(@user)
-if @user.pending_friendships.any?
- %p=link_to "#{image_tag 'icons/friend.png', :plugin => 'community_engine'} You have pending friendship requests.", pending_user_friendships_path(@user)
+ %p=link_to "#{image_tag 'icons/user_add.png', :plugin => 'community_engine'} You have pending friendship requests.", pending_user_friendships_path(@user)
-if @network_activity.empty? && @recommended_posts.empty?
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Deleted file not rendered
Deleted file not rendered
View
BIN assets/images/icons/poll.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -15,6 +15,7 @@ namespace :db do
end
namespace :community_engine do
+
desc 'Move the community engine assets to application public directory'
task :mirror_public_assets => :environment do
# actually, no need to do anything here, the mere act of running rake mirrors the plugin assets for everything
@@ -71,10 +72,7 @@ namespace :community_engine do
task :clobber_rcov do |t|
rm_r OUTPUT_DIR, :force => true
end
-
end
-
-
namespace :db do
namespace :fixtures do
View
@@ -0,0 +1,29 @@
+namespace :community_engine do
+
+ desc 'Install Community Engine for the first time'
+ task :install => [:check_required_gems] do
+
+ Rake::Task["community_engine:generate_plugin_migrations"].invoke
+ #check for engines plugin
+ end
+
+ desc 'Check if the required gems are present'
+ task :check_required_gems do
+ #check if we have the required gems
+ installed_gems = `gem list --no-details --no-versions`.split("\n")
+ required_gems = %w(rmagick hpricot mime-types htmlentities RedCloth rake mysql)
+ missing_gems = required_gems-installed_gems
+
+ if missing_gems.any?
+ raise "CommunityEngine installation can't continue because you are missing these required gems: \n - #{missing_gems.join("\n- ")}"
+ end
+ end
+
+ desc 'Generate CommunityEngine plugin migrations'
+ task :generate_plugin_migrations do
+ `./script/generate plugin_migration community_engine`
+ end
+
+end
+
+

0 comments on commit 291407f

Please sign in to comment.