right_support 2.11.3 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -0
- data/VERSION +1 -1
- data/lib/right_support/notifiers/airbrake.rb +194 -0
- data/lib/right_support/notifiers/base.rb +73 -0
- data/lib/right_support/notifiers/blacklisters/base.rb +48 -0
- data/lib/right_support/notifiers/blacklisters/canonical.rb +60 -0
- data/lib/right_support/notifiers/blacklisters/regular_expression.rb +86 -0
- data/{features/support/file_utils_bundler_mixin.rb → lib/right_support/notifiers/blacklisters/simple.rb} +21 -20
- data/lib/right_support/notifiers/blacklisters/snake_case.rb +60 -0
- data/lib/right_support/notifiers/blacklisters/wildcard.rb +65 -0
- data/lib/right_support/notifiers/blacklisters.rb +34 -0
- data/lib/right_support/notifiers/logger.rb +94 -0
- data/lib/right_support/notifiers/notification.rb +57 -0
- data/lib/right_support/notifiers/utilities/backtrace_decoder.rb +234 -0
- data/lib/right_support/notifiers/utilities.rb +29 -0
- data/lib/right_support/notifiers.rb +32 -0
- data/lib/right_support/rack/request_logger.rb +13 -9
- data/lib/right_support.rb +1 -0
- data/right_support.gemspec +19 -70
- metadata +17 -69
- data/.coveralls.yml +0 -2
- data/.rspec +0 -3
- data/.simplecov +0 -6
- data/.travis.yml +0 -13
- data/Gemfile +0 -51
- data/Gemfile.lock +0 -153
- data/features/balancer_error_handling.feature +0 -34
- data/features/balancer_health_check.feature +0 -33
- data/features/hash_tools.feature +0 -27
- data/features/http_client_timeout.feature +0 -19
- data/features/serialization.feature +0 -113
- data/features/step_definitions/hash_tools_steps.rb +0 -41
- data/features/step_definitions/http_client_steps.rb +0 -27
- data/features/step_definitions/request_balancer_steps.rb +0 -93
- data/features/step_definitions/ruby_steps.rb +0 -176
- data/features/step_definitions/serialization_steps.rb +0 -133
- data/features/step_definitions/server_steps.rb +0 -134
- data/features/support/env.rb +0 -148
- data/right_support.rconf +0 -9
- data/spec/config/feature_set_spec.rb +0 -83
- data/spec/crypto/signed_hash_spec.rb +0 -73
- data/spec/data/hash_tools_spec.rb +0 -602
- data/spec/data/mash_spec.rb +0 -313
- data/spec/data/token_spec.rb +0 -21
- data/spec/data/uuid_spec.rb +0 -45
- data/spec/db/cassandra_model_part1_spec.rb +0 -84
- data/spec/db/cassandra_model_part2_spec.rb +0 -73
- data/spec/db/cassandra_model_spec.rb +0 -375
- data/spec/fixtures/encrypted_priv_rsa.pem +0 -30
- data/spec/fixtures/good_priv_dsa.pem +0 -12
- data/spec/fixtures/good_priv_rsa.pem +0 -15
- data/spec/fixtures/good_pub_dsa.ssh +0 -1
- data/spec/fixtures/good_pub_rsa.pem +0 -5
- data/spec/fixtures/good_pub_rsa.ssh +0 -1
- data/spec/log/exception_logger_spec.rb +0 -76
- data/spec/log/filter_logger_spec.rb +0 -66
- data/spec/log/mixin_spec.rb +0 -141
- data/spec/log/multiplexer_spec.rb +0 -54
- data/spec/log/null_logger_spec.rb +0 -36
- data/spec/log/step_level_logger_spec.rb +0 -49
- data/spec/log/system_logger_spec.rb +0 -172
- data/spec/net/address_helper_spec.rb +0 -57
- data/spec/net/dns_spec.rb +0 -187
- data/spec/net/http_client_spec.rb +0 -181
- data/spec/net/lb/health_check_spec.rb +0 -417
- data/spec/net/lb/round_robin_spec.rb +0 -15
- data/spec/net/lb/sticky_spec.rb +0 -92
- data/spec/net/request_balancer_spec.rb +0 -690
- data/spec/net/s3_helper_spec.rb +0 -160
- data/spec/net/ssl_spec.rb +0 -42
- data/spec/net/string_encoder_spec.rb +0 -58
- data/spec/rack/log_setter_spec.rb +0 -5
- data/spec/rack/request_logger_spec.rb +0 -225
- data/spec/rack/request_tracker_spec.rb +0 -115
- data/spec/rack/runtime_spec.rb +0 -49
- data/spec/ruby/easy_singleton_spec.rb +0 -72
- data/spec/ruby/object_extensions_spec.rb +0 -27
- data/spec/ruby/string_extensions_spec.rb +0 -98
- data/spec/spec_helper.rb +0 -188
- data/spec/stats/activity_spec.rb +0 -425
- data/spec/stats/exceptions_spec.rb +0 -247
- data/spec/stats/helpers_spec.rb +0 -685
- data/spec/validation/openssl_spec.rb +0 -37
- data/spec/validation/ssh_spec.rb +0 -39
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe RightSupport::Validation::OpenSSL do
|
4
|
-
GOOD_PEM_PUB_RSA = read_fixture('good_pub_rsa.pem') unless const_defined?('GOOD_PEM_PUB_RSA')
|
5
|
-
GOOD_PEM_PRIV_RSA = read_fixture('good_priv_rsa.pem') unless const_defined?('GOOD_PEM_PRIV_RSA')
|
6
|
-
GOOD_ENCRYPTED_PEM_PRIV_RSA = read_fixture('encrypted_priv_rsa.pem') unless const_defined?('GOOD_ENCRYPTED_PEM_PRIV_RSA')
|
7
|
-
GOOD_SSH_PUB_RSA = read_fixture('good_pub_rsa.ssh') unless const_defined?('GOOD_SSH_PUB_RSA')
|
8
|
-
GOOD_SSH_PUB_DSA = read_fixture('good_pub_dsa.ssh') unless const_defined?('GOOD_SSH_PUB_DSA')
|
9
|
-
GOOD_PEM_PRIV_DSA = read_fixture('good_priv_dsa.pem') unless const_defined?('GOOD_PEM_PRIV_DSA')
|
10
|
-
|
11
|
-
context :pem_public_key? do
|
12
|
-
it 'recognizes valid keys' do
|
13
|
-
RightSupport::Validation.pem_public_key?(GOOD_PEM_PUB_RSA).should == true
|
14
|
-
end
|
15
|
-
it 'recognizes bad keys' do
|
16
|
-
RightSupport::Validation.pem_public_key?(corrupt(GOOD_PEM_PUB_RSA)).should == false
|
17
|
-
RightSupport::Validation.pem_public_key?(nil).should == false
|
18
|
-
RightSupport::Validation.pem_public_key?('').should == false
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
context :pem_private_key? do
|
23
|
-
it 'recognizes valid keys' do
|
24
|
-
RightSupport::Validation.pem_private_key?(GOOD_PEM_PRIV_RSA).should == true
|
25
|
-
RightSupport::Validation.pem_private_key?(GOOD_PEM_PRIV_DSA).should == true
|
26
|
-
end
|
27
|
-
it 'considers encrypted keys to be "bad" (not usable)' do
|
28
|
-
RightSupport::Validation.pem_private_key?(GOOD_ENCRYPTED_PEM_PRIV_RSA).should == false
|
29
|
-
end
|
30
|
-
it 'recognizes bad keys' do
|
31
|
-
RightSupport::Validation.pem_private_key?(corrupt(GOOD_PEM_PRIV_RSA)).should == false
|
32
|
-
RightSupport::Validation.pem_private_key?(corrupt(GOOD_PEM_PRIV_RSA, 16)).should == false
|
33
|
-
RightSupport::Validation.pem_private_key?(nil).should == false
|
34
|
-
RightSupport::Validation.pem_private_key?('').should == false
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/spec/validation/ssh_spec.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe RightSupport::Validation::SSH do
|
4
|
-
GOOD_PEM_PRIV_RSA = read_fixture('good_priv_rsa.pem') unless const_defined?('GOOD_PEM_PUB_RSA')
|
5
|
-
GOOD_ENCRYPTED_PEM_PRIV_RSA = read_fixture('encrypted_priv_rsa.pem') unless const_defined?('GOOD_ENCRYPTED_PEM_PRIV_RSA')
|
6
|
-
GOOD_SSH_PUB_RSA = read_fixture('good_pub_rsa.ssh') unless const_defined?('GOOD_SSH_PUB_RSA')
|
7
|
-
GOOD_SSH_PUB_DSA = read_fixture('good_pub_dsa.ssh') unless const_defined?('GOOD_SSH_PUB_DSA')
|
8
|
-
GOOD_PEM_PRIV_DSA = read_fixture('good_priv_dsa.pem') unless const_defined?('GOOD_PEM_PRIV_DSA')
|
9
|
-
|
10
|
-
context :ssh_private_key? do
|
11
|
-
it 'recognizes valid keys' do
|
12
|
-
RightSupport::Validation.ssh_private_key?(GOOD_PEM_PRIV_RSA).should == true
|
13
|
-
RightSupport::Validation.ssh_private_key?(GOOD_PEM_PRIV_DSA).should == true
|
14
|
-
end
|
15
|
-
it 'considers encrypted keys to be "bad" (not usable)' do
|
16
|
-
RightSupport::Validation.ssh_private_key?(GOOD_ENCRYPTED_PEM_PRIV_RSA).should == false
|
17
|
-
end
|
18
|
-
it 'recognizes bad keys' do
|
19
|
-
RightSupport::Validation.ssh_private_key?(corrupt(GOOD_PEM_PRIV_RSA)).should == false
|
20
|
-
RightSupport::Validation.ssh_private_key?(corrupt(GOOD_PEM_PRIV_RSA, 16)).should == false
|
21
|
-
RightSupport::Validation.ssh_private_key?(nil).should == false
|
22
|
-
RightSupport::Validation.ssh_private_key?('').should == false
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
context :ssh_public_key? do
|
27
|
-
it 'recognizes valid keys' do
|
28
|
-
RightSupport::Validation.ssh_public_key?(GOOD_SSH_PUB_RSA).should == true
|
29
|
-
end
|
30
|
-
it 'recognizes bad keys' do
|
31
|
-
RightSupport::Validation.ssh_public_key?('ssh-rsa AAAAB3Nhowdybob').should == false
|
32
|
-
RightSupport::Validation.ssh_public_key?('ssh-rsa hello there').should == false
|
33
|
-
RightSupport::Validation.ssh_public_key?('ssh-rsa one two three! user@host').should == false
|
34
|
-
RightSupport::Validation.ssh_public_key?('fafafafafafa mumumumumumu').should == false
|
35
|
-
RightSupport::Validation.ssh_public_key?(nil).should == false
|
36
|
-
RightSupport::Validation.ssh_public_key?('').should == false
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|