Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
99c4e73
Remove leftover submodule directory, which should've been removed in …
Yggdrasil Nov 23, 2011
ea2f9d2
Add 37signals' fast_remote_cache deploy method as submodule
Yggdrasil Mar 1, 2012
37b50df
Replaced dead peritor.com wiki links with valid Github wiki links
brendonrapp Nov 12, 2011
4b6dbc8
Replaced screenshot dead link with Github project link
brendonrapp Nov 12, 2011
6a8b5dd
fix namespace issue
alexspeller Jun 10, 2011
0db94db
Deployer shouldn't do a local query with mercurial eiter
alexspeller Jun 10, 2011
26aeeee
Fix bug with private method being called
alexspeller Jun 9, 2011
cd80efc
Add autogenerated application.css to .gitignore
Yggdrasil Mar 1, 2012
2c77545
Remove submodule from incorrect location
Yggdrasil Mar 2, 2012
ca45474
Recreate fast_remote_cache submodule in correct path
Yggdrasil Mar 2, 2012
5760106
Disallow access to spiders
Yggdrasil Mar 6, 2012
123ba8c
Add submodule for encrypted_copy deployment strategy
Yggdrasil Mar 6, 2012
a6c52dc
Update encrypted_copy submodule for compatibility with Capistrano 2.6
Yggdrasil Mar 6, 2012
155ce39
Remove old frozen gems, due to switch to Bundler
Yggdrasil Mar 6, 2012
892242b
Start tracking Gemfile.lock so we don't get surprised by gem updates.…
Yggdrasil Jun 25, 2013
dd4ee0e
Added Favorite Projects option to the project form. Gives the ability…
Meuk Jun 26, 2013
a2f12a0
Made the favorite and normal project views DRY. Changed the favorite …
Meuk Jun 26, 2013
5985fbd
Merged in Meuker/webistrano (pull request #1)
Yggdrasil Jun 26, 2013
104651f
Fix broken Rakefile by replacing obsolete rake/rdoctask with rdoc/tas…
Yggdrasil Jun 26, 2013
e98711e
Bugfix: Set default value on favorite projects field. Add index for p…
Yggdrasil Jun 26, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ log/*
*~
.DS_Store
*.tmproj
Gemfile.lock
public/stylesheets/application.css
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "vendor/plugins/fast_remote_cache"]
path = vendor/plugins/fast_remote_cache
url = https://github.com/37signals/fast_remote_cache.git
[submodule "vendor/plugins/encrypted_copy"]
path = vendor/plugins/encrypted_copy
url = git://github.com/Yggdrasil/cap_encrypted_copy.git
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gem "rails", "2.3.11"
gem "mysql"
gem "erubis"
gem "rake"
gem "rdoc"
gem "syntax", "1.0.0"
gem "capistrano", "2.6.0"
gem "open4", "0.9.3"
Expand Down
62 changes: 62 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.11)
actionpack (= 2.3.11)
actionpack (2.3.11)
activesupport (= 2.3.11)
rack (~> 1.1.0)
activerecord (2.3.11)
activesupport (= 2.3.11)
activeresource (2.3.11)
activesupport (= 2.3.11)
activesupport (2.3.11)
capistrano (2.6.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
erubis (2.7.0)
exception_notification (2.3.3.0)
highline (1.6.19)
json (1.8.0)
mocha (0.9.8)
rake
mysql (2.9.1)
net-scp (1.1.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.6.7)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
open4 (0.9.3)
rack (1.1.6)
rails (2.3.11)
actionmailer (= 2.3.11)
actionpack (= 2.3.11)
activerecord (= 2.3.11)
activeresource (= 2.3.11)
activesupport (= 2.3.11)
rake (>= 0.8.3)
rake (10.1.0)
rdoc (4.0.1)
json (~> 1.4)
syntax (1.0.0)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.0.10)
capistrano (= 2.6.0)
erubis
exception_notification (= 2.3.3.0)
mocha (= 0.9.8)
mysql
open4 (= 0.9.3)
rails (= 2.3.11)
rake
rdoc
syntax (= 1.0.0)
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'rdoc/task'

require 'tasks/rails'
2 changes: 1 addition & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Project < ActiveRecord::Base

after_create :create_template_defaults

attr_accessible :name, :description, :template
attr_accessible :name, :description, :template, :favorite

# creates the default configuration parameters based on the template
def create_template_defaults
Expand Down
16 changes: 16 additions & 0 deletions app/views/layouts/_favorites.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div id="projects_open_content" style="<%=h show_if_opened(status) %>">
<% projects = Project.find(:all, :conditions => { :favorite => 1 }, :order => "name ASC") %>
<% if projects.count > 0 %>
<%= render(:partial => 'layouts/project_view', :locals => { :projects => projects } )%>
<% else %>
<div class="menu_item">No project created yet</div>
<a href="<%= new_project_path %>" class="menu_link menu_link_create">New project</a>
<% end %>
</div>
<div id="projects_closed_content" style="<%=h show_if_closed(status) %>">
<a href="javascript:open_menu_box('projects')" class="menu_link menu_link_create">
<div class="menu_link_title">
<%=h pluralize(projects.count, 'project')%>
</div>
</a>
</div>
4 changes: 4 additions & 0 deletions app/views/layouts/_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<%= render(:partial => 'layouts/menu_box', :locals => {
:box_type => 'favorites',
:status => controller_in_use_or(ProjectsController, :open, Project),
:path => projects_path } )%>

<%= render(:partial => 'layouts/menu_box', :locals => {
:box_type => 'projects',
Expand Down
26 changes: 26 additions & 0 deletions app/views/layouts/_project_view.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<% for project in projects %>
<a href="<%= project_path(project) %>" class="menu_link <%=h active_link_class(project) %>" title="<%=h project.name %>">
<div class="menu_icons">

<%= image_tag('peritor_theme/arrow_menu_right.gif', :width => '20', :height => '20', :border => '0', :style => "#{h( do_not_show_stages_of_project(project))}", :id => "#{h(dom_id(project))}_arrow_right", :onclick => "open_menu('#{h( dom_id(project))}'); return false;" )%>

<%= image_tag('peritor_theme/arrow_menu_down.gif', :width => '20', :height => '20', :border => '0', :style => "#{h( show_stages_of_project(project))}", :id => "#{h(dom_id(project))}_arrow_down", :onclick => "close_menu('#{h( dom_id(project))}'); return false;" )%></div>
<div class="menu_link_title has_submenu">
<%=h project.name %>
</div>
</a>
<div id="<%=h dom_id(project) %>_stages" style="<%=h show_stages_of_project(project) %>">
<% if project.stages.count > 0 %>
<% for stage in project.stages %>
<a href="<%= project_stage_path(project, stage) %>" class="menu_link <%=h active_link_class(stage) %>" title="<%=h stage.name %>">
<div class="menu_link_title" style="padding-left: 30px; *padding-left: 33px"><%=h stage.name %></div>
</a>
<% end %>
<% else %>
<a href="<%= new_project_stage_path(project) %>" class="menu_link menu_link_new">
<div class="menu_link_title" style="padding-left: 30px; *padding-left: 33px">New stage</div>
</a>
<% end %>
</div>
<% end %>

31 changes: 4 additions & 27 deletions app/views/layouts/_projects.html.erb
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
<div id="projects_open_content" style="<%=h show_if_opened(status) %>">
<% if Project.count > 0 %>
<% for project in Project.find(:all, :order => "name ASC") %>
<a href="<%= project_path(project) %>" class="menu_link <%=h active_link_class(project) %>" title="<%=h project.name %>">
<div class="menu_icons">

<%= image_tag('peritor_theme/arrow_menu_right.gif', :width => '20', :height => '20', :border => '0', :style => "#{h( do_not_show_stages_of_project(project))}", :id => "#{h(dom_id(project))}_arrow_right", :onclick => "open_menu('#{h( dom_id(project))}'); return false;" )%>

<%= image_tag('peritor_theme/arrow_menu_down.gif', :width => '20', :height => '20', :border => '0', :style => "#{h( show_stages_of_project(project))}", :id => "#{h(dom_id(project))}_arrow_down", :onclick => "close_menu('#{h( dom_id(project))}'); return false;" )%></div>
<div class="menu_link_title has_submenu">
<%=h project.name %>
</div>
</a>
<div id="<%=h dom_id(project) %>_stages" style="<%=h show_stages_of_project(project) %>">
<% if project.stages.count > 0 %>
<% for stage in project.stages %>
<a href="<%= project_stage_path(project, stage) %>" class="menu_link <%=h active_link_class(stage) %>" title="<%=h stage.name %>">
<div class="menu_link_title" style="padding-left: 30px; *padding-left: 33px"><%=h stage.name %></div>
</a>
<% end %>
<% else %>
<a href="<%= new_project_stage_path(project) %>" class="menu_link menu_link_new">
<div class="menu_link_title" style="padding-left: 30px; *padding-left: 33px">New stage</div>
</a>
<% end %>
</div>
<% end %>
<% projects = Project.find(:all, :conditions => { :favorite => 0 }, :order => "name ASC") %>
<% if projects.count > 0 %>
<%= render(:partial => 'layouts/project_view', :locals => { :projects => projects } )%>
<% else %>
<div class="menu_item">No project created yet</div>
<a href="<%= new_project_path %>" class="menu_link menu_link_create">New project</a>
Expand All @@ -33,7 +10,7 @@
<div id="projects_closed_content" style="<%=h show_if_closed(status) %>">
<a href="javascript:open_menu_box('projects')" class="menu_link menu_link_create">
<div class="menu_link_title">
<%=h pluralize(Project.count, 'project')%>
<%=h pluralize(projects, 'project')%>
</div>
</a>
</div>
5 changes: 4 additions & 1 deletion app/views/projects/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<b>Description</b><br />
<%= text_area 'project', 'description', :style =>'width:330px; height: 100px' %>
</p>

<p>
<%= check_box 'project', 'favorite' %>
<b>Favorite Project?</b><br />
</p>

<% content_for(:page_scripts) do %>
<script type="text/javascript">
Expand Down
8 changes: 4 additions & 4 deletions app/views/projects/dashboard.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<fieldset class="fieldset">
<legend>Introduction and help</legend>
<div style="float: right; padding: 10px 5px 5px 5px;">
<a href="http://labs.peritor.com/webistrano" target="_blank"><%= image_tag('peritor_theme/webistrano_screenshot.png', :border => '0', :width => '200', :height => '151')%></a>
<a href="https://github.com/peritor/webistrano" target="_blank"><%= image_tag('peritor_theme/webistrano_screenshot.png', :border => '0', :width => '200', :height => '151')%></a>
</div>
<div style="padding-top: 5px;">
Welcome to Webistrano. Your first steps should be to create a project with a stage.
Expand All @@ -10,9 +10,9 @@
For help and more documentation, see
<br />
<ul>
<li><a href="http://labs.peritor.com/webistrano/">Wiki</a></li>
<li><a href="http://labs.peritor.com/webistrano/wiki/ConfigurationParameter">Configuration Parameter</a></li>
<li><a href="http://labs.peritor.com/webistrano/wiki/FAQ">FAQ</a></li>
<li><a href="https://github.com/peritor/webistrano/wiki">Wiki</a></li>
<li><a href="https://github.com/peritor/webistrano/wiki/Configuration-Parameters">Configuration Parameters</a></li>
<li><a href="https://github.com/peritor/webistrano/wiki/FAQ---Frequently-Asked-Questions">FAQ</a></li>
</ul>
<br />
Webistrano is Open Source. Paid support is available by <a href="http://www.peritor.com">Peritor Consulting</a>.
Expand Down
2 changes: 0 additions & 2 deletions config/initializers/capistrano_namespace_rake_fix.rb

This file was deleted.

8 changes: 8 additions & 0 deletions db/migrate/20130626123429_add_favorite_flag_to_projects.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class AddFavoriteFlagToProjects < ActiveRecord::Migration
def self.up
add_column :projects, :favorite, :integer
end

def self.down
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class SetDefaultValueForFavoriteProjects < ActiveRecord::Migration
def self.up
change_column :projects, :favorite, :integer, :default => 0, :null => false
add_index :projects, :favorite
end

def self.down
end
end
5 changes: 4 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20110512144542) do
ActiveRecord::Schema.define(:version => 20130626141121) do

create_table "configuration_parameters", :force => true do |t|
t.string "name"
Expand Down Expand Up @@ -60,8 +60,11 @@
t.string "template"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "favorite", :default => 0, :null => false
end

add_index "projects", ["favorite"], :name => "index_projects_on_favorite"

create_table "recipe_versions", :force => true do |t|
t.integer "recipe_id"
t.integer "version"
Expand Down
10 changes: 7 additions & 3 deletions lib/webistrano/deployer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(deployment)

@deployment = deployment

if(@deployment.task && !@deployment.new_record?)
if(@deployment.send(:task) && !@deployment.new_record?)
# a read deployment
@logger = Webistrano::Logger.new(deployment)
@logger.level = Webistrano::Logger::TRACE
Expand Down Expand Up @@ -63,8 +63,12 @@ def execute!
set_webistrano_logger(config)

set_up_config(config)

exchange_real_revision(config) unless (config.fetch(:scm).to_s == 'git') # git cannot do a local query by default

# git and mercurial cannot do a local query by default
unless %w(git mercurial).include? config.fetch(:scm).to_s
exchange_real_revision(config)
end

save_revision(config)
save_pid

Expand Down
3 changes: 2 additions & 1 deletion public/robots.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
User-agent: *
Disallow: /
Loading