Commit b707c320d2c6eb897bbd0875feafbda6ee33ccf5
Exists in
master
and in
1 other branch
Merge branch 'master' of http://github.com/errbit/errbit
Showing
6 changed files
with
18 additions
and
12 deletions
Show diff stats
app/models/app.rb
| ... | ... | @@ -81,7 +81,8 @@ class App |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | 83 | def find_or_create_err!(attrs) |
| 84 | - Err.where(attrs).first || problems.create!.errs.create!(attrs) | |
| 84 | + Err.any_in(:problem_id => problems.map { |a| a.id }). | |
| 85 | + where(attrs).first || problems.create!.errs.create!(attrs) | |
| 85 | 86 | end |
| 86 | 87 | |
| 87 | 88 | # Mongoid Bug: find(id) on association proxies returns an Enumerator | ... | ... |
app/views/apps/show.html.haml
| 1 | 1 | - content_for :title, @app.name |
| 2 | 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 | 4 | = javascript_include_tag 'apps.show' |
| 5 | 5 | - content_for :meta do |
| 6 | 6 | %strong Errors Caught: | ... | ... |
app/views/errs/_list.atom.builder
app/views/errs/index.html.haml
| 1 | 1 | - content_for :title, 'Unresolved Errors' |
| 2 | 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 | 4 | - content_for :action_bar do |
| 5 | 5 | = link_to 'show resolved', all_errs_path, :class => 'button' |
| 6 | 6 | = render 'table', :errs => @problems | ... | ... |
config/deploy.example.rb
| ... | ... | @@ -6,21 +6,27 @@ |
| 6 | 6 | # `cap deploy` whenever you would like to deploy Errbit. Refer |
| 7 | 7 | # to the Readme for more information. |
| 8 | 8 | |
| 9 | +config = YAML.load_file('config/config.yml')['deployment'] || {} | |
| 10 | + | |
| 9 | 11 | require 'bundler/capistrano' |
| 10 | 12 | |
| 11 | 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 | 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 | 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 | 30 | set :deploy_via, :remote_cache |
| 25 | 31 | set :copy_cache, true |
| 26 | 32 | set :copy_exclude, [".git"] | ... | ... |
lib/hoptoad.rb
| ... | ... | @@ -8,7 +8,6 @@ module Hoptoad |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | 10 | def self.parse_xml!(xml) |
| 11 | - xml = xml.unpack('C*').pack('U*') # Repack string into Unicode to fix invalid UTF-8 chars | |
| 12 | 11 | parsed = ActiveSupport::XmlMini.backend.parse(xml)['notice'] || raise(ApiVersionError) |
| 13 | 12 | processor = get_version_processor(parsed['version']) |
| 14 | 13 | processor.process_notice(parsed) | ... | ... |