subtxt 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/subtxt/version.rb +1 -1
- data/lib/subtxt.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b9a0e570950736b7d8fbdf42a30cdd248cd0b4e
|
4
|
+
data.tar.gz: 562d31ccc403e5aeed9b14394e75f6a351f887d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aab98db6e54554ee67c50906796f0232494f6e1fb313ec5cf5c5692e0e53932f32fe15e706061c7552e4a14c44390316942c3c5af662c1281f67e318c8125716
|
7
|
+
data.tar.gz: 2ee7631dad5eb4415c6cfe7d6c54c150c67bbae4db255954c62130357fe404fcf2dd7c6d6ad7b7f8bd4cf2845490151fe78be199a359f866da26593c37b0e3c5
|
data/lib/subtxt/version.rb
CHANGED
data/lib/subtxt.rb
CHANGED
@@ -42,8 +42,12 @@ def load_patterns pfile
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def subtexts opts
|
45
|
+
unless opts[:patterns]
|
46
|
+
@logger.error "Missing patterns file!"
|
47
|
+
exit
|
48
|
+
end
|
45
49
|
patterns = load_patterns(opts[:patterns])
|
46
|
-
@logger.info "Reading patterns from #{
|
50
|
+
@logger.info "Reading patterns from #{opts[:patterns]}"
|
47
51
|
routine = {}
|
48
52
|
routine['files_count'] = 0
|
49
53
|
routine['files_changed'] = []
|
@@ -130,12 +134,12 @@ parser = OptionParser.new do|opts|
|
|
130
134
|
(#{@expath_def}/ by default) after replacing each matched pattern with
|
131
135
|
its pair.
|
132
136
|
|
133
|
-
Usage: subtxt [path/to/
|
137
|
+
Usage: subtxt [path/to/patterns.ext] [options]
|
134
138
|
Options:
|
135
139
|
"""
|
136
140
|
|
137
141
|
unless ARGV[0]
|
138
|
-
@logger.error "You must at least provide a patterns file
|
142
|
+
@logger.error "You must at least provide a patterns file argument. For help, use\nsubtxt --help"
|
139
143
|
exit
|
140
144
|
end
|
141
145
|
|