ronin-support 0.1.0.pre2 → 0.1.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. data/COPYING.txt +158 -497
  2. data/ChangeLog.md +1 -0
  3. data/Gemfile +3 -9
  4. data/README.md +11 -14
  5. data/gemspec.yml +1 -1
  6. data/lib/ronin/extensions.rb +11 -13
  7. data/lib/ronin/extensions/file.rb +11 -13
  8. data/lib/ronin/extensions/ip_addr.rb +11 -13
  9. data/lib/ronin/extensions/kernel.rb +11 -13
  10. data/lib/ronin/extensions/meta.rb +11 -13
  11. data/lib/ronin/extensions/string.rb +11 -13
  12. data/lib/ronin/formatting.rb +11 -13
  13. data/lib/ronin/formatting/binary.rb +11 -13
  14. data/lib/ronin/formatting/digest.rb +11 -13
  15. data/lib/ronin/formatting/extensions.rb +11 -13
  16. data/lib/ronin/formatting/extensions/binary.rb +11 -13
  17. data/lib/ronin/formatting/extensions/binary/file.rb +11 -13
  18. data/lib/ronin/formatting/extensions/binary/integer.rb +11 -13
  19. data/lib/ronin/formatting/extensions/binary/string.rb +11 -13
  20. data/lib/ronin/formatting/extensions/digest.rb +11 -13
  21. data/lib/ronin/formatting/extensions/digest/file.rb +11 -13
  22. data/lib/ronin/formatting/extensions/digest/string.rb +11 -13
  23. data/lib/ronin/formatting/extensions/http.rb +11 -13
  24. data/lib/ronin/formatting/extensions/http/integer.rb +11 -13
  25. data/lib/ronin/formatting/extensions/http/string.rb +11 -13
  26. data/lib/ronin/formatting/extensions/text.rb +11 -13
  27. data/lib/ronin/formatting/extensions/text/array.rb +11 -13
  28. data/lib/ronin/formatting/extensions/text/string.rb +11 -13
  29. data/lib/ronin/formatting/http.rb +11 -13
  30. data/lib/ronin/formatting/text.rb +11 -13
  31. data/lib/ronin/network.rb +11 -13
  32. data/lib/ronin/network/esmtp.rb +11 -13
  33. data/lib/ronin/network/extensions.rb +11 -13
  34. data/lib/ronin/network/extensions/esmtp.rb +11 -13
  35. data/lib/ronin/network/extensions/esmtp/net.rb +11 -13
  36. data/lib/ronin/network/extensions/http.rb +11 -13
  37. data/lib/ronin/network/extensions/http/net.rb +11 -13
  38. data/lib/ronin/network/extensions/imap.rb +11 -13
  39. data/lib/ronin/network/extensions/imap/net.rb +11 -13
  40. data/lib/ronin/network/extensions/pop3.rb +11 -13
  41. data/lib/ronin/network/extensions/pop3/net.rb +11 -13
  42. data/lib/ronin/network/extensions/smtp.rb +11 -13
  43. data/lib/ronin/network/extensions/smtp/net.rb +11 -13
  44. data/lib/ronin/network/extensions/ssl.rb +11 -13
  45. data/lib/ronin/network/extensions/ssl/net.rb +11 -13
  46. data/lib/ronin/network/extensions/tcp.rb +11 -13
  47. data/lib/ronin/network/extensions/tcp/net.rb +11 -13
  48. data/lib/ronin/network/extensions/telnet.rb +11 -13
  49. data/lib/ronin/network/extensions/telnet/net.rb +11 -13
  50. data/lib/ronin/network/extensions/udp.rb +11 -13
  51. data/lib/ronin/network/extensions/udp/net.rb +11 -13
  52. data/lib/ronin/network/http.rb +11 -13
  53. data/lib/ronin/network/http/exceptions.rb +11 -13
  54. data/lib/ronin/network/http/exceptions/unknown_request.rb +11 -13
  55. data/lib/ronin/network/http/http.rb +11 -13
  56. data/lib/ronin/network/http/proxy.rb +11 -13
  57. data/lib/ronin/network/imap.rb +11 -13
  58. data/lib/ronin/network/network.rb +11 -13
  59. data/lib/ronin/network/pop3.rb +11 -13
  60. data/lib/ronin/network/smtp.rb +11 -13
  61. data/lib/ronin/network/smtp/email.rb +11 -13
  62. data/lib/ronin/network/smtp/smtp.rb +11 -13
  63. data/lib/ronin/network/ssl.rb +11 -13
  64. data/lib/ronin/network/tcp.rb +11 -13
  65. data/lib/ronin/network/telnet.rb +11 -13
  66. data/lib/ronin/network/udp.rb +11 -13
  67. data/lib/ronin/path.rb +11 -13
  68. data/lib/ronin/support.rb +11 -13
  69. data/lib/ronin/support/inflector.rb +9 -10
  70. data/lib/ronin/support/version.rb +12 -14
  71. data/lib/ronin/templates.rb +11 -13
  72. data/lib/ronin/templates/erb.rb +11 -13
  73. data/lib/ronin/templates/template.rb +11 -13
  74. data/spec/extensions/ip_addr_spec.rb +5 -5
  75. data/spec/extensions/kernel_spec.rb +1 -1
  76. data/spec/extensions/string_spec.rb +6 -6
  77. data/spec/formatting/binary/integer_spec.rb +3 -3
  78. data/spec/formatting/binary/string_spec.rb +11 -11
  79. data/spec/formatting/digest/string_spec.rb +5 -5
  80. data/spec/formatting/http/integer_spec.rb +3 -3
  81. data/spec/formatting/http/string_spec.rb +5 -5
  82. data/spec/formatting/text/array_spec.rb +5 -5
  83. data/spec/formatting/text/string_spec.rb +5 -5
  84. data/spec/network/http/proxy_spec.rb +0 -2
  85. data/spec/path_spec.rb +9 -7
  86. metadata +4 -4
@@ -24,7 +24,7 @@ describe String do
24
24
  should respond_to(:format_http)
25
25
  end
26
26
 
27
- describe "uri_encode" do
27
+ describe "#uri_encode" do
28
28
  subject { "mod % 3" }
29
29
 
30
30
  let(:uri_encoded) { "mod%20%25%203" }
@@ -34,7 +34,7 @@ describe String do
34
34
  end
35
35
  end
36
36
 
37
- describe "uri_decode" do
37
+ describe "#uri_decode" do
38
38
  subject { "mod%20%25%203" }
39
39
 
40
40
  let(:uri_decoded) { "mod % 3" }
@@ -44,7 +44,7 @@ describe String do
44
44
  end
45
45
  end
46
46
 
47
- describe "uri_escape" do
47
+ describe "#uri_escape" do
48
48
  subject { "x + y" }
49
49
 
50
50
  let(:uri_escaped) { "x+%2B+y" }
@@ -54,7 +54,7 @@ describe String do
54
54
  end
55
55
  end
56
56
 
57
- describe "uri_unescape" do
57
+ describe "#uri_unescape" do
58
58
  subject { "x+%2B+y" }
59
59
 
60
60
  let(:uri_unescaped) { "x + y" }
@@ -64,7 +64,7 @@ describe String do
64
64
  end
65
65
  end
66
66
 
67
- describe "format_http" do
67
+ describe "#format_http" do
68
68
  subject { "mod % 3" }
69
69
 
70
70
  let(:http_formatted) { "%6d%6f%64%20%25%20%33" }
@@ -29,7 +29,7 @@ describe Array do
29
29
  should respond_to(:hex_integers)
30
30
  end
31
31
 
32
- describe "bytes" do
32
+ describe "#bytes" do
33
33
  it "should convert an Array of bytes to an Array of bytes" do
34
34
  byte_array.bytes.should == byte_array
35
35
  end
@@ -43,7 +43,7 @@ describe Array do
43
43
  end
44
44
  end
45
45
 
46
- describe "chars" do
46
+ describe "#chars" do
47
47
  it "should convert an Array of bytes to an Array of chars" do
48
48
  byte_array.chars.should == char_array
49
49
  end
@@ -57,7 +57,7 @@ describe Array do
57
57
  end
58
58
  end
59
59
 
60
- describe "char_string" do
60
+ describe "#char_string" do
61
61
  it "should convert an Array of bytes to a String" do
62
62
  byte_array.char_string.should == string
63
63
  end
@@ -71,7 +71,7 @@ describe Array do
71
71
  end
72
72
  end
73
73
 
74
- describe "hex_chars" do
74
+ describe "#hex_chars" do
75
75
  let(:hex_chars) { ['\x41', '\x41', '\x20'] }
76
76
 
77
77
  it "should convert an Array of bytes into hexadecimal chars" do
@@ -87,7 +87,7 @@ describe Array do
87
87
  end
88
88
  end
89
89
 
90
- describe "hex_integers" do
90
+ describe "#hex_integers" do
91
91
  let(:hex_integers) { ['0x41', '0x41', '0x20'] }
92
92
 
93
93
  it "should convert an Array of bytes into hexadecimal integers" do
@@ -24,7 +24,7 @@ describe String do
24
24
  should respond_to(:insert_after)
25
25
  end
26
26
 
27
- describe "format_chars" do
27
+ describe "#format_chars" do
28
28
  it "should format each character in the String" do
29
29
  subject.format_chars { |c|
30
30
  "_#{c}"
@@ -80,7 +80,7 @@ describe String do
80
80
  end
81
81
  end
82
82
 
83
- describe "format_bytes" do
83
+ describe "#format_bytes" do
84
84
  it "should format each byte in the String" do
85
85
  subject.format_bytes { |b|
86
86
  sprintf("%%%x",b)
@@ -136,7 +136,7 @@ describe String do
136
136
  end
137
137
  end
138
138
 
139
- describe "random_case" do
139
+ describe "#random_case" do
140
140
  it "should capitalize each character when :probability is 1.0" do
141
141
  new_string = subject.random_case(:probability => 1.0)
142
142
 
@@ -150,7 +150,7 @@ describe String do
150
150
  end
151
151
  end
152
152
 
153
- describe "insert_before" do
153
+ describe "#insert_before" do
154
154
  it "should inject data before a matched String" do
155
155
  subject.insert_before('ll','x').should == "hexllo"
156
156
  end
@@ -164,7 +164,7 @@ describe String do
164
164
  end
165
165
  end
166
166
 
167
- describe "insert_after" do
167
+ describe "#insert_after" do
168
168
  it "should inject data after a matched String" do
169
169
  subject.insert_after('ll','x').should == "hellxo"
170
170
  end
@@ -88,8 +88,6 @@ describe Network::HTTP::Proxy do
88
88
  end
89
89
  end
90
90
 
91
- subject { Network::HTTP::Proxy.new }
92
-
93
91
  it "should behave like a Hash" do
94
92
  subject[:host] = 'example.com'
95
93
  subject[:host].should == 'example.com'
@@ -16,38 +16,40 @@ describe Path do
16
16
  end
17
17
 
18
18
  describe "up" do
19
+ subject { Path }
20
+
19
21
  it "should be able to traverse up 0 directories" do
20
- Path.up(0).should == File::SEPARATOR
22
+ subject.up(0).should == File::SEPARATOR
21
23
  end
22
24
 
23
25
  it "should raise an ArgumentError when not passed an Integer or Enumerable" do
24
26
  lambda {
25
- Path.up(1.5)
27
+ subject.up(1.5)
26
28
  }.should raise_error(ArgumentError)
27
29
  end
28
30
 
29
31
  it "should raise an ArgumentError on negative number of directories" do
30
32
  lambda {
31
- Path.up(-1)
33
+ subject.up(-1)
32
34
  }.should raise_error(ArgumentError)
33
35
  end
34
36
 
35
37
  it "should create directory-escaping paths" do
36
- Path.up(n).to_s.should == (['..'] * n).join(File::SEPARATOR)
38
+ subject.up(n).to_s.should == (['..'] * n).join(File::SEPARATOR)
37
39
  end
38
40
 
39
41
  it "should create a range of directory-escaping paths" do
40
42
  range = 7..10
41
43
 
42
- Path.up(range).should == range.map { |i| Path.up(i) }
44
+ subject.up(range).should == range.map { |i| Path.up(i) }
43
45
  end
44
46
 
45
47
  it "should allow using custom path separators" do
46
- Path.up(n,'\\').to_s.should == (['..'] * n).join("\\")
48
+ subject.up(n,'\\').to_s.should == (['..'] * n).join("\\")
47
49
  end
48
50
  end
49
51
 
50
- describe "join" do
52
+ describe "#join" do
51
53
  let(:base_path) { Path.new('base') }
52
54
 
53
55
  it "should join with sub-paths" do
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 1
8
8
  - 0
9
- - pre2
10
- version: 0.1.0.pre2
9
+ - pre3
10
+ version: 0.1.0.pre3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Postmodern
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-31 00:00:00 -08:00
18
+ date: 2011-01-07 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -233,7 +233,7 @@ files:
233
233
  has_rdoc: yard
234
234
  homepage: http://github.com/ronin-ruby/ronin-support
235
235
  licenses:
236
- - LGPL-2.1
236
+ - LGPL-3
237
237
  post_install_message:
238
238
  rdoc_options: []
239
239