heredoc_unindent 1.0.1 → 1.0.2

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 (6) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.rdoc +7 -0
  3. data/README.rdoc +16 -20
  4. data/Rakefile +5 -1
  5. metadata +7 -7
  6. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ === 1.0.2 / 2011-01-26
2
+
3
+ * 2 minor enhancements
4
+
5
+ * Changed example in README and other minor editions
6
+ * Added new rake task: clean_all
7
+
1
8
  === 1.0.1 / 2011-01-26
2
9
 
3
10
  * 7 minor enhancements
data/README.rdoc CHANGED
@@ -8,35 +8,31 @@ Removes common margin from indented strings such as the ones produced by
8
8
  heredocs, i.e., strips out leading whitespace chars at the beggining of
9
9
  each line (but only as much as the line with the smallest margin).
10
10
 
11
- It is acknowledged that many strings defined in heredocs contain nothing but
12
- code to be read exclusively by parsers (e.g., Kernel#eval or web browser's),
13
- which are basically insensitive to extra indentation. Nevertheless, in cases
14
- when the string is printed or displayed, the unintended indentation is rarely
15
- innocuous -- and thus the reason for this gem.
11
+ It is acknowledged that many strings defined by heredocs contain nothing but
12
+ code to be read exclusively by parsers (e.g., Kernel#eval), which are often
13
+ insensitive to extra indentation. Nevertheless, in the cases the string is
14
+ printed or displayed, the unintended indentation is rarely innocuous -- and
15
+ thus the reason for this gem.
16
16
 
17
17
  == SYNOPSIS:
18
18
 
19
19
  if true
20
- puts <<-EOS.unindent
21
- "How wonderful it is
20
+ s1 = <<-EOS
21
+ How sad it is
22
+ to be unable
23
+ to unindent heredocs
24
+ EOS
25
+ s2 = <<-EOS.unindent
26
+ How wonderful it is
22
27
  to be able
23
- to unindent heredocs"
28
+ to do it!
24
29
  EOS
25
30
  end
26
31
 
27
- produces
28
-
29
- "How wonderful it is
30
- to be able
31
- to unindent heredocs"
32
-
33
- instead of
34
-
35
- "How wonderful it is
36
- to be able
37
- to unindent heredocs"
32
+ s1[0, 13] #=> " How sad"
33
+ s2[0, 13] #=> "How wonderful"
38
34
 
39
- which would result without #unindent.
35
+ " foo\n bar\n baz".unindent #=> "foo\n bar\nbaz"
40
36
 
41
37
  == REQUIREMENTS:
42
38
 
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'hoe'
6
6
  Hoe.spec 'heredoc_unindent' do
7
7
  developer('Adriano Mitre', 'adriano.mitre@gmail.com')
8
8
 
9
- self.version = '1.0.1'
9
+ self.version = '1.0.2'
10
10
 
11
11
  self.readme_file = 'README.rdoc'
12
12
  self.history_file = 'History.rdoc'
@@ -20,3 +20,7 @@ end
20
20
  task :tests => [:test] do
21
21
  # aliasing :test with :tests for RVM ('rvm tests')
22
22
  end
23
+
24
+ task :clean_all => [:clean] do
25
+ rm_rf '.yardoc/'
26
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adriano Mitre
@@ -58,11 +58,11 @@ description: |-
58
58
  heredocs, i.e., strips out leading whitespace chars at the beggining of
59
59
  each line (but only as much as the line with the smallest margin).
60
60
 
61
- It is acknowledged that many strings defined in heredocs contain nothing but
62
- code to be read exclusively by parsers (e.g., Kernel#eval or web browser's),
63
- which are basically insensitive to extra indentation. Nevertheless, in cases
64
- when the string is printed or displayed, the unintended indentation is rarely
65
- innocuous -- and thus the reason for this gem.
61
+ It is acknowledged that many strings defined by heredocs contain nothing but
62
+ code to be read exclusively by parsers (e.g., Kernel#eval), which are often
63
+ insensitive to extra indentation. Nevertheless, in the cases the string is
64
+ printed or displayed, the unintended indentation is rarely innocuous -- and
65
+ thus the reason for this gem.
66
66
  email:
67
67
  - adriano.mitre@gmail.com
68
68
  executables: []
metadata.gz.sig CHANGED
Binary file