This file contains hidden or 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
rake aborted! | |
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/validations.rb:78:in `raise_validation_error' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/validations.rb:50:in `save!' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:43:in `save!' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:313:in `block in save!' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction' | |
/home/foreman/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status' |
This file contains hidden or 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
diff --git a/config/application.rb b/config/application.rb | |
index 2363f59..23ccdf8 100644 | |
--- a/config/application.rb | |
+++ b/config/application.rb | |
@@ -179,7 +179,7 @@ module Foreman | |
# Record request ID in logging MDC storage | |
config.middleware.insert_before Rails::Rack::Logger, Middleware::TaggedLogging | |
- config.middleware.insert_after ActionDispatch::Session::ActiveRecordStore, Middleware::SessionSafeLogging | |
+# config.middleware.insert_after ActionDispatch::Session::ActiveRecordStore, Middleware::SessionSafeLogging |
This file contains hidden or 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
diff --git a/app/controllers/notification_recipients_controller.rb b/app/controllers/notification_recipients_controller.rb | |
index 4b25877..ae32929 100644 | |
--- a/app/controllers/notification_recipients_controller.rb | |
+++ b/app/controllers/notification_recipients_controller.rb | |
@@ -7,12 +7,11 @@ class NotificationRecipientsController < Api::V2::BaseController | |
def index | |
@notifications = NotificationRecipient. | |
where(:user_id => User.current.id, :notification_id => Notification.active). | |
- order(:created_at). | |
+ order(created_at: :desc). |
This file contains hidden or 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
#!/bin/bash | |
# Delay before starting | |
DELAY=10 | |
# Sound notification to let one know when recording is about to start (and ends) | |
beep() { | |
paplay /usr/share/sounds/gnome/default/alerts/sonar.ogg & | |
} |
This file contains hidden or 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
module Settings | |
class Mail | |
include ActiveModel::Validations | |
include ActiveModel::Model | |
ATTRIBUTES = [ :administrator, :email_reply_address, :email_subject_prefix, :send_welcome_email ] | |
attr_accessor *ATTRIBUTES | |
validates :administrator, :email_reply_address, :format => { | |
:with => /\A(([\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}~]+((\.\"[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}~\"\(\),:;<>@\[\\\] ]+(\.[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}~\"\(\),:;<>@\[\\\] ]+)*\")*\.[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}~]+)*)|(\"[\w !#\$%&\'\*\+\-\/=\?\^`\{\|\}~\"\(\),:;<>@\[\\\] ]+(\.[\w !#\$%&\'\*\+\-\/=\?\^`\{\|\}~\"\(\),:;<>@\[\\\] ]+)*\")) |
This file contains hidden or 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
diff --git a/lib/proxy/plugin.rb b/lib/proxy/plugin.rb | |
index 8bdabc3..1a598c0 100644 | |
--- a/lib/proxy/plugin.rb | |
+++ b/lib/proxy/plugin.rb | |
@@ -71,7 +71,7 @@ class ::Proxy::Plugin | |
end | |
def http_rackup_path(path) | |
- @get_http_rackup_path = path if http_enabled? | |
+ @get_http_rackup_path = path |
This file contains hidden or 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
import DS from 'ember-data'; | |
export default DS.RESTSerializer.extend({ | |
extractArray: function(store, type, payload) { | |
// 'foreman-experimental-ui@model:setting:' | |
var model_name = type.toString().split(":")[1]; | |
payload[model_name] = payload['results']; | |
delete payload['results'] | |
// TODO: handle additional API result (params, counters etc) | |
return this._super(store, type, payload); |
This file contains hidden or 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
import DS from 'ember-data'; | |
export default DS.RESTSerializer.extend({ | |
extractArray: function(store, type, payload) { | |
// 'foreman-experimental-ui@model:setting:' | |
var wrapped_payload = {}; | |
var model_name = type.toString().split(":")[1]; | |
wrapped_payload[model_name] = payload['results']; | |
// TODO: handle additional API result (params, counters etc) | |
return this._super(store, type, wrapped_payload); |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'graphite-api' | |
require 'graphite-api/core_ext/numeric' | |
require './pull_request_stats' | |
# Or use the built-in one | |
GraphiteAPI::Logger.init( | |
:level => :debug, | |
:std => STDOUT |
This file contains hidden or 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 'octokit' | |
class PullRequestStat | |
attr_reader :project | |
Octokit.auto_paginate = true | |
def initialize project | |
@project = project | |
end |