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
| var settings = A.Fake<IConnectionSettings>(); | |
| var connection = A.Fake<IConnection>(); | |
| A.CallTo(() => settings.DefaultIndex).Returns("nest_test_data"); | |
| var value = new ConnectionStatus(File.ReadAllText(@"InversionOfControl.json")); | |
| A.CallTo(() => | |
| connection.PostSync( | |
| A<string>.That.Contains("nest_test_data/elasticsearchprojects/_search"), |
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
| @echo on | |
| set DbName="db_name" | |
| for %%i in (*.sql) do sqlcmd -E -S localhost -d %DbName% -i %%i |
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
| server_names_hash_bucket_size 256; | |
| server { | |
| listen 80; ## listen for ipv4 | |
| server_name _; | |
| access_log /home/dev/www/logs/localhost.access.log; | |
| location / { | |
| root /home/dev/www/current; |
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
| public abstract class SevenDigitalAppHost : AppHostBase | |
| { | |
| protected SevenDigitalAppHost(string serviceName, params Assembly[] assembliesWithServices) | |
| : base(serviceName, assembliesWithServices) | |
| { | |
| JsConfig.EmitCamelCaseNames = true; | |
| JsConfig.DateHandler = JsonDateHandler.ISO8601; | |
| Plugins.RemoveAll(x => x is AuthFeature); | |
| Plugins.RemoveAll(x => x is SessionFeature); |
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
| run "nohup fastcgi-mono-server4 /applications=/:#{latest_release} /filename=/tmp/SOCK-#{fqdn} /socket=unix >/dev/null 2>&1&" |
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
| public class StatsDFeature : IPlugin | |
| { | |
| private readonly Statsd _client; | |
| private readonly string _statNamePrefix; | |
| public StatsDFeature(IStatsd client, string statNamePrefix) | |
| { | |
| if (client == null) | |
| throw new ArgumentNullException("client", "client instance must be specified"); |
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
| public abstract class RestServiceBase<TRequest> : global::ServiceStack.ServiceInterface.RestServiceBase<TRequest> | |
| { | |
| private IErrorResponseFactory _errorResponseFactory; | |
| private IErrorResponseFactory ErrorResponseFactory | |
| { | |
| get { return _errorResponseFactory ?? (_errorResponseFactory = new ErrorResponseFactory()); } | |
| set { _errorResponseFactory = value; } | |
| } | |
| private static readonly ILog Log = LogManager.GetLogger(typeof(ServiceBase<>)); |
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
| public interface IErrorResponseFactory | |
| { | |
| object CreateErrorResponse<TRequest>(TRequest request, Exception ex, ResponseStatus responseStatus); | |
| object CreateErrorResponse<TRequest>(TRequest request, ValidationErrorResult validationError); | |
| } | |
| public class ErrorResponseFactory : IErrorResponseFactory | |
| { | |
| public object CreateErrorResponse<TRequest>(TRequest request, ValidationErrorResult validationError) |
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
| public class ValidationFeature : IPlugin | |
| { | |
| private readonly IErrorResponseFactory _errorResponseFactory; | |
| public ValidationFeature(IErrorResponseFactory errorResponseFactory) | |
| { | |
| _errorResponseFactory = errorResponseFactory; | |
| } | |
| public static bool Enabled { private set; get; } |
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
| set :stages, %w(devtest systest uat prod) | |
| set :default_stage, "devtest" | |
| set :keep_releases, 5 | |
| require 'capistrano/ext/multistage' | |
| require 'nokogiri' | |
| set :use_sudo, false | |
| set :normalize_asset_timestamps, false |
OlderNewer