This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @downloads.group_by(&:download_type).each do |download_type, downloads| -%> | |
<h3><%= download_type.name.pluralize %></h3> | |
<ul> | |
<%= render :partial => 'support/download', :collection => downloads %> | |
</ul> | |
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% error_handling_form_for @article do |f| -%> | |
<%= f.text_field :title %> | |
<%= f.date_select :post_date, :order => [:month, :day, :year] %> | |
<%= f.text_area :body %> | |
<%= f.submit 'Submit' %> | |
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stages, %w(staging production) | |
set :default_stage, 'staging' | |
require 'capistrano/ext/multistage' | |
# repository elsewhere | |
set :scm, :git | |
set :repository, "[email protected]:Repositories/wavetronix.git" | |
set :ssh_options, { :forward_agent => true } | |
set :deploy_via, :remote_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class ProjectTest < ActiveSupport::TestCase | |
test "should be able to retrieve projects based on day" do | |
actual = projects(:huddle).reports_grouped_by_day | |
expected_keys = actual.keys.sort.map { |d| d.to_s(:db) } | |
assert_equal ["2009-01-06", "2009-01-07"], expected_keys | |
assert_equal [status_reports(:one_tue).id, status_reports(:two_tue).id], actual[Date.parse("2009-01-06")].map(&:id) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set another default user than root for security reasons | |
user nginx nginx; | |
# As a thumb rule: One per CPU. If you are serving a large amount | |
# of static files, which requires blocking disk reads, you may want | |
# to increase this from the number of cpu_cores available on your | |
# system. | |
# | |
# The maximum number of connections for Nginx is calculated by: | |
# max_clients = worker_processes * worker_connections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name rapidturtle.com; | |
rewrite ^ $scheme://www.rapidturtle.com$request_uri? permanent; | |
} | |
server { | |
server_name www.rapidturtle.com; | |
root /home/deploy/com.rapidturtle.www/current/public; | |
access_log logs/com.rapidturtle.www.access.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
require 'bundler/capistrano' | |
# Uncomment if you are using Rails' asset pipeline | |
load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DownloadTypeSweeper < ActionController::Caching::Sweeper | |
observe DownloadType | |
def after_save(download_type) | |
expire_cache_for download_type | |
end | |
def before_destroy(download_type) | |
expire_cache_for download_type | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# enable one of the following if you're on Linux or FreeBSD | |
listen 80 default deferred; # for Linux | |
# listen 80 default accept_filter=httpready; # for FreeBSD | |
# If you have IPv6, you'll likely want to have two separate listeners. | |
# One on IPv4 only (the default), and another on IPv6 only instead | |
# of a single dual-stack listener. A dual-stack listener will make | |
# for ugly IPv4 addresses in $remote_addr (e.g ":ffff:10.0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Authentication | |
Employees should be able to access the applicaiton using their existing network login account. | |
Scenario: Sign In | |
Given a valid user | |
When I am on the sign in page | |
And I fill in "username" with "brubble" | |
And I fill in "password" with "secret" | |
And I click "Sign in" | |
Then I should see "Signed in as: Barney Rubble" |
OlderNewer