opener-property-tagger 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db4ce8acc0c1dd88b2042f9a936012ea9a3c1448
|
4
|
+
data.tar.gz: 4ed777c8b215fb98dd3687689cb1c58d97787dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cd57abe32b4d88f8ed10618c9e8466c1628faebda89ad1ceeaa956c571fdc00a6069cea44a1a1570df2ebe0136fc6e34c142d1850972a1bc3e2f926c640d13d
|
7
|
+
data.tar.gz: e64b80100aac3dbfc3229e75692ef9ab16cbd362ca878e36f2ef5b492c456843fcb535c5f26105f6e334594a433c7ff9b050758068779803373aab76acac5e96
|
@@ -28,6 +28,8 @@ module Opener
|
|
28
28
|
# @option options [Array] :args Collection of arbitrary arguments to pass
|
29
29
|
# to the underlying kernel.
|
30
30
|
#
|
31
|
+
# @option options [TrueClass] :no_time Disables adding of timestamps.
|
32
|
+
#
|
31
33
|
def initialize(options = {})
|
32
34
|
@args = options.delete(:args) || []
|
33
35
|
@options = options
|
@@ -63,8 +65,10 @@ module Opener
|
|
63
65
|
end
|
64
66
|
|
65
67
|
protected
|
68
|
+
|
66
69
|
def process(input)
|
67
|
-
processor =
|
70
|
+
processor = Processor.new(input, path, !options[:no_time])
|
71
|
+
|
68
72
|
return processor.process
|
69
73
|
end
|
70
74
|
end # PolarityTagger
|
@@ -54,8 +54,14 @@ Examples:
|
|
54
54
|
abort "property-tagger v#{VERSION} on #{RUBY_DESCRIPTION}"
|
55
55
|
end
|
56
56
|
|
57
|
+
on :'no-time', 'Disables adding of timestamps'
|
58
|
+
|
57
59
|
run do |opts, args|
|
58
|
-
tagger = PropertyTagger.new(
|
60
|
+
tagger = PropertyTagger.new(
|
61
|
+
:args => args,
|
62
|
+
:no_time => opts[:'no-time']
|
63
|
+
)
|
64
|
+
|
59
65
|
input = STDIN.tty? ? nil : STDIN.read
|
60
66
|
|
61
67
|
puts tagger.run(input)
|
@@ -145,7 +145,7 @@ module Opener
|
|
145
145
|
references_node = new_node("references", property_node)
|
146
146
|
|
147
147
|
value.uniq.each do |v|
|
148
|
-
comment = Oga::XML::Comment.new(:text => v.last)
|
148
|
+
comment = Oga::XML::Comment.new(:text => " #{v.last} ")
|
149
149
|
|
150
150
|
references_node.children << comment
|
151
151
|
|