Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 291407f1204155f90b72daed1811599c97300f5b 1 parent fbd929e
Bruno Bornsztein authored
View
1  README
@@ -13,6 +13,7 @@ Requirements:
htmlentities
redcloth
rake 0.8.1
+ mysql
GETTING COMMUNITY ENGINE RUNNING
==================================================================
View
1  app/controllers/posts_controller.rb
@@ -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
View
2  app/views/activities/_icon.haml
@@ -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'
View
7 app/views/polls/_excerpt.haml
@@ -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'}
View
2  app/views/users/dashboard.html.haml
@@ -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
BIN  assets/images/icons/activity_default.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/images/icons/friend.png
Deleted file not rendered
View
BIN  assets/images/icons/photo.png
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.
View
4 tasks/community_engine_tasks.rake
@@ -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
29 tasks/install.rake
@@ -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
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.