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.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -0
  3. data/VERSION +1 -1
  4. data/lib/right_support/notifiers/airbrake.rb +194 -0
  5. data/lib/right_support/notifiers/base.rb +73 -0
  6. data/lib/right_support/notifiers/blacklisters/base.rb +48 -0
  7. data/lib/right_support/notifiers/blacklisters/canonical.rb +60 -0
  8. data/lib/right_support/notifiers/blacklisters/regular_expression.rb +86 -0
  9. data/{features/support/file_utils_bundler_mixin.rb → lib/right_support/notifiers/blacklisters/simple.rb} +21 -20
  10. data/lib/right_support/notifiers/blacklisters/snake_case.rb +60 -0
  11. data/lib/right_support/notifiers/blacklisters/wildcard.rb +65 -0
  12. data/lib/right_support/notifiers/blacklisters.rb +34 -0
  13. data/lib/right_support/notifiers/logger.rb +94 -0
  14. data/lib/right_support/notifiers/notification.rb +57 -0
  15. data/lib/right_support/notifiers/utilities/backtrace_decoder.rb +234 -0
  16. data/lib/right_support/notifiers/utilities.rb +29 -0
  17. data/lib/right_support/notifiers.rb +32 -0
  18. data/lib/right_support/rack/request_logger.rb +13 -9
  19. data/lib/right_support.rb +1 -0
  20. data/right_support.gemspec +19 -70
  21. metadata +17 -69
  22. data/.coveralls.yml +0 -2
  23. data/.rspec +0 -3
  24. data/.simplecov +0 -6
  25. data/.travis.yml +0 -13
  26. data/Gemfile +0 -51
  27. data/Gemfile.lock +0 -153
  28. data/features/balancer_error_handling.feature +0 -34
  29. data/features/balancer_health_check.feature +0 -33
  30. data/features/hash_tools.feature +0 -27
  31. data/features/http_client_timeout.feature +0 -19
  32. data/features/serialization.feature +0 -113
  33. data/features/step_definitions/hash_tools_steps.rb +0 -41
  34. data/features/step_definitions/http_client_steps.rb +0 -27
  35. data/features/step_definitions/request_balancer_steps.rb +0 -93
  36. data/features/step_definitions/ruby_steps.rb +0 -176
  37. data/features/step_definitions/serialization_steps.rb +0 -133
  38. data/features/step_definitions/server_steps.rb +0 -134
  39. data/features/support/env.rb +0 -148
  40. data/right_support.rconf +0 -9
  41. data/spec/config/feature_set_spec.rb +0 -83
  42. data/spec/crypto/signed_hash_spec.rb +0 -73
  43. data/spec/data/hash_tools_spec.rb +0 -602
  44. data/spec/data/mash_spec.rb +0 -313
  45. data/spec/data/token_spec.rb +0 -21
  46. data/spec/data/uuid_spec.rb +0 -45
  47. data/spec/db/cassandra_model_part1_spec.rb +0 -84
  48. data/spec/db/cassandra_model_part2_spec.rb +0 -73
  49. data/spec/db/cassandra_model_spec.rb +0 -375
  50. data/spec/fixtures/encrypted_priv_rsa.pem +0 -30
  51. data/spec/fixtures/good_priv_dsa.pem +0 -12
  52. data/spec/fixtures/good_priv_rsa.pem +0 -15
  53. data/spec/fixtures/good_pub_dsa.ssh +0 -1
  54. data/spec/fixtures/good_pub_rsa.pem +0 -5
  55. data/spec/fixtures/good_pub_rsa.ssh +0 -1
  56. data/spec/log/exception_logger_spec.rb +0 -76
  57. data/spec/log/filter_logger_spec.rb +0 -66
  58. data/spec/log/mixin_spec.rb +0 -141
  59. data/spec/log/multiplexer_spec.rb +0 -54
  60. data/spec/log/null_logger_spec.rb +0 -36
  61. data/spec/log/step_level_logger_spec.rb +0 -49
  62. data/spec/log/system_logger_spec.rb +0 -172
  63. data/spec/net/address_helper_spec.rb +0 -57
  64. data/spec/net/dns_spec.rb +0 -187
  65. data/spec/net/http_client_spec.rb +0 -181
  66. data/spec/net/lb/health_check_spec.rb +0 -417
  67. data/spec/net/lb/round_robin_spec.rb +0 -15
  68. data/spec/net/lb/sticky_spec.rb +0 -92
  69. data/spec/net/request_balancer_spec.rb +0 -690
  70. data/spec/net/s3_helper_spec.rb +0 -160
  71. data/spec/net/ssl_spec.rb +0 -42
  72. data/spec/net/string_encoder_spec.rb +0 -58
  73. data/spec/rack/log_setter_spec.rb +0 -5
  74. data/spec/rack/request_logger_spec.rb +0 -225
  75. data/spec/rack/request_tracker_spec.rb +0 -115
  76. data/spec/rack/runtime_spec.rb +0 -49
  77. data/spec/ruby/easy_singleton_spec.rb +0 -72
  78. data/spec/ruby/object_extensions_spec.rb +0 -27
  79. data/spec/ruby/string_extensions_spec.rb +0 -98
  80. data/spec/spec_helper.rb +0 -188
  81. data/spec/stats/activity_spec.rb +0 -425
  82. data/spec/stats/exceptions_spec.rb +0 -247
  83. data/spec/stats/helpers_spec.rb +0 -685
  84. data/spec/validation/openssl_spec.rb +0 -37
  85. 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
@@ -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