qualitysmith_extensions 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Readme CHANGED
@@ -1,10 +1,14 @@
1
- == Our Extensions Readme
1
+ = QualitySmith Extensions
2
+
3
+ [<b>Home page</b>:] http://qualitysmithext.rubyforge.org/
4
+ [<b>Project site</b>:] http://rubyforge.org/projects/qualitysmithext/
5
+ [<b>License</b>:] {Ruby License}[link:files/License.html]
2
6
 
3
7
  == Introduction
4
8
 
5
- This is a library of miscellaneous general-purpose, reusable Ruby code, quite similar in purpose and layout to {Ruby Facets}[http://facets.rubyforge.org/], but it's certainly not meant to *compete* with it!
9
+ This is a library of miscellaneous general-purpose, reusable Ruby code, quite similar in purpose and layout to {Ruby Facets}[http://facets.rubyforge.org/]. It is certainly not meant to _compete_ with Facets though!
6
10
 
7
- Instead, developers are encouraged to first check if it the method or class they are looking for already exists in one of the fine existing open-source projects (like {Facets}[http://facets.rubyforge.org/] or {Extensions}[http://extensions.rubyforge.org/rdoc/index.html] or {stdlib}[http://www.ruby-doc.org/stdlib/]).
11
+ Developers are encouraged to first check if the method or class they are looking for already exists in one of the fine existing open-source projects (like {Facets}[http://facets.rubyforge.org/] or {Extensions}[http://extensions.rubyforge.org/rdoc/index.html] or {stdlib}[http://www.ruby-doc.org/stdlib/]).
8
12
 
9
13
  If the code you are needing hasn't already been written by someone else, then you can throw it in this library. Also submit it to an existing extensions project if you think it's any good.
10
14
 
@@ -14,59 +18,36 @@ Like Facets, this library contains:
14
18
 
15
19
  == Installation
16
20
 
17
- === Non-gem
18
-
19
- Install the plugin from Subversion and add an svn:external to your vendor/plugins directory with this command:
20
-
21
- ./script/plugin install -x http://code.qualitysmith.com/gemables/qualitysmith_extensions
22
-
23
- === Gem
24
-
25
- In your dreams.
21
+ gem install qualitysmith_extensions
26
22
 
27
23
  == Usage
28
24
 
29
- === In Rails (non-gem)
30
-
31
- Install the plugin from Subversion and add an svn:external to your vendor/plugins directory with this command:
32
-
33
- ./script/plugin install -x http://code.qualitysmith.com/gemables/qualitysmith_extensions
34
-
35
- Put this in your config/environment.rb :
25
+ require "rubygems"
26
+ gem "qualitysmith_extensions"
36
27
 
37
- Rails::Initializer.run do |config|
38
- config.load_paths += %W( #{RAILS_ROOT}/vendor/plugins )
39
- end
40
- require "qualitysmith_extensions/lib/qualitysmith_extensions/all.rb"
28
+ And then <b>include as much or as little as you want</b>.
41
29
 
42
- === Include as much or as little as you want
30
+ Use the handy <tt>all.rb</tt> files to load everything in a particular directory (and all subdirectories).
43
31
 
44
32
  To load everything:
45
33
 
46
- require "../path/to/qualitysmith_extensions/lib/qualitysmith_extensions/all.rb"
34
+ require "qualitysmith_extensions/all"
47
35
 
48
36
  To load everything just for one class:
49
37
 
50
- require "../path/to/qualitysmith_extensions/lib/qualitysmith_extensions/string/all.rb"
38
+ require "qualitysmith_extensions/string/all"
51
39
 
52
40
  To load just an individual method:
53
41
 
54
- require "../path/to/qualitysmith_extensions/lib/qualitysmith_extensions/array/average.rb"
42
+ require "qualitysmith_extensions/array/average"
55
43
 
56
- === Gem
57
-
58
- It's not packaged as a gem yet,... but if it were, it might work something like this?:
59
-
60
- require "rubygems"
61
- require_gem "qualitysmith_extensions"
62
- require "qualitysmith_extensions/lib/qualitysmith_extensions/array/all.rb"
63
44
 
64
45
  == Running tests
65
46
 
66
47
  Tests are self-contained within the file for the code that is under test.
67
48
 
68
- To run the tests directly, you need to use the <tt>rubytest</tt> command that is included with the {Reap}[http://reap.rubyforge.org/] tool.
49
+ To run the tests directly, you need to use the <tt>exrb</tt> command that is part of the {Ratchets}[http://ratchets.rubyforge.org/] project.
69
50
 
70
- If you use <tt>vim</tt>, you can set up your editor to run the tests just by typing the <tt>:Test</tt> command. To set that up, just include <tt>~/svn/devscripts/vim/include.vim</tt> .
51
+ At some point in time, we may extract them into separate files using the Exacto test extractor tool.
71
52
 
72
- At some point in time, we may extract them into separate files using the Reap test extractor tool.
53
+ <b>QualitySmith developers</b>: If you use <tt>vim</tt>, you can set up your editor to run the tests just by typing the <tt>:Test</tt> command. To set that up, just include <tt>~/svn/devscripts/vim/include.vim</tt> .
@@ -9,7 +9,9 @@ require 'rubygems'
9
9
  require 'facets/core/kernel/silence_warnings'
10
10
 
11
11
  class Array
12
- # Expands (calls to_a on) all Ranges contained in this array, replacing the range with the list of elements that the range represents.
12
+ # Expands (calls +to_a+ on) all Ranges contained in this array, replacing the range with the list of *elements* that the range represents.
13
+ #
14
+ # This is especially useful when you want to have "discontiguous ranges" like [1..3, 5..7]...
13
15
  #
14
16
  # [1..3, 5..7].expand_ranges
15
17
  # => [1, 2, 3, 5, 6, 7]
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: qualitysmith_extensions
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5
7
- date: 2007-03-22 00:00:00 -07:00
6
+ version: 0.0.6
7
+ date: 2007-03-23 00:00:00 -07:00
8
8
  summary: A collection of reusable Ruby methods developed by QualitySmith.
9
9
  require_paths:
10
10
  - lib
@@ -46,7 +46,7 @@ files:
46
46
  - lib/qualitysmith_extensions/kernel/filter_output.rb
47
47
  - lib/qualitysmith_extensions/kernel/backtrace.rb
48
48
  - lib/qualitysmith_extensions/kernel/capture_output.rb
49
- - lib/qualitysmith_extensions/object/singleton.rb
49
+ - lib/qualitysmith_extensions/object/singleton_send.rb
50
50
  - lib/qualitysmith_extensions/object/own_methods.rb
51
51
  - lib/qualitysmith_extensions/file/exact_match_regexp.rb
52
52
  - lib/qualitysmith_extensions/date/iso8601.rb