mack_ruby_core_extensions 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Tue, 25 Mar 2008 17:19:35 -0400
1
+ Tue, 25 Mar 2008 17:33:58 -0400
@@ -69,11 +69,10 @@
69
69
  <div id="contextContent">
70
70
 
71
71
  <div id="description">
72
- <h1>Hello, and welcome to the <a href="../classes/Mack.html">Mack</a> Ruby Core Extensions!</h1>
72
+ <h1>Hello, and welcome to the Mack Ruby Core Extensions!</h1>
73
73
  <p>
74
74
  These are a collection of extensions to the Ruby core libraries meant to
75
- help with the development of <a href="../classes/Mack.html">Mack</a> and <a
76
- href="../classes/Mack.html">Mack</a> applications. Please enjoy.
75
+ help with the development of Mack and Mack applications. Please enjoy.
77
76
  </p>
78
77
  <h2>Contact</h2>
79
78
  <p>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Mar 25 15:43:06 -0400 2008</td>
59
+ <td>Tue Mar 25 17:28:02 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Mar 25 15:37:58 -0400 2008</td>
59
+ <td>Tue Mar 25 17:26:23 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -26,8 +26,6 @@
26
26
  <a href="classes/Float.html">Float</a><br />
27
27
  <a href="classes/Hash.html">Hash</a><br />
28
28
  <a href="classes/Kernel.html">Kernel</a><br />
29
- <a href="classes/Mack.html">Mack</a><br />
30
- <a href="classes/Mack/Utils.html">Mack::Utils</a><br />
31
29
  <a href="classes/Mack/Utils/Inflector.html">Mack::Utils::Inflector</a><br />
32
30
  <a href="classes/Math.html">Math</a><br />
33
31
  <a href="classes/MethodNotImplemented.html">MethodNotImplemented</a><br />
@@ -21,71 +21,72 @@
21
21
  <h1 class="section-bar">Methods</h1>
22
22
  <div id="index-entries">
23
23
  <a href="classes/Hash.html#M000005">- (Hash)</a><br />
24
- <a href="classes/String.html#M000033">blank? (String)</a><br />
24
+ <a href="classes/String.html#M000034">blank? (String)</a><br />
25
25
  <a href="classes/NilClass.html#M000024">blank? (NilClass)</a><br />
26
- <a href="classes/String.html#M000044">breakify (String)</a><br />
27
- <a href="classes/String.html#M000045">breakify! (String)</a><br />
28
- <a href="classes/String.html#M000031">camelcase (String)</a><br />
29
- <a href="classes/String.html#M000051">capitalize_all_words (String)</a><br />
30
- <a href="classes/String.html#M000052">capitalize_all_words! (String)</a><br />
26
+ <a href="classes/String.html#M000045">breakify (String)</a><br />
27
+ <a href="classes/String.html#M000046">breakify! (String)</a><br />
28
+ <a href="classes/String.html#M000032">camelcase (String)</a><br />
29
+ <a href="classes/String.html#M000052">capitalize_all_words (String)</a><br />
30
+ <a href="classes/String.html#M000053">capitalize_all_words! (String)</a><br />
31
31
  <a href="classes/Class.html#M000023">class_is_a? (Class)</a><br />
32
- <a href="classes/String.html#M000032">constantize (String)</a><br />
32
+ <a href="classes/String.html#M000033">constantize (String)</a><br />
33
33
  <a href="classes/Module.html#M000018">convert_security_of_methods (Module)</a><br />
34
34
  <a href="classes/Array.html#M000016">count (Array)</a><br />
35
35
  <a href="classes/Array.html#M000008">delete_from_array (Array)</a><br />
36
36
  <a href="classes/Array.html#M000009">delete_from_array! (Array)</a><br />
37
- <a href="classes/String.html#M000040">ends_with? (String)</a><br />
38
- <a href="classes/String.html#M000046">hexdigest (String)</a><br />
39
- <a href="classes/String.html#M000047">hexdigest! (String)</a><br />
37
+ <a href="classes/String.html#M000041">ends_with? (String)</a><br />
38
+ <a href="classes/String.html#M000047">hexdigest (String)</a><br />
39
+ <a href="classes/String.html#M000048">hexdigest! (String)</a><br />
40
40
  <a href="classes/Module.html#M000019">include_safely_into (Module)</a><br />
41
- <a href="classes/Mack/Utils/Inflector.html#M000061">inflections (Mack::Utils::Inflector)</a><br />
41
+ <a href="classes/Mack/Utils/Inflector.html#M000062">inflections (Mack::Utils::Inflector)</a><br />
42
42
  <a href="classes/Array.html#M000017">invert (Array)</a><br />
43
- <a href="classes/Mack/Utils/Inflector.html#M000057">irregular (Mack::Utils::Inflector)</a><br />
44
- <a href="classes/Object.html#M000028">ivar_cache (Object)</a><br />
45
- <a href="classes/Object.html#M000029">ivar_cache_clear (Object)</a><br />
43
+ <a href="classes/Mack/Utils/Inflector.html#M000058">irregular (Mack::Utils::Inflector)</a><br />
44
+ <a href="classes/Object.html#M000029">ivar_cache (Object)</a><br />
45
+ <a href="classes/Object.html#M000030">ivar_cache_clear (Object)</a><br />
46
46
  <a href="classes/Hash.html#M000004">join (Hash)</a><br />
47
- <a href="classes/String.html#M000036">linkify (String)</a><br />
48
- <a href="classes/Math.html#M000064">log2 (Math)</a><br />
47
+ <a href="classes/String.html#M000037">linkify (String)</a><br />
48
+ <a href="classes/Math.html#M000065">log2 (Math)</a><br />
49
49
  <a href="classes/Dir.html#M000002">make_dirs (Dir)</a><br />
50
- <a href="classes/Math.html#M000066">max (Math)</a><br />
51
- <a href="classes/String.html#M000037">methodize (String)</a><br />
50
+ <a href="classes/Math.html#M000067">max (Math)</a><br />
52
51
  <a href="classes/Symbol.html#M000001">methodize (Symbol)</a><br />
53
- <a href="classes/Math.html#M000065">min (Math)</a><br />
54
- <a href="classes/Object.html#M000030">namespaces (Object)</a><br />
52
+ <a href="classes/String.html#M000038">methodize (String)</a><br />
53
+ <a href="classes/Math.html#M000066">min (Math)</a><br />
54
+ <a href="classes/Object.html#M000031">namespaces (Object)</a><br />
55
+ <a href="classes/Object.html#M000026">needs_method (Object)</a><br />
55
56
  <a href="classes/MethodNotImplemented.html#M000020">new (MethodNotImplemented)</a><br />
56
57
  <a href="classes/Class.html#M000022">new_instance_of (Class)</a><br />
57
58
  <a href="classes/Array.html#M000007">parse_splat_args (Array)</a><br />
58
59
  <a href="classes/Array.html#M000012">pick_random (Array)</a><br />
59
- <a href="classes/Mack/Utils/Inflector.html#M000055">plural (Mack::Utils::Inflector)</a><br />
60
- <a href="classes/String.html#M000034">plural (String)</a><br />
61
- <a href="classes/Mack/Utils/Inflector.html#M000060">pluralize (Mack::Utils::Inflector)</a><br />
62
- <a href="classes/String.html#M000041">pluralize_word (String)</a><br />
63
- <a href="classes/Kernel.html#M000062">pp_to_s (Kernel)</a><br />
60
+ <a href="classes/String.html#M000035">plural (String)</a><br />
61
+ <a href="classes/Mack/Utils/Inflector.html#M000056">plural (Mack::Utils::Inflector)</a><br />
62
+ <a href="classes/Mack/Utils/Inflector.html#M000061">pluralize (Mack::Utils::Inflector)</a><br />
63
+ <a href="classes/String.html#M000042">pluralize_word (String)</a><br />
64
+ <a href="classes/Kernel.html#M000063">pp_to_s (Kernel)</a><br />
64
65
  <a href="classes/Float.html#M000021">prec (Float)</a><br />
65
66
  <a href="classes/Dir.html#M000003">prep_dir (Dir)</a><br />
66
67
  <a href="classes/Array.html#M000013">random_each (Array)</a><br />
68
+ <a href="classes/String.html#M000049">randomize (String)</a><br />
67
69
  <a href="classes/Array.html#M000010">randomize (Array)</a><br />
68
- <a href="classes/String.html#M000048">randomize (String)</a><br />
69
70
  <a href="classes/Array.html#M000011">randomize! (Array)</a><br />
70
- <a href="classes/String.html#M000042">remove (String)</a><br />
71
- <a href="classes/String.html#M000043">remove! (String)</a><br />
72
- <a href="classes/Kernel.html#M000063">retryable (Kernel)</a><br />
73
- <a href="classes/Object.html#M000026">running_time (Object)</a><br />
74
- <a href="classes/Object.html#M000027">send_with_chain (Object)</a><br />
75
- <a href="classes/String.html#M000035">singular (String)</a><br />
76
- <a href="classes/Mack/Utils/Inflector.html#M000056">singular (Mack::Utils::Inflector)</a><br />
77
- <a href="classes/Mack/Utils/Inflector.html#M000059">singularize (Mack::Utils::Inflector)</a><br />
78
- <a href="classes/String.html#M000053">sql_safe_str (String)</a><br />
79
- <a href="classes/String.html#M000054">sql_safe_str! (String)</a><br />
80
- <a href="classes/String.html#M000039">starts_with? (String)</a><br />
71
+ <a href="classes/String.html#M000043">remove (String)</a><br />
72
+ <a href="classes/String.html#M000044">remove! (String)</a><br />
73
+ <a href="classes/Kernel.html#M000064">retryable (Kernel)</a><br />
74
+ <a href="classes/Object.html#M000027">running_time (Object)</a><br />
75
+ <a href="classes/Object.html#M000028">send_with_chain (Object)</a><br />
76
+ <a href="classes/Mack/Utils/Inflector.html#M000057">singular (Mack::Utils::Inflector)</a><br />
77
+ <a href="classes/String.html#M000036">singular (String)</a><br />
78
+ <a href="classes/Mack/Utils/Inflector.html#M000060">singularize (Mack::Utils::Inflector)</a><br />
79
+ <a href="classes/String.html#M000054">sql_safe_str (String)</a><br />
80
+ <a href="classes/String.html#M000055">sql_safe_str! (String)</a><br />
81
+ <a href="classes/String.html#M000040">starts_with? (String)</a><br />
81
82
  <a href="classes/Array.html#M000014">subset? (Array)</a><br />
82
83
  <a href="classes/Array.html#M000015">superset? (Array)</a><br />
83
84
  <a href="classes/Object.html#M000025">to_param (Object)</a><br />
84
85
  <a href="classes/Hash.html#M000006">to_params (Hash)</a><br />
85
- <a href="classes/String.html#M000049">truncate (String)</a><br />
86
- <a href="classes/String.html#M000050">truncate! (String)</a><br />
87
- <a href="classes/Mack/Utils/Inflector.html#M000058">uncountable (Mack::Utils::Inflector)</a><br />
88
- <a href="classes/String.html#M000038">underscore (String)</a><br />
86
+ <a href="classes/String.html#M000050">truncate (String)</a><br />
87
+ <a href="classes/String.html#M000051">truncate! (String)</a><br />
88
+ <a href="classes/Mack/Utils/Inflector.html#M000059">uncountable (Mack::Utils::Inflector)</a><br />
89
+ <a href="classes/String.html#M000039">underscore (String)</a><br />
89
90
  </div>
90
91
  </div>
91
92
  </body>
@@ -6,6 +6,12 @@ class Object
6
6
  self.to_s
7
7
  end
8
8
 
9
+ def self.needs_method(meth)
10
+ define_method(meth) do
11
+ raise MethodNotImplemented.new(meth)
12
+ end
13
+ end
14
+
9
15
  def running_time(message = "", logger = nil)
10
16
  s_time = Time.now
11
17
  s = "---Starting at #{s_time}---"
@@ -1,6 +1,6 @@
1
1
  require 'singleton'
2
- module Mack
3
- module Utils
2
+ module Mack # :nodoc:
3
+ module Utils # :nodoc:
4
4
  # This class is used to deal with inflection strings. This means taken a string and make it plural, or singular, etc...
5
5
  # Inflection rules can be added very easy, and are checked from the bottom up. This means that the last rule is the first
6
6
  # rule to be matched. The exception to this, kind of, is 'irregular' and 'uncountable' rules. The 'uncountable' rules are
@@ -2,14 +2,16 @@ require File.dirname(__FILE__) + '/../test_helper.rb'
2
2
 
3
3
  class ObjectTest < Test::Unit::TestCase
4
4
 
5
+ needs_method :foo
6
+
5
7
  def setup
6
8
  end
7
9
 
8
10
  def teardown
9
11
  end
10
-
11
- # replace this with tests of your own.
12
- def test_truth
13
- assert true
12
+
13
+ def test_needs_method
14
+ assert_raise(MethodNotImplemented) { foo }
14
15
  end
16
+
15
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack_ruby_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -47,8 +47,6 @@ files:
47
47
  - doc/classes/Hash.html
48
48
  - doc/classes/Kernel.html
49
49
  - doc/classes/Mack/Utils/Inflector.html
50
- - doc/classes/Mack/Utils.html
51
- - doc/classes/Mack.html
52
50
  - doc/classes/Math.html
53
51
  - doc/classes/MethodNotImplemented.html
54
52
  - doc/classes/Module.html
@@ -1,111 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Mack</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Mack</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/utils/inflector_rb.html">
59
- lib/utils/inflector.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
-
80
- </div>
81
-
82
-
83
- <!-- if includes -->
84
-
85
- <div id="section">
86
-
87
- <div id="class-list">
88
- <h3 class="section-bar">Classes and Modules</h3>
89
-
90
- Module <a href="Mack/Utils.html" class="link">Mack::Utils</a><br />
91
-
92
- </div>
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>
@@ -1,111 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Mack::Utils</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Mack::Utils</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/utils/inflector_rb.html">
59
- lib/utils/inflector.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
-
80
- </div>
81
-
82
-
83
- <!-- if includes -->
84
-
85
- <div id="section">
86
-
87
- <div id="class-list">
88
- <h3 class="section-bar">Classes and Modules</h3>
89
-
90
- Class <a href="Utils/Inflector.html" class="link">Mack::Utils::Inflector</a><br />
91
-
92
- </div>
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>