super_stamper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -8,7 +8,11 @@ Easily add a header recursively to multiple files in your project directory.
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
- Stamp your files!
11
+ This program removes any magic encoding lines such as these:
12
+
13
+ # -*- encoding : utf-8 -*-
14
+
15
+ After running super_stamper, you might want to run magic_encoding again.
12
16
 
13
17
  == SYNOPSIS:
14
18
 
@@ -47,4 +51,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
47
51
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
48
52
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
49
53
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
50
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
54
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -5,7 +5,8 @@ module SuperStamper
5
5
  def self.execute(stdout, arguments=[])
6
6
 
7
7
  options = {
8
- :filename => 'header.txt'
8
+ :filename => 'header.txt',
9
+ :extension => 'rb'
9
10
  }
10
11
  mandatory_options = %w( )
11
12
 
@@ -19,6 +20,10 @@ module SuperStamper
19
20
  BANNER
20
21
  opts.separator ""
21
22
  ########################################################################
23
+ opts.on("-e", "--extension PATH", String,
24
+ "Which extension to look for.",
25
+ "Default: rb") { |arg| options[:extension] = arg }
26
+ ########################################################################
22
27
  opts.on("-f", "--filename PATH", String,
23
28
  "Which file to use as header.",
24
29
  "Default: header.txt") { |arg| options[:filename] = arg }
@@ -35,8 +40,9 @@ module SuperStamper
35
40
  end
36
41
 
37
42
  filename = options[:filename]
43
+ extension = options[:extension]
38
44
 
39
- SuperStamper::Base.stamp_recursively( :header_file_name => filename )
45
+ SuperStamper::Base.stamp_recursively( :header_file_name => filename, :extension => extension )
40
46
  end
41
47
  end
42
48
  end
data/lib/super_stamper.rb CHANGED
@@ -5,7 +5,7 @@ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname
5
5
 
6
6
  module SuperStamper
7
7
  # a version constant
8
- VERSION = '0.0.1'
8
+ VERSION = '0.0.2'
9
9
  # a class
10
10
  class Base
11
11
  BEGIN_HEADER = "# -- begin header --"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_stamper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Commander Johnson