rabid 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +2 -1
  3. data/bin/rabid +2 -10
  4. data/lib/bigipcookie.rb +13 -11
  5. data/lib/bigipcookie/version.rb +1 -1
  6. metadata +22 -74
  7. data/.gitignore +0 -8
  8. data/.rubocop.yml +0 -22
  9. data/.yardopts +0 -4
  10. data/.yardopts-dev +0 -6
  11. data/Gemfile +0 -6
  12. data/Gemfile.lock +0 -58
  13. data/README.md +0 -32
  14. data/Rakefile +0 -10
  15. data/bin/rabid_setup +0 -6
  16. data/docs/.nojekyll +0 -0
  17. data/docs/About.md +0 -13
  18. data/docs/CHANGELOG.md +0 -23
  19. data/docs/README.md +0 -23
  20. data/docs/_coverpage.md +0 -14
  21. data/docs/_media/logo.png +0 -0
  22. data/docs/_navbar.md +0 -2
  23. data/docs/_sidebar.md +0 -15
  24. data/docs/index.html +0 -31
  25. data/docs/pages/demo.md +0 -3
  26. data/docs/pages/documentation.md +0 -34
  27. data/docs/pages/install.md +0 -90
  28. data/docs/pages/publishing.md +0 -39
  29. data/docs/pages/quick-start.md +0 -30
  30. data/docs/pages/usage.md +0 -54
  31. data/docs/vendor/docsify.js +0 -1
  32. data/docs/vendor/plugins/emoji.min.js +0 -1
  33. data/docs/vendor/plugins/search.min.js +0 -1
  34. data/docs/vendor/prismjs/components/prism-ruby.min.js +0 -1
  35. data/docs/vendor/themes/vue.css +0 -1
  36. data/docs/why.md +0 -49
  37. data/docs/yard/BigIPCookie.html +0 -159
  38. data/docs/yard/BigIPCookie/Decode.html +0 -782
  39. data/docs/yard/Version.html +0 -126
  40. data/docs/yard/_index.html +0 -138
  41. data/docs/yard/class_list.html +0 -51
  42. data/docs/yard/css/common.css +0 -1
  43. data/docs/yard/css/full_list.css +0 -58
  44. data/docs/yard/css/style.css +0 -496
  45. data/docs/yard/file.LICENSE.html +0 -70
  46. data/docs/yard/file.README.html +0 -105
  47. data/docs/yard/file_list.html +0 -61
  48. data/docs/yard/frames.html +0 -17
  49. data/docs/yard/index.html +0 -105
  50. data/docs/yard/js/app.js +0 -303
  51. data/docs/yard/js/full_list.js +0 -216
  52. data/docs/yard/js/jquery.js +0 -4
  53. data/docs/yard/method_list.html +0 -99
  54. data/docs/yard/top-level-namespace.html +0 -112
  55. data/package-lock.json +0 -154
  56. data/test/test_bigipcookie.rb +0 -86
@@ -1,86 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'minitest/autorun'
4
- require 'bigipcookie'
5
-
6
- class BigIPCookieTest < Minitest::Test
7
- # IPv4 pool members, with pool name
8
- def test_bigipcookie_decode_ipv4_pm
9
- # Size (ip/port) 10 + 5
10
- bip = BigIPCookie::Decode.new('BIGipServer<pool_name>=1677787402.36895.0000')
11
- bip.auto_decode
12
- # Decoded cookie
13
- assert_equal('10.1.1.100:8080', bip.decoded_cookie)
14
- # Pool name
15
- assert_equal('<pool_name>', bip.pool_name)
16
- # Cookie type
17
- assert_equal('IPv4 pool members', bip.cookie_type)
18
- # Test cookie with different encoded lenght
19
- # Size (ip/port) 9 + 5
20
- bip = BigIPCookie::Decode.new('135851530.20480.0000')
21
- bip.auto_decode
22
- assert_equal('10.238.24.8:80', bip.decoded_cookie)
23
- # Size (ip/port) 8 + 0
24
- bip = BigIPCookie::Decode.new('34467338.0.0000')
25
- bip.auto_decode
26
- assert_equal('10.238.13.2:0', bip.decoded_cookie)
27
- end
28
-
29
- # IPv4 pool members in non-default route domains, only cookie value
30
- def test_bigipcookie_decode_ipv4_pm_ndrd
31
- bip = BigIPCookie::Decode.new('rd5o00000000000000000000ffffc0000201o80')
32
- bip.auto_decode
33
- # Decoded cookie
34
- assert_equal('192.0.2.1%5:80', bip.decoded_cookie)
35
- # Pool name
36
- assert_equal('unknown', bip.pool_name)
37
- # Cookie type
38
- assert_equal('IPv4 pool members in non-default route domains', bip.cookie_type)
39
- end
40
-
41
- # IPv6 pool members, custom cookie name, long ipv6 format
42
- def test_bigipcookie_decode_ipv6_pm
43
- bip = BigIPCookie::Decode.new('CustomeCookieName=vi20010112000000000000000000000030.20480')
44
- bip.auto_decode(ipv6compression: 0)
45
- # Decoded cookie
46
- assert_equal('[2001:0112:0000:0000:0000:0000:0000:0030]:80', bip.decoded_cookie)
47
- # Pool name
48
- assert_equal('unknown', bip.pool_name)
49
- # Cookie type
50
- assert_equal('IPv6 pool members', bip.cookie_type)
51
- end
52
-
53
- # IPv6 pool members in non-default route domains
54
- def test_bigipcookie_decode_ipv6_pm_ndrd
55
- bip = BigIPCookie::Decode.new('BIGipServer~SuperPool=rd3o20010112000000000000000000000030o80')
56
- bip.auto_decode
57
- # Decoded cookie
58
- assert_equal('[2001:112::30%3]:80', bip.decoded_cookie)
59
- # Pool name
60
- assert_equal('~SuperPool', bip.pool_name)
61
- # Cookie type
62
- assert_equal('IPv6 pool members in non-default route domains', bip.cookie_type)
63
- end
64
-
65
- def test_encrypted
66
- bip = BigIPCookie::Decode.new('BIGipServerhttp-pool=!LHmYFDA0qZyj4NoylBEaDn0/k2wesiGt0ANZhWaAohjULoWFXRc1b/yfibypy1qfBzD51kqvmwzfcy4=')
67
- bip.auto_decode
68
- # Decoded cookie
69
- assert_equal('Unknown:Encrypted', bip.decoded_cookie)
70
- # Pool name
71
- assert_equal('http-pool', bip.pool_name)
72
- # Cookie type
73
- assert_equal('Encrypted', bip.cookie_type)
74
- end
75
-
76
- def test_encrypted_2
77
- bip = BigIPCookie::Decode.new('BIGipServerhttp-pool=!VGVzdCBzdHJpbmcgMiBlcXVhbCBzaWducw==')
78
- bip.auto_decode
79
- # Decoded cookie
80
- assert_equal('Unknown:Encrypted', bip.decoded_cookie)
81
- # Pool name
82
- assert_equal('http-pool', bip.pool_name)
83
- # Cookie type
84
- assert_equal('Encrypted', bip.cookie_type)
85
- end
86
- end