dtas 0.14.2 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Documentation/.gitignore +1 -1
- data/Documentation/GNUmakefile +1 -1
- data/Documentation/dtas-archive.pod +2 -2
- data/Documentation/dtas-console.pod +2 -2
- data/Documentation/dtas-ctl.pod +2 -2
- data/Documentation/dtas-cueedit.pod +2 -2
- data/Documentation/dtas-enq.pod +2 -2
- data/Documentation/dtas-env.pod +2 -2
- data/Documentation/dtas-msinkctl.pod +2 -2
- data/Documentation/dtas-player.pod +2 -2
- data/Documentation/dtas-player_effects.pod +2 -2
- data/Documentation/dtas-player_protocol.pod +19 -4
- data/Documentation/dtas-player_sink_examples.pod +2 -2
- data/Documentation/dtas-sinkedit.pod +2 -2
- data/Documentation/dtas-sourceedit.pod +2 -2
- data/Documentation/dtas-splitfx.pod +1 -1
- data/Documentation/dtas-tl.pod +2 -2
- data/Documentation/dtas-xdelay.pod +2 -2
- data/Documentation/update-footer.rb +3 -3
- data/GIT-VERSION-GEN +2 -2
- data/GNUmakefile +1 -1
- data/HACKING +2 -2
- data/INSTALL +10 -10
- data/README +6 -5
- data/Rakefile +5 -5
- data/TODO +1 -1
- data/bin/dtas-archive +2 -2
- data/bin/dtas-console +1 -1
- data/bin/dtas-ctl +1 -1
- data/bin/dtas-cueedit +1 -1
- data/bin/dtas-enq +1 -1
- data/bin/dtas-mlib +1 -1
- data/bin/dtas-msinkctl +1 -1
- data/bin/dtas-partstats +1 -1
- data/bin/dtas-player +1 -1
- data/bin/dtas-readahead +19 -8
- data/bin/dtas-sinkedit +1 -1
- data/bin/dtas-sourceedit +1 -1
- data/bin/dtas-splitfx +1 -1
- data/bin/dtas-tl +1 -1
- data/bin/dtas-xdelay +1 -1
- data/dtas-linux.gemspec +2 -2
- data/dtas-mpris.gemspec +2 -2
- data/dtas.gemspec +2 -2
- data/lib/dtas.rb +15 -2
- data/lib/dtas/buffer.rb +1 -1
- data/lib/dtas/buffer/read_write.rb +1 -1
- data/lib/dtas/buffer/splice.rb +1 -2
- data/lib/dtas/command.rb +1 -1
- data/lib/dtas/compat_onenine.rb +1 -1
- data/lib/dtas/cue_index.rb +1 -1
- data/lib/dtas/disclaimer.rb +1 -1
- data/lib/dtas/edit_client.rb +1 -1
- data/lib/dtas/fadefx.rb +2 -2
- data/lib/dtas/format.rb +9 -5
- data/lib/dtas/mcache.rb +31 -0
- data/lib/dtas/mlib.rb +11 -7
- data/lib/dtas/mlib/migrations/0001_initial.rb +1 -1
- data/lib/dtas/nonblock.rb +1 -1
- data/lib/dtas/parse_freq.rb +1 -1
- data/lib/dtas/parse_time.rb +1 -1
- data/lib/dtas/partstats.rb +2 -3
- data/lib/dtas/pipe.rb +1 -1
- data/lib/dtas/player.rb +2 -1
- data/lib/dtas/player/client_handler.rb +74 -16
- data/lib/dtas/process.rb +1 -1
- data/lib/dtas/replaygain.rb +1 -1
- data/lib/dtas/rg_state.rb +4 -9
- data/lib/dtas/serialize.rb +1 -1
- data/lib/dtas/sigevent.rb +1 -1
- data/lib/dtas/sigevent/efd.rb +1 -1
- data/lib/dtas/sigevent/pipe.rb +1 -1
- data/lib/dtas/sink.rb +1 -1
- data/lib/dtas/source.rb +2 -1
- data/lib/dtas/source/av.rb +1 -1
- data/lib/dtas/source/av_ff_common.rb +7 -3
- data/lib/dtas/source/cmd.rb +1 -1
- data/lib/dtas/source/common.rb +1 -1
- data/lib/dtas/source/ff.rb +1 -1
- data/lib/dtas/source/file.rb +1 -1
- data/lib/dtas/source/mp3gain.rb +1 -1
- data/lib/dtas/source/sox.rb +59 -32
- data/lib/dtas/spawn_fix.rb +1 -1
- data/lib/dtas/splitfx.rb +11 -6
- data/lib/dtas/state_file.rb +1 -1
- data/lib/dtas/tfx.rb +1 -1
- data/lib/dtas/track.rb +1 -1
- data/lib/dtas/tracklist.rb +1 -1
- data/lib/dtas/unix_accepted.rb +1 -1
- data/lib/dtas/unix_client.rb +1 -1
- data/lib/dtas/unix_server.rb +1 -1
- data/lib/dtas/util.rb +1 -1
- data/lib/dtas/writable_iter.rb +1 -1
- data/lib/dtas/xs.rb +1 -1
- data/perl/dtas-graph +1 -1
- data/test/covshow.rb +1 -1
- data/test/helper.rb +1 -1
- data/test/player_integration.rb +1 -1
- data/test/test_buffer.rb +11 -7
- data/test/test_env.rb +1 -1
- data/test/test_fadefx.rb +1 -1
- data/test/test_format.rb +1 -1
- data/test/test_format_change.rb +1 -1
- data/test/test_mcache.rb +19 -0
- data/test/test_mlib.rb +1 -1
- data/test/test_parse_freq.rb +1 -1
- data/test/test_player.rb +1 -1
- data/test/test_player_client_handler.rb +1 -1
- data/test/test_player_integration.rb +1 -1
- data/test/test_process.rb +1 -1
- data/test/test_rg_integration.rb +2 -2
- data/test/test_rg_state.rb +9 -2
- data/test/test_sink.rb +1 -1
- data/test/test_sink_pipe_size.rb +1 -1
- data/test/test_sink_tee_integration.rb +1 -1
- data/test/test_source_av.rb +1 -1
- data/test/test_source_sox.rb +2 -1
- data/test/test_splitfx.rb +1 -1
- data/test/test_tfx.rb +1 -1
- data/test/test_tracklist.rb +1 -1
- data/test/test_unixserver.rb +1 -1
- data/test/test_util.rb +1 -1
- metadata +6 -4
data/README
CHANGED
@@ -43,7 +43,7 @@ Users of dtas-player will also be interested in the following scripts:
|
|
43
43
|
|
44
44
|
All scripts have some documentation in the Documentation/ directory or
|
45
45
|
manpages distributed with the gem. Documentation is also available on
|
46
|
-
|
46
|
+
https://80x24.org/dtas/$COMMAND.txt in plain-text form.
|
47
47
|
|
48
48
|
dtas exposes no public APIs outside of command-line and YAML text. dtas is
|
49
49
|
aimed at users familiar with the *nix command-line and editing text files.
|
@@ -66,7 +66,7 @@ the git(7) suite for generating and sending patches. Please format
|
|
66
66
|
pull requests with the git-request-pull(1) script (also distributed
|
67
67
|
with git(7)) and send them via email to <dtas-all@nongnu.org>.
|
68
68
|
|
69
|
-
See
|
69
|
+
See https://www.git-scm.com/ for more information on git.
|
70
70
|
|
71
71
|
## Contact
|
72
72
|
|
@@ -77,16 +77,17 @@ appreciated.
|
|
77
77
|
Please send plain-text mail to the list at <dtas-all@nongnu.org>\
|
78
78
|
HTML mail will not be read. dtas is for GUI-phobes, by GUI-phobes.\
|
79
79
|
Mailing list archives available at <ftp://lists.gnu.org/dtas-all>
|
80
|
-
or <
|
80
|
+
or <https://80x24.org/dtas-all/>
|
81
81
|
No subscription is necessary to post to the mailing list.
|
82
82
|
You may also read via:
|
83
83
|
NNTP: <nntp://news.public-inbox.org/inbox.comp.audio.dtas>
|
84
|
-
|
84
|
+
<nntp://news.gmane.org/gmane.comp.audio.dtas.general>
|
85
|
+
Atom: <https://80x24.org/dtas-all/new.atom>
|
85
86
|
|
86
87
|
## Copyright
|
87
88
|
|
88
89
|
Copyright 2013-2016 all contributors <dtas-all@nongnu.org>\
|
89
|
-
License: GPL-3.0+ <
|
90
|
+
License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
90
91
|
|
91
92
|
dtas is copyrighted Free Software by all contributors, see logs
|
92
93
|
in revision control for names and email addresses of all of them.
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>.
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require 'tempfile'
|
5
5
|
include Rake::DSL
|
@@ -42,7 +42,7 @@ def tags
|
|
42
42
|
fp.puts "Unreleased" unless fp.size > 0
|
43
43
|
fp.puts "# COPYRIGHT"
|
44
44
|
fp.puts "Copyright (C) 2013-2015 all contributors <dtas-all@nongnu.org>"
|
45
|
-
fp.puts "License: GPL-3.0+ <
|
45
|
+
fp.puts "License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>"
|
46
46
|
fp.rewind
|
47
47
|
assert_equal fp.read, File.read("NEWS") rescue nil
|
48
48
|
fp.chmod 0644
|
@@ -52,8 +52,8 @@ def tags
|
|
52
52
|
desc 'prints news as an Atom feed'
|
53
53
|
task 'NEWS.atom' do
|
54
54
|
require 'builder' # gem install builder
|
55
|
-
url_base = '
|
56
|
-
cgit_url = '
|
55
|
+
url_base = 'https://80x24.org/dtas/'
|
56
|
+
cgit_url = 'https://80x24.org/dtas.git/'
|
57
57
|
new_tags = tags[0,10]
|
58
58
|
x = Builder::XmlMarkup.new
|
59
59
|
x.instruct! :xml, encoding: 'UTF-8', version: '1.0'
|
@@ -98,7 +98,7 @@ def tags
|
|
98
98
|
files = []
|
99
99
|
|
100
100
|
# git-set-file-times is distributed with rsync,
|
101
|
-
# Also available at:
|
101
|
+
# Also available at: https://yhbt.net/git-set-file-times
|
102
102
|
# on Debian systems: /usr/share/doc/rsync/scripts/git-set-file-times.gz
|
103
103
|
sh("git", "set-file-times", "Documentation", "examples", *top)
|
104
104
|
make = ENV['MAKE'] || 'make'
|
data/TODO
CHANGED
data/bin/dtas-archive
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2015-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
usage = "#$0 SOURCE DESTINATION"
|
6
6
|
|
@@ -133,7 +133,7 @@
|
|
133
133
|
next
|
134
134
|
end
|
135
135
|
|
136
|
-
stats_out = "#{output.sub(/\.[
|
136
|
+
stats_out = "#{output.sub(/\.[^\.]+\z/, '')}.stats" if stats
|
137
137
|
|
138
138
|
if dry_run || !silent
|
139
139
|
names = job.map { |x| Shellwords.escape(x) }
|
data/bin/dtas-console
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
#
|
6
6
|
# Note: no idea what I'm doing, especially w.r.t. curses
|
data/bin/dtas-ctl
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'dtas/unix_client'
|
6
6
|
|
data/bin/dtas-cueedit
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'tempfile'
|
6
6
|
require 'dtas/xs'
|
data/bin/dtas-enq
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'dtas/unix_client'
|
6
6
|
c = DTAS::UNIXClient.new
|
data/bin/dtas-mlib
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2015-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
usage = "#$0 [-d DATABASE-URI] ACTION [ARGS]"
|
6
6
|
Thread.abort_on_exception = $stderr.sync = $stdout.sync = true
|
data/bin/dtas-msinkctl
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'yaml'
|
6
6
|
require 'dtas/unix_client'
|
data/bin/dtas-partstats
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
# TODO
|
6
6
|
# - option parsing: sox effects, stats effect options
|
data/bin/dtas-player
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
Thread.abort_on_exception = $stderr.sync = $stdout.sync = true
|
6
6
|
require 'yaml'
|
data/bin/dtas-readahead
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2015-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
#
|
6
6
|
# Really janky readahead script. Requires dtas-player to be
|
@@ -133,6 +133,7 @@ def do_ra(fp, pos, w)
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def do_open(path)
|
136
|
+
return unless path # could be a command
|
136
137
|
if path =~ /\.ya?ml\z/
|
137
138
|
File.open(path) do |fp|
|
138
139
|
buf = fp.read(4)
|
@@ -149,8 +150,8 @@ def do_open(path)
|
|
149
150
|
File.open(path)
|
150
151
|
end
|
151
152
|
|
153
|
+
work = {}
|
152
154
|
begin
|
153
|
-
work = {}
|
154
155
|
cur_pid = nil
|
155
156
|
@todo_ra = @max_ra
|
156
157
|
t0 = DTAS.now
|
@@ -158,14 +159,19 @@ def do_open(path)
|
|
158
159
|
cur = YAML.load(c.req('current'))
|
159
160
|
while @todo_ra > 0 && fp.nil?
|
160
161
|
if current = cur['current']
|
161
|
-
track = current['infile']
|
162
|
-
|
162
|
+
track = current['infile']
|
163
|
+
break unless track.kind_of?(String)
|
164
|
+
track.freeze
|
165
|
+
fp = work[track] ||= do_open(track)
|
163
166
|
cur_pid = current['pid']
|
164
167
|
if fp
|
165
168
|
pos = expand_pid(cur_pid).map do |pid|
|
166
169
|
seek_to_cur_pos(pid, fp)
|
167
170
|
end.compact.max
|
168
|
-
|
171
|
+
if pos
|
172
|
+
fp = do_ra(fp, pos, w)
|
173
|
+
work.delete_if { |_, io| io.closed? }
|
174
|
+
end
|
169
175
|
end
|
170
176
|
else
|
171
177
|
break
|
@@ -174,12 +180,14 @@ def do_open(path)
|
|
174
180
|
# queue has priority, work on it, first
|
175
181
|
queue = YAML.load(c.req('queue cat'))
|
176
182
|
while @todo_ra > 0 && track = queue.shift
|
183
|
+
next unless track.kind_of?(String)
|
177
184
|
fp = nil
|
178
185
|
begin
|
179
|
-
work[track] ||=
|
186
|
+
fp = work[track] ||= do_open(track)
|
180
187
|
rescue SystemCallError
|
181
188
|
end
|
182
189
|
fp = do_ra(fp, 0, w) if fp
|
190
|
+
work.delete_if { |_, io| io.closed? }
|
183
191
|
end
|
184
192
|
break if @todo_ra <= 0
|
185
193
|
|
@@ -192,10 +200,11 @@ def do_open(path)
|
|
192
200
|
fp = nil
|
193
201
|
track = c.req("tl get #{cid}").sub!(/\A1 \d+=/, '').freeze
|
194
202
|
begin
|
195
|
-
work[track] ||=
|
203
|
+
fp = work[track] ||= do_open(track)
|
196
204
|
rescue SystemCallError
|
197
205
|
end
|
198
206
|
fp = do_ra(fp, 0, w) if fp
|
207
|
+
work.delete_if { |_, io| io.closed? }
|
199
208
|
if @todo_ra > 0 && fp.nil? && ids[idx += 1].nil?
|
200
209
|
idx = repeat == 'true' ? 0 : nil
|
201
210
|
end
|
@@ -210,7 +219,9 @@ def do_open(path)
|
|
210
219
|
timeout = 5 - elapsed
|
211
220
|
timeout = 0 if timeout < 0
|
212
221
|
else
|
213
|
-
|
222
|
+
work.each_value(&:close).clear
|
223
|
+
fp.close if fp && !fp.closed?
|
224
|
+
fp = timeout = nil
|
214
225
|
end
|
215
226
|
r = wait_read(w, timeout)
|
216
227
|
p w.res_wait if r
|
data/bin/dtas-sinkedit
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'optparse'
|
6
6
|
require 'dtas/edit_client'
|
data/bin/dtas-sourceedit
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'optparse'
|
6
6
|
require 'dtas/edit_client'
|
data/bin/dtas-splitfx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
require 'yaml'
|
6
6
|
require 'optparse'
|
data/bin/dtas-tl
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
# encoding: binary
|
6
6
|
# WARNING: totally unstable API, use dtas-ctl for scripting (but the protocol
|
data/bin/dtas-xdelay
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
USAGE = "Usage: #$0 [-x FREQ] [-l] /dev/fd/LO /dev/fd/HI DELAY [DELAY ...]"
|
6
6
|
require 'optparse'
|
data/dtas-linux.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
#
|
4
4
|
# this just declares dependencies to make gem installation a little easier
|
5
5
|
# for Linux users
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"via tee(), splice() and eventfd() on Linux"
|
13
13
|
s.email = %q{e@80x24.org}
|
14
14
|
s.files = []
|
15
|
-
s.homepage = '
|
15
|
+
s.homepage = 'https://80x24.org/dtas/'
|
16
16
|
s.add_dependency(%q<dtas>)
|
17
17
|
s.add_dependency(%q<io_splice>, '~> 4')
|
18
18
|
s.add_dependency(%q<sleepy_penguin>, '~> 3')
|
data/dtas-mpris.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-2.0+ or later <
|
2
|
+
# License: GPL-2.0+ or later <https://www.gnu.org/licenses/gpl-2.0.txt>
|
3
3
|
# This is GPL-2.0+ instead of GPL-3.0+ because ruby-dbus is LGPL-2.1 (only)
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{dtas-mpris}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"This is currently a dummy package as dtas-mpris is not implemented"
|
12
12
|
s.email = %q{e@80x24.org}
|
13
13
|
s.files = []
|
14
|
-
s.homepage = '
|
14
|
+
s.homepage = 'https://80x24.org/dtas/'
|
15
15
|
s.add_dependency(%q<dtas>)
|
16
16
|
s.add_dependency(%q<ruby-dbus>)
|
17
17
|
s.licenses = 'GPL-2.0+'
|
data/dtas.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
manifest = File.read('.gem-manifest').split(/\n/)
|
5
5
|
s.name = %q{dtas}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
s.email = %q{e@80x24.org}
|
11
11
|
s.executables = manifest.grep(%r{\Abin/}).map { |s| s.sub(%r{\Abin/}, "") }
|
12
12
|
s.files = manifest
|
13
|
-
s.homepage = '
|
13
|
+
s.homepage = 'https://80x24.org/dtas/'
|
14
14
|
s.licenses = "GPL-3.0+"
|
15
15
|
s.required_ruby_version = '>= 1.9.3'
|
16
16
|
end
|
data/lib/dtas.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
|
5
5
|
# DTAS currently exposes no public API for Ruby programmers.
|
6
|
-
# See
|
6
|
+
# See https://80x24.org/dtas/ for more info.
|
7
7
|
module DTAS
|
8
8
|
|
9
9
|
# try to use the monotonic clock in Ruby >= 2.1, it is immune to clock
|
@@ -24,6 +24,19 @@ def self.now # :nodoc:
|
|
24
24
|
def self.null # :nodoc:
|
25
25
|
@null ||= File.open('/dev/null', 'r+')
|
26
26
|
end
|
27
|
+
|
28
|
+
# String#-@ will deduplicate strings when Ruby 2.5 is released (Dec 2017)
|
29
|
+
# https://bugs.ruby-lang.org/issues/13077
|
30
|
+
if RUBY_VERSION.to_f >= 2.5
|
31
|
+
def self.dedupe_str(str)
|
32
|
+
-str
|
33
|
+
end
|
34
|
+
else
|
35
|
+
# Ruby 2.1 - 2.4, noop for older Rubies
|
36
|
+
def self.dedupe_str(str)
|
37
|
+
eval "#{str.inspect}.freeze"
|
38
|
+
end
|
39
|
+
end
|
27
40
|
# :startdoc:
|
28
41
|
end
|
29
42
|
|
data/lib/dtas/buffer.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require 'io/wait'
|
5
5
|
require_relative '../dtas'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require 'io/nonblock'
|
5
5
|
require_relative '../../dtas'
|
data/lib/dtas/buffer/splice.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require 'io/nonblock'
|
5
5
|
require 'io/splice'
|
@@ -10,7 +10,6 @@
|
|
10
10
|
module DTAS::Buffer::Splice # :nodoc:
|
11
11
|
MAX_AT_ONCE = 4096 # page size in Linux
|
12
12
|
MAX_AT_ONCE_1 = 65536
|
13
|
-
MAX_SIZE = File.read("/proc/sys/fs/pipe-max-size").to_i
|
14
13
|
F_MOVE = IO::Splice::F_MOVE
|
15
14
|
|
16
15
|
def buffer_size
|
data/lib/dtas/command.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require_relative 'serialize'
|
5
5
|
require 'shellwords'
|
data/lib/dtas/compat_onenine.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
2
|
-
# License: GPL-3.0+
|
2
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
3
3
|
|
4
4
|
# Make Ruby 1.9.3 look like Ruby 2.0.0 to us
|
5
5
|
# This exists for Debian wheezy users using the stock Ruby 1.9.3 install.
|
data/lib/dtas/cue_index.rb
CHANGED
data/lib/dtas/disclaimer.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# :enddoc:
|
2
2
|
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
|
3
|
-
# License: GPL-3.0+
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
DTAS_PROGNAME = File.basename($0)
|
6
6
|
DTAS_DISCLAIMER = <<EOF
|
data/lib/dtas/edit_client.rb
CHANGED