zucker 9 → 10
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/CHANGELOG +43 -37
- data/Rakefile +10 -9
- data/desc/blank.yaml +4 -2
- data/desc/file.yaml +5 -6
- data/desc/hash.yaml +1 -1
- data/desc/kernel.yaml +2 -2
- data/desc/not.yaml +1 -1
- data/desc/qq.yaml +1 -1
- data/desc/sandbox.yaml +1 -0
- data/doc/zucker_doc.html +87 -65
- data/doc/zucker_doc.rb +3 -4
- data/lib/zucker.rb +2 -2
- data/spec/file_spec.rb +20 -4
- data/spec/sandbox_spec.rb +8 -6
- data/zucker.gemspec +1 -1
- metadata +96 -109
data/.gemtest
ADDED
File without changes
|
data/CHANGELOG
CHANGED
@@ -1,75 +1,81 @@
|
|
1
|
+
2011-04-29 | Zucker 10
|
2
|
+
* doc/spec tweaks
|
3
|
+
* make test.rubygems.org-testable
|
4
|
+
* fix zucker 9 permission issue
|
5
|
+
|
6
|
+
|
1
7
|
2011-01-22 | Zucker 9
|
2
|
-
*
|
8
|
+
* remove history versions (sorry, it caused too much gem/rdoc troubles)
|
3
9
|
* add file cube: File.delete! and File.gsub
|
4
10
|
* debug pack improvements
|
5
11
|
* binding: typos + return nil
|
6
12
|
* cc: support for ripl + return nil
|
7
13
|
* mm: also show eigenclass for modules + nicer displaying + return nil
|
8
14
|
* added Regexp#visualize
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
15
|
+
* remove optional sandbox param
|
16
|
+
* rename xxx2proc to xxx_to_proc
|
17
|
+
* change rakefile/rspec/gemspec structure
|
12
18
|
* more minor fixes and improvements
|
13
19
|
|
14
20
|
|
15
21
|
2010-10-06 | Zucker 8
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
22
|
+
* fix a little alias_for bug
|
23
|
+
* disable rdoc creation when installing (in favour of the custom docs)
|
24
|
+
* change Binding#inspect to Binding.variables (was too verbose and dangerous)
|
19
25
|
|
20
26
|
|
21
27
|
2010-10-03 | Zucker 7
|
22
|
-
*
|
28
|
+
* fix critical OS.windows? bug
|
23
29
|
|
24
30
|
|
25
31
|
2010-10-03 | Zucker 6
|
26
32
|
* no new cubes
|
27
33
|
* bugfix for OS.posix?
|
28
34
|
* small changes + bugfixes + doc improvements
|
29
|
-
*
|
30
|
-
*
|
35
|
+
* add two user methods to Info
|
36
|
+
* change egonil semantics ( using method_missing, see http://rbjl.net/26/catch_nil.rb )
|
31
37
|
* bugfix for vv
|
32
38
|
|
33
39
|
|
34
40
|
2010-09-04 | Zucker 5
|
35
|
-
* debug edition -
|
36
|
-
*
|
37
|
-
*
|
41
|
+
* debug edition - add two debug helpers: oo (output line, method, file) and cc (output method callstack)
|
42
|
+
* rename cube D to dd add add more debug aliases (for mm and binding)
|
43
|
+
* fix __SPECIAL_VARS__ in info and kernel cube and some minor bugfixes
|
38
44
|
* Zucker.activate_more_aliases! option
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
+
* add Hash#&
|
46
|
+
* add aliases: File.filename (for basename), Dir.join and Dir.split (for File.join, split)
|
47
|
+
* add a flexible requiring mechansim in zucker.rb (no api changes)
|
48
|
+
* restructure packages
|
49
|
+
* add rake tasks for releasing
|
50
|
+
* improve RubyVersion constant (cleaner and more flexible)
|
45
51
|
|
46
52
|
|
47
53
|
2010-09-01 | Zucker 4
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
54
|
+
* fix Binding#inspect
|
55
|
+
* add RubyEngine constant
|
56
|
+
* add RubyVersion constant
|
57
|
+
* add OS constant
|
58
|
+
* add q debug method (like p but on one line)
|
59
|
+
* add String#-
|
54
60
|
|
55
61
|
|
56
62
|
2010-08-14 | Zucker 3
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
63
|
+
* add tap cube
|
64
|
+
* add Object#not
|
65
|
+
* add alias_for for an alternative alias syntax
|
66
|
+
* add String#constantize (improved AS version)
|
67
|
+
* improve Info module
|
68
|
+
* make Array#sum Rails compatibile
|
69
|
+
* improve docs
|
70
|
+
* change directory layout (no changes for requiring)
|
65
71
|
* more small changes
|
66
72
|
|
67
73
|
|
68
74
|
2010-08-08 | Zucker 2
|
69
|
-
*
|
70
|
-
*
|
71
|
-
*
|
72
|
-
*
|
75
|
+
* add info cube
|
76
|
+
* add chaining for array2proc
|
77
|
+
* fix Hash.zip
|
78
|
+
* fix instance_variables_from binding for 1.9
|
73
79
|
* more specs
|
74
80
|
|
75
81
|
|
data/Rakefile
CHANGED
@@ -16,8 +16,10 @@ task 'doc' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
task 'default' => 'spec'
|
19
|
+
task 'test' => 'spec'
|
19
20
|
RSpec::Core::RakeTask.new('spec') do |t|
|
20
21
|
t.ruby_opts = "-r " + File.join(@path, 'spec', 'spec_helper')
|
22
|
+
t.rspec_opts = "--color"
|
21
23
|
|
22
24
|
if RUBY_VERSION < '1.9'
|
23
25
|
t.pattern = File.join(@path, 'spec', '*_spec.rb')
|
@@ -49,7 +51,7 @@ task :gemspec do
|
|
49
51
|
end
|
50
52
|
|
51
53
|
# release
|
52
|
-
desc 'run specs, build doc, bump version, set date
|
54
|
+
desc 'run specs, build doc, bump version, set date and add these changes to git'
|
53
55
|
task 'prepare_release' => %w[spec] do # run specs
|
54
56
|
# really want to release?
|
55
57
|
print 'Do you really want to release? ...then enter release: '
|
@@ -62,12 +64,12 @@ task 'prepare_release' => %w[spec] do # run specs
|
|
62
64
|
zucker_rb.sub! /DATE\s*=.*$/, "DATE = '#{Date.today}'"
|
63
65
|
File.open 'lib/zucker.rb','w' do |f| f.write zucker_rb end
|
64
66
|
|
65
|
-
|
67
|
+
system 'rake doc'
|
66
68
|
|
67
69
|
# add changes to git and tag
|
68
|
-
|
69
|
-
|
70
|
-
|
70
|
+
system 'git add .'
|
71
|
+
system "git commit -m 'Ruby Zucker #@v :)'"
|
72
|
+
system "git tag -a v#@v -m 'Ruby Zucker #@v :)'"
|
71
73
|
|
72
74
|
# done
|
73
75
|
puts "prepared Zucker #@v gem release"
|
@@ -75,8 +77,7 @@ end
|
|
75
77
|
|
76
78
|
desc 'prepare_release, build gem, and push it to git and display rubygems push command'
|
77
79
|
task 'release' => %w[gem] do
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
puts "gem push pkg/#{last_gem}"
|
80
|
+
system 'git push origin master'
|
81
|
+
system 'git push origin master --tags'
|
82
|
+
puts "gem push pkg/zucker-#{ Zucker::VERSION }.gem"
|
82
83
|
end
|
data/desc/blank.yaml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
blank:
|
2
|
-
summary: Does pretty the same as in ActiveSupport (Every object can be asked if it is blank).
|
2
|
+
summary: Does pretty the same as in ActiveSupport (Every object can be asked if it is blank or present).
|
3
3
|
why: It's too familiar ;)
|
4
4
|
methods:
|
5
|
-
Object#blank?:
|
5
|
+
Object#blank?:
|
6
|
+
- "'an object'.blank? # => false"
|
7
|
+
- "nil.present? # => false"
|
6
8
|
versions:
|
7
9
|
- 1.9
|
8
10
|
- 1.8
|
data/desc/file.yaml
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
file:
|
2
2
|
summary: Extensions for ⇧File⇧.
|
3
3
|
methods:
|
4
|
-
File
|
5
|
-
File.gsub 'some_filename',
|
4
|
+
File.gsub: |
|
5
|
+
File.gsub 'some_filename', # will read the file and substitute the hash keys with their values
|
6
6
|
/hi/ => 'cu',
|
7
|
-
/\d/ => proc
|
8
|
-
|
9
|
-
File#delete!: "File.delete! 'some_filename' # will delete the file, don't care if it exist."
|
7
|
+
/\d/ => proc{ |m| (m.to_i+1).to_s }
|
8
|
+
File.delete!: "File.delete! 'some_filename' # will delete the file, don't care if it exist."
|
10
9
|
info:
|
11
|
-
- "Idea for
|
10
|
+
- "Idea for ⇧File.delete!⇧ from sugar-high."
|
12
11
|
versions:
|
13
12
|
- 1.9
|
14
13
|
- 1.8
|
data/desc/hash.yaml
CHANGED
data/desc/kernel.yaml
CHANGED
@@ -4,9 +4,9 @@ kernel:
|
|
4
4
|
methods:
|
5
5
|
activate_warnings!: "activate_warnings! # sets $VERBOSE to 1"
|
6
6
|
deactivate_warnings!: "deactivate_warnings! # sets $VERBOSE to 0"
|
7
|
-
executed_directly?, standalone?: "executed_directly? # checks, if the current file is run directly -> true"
|
7
|
+
executed_directly?, directly_executed, standalone?: "executed_directly? # checks, if the current file is run directly -> true"
|
8
8
|
library?: "library? # checks, if the current file is run directly -> false"
|
9
|
-
irb?: "irb? # returns false if not called from IRB"
|
9
|
+
irb?: "irb? # returns false if not called from IRB or RIPL"
|
10
10
|
ignore_sigint!: "ignore_sigint! # blocks CTRL+C"
|
11
11
|
versions:
|
12
12
|
- 1.9
|
data/desc/not.yaml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
not:
|
2
|
-
summary: ⇧not⇧ returns an object on which all methods are redirected to it's receiver object, but returns inverted boolean.
|
2
|
+
summary: ⇧not⇧ returns an object on which all methods are redirected to it's receiver object, but returns the inverted boolean.
|
3
3
|
why: Better readability.
|
4
4
|
methods:
|
5
5
|
Object#not: |
|
data/desc/qq.yaml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
qq:
|
2
|
-
summary: The ⇧q⇧ method does the same like ⇧p⇧, but
|
2
|
+
summary: The ⇧q⇧ method does the same like ⇧p⇧, but outputs multiple arguments on the same line.
|
3
3
|
methods:
|
4
4
|
q, qq: |
|
5
5
|
q "zucker", '', {6=>7}, 5, 2.3, :o # outputs "zucker" "" {6=>7} 5 2.3 :o
|
data/desc/sandbox.yaml
CHANGED
data/doc/zucker_doc.html
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<head>
|
6
6
|
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
7
7
|
|
8
|
-
<title>Ruby Zucker
|
8
|
+
<title>Ruby Zucker 10</title>
|
9
9
|
<script type="text/javascript">
|
10
10
|
var show = function(snippet){
|
11
11
|
document.getElementById( snippet ).style.display = 'block'
|
@@ -281,10 +281,9 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
281
281
|
<body>
|
282
282
|
<div id="world">
|
283
283
|
<img class="rubylogo" alt="ruby" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAADAVgAAwFYBgeEOVwAAAAd0SU1FB9oIHxY1C2ozXR0AABglSURBVGjevZt/sGVVdec/a+9z7q/3o1830N00DQiCQkoQiPgj0UiG8UcyMZNSC82PkdIEqYlaISkTMTPlVEw5IdHRqKEURQ2JSZwaiYijJimnxohMVH42Aml+2dD9ul//fP1+9Lv3nnP23mv+2Puce25DTOI4dtepe+5+7913vnut9V1rfdd+wo/wn/cea+3UWlBFIFfVDOdCsbi/Gj7+CMWePRQH9lEsLlItLjLav0h1fAX1ivqKUDq08njnkNKzYZXDsyb86qoH4KNzXd6xXjztGbIfBdAQAsYYjDFT66q6E7gQeJWIBDXmmKpfN1k2kl4P040X3S6m08FYIyH4TBEQASMYhGGOGWY4CSx+fC5fqZD971gv9gH8wVyHd6+XPxrAJwMVEVR1AFwBnFsdWrrKrSy/TIcbSJ6Tb9tBftpWqiNHML0uptfH9vqYfh/b7+OzHPUBSZ9Ziae0gaGBwggKKBBU7vvAfOfDTuW+69eLBwDes9DjvStj5P8n0JOs+VzgZzcevP9la//wjZ8qnnjslHLP41QH9irjITbLpXP6TmZf+BJmf+Z1VBtjhg/uojx4kGJxkWJxL+X+RdzKKq5yjIoNxtWYEaqViJQqWolIpUZLRBxQij7shPf8l9XyVoDfme/8cAGrKiKTj6zKcpDl+U8A7167+1vP3vvhG7aNdj/UC8cOEdbWMYoai1gBAyoByXoZg4svZ+t7P0i1NuTEvXdTHDigxYH94pYO6OqeJ2Rt9RhOHUHRUkQqIsgK0VKNVBDBo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Zl0TOKiGY9LV4ZoqWlTnJudvNvZUoN52e9zizM4hivknWSgAbwImZjU1rSPO9JlnctlhcRbhgYTunzm7iiwcewIXAmi/W8tn5tSaGP7G5z7XHx8si3ORh5OJBTLygTkM87ImwatCRq6QqKi2LUp0LGuq+vonf5M46LefU3VIQyLKMhZkeric8ZUYsmYKjUrJCyQn1lKJURnGiOIFKFIfiUYLRqHyaCLxjLF2b07U5eadL3u9CJ9Ptc1v4xfNfQifLOV6O1piZW52uZoG/ODXPV6v8fU75ba2rVGkOzUgQ6JdeTx15PCDZrGK7ErQSL46gHi+OgMPjpyorL0KwBnILJvKAikzYfbJVqGpsKDCSiSFDyEwkr44YcolAOyajI5aOzehkGXmWkWU53Syn2+nR73TZ8CW7jjx555b+/Btf+eAji41Lf2Khxy8fHVcf35S9TxDv0OtrsAGadLPWMZwy8ipiRaRDSB7QWDlNEppzW5nBpRaN1pRSRJrTc4a6AZaUS9NWCzj1VJL0+jCp3NLw7JCiB71yyAoHBzY/ONvpL83nvY3Ngzl/6sy8O212i7/49HOXrvnmnUeeZuEb5/u8bW3EJxf6vTXPC7yRLwV0QacUfmGu8n77EKvdzSGok4CXoA5PRRBPYQNlZmL8Szrkrc80cdSYN+EYsFeERZB9Jt7vG6s/DuriX+Roc25FwVkRZ0QKIzLOxIy7WTae6wzGb3jyUPlPnb96/2kZv33ETT/Hn8z3efvaCIA/2tSfVfQFCq9T5OeAs1SQTNGz1jOv+SAvpaKUSivjjnqjh73RIwqHgSMicgg4AqwIsiawboQ1i1nvYlaPhaLITdQB4iVqjYQuJsxl3XCwOqEztsfFM9u4/MlH/3V/YfOW/4T59Pue8Wv/F9jGEQFesRfqAAAAAElFTkSuQmCC" />
|
284
|
-
<h1>Ruby Zucker
|
284
|
+
<h1>Ruby Zucker 10</h1>
|
285
285
|
<h2 style="clear:both">What is it?</h2>
|
286
|
-
<p class="text">Zucker (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>) is the German word for sugar. It adds syntactic sugar in the form of independent, small scripts that make Ruby even more sweet. It adds a lot of useful helper methods for an improved readability and usage. Everything is documented on this page
|
287
|
-
<p class="text">See the <a href="http://github.com/janlelis/zucker">github page</a> and wiki for issues, discussion and information about contributing.</p>
|
286
|
+
<p class="text">Zucker (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>) is the German word for sugar. It adds syntactic sugar in the form of independent, small scripts that make Ruby even more sweet. It adds a lot of useful helper methods for an improved readability and usage. Almost every Zucker feature comes with specs. Everything is documented on this page. The source is available at <a href="http://github.com/janlelis/zucker">github</a>.</p>
|
288
287
|
|
289
288
|
<h2>Install</h2>
|
290
289
|
<p class="text">
|
@@ -298,7 +297,7 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
298
297
|
<p class="text">The gem consists of many small snippets, called <em>cubes</em>, which are bundled in <em>packs</em>. Since there aren't any dependencies within the gem, you can easily require only the packs or cubes you want:
|
299
298
|
<code class="scode">require 'zucker/cube_or_pack_name'</code>
|
300
299
|
</p>
|
301
|
-
<h3 style="padding-left:1.3em">
|
300
|
+
<h3 style="padding-left:1.3em">Packs</h3>
|
302
301
|
<ul class="text">
|
303
302
|
<li><a href="#control" style="text-decoration:none;font-weight:bold;">control</a>: Cubes that change program behaviour.</li>
|
304
303
|
<li><a href="#env" style="text-decoration:none;font-weight:bold;">env</a>: Cubes for collecting information.</li>
|
@@ -314,7 +313,7 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
314
313
|
<h3 style="padding-left:1.3em">Which methods and constants are added directly to the global namespace by the <em>default</em> pack?</h3>
|
315
314
|
<p class="text">
|
316
315
|
|
317
|
-
<code class="scode">Info, RubyVersion, RubyEngine, OS, Infinity, NaN, alias_for, aliases_for, egonil, nn, iterate, instance_variables_from, ivars, activate_warnings!, deactivate_warnings!, executed_directly?, standalone?, library?, ignore_sigint!, sandbox, tap_on, make_new, (blank?, present?, mcopy)</code>
|
316
|
+
<code class="scode">Info, RubyVersion, RubyEngine, OS, Infinity, NaN, alias_for, aliases_for, egonil, nn, iterate, instance_variables_from, ivars, activate_warnings!, deactivate_warnings!, executed_directly?, directly_executed?, standalone?, library?, ignore_sigint!, sandbox, tap_on, make_new, (blank?, present?, mcopy)</code>
|
318
317
|
</p>
|
319
318
|
|
320
319
|
|
@@ -484,7 +483,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">Object#iterate
|
|
484
483
|
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/iterate">github wiki</a></td></tr></table> <h3 title="require 'zucker/kernel'" id="kernel">kernel</h3>
|
485
484
|
<table class="cube_table"
|
486
485
|
id="kernel_cube"
|
487
|
-
title="require 'zucker/kernel'"> <tr><th>Summary</th> <td>Some useful general shortcut methods.</td></tr><tr><th>Why?</th> <td>Readability.</td></tr><tr><th>Methods/Usage</th> <td><h5>activate_warnings!</h5><pre class="usage source" style="display:block">activate_warnings! <span class="c"># sets $VERBOSE to 1</span></pre><h5>deactivate_warnings!</h5><pre class="usage source" style="display:block">deactivate_warnings! <span class="c"># sets $VERBOSE to 0</span></pre><h5>executed_directly?, standalone?</h5><pre class="usage source" style="display:block">executed_directly? <span class="c"># checks, if the current file is run directly -> true</span></pre><h5>library?</h5><pre class="usage source" style="display:block">library? <span class="c"># checks, if the current file is run directly -> false</span></pre><h5>irb?</h5><pre class="usage source" style="display:block">irb? <span class="c"># returns false if not called from IRB</span></pre><h5>ignore_sigint!</h5><pre class="usage source" style="display:block">ignore_sigint! <span class="c"># blocks CTRL+C</span></pre></td></tr><tr><th>Specification</th> <td> <span id="show_kernel_spec">(<a href="javascript:show('kernel_spec')">show</a>)</span>
|
486
|
+
title="require 'zucker/kernel'"> <tr><th>Summary</th> <td>Some useful general shortcut methods.</td></tr><tr><th>Why?</th> <td>Readability.</td></tr><tr><th>Methods/Usage</th> <td><h5>activate_warnings!</h5><pre class="usage source" style="display:block">activate_warnings! <span class="c"># sets $VERBOSE to 1</span></pre><h5>deactivate_warnings!</h5><pre class="usage source" style="display:block">deactivate_warnings! <span class="c"># sets $VERBOSE to 0</span></pre><h5>executed_directly?, directly_executed, standalone?</h5><pre class="usage source" style="display:block">executed_directly? <span class="c"># checks, if the current file is run directly -> true</span></pre><h5>library?</h5><pre class="usage source" style="display:block">library? <span class="c"># checks, if the current file is run directly -> false</span></pre><h5>irb?</h5><pre class="usage source" style="display:block">irb? <span class="c"># returns false if not called from IRB or RIPL</span></pre><h5>ignore_sigint!</h5><pre class="usage source" style="display:block">ignore_sigint! <span class="c"># blocks CTRL+C</span></pre></td></tr><tr><th>Specification</th> <td> <span id="show_kernel_spec">(<a href="javascript:show('kernel_spec')">show</a>)</span>
|
488
487
|
<pre class="source" id="kernel_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/kernel</span><span class="dl">'</span></span>
|
489
488
|
|
490
489
|
describe <span class="s"><span class="dl">'</span><span class="k">activate_warnings!</span><span class="dl">'</span></span> <span class="r">do</span>
|
@@ -568,12 +567,14 @@ describe <span class="s"><span class="dl">'</span><span class="k">ignore_sigint!
|
|
568
567
|
<pre class="source" id="sandbox_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/sandbox</span><span class="dl">'</span></span>
|
569
568
|
|
570
569
|
describe <span class="s"><span class="dl">'</span><span class="k">sandbox</span><span class="dl">'</span></span> <span class="r">do</span>
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
<span class="
|
575
|
-
|
576
|
-
|
570
|
+
<span class="r">unless</span> <span class="r">defined?</span>(<span class="co">RUBY_ENGINE</span>) && <span class="co">RUBY_ENGINE</span> == <span class="s"><span class="dl">'</span><span class="k">jruby</span><span class="dl">'</span></span>
|
571
|
+
it <span class="s"><span class="dl">'</span><span class="k">should throw a SecurityError if bad commands are issued</span><span class="dl">'</span></span> <span class="r">do</span>
|
572
|
+
proc <span class="r">do</span>
|
573
|
+
sandbox <span class="r">do</span>
|
574
|
+
<span class="sh"><span class="dl">`</span><span class="k">ls</span><span class="dl">`</span></span>
|
575
|
+
<span class="r">end</span>
|
576
|
+
<span class="r">end</span>.should raise_exception <span class="co">SecurityError</span>
|
577
|
+
<span class="r">end</span>
|
577
578
|
<span class="r">end</span>
|
578
579
|
<span class="r">end</span></pre> </td></tr><tr><th>Source</th> <td> <span id="show_sandbox_source">(<a href="javascript:show('sandbox_source')">show</a>)</span>
|
579
580
|
<pre class="source" id="sandbox_source">require <span class="s"><span class="dl">'</span><span class="k">zucker</span><span class="dl">'</span></span>
|
@@ -589,7 +590,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">sandbox</span>
|
|
589
590
|
<span class="r">end</span>
|
590
591
|
<span class="r">end</span>
|
591
592
|
|
592
|
-
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/sandbox">github wiki</a></td></tr></table> <h3 title="require 'zucker/tap'" id="tap">tap</h3>
|
593
|
+
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8, Does not work on JRuby, since $SAFE is not supported there</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/sandbox">github wiki</a></td></tr></table> <h3 title="require 'zucker/tap'" id="tap">tap</h3>
|
593
594
|
<table class="cube_table"
|
594
595
|
id="tap_cube"
|
595
596
|
title="require 'zucker/tap'"> <tr><th>Summary</th> <td>This cube adds the two <code>tap</code> variants <code>tap_on</code> (known as <code>returning</code> in ActiveSupport) and <code>make_new</code>.</td></tr><tr><th>Methods/Usage</th> <td><h5>tap_on</h5><pre class="usage source" style="display:block">tap_on [<span class="i">1</span>,<span class="i">2</span>] <span class="r">do</span> |obj|
|
@@ -1291,20 +1292,35 @@ describe <span class="s"><span class="dl">'</span><span class="k">Enumerable#mas
|
|
1291
1292
|
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/enumerable">github wiki</a></td></tr></table> <h3 title="require 'zucker/file'" id="file">file</h3>
|
1292
1293
|
<table class="cube_table"
|
1293
1294
|
id="file_cube"
|
1294
|
-
title="require 'zucker/file'"> <tr><th>Summary</th> <td>Extensions for <code>File</code>.</td></tr><tr><th>Methods/Usage</th> <td><h5>File
|
1295
|
+
title="require 'zucker/file'"> <tr><th>Summary</th> <td>Extensions for <code>File</code>.</td></tr><tr><th>Methods/Usage</th> <td><h5>File.gsub</h5><pre class="usage source" style="display:block"><span class="co">File</span>.gsub <span class="s"><span class="dl">'</span><span class="k">some_filename</span><span class="dl">'</span></span>, <span class="c"># will read the file and substitute the hash keys with their values</span>
|
1295
1296
|
<span class="rx"><span class="dl">/</span><span class="k">hi</span><span class="dl">/</span></span> => <span class="s"><span class="dl">'</span><span class="k">cu</span><span class="dl">'</span></span>,
|
1296
|
-
<span class="rx"><span class="dl">/</span><span class="ch">\d</span><span class="dl">/</span></span> => proc
|
1297
|
-
|
1298
|
-
</pre><h5>File#delete!</h5><pre class="usage source" style="display:block"><span class="co">File</span>.delete! <span class="s"><span class="dl">'</span><span class="k">some_filename</span><span class="dl">'</span></span> <span class="c"># will delete the file, don't care if it exist.</span></pre></td></tr><tr><th>Information</th> <td>Idea for <code>.File#delete!</code>. from sugar-high.</td></tr><tr><th>Specification</th> <td> <span id="show_file_spec">(<a href="javascript:show('file_spec')">show</a>)</span>
|
1297
|
+
<span class="rx"><span class="dl">/</span><span class="ch">\d</span><span class="dl">/</span></span> => proc{ |m| (m.to_i+<span class="i">1</span>).to_s }
|
1298
|
+
</pre><h5>File.delete!</h5><pre class="usage source" style="display:block"><span class="co">File</span>.delete! <span class="s"><span class="dl">'</span><span class="k">some_filename</span><span class="dl">'</span></span> <span class="c"># will delete the file, don't care if it exist.</span></pre></td></tr><tr><th>Information</th> <td>Idea for <code>File.delete!</code> from sugar-high.</td></tr><tr><th>Specification</th> <td> <span id="show_file_spec">(<a href="javascript:show('file_spec')">show</a>)</span>
|
1299
1299
|
<pre class="source" id="file_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/file</span><span class="dl">'</span></span>
|
1300
1300
|
require <span class="s"><span class="dl">'</span><span class="k">fileutils</span><span class="dl">'</span></span>
|
1301
1301
|
|
1302
|
-
describe <span class="s"><span class="dl">'</span><span class="k">File
|
1303
|
-
|
1302
|
+
describe <span class="s"><span class="dl">'</span><span class="k">File.gsub</span><span class="dl">'</span></span> <span class="r">do</span>
|
1303
|
+
let <span class="sy">:random_filename</span> <span class="r">do</span>
|
1304
|
+
<span class="s"><span class="dl">'</span><span class="k">test_</span><span class="dl">'</span></span> + (<span class="i">0</span>..<span class="i">20</span>).map{|e| [*<span class="s"><span class="dl">'</span><span class="k">a</span><span class="dl">'</span></span>..<span class="s"><span class="dl">'</span><span class="k">z</span><span class="dl">'</span></span>].send <span class="co">RUBY_VERSION</span> > <span class="s"><span class="dl">'</span><span class="k">1.9</span><span class="dl">'</span></span> ? <span class="sy">:sample</span> : <span class="sy">:choice</span> }*<span class="s"><span class="dl">'</span><span class="dl">'</span></span>
|
1305
|
+
<span class="r">end</span>
|
1306
|
+
|
1307
|
+
it <span class="s"><span class="dl">'</span><span class="k">should read filename in arg1, substitute every key in the arg2 with its value and save the file</span><span class="dl">'</span></span> <span class="r">do</span>
|
1308
|
+
<span class="co">File</span>.open(random_filename,<span class="s"><span class="dl">'</span><span class="k">w</span><span class="dl">'</span></span>){ |file|
|
1309
|
+
file.print <span class="s"><span class="dl">'</span><span class="k">should read filename in arg1, substitute every key in the arg2 with its value and save the file</span><span class="dl">'</span></span>
|
1310
|
+
}
|
1311
|
+
<span class="co">File</span>.gsub random_filename,
|
1312
|
+
<span class="rx"><span class="dl">/</span><span class="k">read</span><span class="dl">/</span></span> => <span class="s"><span class="dl">'</span><span class="k">write</span><span class="dl">'</span></span>,
|
1313
|
+
<span class="rx"><span class="dl">/</span><span class="ch">\d</span><span class="k">+</span><span class="dl">/</span></span> => proc{|m| (m.to_i+<span class="i">1</span>).to_s }
|
1314
|
+
|
1315
|
+
<span class="co">File</span>.read(random_filename).should ==
|
1316
|
+
<span class="s"><span class="dl">'</span><span class="k">should write filename in arg2, substitute every key in the arg3 with its value and save the file</span><span class="dl">'</span></span>
|
1317
|
+
|
1318
|
+
<span class="co">FileUtils</span>.rm random_filename
|
1319
|
+
<span class="r">end</span>
|
1304
1320
|
<span class="r">end</span>
|
1305
1321
|
|
1306
|
-
describe <span class="s"><span class="dl">'</span><span class="k">File
|
1307
|
-
let <span class="sy">:random_filename</span>
|
1322
|
+
describe <span class="s"><span class="dl">'</span><span class="k">File.delete!</span><span class="dl">'</span></span> <span class="r">do</span>
|
1323
|
+
let <span class="sy">:random_filename</span> <span class="r">do</span>
|
1308
1324
|
<span class="s"><span class="dl">'</span><span class="k">test_</span><span class="dl">'</span></span> + (<span class="i">0</span>..<span class="i">20</span>).map{|e| [*<span class="s"><span class="dl">'</span><span class="k">a</span><span class="dl">'</span></span>..<span class="s"><span class="dl">'</span><span class="k">z</span><span class="dl">'</span></span>].send <span class="co">RUBY_VERSION</span> > <span class="s"><span class="dl">'</span><span class="k">1.9</span><span class="dl">'</span></span> ? <span class="sy">:sample</span> : <span class="sy">:choice</span> }*<span class="s"><span class="dl">'</span><span class="dl">'</span></span>
|
1309
1325
|
<span class="r">end</span>
|
1310
1326
|
|
@@ -1349,7 +1365,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">File#delete!</
|
|
1349
1365
|
<span class="r">end</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/file">github wiki</a></td></tr></table> <h3 title="require 'zucker/hash'" id="hash">hash</h3>
|
1350
1366
|
<table class="cube_table"
|
1351
1367
|
id="hash_cube"
|
1352
|
-
title="require 'zucker/hash'"> <tr><th>Summary</th> <td>Some sugar for dealing with
|
1368
|
+
title="require 'zucker/hash'"> <tr><th>Summary</th> <td>Some sugar for dealing with hashes.</td></tr><tr><th>Methods/Usage</th> <td><h5>Hash.zip</h5><pre class="usage source" style="display:block"><span class="co">Hash</span>.zip [<span class="i">1</span>,<span class="i">2</span>,<span class="i">3</span>], [<span class="i">4</span>,<span class="i">5</span>,<span class="i">6</span>] <span class="c"># => {1=>4, 2=>5, 3=>6}</span></pre><h5>Hash#<<</h5><pre class="usage source" style="display:block">{<span class="i">1</span>=><span class="i">2</span>} << [<span class="i">3</span>, <span class="i">4</span>] <span class="c"># => { 1=>2, 3=>4 }</span>
|
1353
1369
|
{<span class="i">1</span>=><span class="i">2</span>} << { <span class="i">5</span>=><span class="i">6</span> } <span class="c"># => { 1=>2, 5=>6 }</span>
|
1354
1370
|
</pre><h5>Hash#&</h5><pre class="usage source" style="display:block">{ <span class="i">1</span>=><span class="i">4</span>, <span class="i">2</span>=><span class="i">5</span>, <span class="i">3</span>=><span class="i">6</span> } & { <span class="i">1</span>=><span class="i">4</span>, <span class="i">2</span>=><span class="i">7</span> } <span class="c"># => { 1=>4 }</span></pre></td></tr><tr><th>Information</th> <td>Some of the operators are inspired by Ruby Facets.</td></tr><tr><th>Specification</th> <td> <span id="show_hash_spec">(<a href="javascript:show('hash_spec')">show</a>)</span>
|
1355
1371
|
<pre class="source" id="hash_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/hash</span><span class="dl">'</span></span>
|
@@ -1624,7 +1640,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">String#|</span
|
|
1624
1640
|
<h3 title="require 'zucker/blank'" id="blank">blank</h3>
|
1625
1641
|
<table class="cube_table"
|
1626
1642
|
id="blank_cube"
|
1627
|
-
title="require 'zucker/blank'"> <tr><th>Summary</th> <td>Does pretty the same as in ActiveSupport (Every object can be asked if it is blank).</td></tr><tr><th>Why?</th> <td>It's too familiar ;)</td></tr><tr><th>Methods/Usage</th> <td><h5>Object#blank?</h5><pre class="usage source" style="display:block"
|
1643
|
+
title="require 'zucker/blank'"> <tr><th>Summary</th> <td>Does pretty the same as in ActiveSupport (Every object can be asked if it is blank or present).</td></tr><tr><th>Why?</th> <td>It's too familiar ;)</td></tr><tr><th>Methods/Usage</th> <td><h5>Object#blank?</h5><pre class="usage source" style="display:block">[<span class="s"><span class="dl">"</span><span class="k">'an object'.blank? # => false</span><span class="dl">"</span></span>, <span class="s"><span class="dl">"</span><span class="k">nil.present? # => false</span><span class="dl">"</span></span>]</pre></td></tr><tr><th>Specification</th> <td> <span id="show_blank_spec">(<a href="javascript:show('blank_spec')">show</a>)</span>
|
1628
1644
|
<pre class="source" id="blank_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/blank</span><span class="dl">'</span></span>
|
1629
1645
|
|
1630
1646
|
describe <span class="s"><span class="dl">'</span><span class="k">Object#blank?</span><span class="dl">'</span></span> <span class="r">do</span>
|
@@ -1699,7 +1715,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">Object#mcopy</
|
|
1699
1715
|
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/mcopy">github wiki</a></td></tr></table> <h3 title="require 'zucker/not'" id="not">not</h3>
|
1700
1716
|
<table class="cube_table"
|
1701
1717
|
id="not_cube"
|
1702
|
-
title="require 'zucker/not'"> <tr><th>Summary</th> <td><code>not</code> returns an object on which all methods are redirected to it's receiver object, but returns inverted boolean.</td></tr><tr><th>Why?</th> <td>Better readability.</td></tr><tr><th>Methods/Usage</th> <td><h5>Object#not</h5><pre class="usage source" style="display:block">[<span class="i">1</span>,<span class="i">2</span>,<span class="i">3</span>].not.empty? <span class="c"># true</span>
|
1718
|
+
title="require 'zucker/not'"> <tr><th>Summary</th> <td><code>not</code> returns an object on which all methods are redirected to it's receiver object, but returns the inverted boolean.</td></tr><tr><th>Why?</th> <td>Better readability.</td></tr><tr><th>Methods/Usage</th> <td><h5>Object#not</h5><pre class="usage source" style="display:block">[<span class="i">1</span>,<span class="i">2</span>,<span class="i">3</span>].not.empty? <span class="c"># true</span>
|
1703
1719
|
</pre></td></tr><tr><th>Information</th> <td>See <a href="http://blog.jayfields.com/2007/08/ruby-adding-not-method-for-readability.html">this article by Jay Field</a> for more information.</td></tr><tr><th>Specification</th> <td> <span id="show_not_spec">(<a href="javascript:show('not_spec')">show</a>)</span>
|
1704
1720
|
<pre class="source" id="not_spec"><span class="r">if</span> <span class="r">defined?</span> <span class="co">BasicObject</span> <span class="c"># 1.9 only</span>
|
1705
1721
|
|
@@ -2467,7 +2483,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">o</span><span
|
|
2467
2483
|
<span class="c"># J-_-L</span></pre> </td></tr><tr><th>Compatibility</th> <td>1.9, 1.8</td></tr><tr><th>Discussion</th> <td><a href="http://wiki.github.com/janlelis/zucker/oo">github wiki</a></td></tr></table> <h3 title="require 'zucker/qq'" id="qq">qq</h3>
|
2468
2484
|
<table class="cube_table"
|
2469
2485
|
id="qq_cube"
|
2470
|
-
title="require 'zucker/qq'"> <tr><th>Summary</th> <td>The <code>q</code> method does the same like <code>p</code>, but
|
2486
|
+
title="require 'zucker/qq'"> <tr><th>Summary</th> <td>The <code>q</code> method does the same like <code>p</code>, but outputs multiple arguments on the same line.</td></tr><tr><th>Methods/Usage</th> <td><h5>q, qq</h5><pre class="usage source" style="display:block">q <span class="s"><span class="dl">"</span><span class="k">zucker</span><span class="dl">"</span></span>, <span class="s"><span class="dl">'</span><span class="dl">'</span></span>, {<span class="i">6</span>=><span class="i">7</span>}, <span class="i">5</span>, <span class="fl">2.3</span>, <span class="sy">:o</span> <span class="c"># outputs "zucker" "" {6=>7} 5 2.3 :o</span>
|
2471
2487
|
</pre></td></tr><tr><th>Information</th> <td>Inspired by <a href="http://github.com/rdp/sane/blob/master/lib/sane/pps.rb">rdp</a>.</td></tr><tr><th>Specification</th> <td> <span id="show_qq_spec">(<a href="javascript:show('qq_spec')">show</a>)</span>
|
2472
2488
|
<pre class="source" id="qq_spec">require <span class="s"><span class="dl">'</span><span class="k">zucker/qq</span><span class="dl">'</span></span>
|
2473
2489
|
|
@@ -2589,78 +2605,84 @@ describe <span class="s"><span class="dl">'</span><span class="k">Regexp#visuali
|
|
2589
2605
|
|
2590
2606
|
<h2>Changelog</h2>
|
2591
2607
|
<div class="cubes">
|
2592
|
-
<pre class="scode">2011-
|
2593
|
-
*
|
2608
|
+
<pre class="scode">2011-04-29 | <a href="http://rubyzucker.info/10/">Zucker 10</a>
|
2609
|
+
* doc/spec tweaks
|
2610
|
+
* make test.rubygems.org-testable
|
2611
|
+
* fix zucker 9 permission issue
|
2612
|
+
|
2613
|
+
|
2614
|
+
2011-01-22 | <a href="http://rubyzucker.info/9/">Zucker 9</a>
|
2615
|
+
* remove history versions (sorry, it caused too much gem/rdoc troubles)
|
2594
2616
|
* add file cube: File.delete! and File.gsub
|
2595
2617
|
* debug pack improvements
|
2596
2618
|
* binding: typos + return nil
|
2597
2619
|
* cc: support for ripl + return nil
|
2598
2620
|
* mm: also show eigenclass for modules + nicer displaying + return nil
|
2599
2621
|
* added Regexp#visualize
|
2600
|
-
*
|
2601
|
-
*
|
2602
|
-
*
|
2622
|
+
* remove optional sandbox param
|
2623
|
+
* rename xxx2proc to xxx_to_proc
|
2624
|
+
* change rakefile/rspec/gemspec structure
|
2603
2625
|
* more minor fixes and improvements
|
2604
2626
|
|
2605
2627
|
|
2606
2628
|
2010-10-06 | <a href="http://rubyzucker.info/8/">Zucker 8</a>
|
2607
|
-
*
|
2608
|
-
*
|
2609
|
-
*
|
2629
|
+
* fix a little alias_for bug
|
2630
|
+
* disable rdoc creation when installing (in favour of the custom docs)
|
2631
|
+
* change Binding#inspect to Binding.variables (was too verbose and dangerous)
|
2610
2632
|
|
2611
2633
|
|
2612
2634
|
2010-10-03 | <a href="http://rubyzucker.info/7/">Zucker 7</a>
|
2613
|
-
*
|
2635
|
+
* fix critical OS.windows? bug
|
2614
2636
|
|
2615
2637
|
|
2616
2638
|
2010-10-03 | <a href="http://rubyzucker.info/6/">Zucker 6</a>
|
2617
2639
|
* no new cubes
|
2618
2640
|
* bugfix for OS.posix?
|
2619
2641
|
* small changes + bugfixes + doc improvements
|
2620
|
-
*
|
2621
|
-
*
|
2642
|
+
* add two user methods to Info
|
2643
|
+
* change egonil semantics ( using method_missing, see http://rbjl.net/26/catch_nil.rb )
|
2622
2644
|
* bugfix for vv
|
2623
2645
|
|
2624
2646
|
|
2625
2647
|
2010-09-04 | <a href="http://rubyzucker.info/5/">Zucker 5</a>
|
2626
|
-
* debug edition -
|
2627
|
-
*
|
2628
|
-
*
|
2648
|
+
* debug edition - add two debug helpers: oo (output line, method, file) and cc (output method callstack)
|
2649
|
+
* rename cube D to dd add add more debug aliases (for mm and binding)
|
2650
|
+
* fix __SPECIAL_VARS__ in info and kernel cube and some minor bugfixes
|
2629
2651
|
* Zucker.activate_more_aliases! option
|
2630
|
-
*
|
2631
|
-
*
|
2632
|
-
*
|
2633
|
-
*
|
2634
|
-
*
|
2635
|
-
*
|
2652
|
+
* add Hash#&
|
2653
|
+
* add aliases: File.filename (for basename), Dir.join and Dir.split (for File.join, split)
|
2654
|
+
* add a flexible requiring mechansim in zucker.rb (no api changes)
|
2655
|
+
* restructure packages
|
2656
|
+
* add rake tasks for releasing
|
2657
|
+
* improve RubyVersion constant (cleaner and more flexible)
|
2636
2658
|
|
2637
2659
|
|
2638
2660
|
2010-09-01 | <a href="http://rubyzucker.info/4/">Zucker 4</a>
|
2639
|
-
*
|
2640
|
-
*
|
2641
|
-
*
|
2642
|
-
*
|
2643
|
-
*
|
2644
|
-
*
|
2661
|
+
* fix Binding#inspect
|
2662
|
+
* add RubyEngine constant
|
2663
|
+
* add RubyVersion constant
|
2664
|
+
* add OS constant
|
2665
|
+
* add q debug method (like p but on one line)
|
2666
|
+
* add String#-
|
2645
2667
|
|
2646
2668
|
|
2647
2669
|
2010-08-14 | <a href="http://rubyzucker.info/3/">Zucker 3</a>
|
2648
|
-
*
|
2649
|
-
*
|
2650
|
-
*
|
2651
|
-
*
|
2652
|
-
*
|
2653
|
-
*
|
2654
|
-
*
|
2655
|
-
*
|
2670
|
+
* add tap cube
|
2671
|
+
* add Object#not
|
2672
|
+
* add alias_for for an alternative alias syntax
|
2673
|
+
* add String#constantize (improved AS version)
|
2674
|
+
* improve Info module
|
2675
|
+
* make Array#sum Rails compatibile
|
2676
|
+
* improve docs
|
2677
|
+
* change directory layout (no changes for requiring)
|
2656
2678
|
* more small changes
|
2657
2679
|
|
2658
2680
|
|
2659
2681
|
2010-08-08 | <a href="http://rubyzucker.info/2/">Zucker 2</a>
|
2660
|
-
*
|
2661
|
-
*
|
2662
|
-
*
|
2663
|
-
*
|
2682
|
+
* add info cube
|
2683
|
+
* add chaining for array2proc
|
2684
|
+
* fix Hash.zip
|
2685
|
+
* fix instance_variables_from binding for 1.9
|
2664
2686
|
* more specs
|
2665
2687
|
|
2666
2688
|
|
@@ -2677,7 +2699,7 @@ describe <span class="s"><span class="dl">'</span><span class="k">Regexp#visuali
|
|
2677
2699
|
</div>
|
2678
2700
|
<div id="foot">
|
2679
2701
|
<div id="smile"><a href="http://rbjl.net">J-_-L</a></div>
|
2680
|
-
This is the Ruby Zucker
|
2702
|
+
This is the Ruby Zucker 10 documentation (2011-04-29).
|
2681
2703
|
The current version is always available at <a href="http://rubyzucker.info">rubyzucker.info</a>.
|
2682
2704
|
Source at <a href="http://github.com/janlelis/zucker">github</a>.
|
2683
2705
|
Ruby Logo CC-BY-SA Yukihiro Matsumoto.
|
data/doc/zucker_doc.rb
CHANGED
@@ -499,8 +499,7 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
499
499
|
<img class="rubylogo" alt="ruby" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAADAVgAAwFYBgeEOVwAAAAd0SU1FB9oIHxY1C2ozXR0AABglSURBVGjevZt/sGVVdec/a+9z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AikzYfbJVqGpsKDCSiSFDyEwkr44YcolAOyajI5aOzehkGXmWkWU53Syn2+nR73TZ8CW7jjx555b+/Btf+eAji41Lf2Khxy8fHVcf35S9TxDv0OtrsAGadLPWMZwy8ipiRaRDSB7QWDlNEppzW5nBpRaN1pRSRJrTc4a6AZaUS9NWCzj1VJL0+jCp3NLw7JCiB71yyAoHBzY/ONvpL83nvY3Ngzl/6sy8O212i7/49HOXrvnmnUeeZuEb5/u8bW3EJxf6vTXPC7yRLwV0QacUfmGu8n77EKvdzSGok4CXoA5PRRBPYQNlZmL8Szrkrc80cdSYN+EYsFeERZB9Jt7vG6s/DuriX+Roc25FwVkRZ0QKIzLOxIy7WTae6wzGb3jyUPlPnb96/2kZv33ETT/Hn8z3efvaCIA/2tSfVfQFCq9T5OeAs1SQTNGz1jOv+SAvpaKUSivjjnqjh73RIwqHgSMicgg4AqwIsiawboQ1i1nvYlaPhaLITdQB4iVqjYQuJsxl3XCwOqEztsfFM9u4/MlH/3V/YfOW/4T59Pue8Wv/F9jGEQFesRfqAAAAAElFTkSuQmCC" />
|
500
500
|
<h1>Ruby Zucker ..version..</h1>
|
501
501
|
<h2 style="clear:both">What is it?</h2>
|
502
|
-
<p class="text">Zucker (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>) is the German word for sugar. It adds syntactic sugar in the form of independent, small scripts that make Ruby even more sweet. It adds a lot of useful helper methods for an improved readability and usage. Everything is documented on this page
|
503
|
-
<p class="text">See the <a href="http://github.com/janlelis/zucker">github page</a> and wiki for issues, discussion and information about contributing.</p>
|
502
|
+
<p class="text">Zucker (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>) is the German word for sugar. It adds syntactic sugar in the form of independent, small scripts that make Ruby even more sweet. It adds a lot of useful helper methods for an improved readability and usage. Almost every Zucker feature comes with specs. Everything is documented on this page. The source is available at <a href="http://github.com/janlelis/zucker">github</a>.</p>
|
504
503
|
|
505
504
|
<h2>Install</h2>
|
506
505
|
<p class="text">
|
@@ -514,7 +513,7 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
514
513
|
<p class="text">The gem consists of many small snippets, called <em>cubes</em>, which are bundled in <em>packs</em>. Since there aren't any dependencies within the gem, you can easily require only the packs or cubes you want:
|
515
514
|
<code class="scode">require 'zucker/cube_or_pack_name'</code>
|
516
515
|
</p>
|
517
|
-
<h3 style="padding-left:1.3em">
|
516
|
+
<h3 style="padding-left:1.3em">Packs</h3>
|
518
517
|
<ul class="text">
|
519
518
|
..packages..
|
520
519
|
</ul>
|
@@ -524,7 +523,7 @@ table.source td { padding: 2px 4px; vertical-align: top; }
|
|
524
523
|
<h3 style="padding-left:1.3em">Which methods and constants are added directly to the global namespace by the <em>default</em> pack?</h3>
|
525
524
|
<p class="text">
|
526
525
|
|
527
|
-
<code class="scode">Info, RubyVersion, RubyEngine, OS, Infinity, NaN, alias_for, aliases_for, egonil, nn, iterate, instance_variables_from, ivars, activate_warnings!, deactivate_warnings!, executed_directly?, standalone?, library?, ignore_sigint!, sandbox, tap_on, make_new, (blank?, present?, mcopy)</code>
|
526
|
+
<code class="scode">Info, RubyVersion, RubyEngine, OS, Infinity, NaN, alias_for, aliases_for, egonil, nn, iterate, instance_variables_from, ivars, activate_warnings!, deactivate_warnings!, executed_directly?, directly_executed?, standalone?, library?, ignore_sigint!, sandbox, tap_on, make_new, (blank?, present?, mcopy)</code>
|
528
527
|
</p>
|
529
528
|
|
530
529
|
..cubes..
|
data/lib/zucker.rb
CHANGED
data/spec/file_spec.rb
CHANGED
@@ -1,12 +1,28 @@
|
|
1
1
|
require 'zucker/file'
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
|
-
describe 'File
|
5
|
-
|
4
|
+
describe 'File.gsub' do
|
5
|
+
let :random_filename do
|
6
|
+
'test_' + (0..20).map{|e| [*'a'..'z'].send RUBY_VERSION > '1.9' ? :sample : :choice }*''
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should read filename in arg1, substitute every key in the arg2 with its value and save the file' do
|
10
|
+
File.open(random_filename,'w'){ |file|
|
11
|
+
file.print 'should read filename in arg1, substitute every key in the arg2 with its value and save the file'
|
12
|
+
}
|
13
|
+
File.gsub random_filename,
|
14
|
+
/read/ => 'write',
|
15
|
+
/\d+/ => proc{|m| (m.to_i+1).to_s }
|
16
|
+
|
17
|
+
File.read(random_filename).should ==
|
18
|
+
'should write filename in arg2, substitute every key in the arg3 with its value and save the file'
|
19
|
+
|
20
|
+
FileUtils.rm random_filename
|
21
|
+
end
|
6
22
|
end
|
7
23
|
|
8
|
-
describe 'File
|
9
|
-
let :random_filename
|
24
|
+
describe 'File.delete!' do
|
25
|
+
let :random_filename do
|
10
26
|
'test_' + (0..20).map{|e| [*'a'..'z'].send RUBY_VERSION > '1.9' ? :sample : :choice }*''
|
11
27
|
end
|
12
28
|
|
data/spec/sandbox_spec.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
require 'zucker/sandbox'
|
2
2
|
|
3
3
|
describe 'sandbox' do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
|
5
|
+
it 'should throw a SecurityError if bad commands are issued' do
|
6
|
+
proc do
|
7
|
+
sandbox do
|
8
|
+
`ls`
|
9
|
+
end
|
10
|
+
end.should raise_exception SecurityError
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
data/zucker.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.description = "Sweeten your Ruby code with syntactic sugar :).
|
12
12
|
Adds a lot of little helpers that you do not want to miss again."
|
13
13
|
s.homepage = "http://rubyzucker.info"
|
14
|
-
s.files = Dir.glob( %w[{lib,spec}/**/*.rb desc/**/*.yaml] ) + %w{Rakefile zucker.gemspec MIT-LICENSE README CHANGELOG doc/zucker_doc.rb doc/zucker_doc.html}
|
14
|
+
s.files = Dir.glob( %w[{lib,spec}/**/*.rb desc/**/*.yaml] ) + %w{Rakefile zucker.gemspec MIT-LICENSE README CHANGELOG doc/zucker_doc.rb doc/zucker_doc.html .gemtest}
|
15
15
|
s.has_rdoc = false
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.required_ruby_version = '>= 1.8.7' # 1.9 recommended
|
metadata
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zucker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 9
|
7
|
-
version: "9"
|
4
|
+
prerelease:
|
5
|
+
version: "10"
|
8
6
|
platform: ruby
|
9
7
|
authors:
|
10
8
|
- Jan Lelis
|
@@ -13,8 +11,7 @@ autorequire:
|
|
13
11
|
bindir: bin
|
14
12
|
cert_chain: []
|
15
13
|
|
16
|
-
date: 2011-
|
17
|
-
default_executable:
|
14
|
+
date: 2011-04-28 00:00:00 Z
|
18
15
|
dependencies:
|
19
16
|
- !ruby/object:Gem::Dependency
|
20
17
|
name: rspec
|
@@ -24,8 +21,6 @@ dependencies:
|
|
24
21
|
requirements:
|
25
22
|
- - ">="
|
26
23
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 0
|
29
24
|
version: "0"
|
30
25
|
type: :development
|
31
26
|
version_requirements: *id001
|
@@ -37,8 +32,6 @@ dependencies:
|
|
37
32
|
requirements:
|
38
33
|
- - ">="
|
39
34
|
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 0
|
42
35
|
version: "0"
|
43
36
|
type: :development
|
44
37
|
version_requirements: *id002
|
@@ -53,123 +46,123 @@ extensions: []
|
|
53
46
|
extra_rdoc_files: []
|
54
47
|
|
55
48
|
files:
|
56
|
-
- lib/zucker.rb
|
57
|
-
- lib/zucker/tap.rb
|
58
|
-
- lib/zucker/alias_for.rb
|
59
|
-
- lib/zucker/hash_to_proc.rb
|
60
|
-
- lib/zucker/mcopy.rb
|
61
|
-
- lib/zucker/class2proc.rb
|
62
|
-
- lib/zucker/info.rb
|
63
|
-
- lib/zucker/version.rb
|
64
|
-
- lib/zucker/array_to_proc.rb
|
65
|
-
- lib/zucker/engine.rb
|
66
49
|
- lib/zucker/default.rb
|
67
|
-
- lib/zucker/
|
68
|
-
- lib/zucker/binding.rb
|
69
|
-
- lib/zucker/blank.rb
|
70
|
-
- lib/zucker/object.rb
|
71
|
-
- lib/zucker/string.rb
|
72
|
-
- lib/zucker/kernel.rb
|
73
|
-
- lib/zucker/class_to_proc.rb
|
74
|
-
- lib/zucker/regexp2proc.rb
|
75
|
-
- lib/zucker/unary.rb
|
76
|
-
- lib/zucker/not.rb
|
77
|
-
- lib/zucker/regexp_visualize.rb
|
50
|
+
- lib/zucker/qq.rb
|
78
51
|
- lib/zucker/all.rb
|
79
|
-
- lib/zucker/
|
80
|
-
- lib/zucker/aliases.rb
|
81
|
-
- lib/zucker/extensions.rb
|
52
|
+
- lib/zucker/string.rb
|
82
53
|
- lib/zucker/sandbox.rb
|
83
|
-
- lib/zucker/
|
54
|
+
- lib/zucker/regexp2proc.rb
|
55
|
+
- lib/zucker/ivars.rb
|
84
56
|
- lib/zucker/dd.rb
|
57
|
+
- lib/zucker/class2proc.rb
|
85
58
|
- lib/zucker/enumerable.rb
|
86
|
-
- lib/zucker/
|
87
|
-
- lib/zucker/
|
59
|
+
- lib/zucker/alias_for.rb
|
60
|
+
- lib/zucker/control.rb
|
61
|
+
- lib/zucker/array_to_proc.rb
|
62
|
+
- lib/zucker/unary.rb
|
63
|
+
- lib/zucker/hash.rb
|
64
|
+
- lib/zucker/hash2proc.rb
|
65
|
+
- lib/zucker/regexp_to_proc.rb
|
66
|
+
- lib/zucker/tap.rb
|
67
|
+
- lib/zucker/blank.rb
|
68
|
+
- lib/zucker/not.rb
|
69
|
+
- lib/zucker/array2proc.rb
|
70
|
+
- lib/zucker/info.rb
|
88
71
|
- lib/zucker/array.rb
|
89
|
-
- lib/zucker/
|
90
|
-
- lib/zucker/
|
72
|
+
- lib/zucker/binding.rb
|
73
|
+
- lib/zucker/extensions.rb
|
74
|
+
- lib/zucker/mm.rb
|
75
|
+
- lib/zucker/oo.rb
|
76
|
+
- lib/zucker/aliases.rb
|
77
|
+
- lib/zucker/to_proc.rb
|
91
78
|
- lib/zucker/iterate.rb
|
92
|
-
- lib/zucker/array2proc.rb
|
93
|
-
- lib/zucker/cc.rb
|
94
|
-
- lib/zucker/debug.rb
|
95
|
-
- lib/zucker/square_brackets_for.rb
|
96
79
|
- lib/zucker/egonil.rb
|
80
|
+
- lib/zucker/mcopy.rb
|
97
81
|
- lib/zucker/shortcuts.rb
|
98
|
-
- lib/zucker/
|
82
|
+
- lib/zucker/hash_to_proc.rb
|
83
|
+
- lib/zucker/square_brackets_for.rb
|
84
|
+
- lib/zucker/file.rb
|
85
|
+
- lib/zucker/kernel.rb
|
86
|
+
- lib/zucker/engine.rb
|
87
|
+
- lib/zucker/regexp_visualize.rb
|
88
|
+
- lib/zucker/class_to_proc.rb
|
99
89
|
- lib/zucker/os.rb
|
100
|
-
- lib/zucker/
|
101
|
-
- lib/zucker/
|
102
|
-
- lib/zucker/
|
103
|
-
- lib/zucker/
|
104
|
-
-
|
90
|
+
- lib/zucker/object.rb
|
91
|
+
- lib/zucker/cc.rb
|
92
|
+
- lib/zucker/debug.rb
|
93
|
+
- lib/zucker/env.rb
|
94
|
+
- lib/zucker/version.rb
|
95
|
+
- lib/zucker/union.rb
|
96
|
+
- lib/zucker.rb
|
97
|
+
- spec/cc_spec.rb
|
98
|
+
- spec/iterate_spec.rb
|
99
|
+
- spec/kernel_spec.rb
|
100
|
+
- spec/union_spec.rb
|
101
|
+
- spec/string_spec.rb
|
105
102
|
- spec/tap_spec.rb
|
106
|
-
- spec/hash_spec.rb
|
107
|
-
- spec/array_spec.rb
|
108
|
-
- spec/dd_spec.rb
|
109
|
-
- spec/square_brackets_for_spec.rb
|
110
|
-
- spec/mm_spec.rb
|
111
|
-
- spec/sandbox_spec.rb
|
112
|
-
- spec/binding_spec.rb
|
113
103
|
- spec/unary_spec.rb
|
114
|
-
- spec/
|
115
|
-
- spec/
|
116
|
-
- spec/spec_helper.rb
|
117
|
-
- spec/alias_for_spec.rb
|
118
|
-
- spec/blank_spec.rb
|
104
|
+
- spec/regexp_to_proc_spec.rb
|
105
|
+
- spec/egonil_spec.rb
|
119
106
|
- spec/regexp_visualize_spec.rb
|
107
|
+
- spec/ivars_spec.rb
|
108
|
+
- spec/sandbox_spec.rb
|
120
109
|
- spec/array_to_proc_spec.rb
|
110
|
+
- spec/hash_spec.rb
|
111
|
+
- spec/spec_helper.rb
|
112
|
+
- spec/hash_to_proc_spec.rb
|
113
|
+
- spec/binding_spec.rb
|
114
|
+
- spec/mcopy_spec.rb
|
115
|
+
- spec/qq_spec.rb
|
116
|
+
- spec/aliases_spec.rb
|
117
|
+
- spec/engine_spec.rb
|
118
|
+
- spec/dd_spec.rb
|
119
|
+
- spec/square_brackets_for_spec.rb
|
120
|
+
- spec/enumerable_spec.rb
|
121
121
|
- spec/version_spec.rb
|
122
|
+
- spec/blank_spec.rb
|
123
|
+
- spec/alias_for_spec.rb
|
124
|
+
- spec/mm_spec.rb
|
125
|
+
- spec/array_spec.rb
|
122
126
|
- spec/os_spec.rb
|
123
|
-
- spec/iterate_spec.rb
|
124
|
-
- spec/cc_spec.rb
|
125
|
-
- spec/mcopy_spec.rb
|
126
|
-
- spec/egonil_spec.rb
|
127
|
-
- spec/ivars_spec.rb
|
128
127
|
- spec/not_spec.rb
|
129
|
-
- spec/aliases_spec.rb
|
130
|
-
- spec/string_spec.rb
|
131
|
-
- spec/oo_spec.rb
|
132
128
|
- spec/class_to_proc_spec.rb
|
133
|
-
- spec/
|
134
|
-
- spec/regexp_to_proc_spec.rb
|
135
|
-
- spec/union_spec.rb
|
129
|
+
- spec/oo_spec.rb
|
136
130
|
- spec/info_spec.rb
|
137
|
-
- spec/
|
138
|
-
-
|
139
|
-
- desc/
|
140
|
-
- desc/tap.yaml
|
141
|
-
- desc/class_to_proc.yaml
|
142
|
-
- desc/string.yaml
|
143
|
-
- desc/dd.yaml
|
144
|
-
- desc/array.yaml
|
145
|
-
- desc/file.yaml
|
146
|
-
- desc/alias_for.yaml
|
131
|
+
- spec/file_spec.rb
|
132
|
+
- desc/hash_to_proc.yaml
|
133
|
+
- desc/engine.yaml
|
147
134
|
- desc/iterate.yaml
|
148
|
-
- desc/version.yaml
|
149
|
-
- desc/aliases.yaml
|
150
|
-
- desc/binding.yaml
|
151
|
-
- desc/regexp_visualize.yaml
|
152
135
|
- desc/unary.yaml
|
153
|
-
- desc/
|
154
|
-
- desc/hash_to_proc.yaml
|
136
|
+
- desc/not.yaml
|
155
137
|
- desc/ivars.yaml
|
156
|
-
- desc/engine.yaml
|
157
|
-
- desc/sandbox.yaml
|
158
|
-
- desc/egonil.yaml
|
159
|
-
- desc/union.yaml
|
160
|
-
- desc/hash.yaml
|
161
|
-
- desc/qq.yaml
|
162
|
-
- desc/cc.yaml
|
163
138
|
- desc/info.yaml
|
164
|
-
- desc/
|
165
|
-
- desc/os.yaml
|
166
|
-
- desc/not.yaml
|
167
|
-
- desc/square_brackets_for.yaml
|
139
|
+
- desc/regexp_visualize.yaml
|
168
140
|
- desc/array_to_proc.yaml
|
169
|
-
- desc/
|
170
|
-
- desc/
|
141
|
+
- desc/array.yaml
|
142
|
+
- desc/cc.yaml
|
143
|
+
- desc/square_brackets_for.yaml
|
144
|
+
- desc/class_to_proc.yaml
|
145
|
+
- desc/mm.yaml
|
171
146
|
- desc/regexp_to_proc.yaml
|
147
|
+
- desc/file.yaml
|
172
148
|
- desc/mcopy.yaml
|
149
|
+
- desc/enumerable.yaml
|
150
|
+
- desc/qq.yaml
|
151
|
+
- desc/union.yaml
|
152
|
+
- desc/kernel.yaml
|
153
|
+
- desc/dd.yaml
|
154
|
+
- desc/hash.yaml
|
155
|
+
- desc/aliases.yaml
|
156
|
+
- desc/sandbox.yaml
|
157
|
+
- desc/version.yaml
|
158
|
+
- desc/blank.yaml
|
159
|
+
- desc/tap.yaml
|
160
|
+
- desc/string.yaml
|
161
|
+
- desc/alias_for.yaml
|
162
|
+
- desc/os.yaml
|
163
|
+
- desc/oo.yaml
|
164
|
+
- desc/binding.yaml
|
165
|
+
- desc/egonil.yaml
|
173
166
|
- Rakefile
|
174
167
|
- zucker.gemspec
|
175
168
|
- MIT-LICENSE
|
@@ -177,7 +170,7 @@ files:
|
|
177
170
|
- CHANGELOG
|
178
171
|
- doc/zucker_doc.rb
|
179
172
|
- doc/zucker_doc.html
|
180
|
-
|
173
|
+
- .gemtest
|
181
174
|
homepage: http://rubyzucker.info
|
182
175
|
licenses:
|
183
176
|
- MIT
|
@@ -191,23 +184,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
184
|
requirements:
|
192
185
|
- - ">="
|
193
186
|
- !ruby/object:Gem::Version
|
194
|
-
segments:
|
195
|
-
- 1
|
196
|
-
- 8
|
197
|
-
- 7
|
198
187
|
version: 1.8.7
|
199
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
189
|
none: false
|
201
190
|
requirements:
|
202
191
|
- - ">="
|
203
192
|
- !ruby/object:Gem::Version
|
204
|
-
segments:
|
205
|
-
- 0
|
206
193
|
version: "0"
|
207
194
|
requirements: []
|
208
195
|
|
209
196
|
rubyforge_project:
|
210
|
-
rubygems_version: 1.
|
197
|
+
rubygems_version: 1.7.2
|
211
198
|
signing_key:
|
212
199
|
specification_version: 3
|
213
200
|
summary: Many little helpers that sweeten your Ruby code :).
|