Commit d21fff056a0a7bda5f0357fbdc592c952a09cfb6
Exists in
master
and in
1 other branch
Merge pull request #132 from appiphany/master
Some improvements
Showing
4 changed files
with
16 additions
and
10 deletions
Show diff stats
app/views/apps/show.html.haml
| 1 | - content_for :title, @app.name | 1 | - content_for :title, @app.name |
| 2 | - content_for :head do | 2 | - content_for :head do |
| 3 | - = auto_discovery_link_tag :atom, app_url(@app, User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices for #{@app.name} at #{root_url}" | 3 | + = auto_discovery_link_tag :atom, app_path(@app, User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices for #{@app.name} at #{request.host}" |
| 4 | = javascript_include_tag 'apps.show' | 4 | = javascript_include_tag 'apps.show' |
| 5 | - content_for :meta do | 5 | - content_for :meta do |
| 6 | %strong Errors Caught: | 6 | %strong Errors Caught: |
app/views/errs/_list.atom.builder
app/views/errs/index.html.haml
| 1 | - content_for :title, 'Unresolved Errors' | 1 | - content_for :title, 'Unresolved Errors' |
| 2 | - content_for :head do | 2 | - content_for :head do |
| 3 | - = auto_discovery_link_tag :atom, errs_url(User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices at #{root_url}" | 3 | + = auto_discovery_link_tag :atom, errs_path(User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices at #{request.host}" |
| 4 | - content_for :action_bar do | 4 | - content_for :action_bar do |
| 5 | = link_to 'show resolved', all_errs_path, :class => 'button' | 5 | = link_to 'show resolved', all_errs_path, :class => 'button' |
| 6 | = render 'table', :errs => @problems | 6 | = render 'table', :errs => @problems |
config/deploy.example.rb
| @@ -6,21 +6,27 @@ | @@ -6,21 +6,27 @@ | ||
| 6 | # `cap deploy` whenever you would like to deploy Errbit. Refer | 6 | # `cap deploy` whenever you would like to deploy Errbit. Refer |
| 7 | # to the Readme for more information. | 7 | # to the Readme for more information. |
| 8 | 8 | ||
| 9 | +config = YAML.load_file('config/config.yml')['deployment'] || {} | ||
| 10 | + | ||
| 9 | require 'bundler/capistrano' | 11 | require 'bundler/capistrano' |
| 10 | 12 | ||
| 11 | set :application, "errbit" | 13 | set :application, "errbit" |
| 12 | -set :repository, "http://github.com/jdpace/errbit.git" | 14 | +set :repository, config['repository'] || "http://github.com/errbit/errbit.git" |
| 13 | 15 | ||
| 14 | -role :web, "errbit.example.com" | ||
| 15 | -role :app, "errbit.example.com" | ||
| 16 | -role :db, "errbit.example.com", :primary => true | 16 | +role :web, config['hosts']['web'] || "errbit.example.com" |
| 17 | +role :app, config['hosts']['app'] || "errbit.example.com" | ||
| 18 | +role :db, config['hosts']['db'] || "errbit.example.com", :primary => true | ||
| 17 | 19 | ||
| 18 | -set :user, :deploy | 20 | +set :user, config['user'] || :deploy |
| 19 | set :use_sudo, false | 21 | set :use_sudo, false |
| 20 | -set :ssh_options, { :forward_agent => true } | 22 | +if config.has_key?('ssh_key') |
| 23 | + set :ssh_options, { :forward_agent => true, :keys => [ config['ssh_key'] ] } | ||
| 24 | +else | ||
| 25 | + set :ssh_options, { :forward_agent => true } | ||
| 26 | +end | ||
| 21 | default_run_options[:pty] = true | 27 | default_run_options[:pty] = true |
| 22 | 28 | ||
| 23 | -set :deploy_to, "/var/www/apps/#{application}" | 29 | +set :deploy_to, config['deploy_to'] || "/var/www/apps/#{application}" |
| 24 | set :deploy_via, :remote_cache | 30 | set :deploy_via, :remote_cache |
| 25 | set :copy_cache, true | 31 | set :copy_cache, true |
| 26 | set :copy_exclude, [".git"] | 32 | set :copy_exclude, [".git"] |