ssmd 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssmd/processors/prosody_processor.rb +24 -1
- data/lib/ssmd/version.rb +1 -1
- 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: ca958be00bb04e7af41269615ad89353790aff56
|
4
|
+
data.tar.gz: f97eaddda402d1ab60c1e5b30b72495d7cdfbc61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a59de6e3c716e227e08b1c5804c57f149ef320dad4b4cc00582bc65a7a1642ec3ad93e9642e1289bac8723a92151c984a433ed43c74ac285ae85e71d43e361b
|
7
|
+
data.tar.gz: a368ceb07a06342ffa5a92b3d44ed77d078d943064dc51a825ff3064d32f2b4b123a46000033711a7822a70b0d9ac9dc64ffe0670dac6b42065cd4cca745d23f
|
@@ -57,43 +57,66 @@ module SSMD::Processors
|
|
57
57
|
}x
|
58
58
|
end
|
59
59
|
|
60
|
+
##
|
61
|
+
# Match example: ~silent~
|
60
62
|
def silent_volume
|
61
|
-
|
63
|
+
/#{ws_start}~#{content('silent')}~#{ws_end}/
|
62
64
|
end
|
63
65
|
|
66
|
+
##
|
67
|
+
# Match example: --extra soft-- or -soft-
|
64
68
|
def soft_volume
|
65
69
|
/(?:#{ws_start}--#{content('x-soft')}--#{ws_end})|(?:#{ws_start}-#{content('soft')}-#{ws_end})/
|
66
70
|
end
|
67
71
|
|
72
|
+
##
|
73
|
+
# Match example: ++extra loud or +loud+
|
68
74
|
def loud_volume
|
69
75
|
/(?:#{ws_start}\+\+#{content('x-loud')}\+\+#{ws_end})|(?:#{ws_start}\+#{content('loud')}\+#{ws_end})/
|
70
76
|
end
|
71
77
|
|
78
|
+
##
|
79
|
+
# Match example: <<extra slow<< or <slow<
|
72
80
|
def slow_rate
|
73
81
|
/(?:#{ws_start}<<#{content('x-slow')}<<#{ws_end})|(?:#{ws_start}<#{content('slow')}<#{ws_end})/
|
74
82
|
end
|
75
83
|
|
84
|
+
##
|
85
|
+
# Match example: >>extra fast>> or >fast>
|
76
86
|
def fast_rate
|
77
87
|
/(?:#{ws_start}>>#{content('x-fast')}>>#{ws_end})|(?:#{ws_start}>#{content('fast')}>#{ws_end})/
|
78
88
|
end
|
79
89
|
|
90
|
+
##
|
91
|
+
# Match example: __extra low__ or _low_
|
80
92
|
def low_pitch
|
81
93
|
/(?:#{ws_start}__#{content('x-low')}__#{ws_end})|(?:#{ws_start}_#{content('low')}_#{ws_end})/
|
82
94
|
end
|
83
95
|
|
96
|
+
##
|
97
|
+
# Match example: ^^extra high^^ or ^high^
|
84
98
|
def high_pitch
|
85
99
|
/(?:#{ws_start}\^\^#{content('x-high')}\^\^#{ws_end})|(?:#{ws_start}\^#{content('high')}\^#{ws_end})/
|
86
100
|
end
|
87
101
|
|
102
|
+
##
|
103
|
+
# Matches either a single char or a longer string starting and ending
|
104
|
+
# with a non-whitespace char.
|
88
105
|
def content(name = nil)
|
89
106
|
id = name ? "?<#{name}>" : ""
|
90
107
|
/(#{id}(?:[^\s])|(?:[^\s].*[^\s]))/
|
91
108
|
end
|
92
109
|
|
110
|
+
##
|
111
|
+
# Matches the beginning of the input or a whitespace char via lookbehind,
|
112
|
+
# meaning it's excluded from the match result.
|
93
113
|
def ws_start
|
94
114
|
/(?<=(\A)|(?:\s))/
|
95
115
|
end
|
96
116
|
|
117
|
+
##
|
118
|
+
# Matches the end of the input or a whitespace char via lookahead,
|
119
|
+
# meaning it's excluded from the match result.
|
97
120
|
def ws_end
|
98
121
|
/(?=(\Z)|(?:\s))/
|
99
122
|
end
|
data/lib/ssmd/version.rb
CHANGED