dtas 0.14.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/Documentation/.gitignore +1 -1
  4. data/Documentation/GNUmakefile +1 -1
  5. data/Documentation/dtas-archive.pod +2 -2
  6. data/Documentation/dtas-console.pod +2 -2
  7. data/Documentation/dtas-ctl.pod +2 -2
  8. data/Documentation/dtas-cueedit.pod +2 -2
  9. data/Documentation/dtas-enq.pod +2 -2
  10. data/Documentation/dtas-env.pod +2 -2
  11. data/Documentation/dtas-msinkctl.pod +2 -2
  12. data/Documentation/dtas-player.pod +2 -2
  13. data/Documentation/dtas-player_effects.pod +2 -2
  14. data/Documentation/dtas-player_protocol.pod +19 -4
  15. data/Documentation/dtas-player_sink_examples.pod +2 -2
  16. data/Documentation/dtas-sinkedit.pod +2 -2
  17. data/Documentation/dtas-sourceedit.pod +2 -2
  18. data/Documentation/dtas-splitfx.pod +1 -1
  19. data/Documentation/dtas-tl.pod +2 -2
  20. data/Documentation/dtas-xdelay.pod +2 -2
  21. data/Documentation/update-footer.rb +3 -3
  22. data/GIT-VERSION-GEN +2 -2
  23. data/GNUmakefile +1 -1
  24. data/HACKING +2 -2
  25. data/INSTALL +10 -10
  26. data/README +6 -5
  27. data/Rakefile +5 -5
  28. data/TODO +1 -1
  29. data/bin/dtas-archive +2 -2
  30. data/bin/dtas-console +1 -1
  31. data/bin/dtas-ctl +1 -1
  32. data/bin/dtas-cueedit +1 -1
  33. data/bin/dtas-enq +1 -1
  34. data/bin/dtas-mlib +1 -1
  35. data/bin/dtas-msinkctl +1 -1
  36. data/bin/dtas-partstats +1 -1
  37. data/bin/dtas-player +1 -1
  38. data/bin/dtas-readahead +19 -8
  39. data/bin/dtas-sinkedit +1 -1
  40. data/bin/dtas-sourceedit +1 -1
  41. data/bin/dtas-splitfx +1 -1
  42. data/bin/dtas-tl +1 -1
  43. data/bin/dtas-xdelay +1 -1
  44. data/dtas-linux.gemspec +2 -2
  45. data/dtas-mpris.gemspec +2 -2
  46. data/dtas.gemspec +2 -2
  47. data/lib/dtas.rb +15 -2
  48. data/lib/dtas/buffer.rb +1 -1
  49. data/lib/dtas/buffer/read_write.rb +1 -1
  50. data/lib/dtas/buffer/splice.rb +1 -2
  51. data/lib/dtas/command.rb +1 -1
  52. data/lib/dtas/compat_onenine.rb +1 -1
  53. data/lib/dtas/cue_index.rb +1 -1
  54. data/lib/dtas/disclaimer.rb +1 -1
  55. data/lib/dtas/edit_client.rb +1 -1
  56. data/lib/dtas/fadefx.rb +2 -2
  57. data/lib/dtas/format.rb +9 -5
  58. data/lib/dtas/mcache.rb +31 -0
  59. data/lib/dtas/mlib.rb +11 -7
  60. data/lib/dtas/mlib/migrations/0001_initial.rb +1 -1
  61. data/lib/dtas/nonblock.rb +1 -1
  62. data/lib/dtas/parse_freq.rb +1 -1
  63. data/lib/dtas/parse_time.rb +1 -1
  64. data/lib/dtas/partstats.rb +2 -3
  65. data/lib/dtas/pipe.rb +1 -1
  66. data/lib/dtas/player.rb +2 -1
  67. data/lib/dtas/player/client_handler.rb +74 -16
  68. data/lib/dtas/process.rb +1 -1
  69. data/lib/dtas/replaygain.rb +1 -1
  70. data/lib/dtas/rg_state.rb +4 -9
  71. data/lib/dtas/serialize.rb +1 -1
  72. data/lib/dtas/sigevent.rb +1 -1
  73. data/lib/dtas/sigevent/efd.rb +1 -1
  74. data/lib/dtas/sigevent/pipe.rb +1 -1
  75. data/lib/dtas/sink.rb +1 -1
  76. data/lib/dtas/source.rb +2 -1
  77. data/lib/dtas/source/av.rb +1 -1
  78. data/lib/dtas/source/av_ff_common.rb +7 -3
  79. data/lib/dtas/source/cmd.rb +1 -1
  80. data/lib/dtas/source/common.rb +1 -1
  81. data/lib/dtas/source/ff.rb +1 -1
  82. data/lib/dtas/source/file.rb +1 -1
  83. data/lib/dtas/source/mp3gain.rb +1 -1
  84. data/lib/dtas/source/sox.rb +59 -32
  85. data/lib/dtas/spawn_fix.rb +1 -1
  86. data/lib/dtas/splitfx.rb +11 -6
  87. data/lib/dtas/state_file.rb +1 -1
  88. data/lib/dtas/tfx.rb +1 -1
  89. data/lib/dtas/track.rb +1 -1
  90. data/lib/dtas/tracklist.rb +1 -1
  91. data/lib/dtas/unix_accepted.rb +1 -1
  92. data/lib/dtas/unix_client.rb +1 -1
  93. data/lib/dtas/unix_server.rb +1 -1
  94. data/lib/dtas/util.rb +1 -1
  95. data/lib/dtas/writable_iter.rb +1 -1
  96. data/lib/dtas/xs.rb +1 -1
  97. data/perl/dtas-graph +1 -1
  98. data/test/covshow.rb +1 -1
  99. data/test/helper.rb +1 -1
  100. data/test/player_integration.rb +1 -1
  101. data/test/test_buffer.rb +11 -7
  102. data/test/test_env.rb +1 -1
  103. data/test/test_fadefx.rb +1 -1
  104. data/test/test_format.rb +1 -1
  105. data/test/test_format_change.rb +1 -1
  106. data/test/test_mcache.rb +19 -0
  107. data/test/test_mlib.rb +1 -1
  108. data/test/test_parse_freq.rb +1 -1
  109. data/test/test_player.rb +1 -1
  110. data/test/test_player_client_handler.rb +1 -1
  111. data/test/test_player_integration.rb +1 -1
  112. data/test/test_process.rb +1 -1
  113. data/test/test_rg_integration.rb +2 -2
  114. data/test/test_rg_state.rb +9 -2
  115. data/test/test_sink.rb +1 -1
  116. data/test/test_sink_pipe_size.rb +1 -1
  117. data/test/test_sink_tee_integration.rb +1 -1
  118. data/test/test_source_av.rb +1 -1
  119. data/test/test_source_sox.rb +2 -1
  120. data/test/test_splitfx.rb +1 -1
  121. data/test/test_tfx.rb +1 -1
  122. data/test/test_tracklist.rb +1 -1
  123. data/test/test_unixserver.rb +1 -1
  124. data/test/test_util.rb +1 -1
  125. 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
- http://dtas.80x24.org/$COMMAND.txt in plain-text form.
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 http://www.git-scm.com/ for more information on git.
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 <http://80x24.org/dtas-all/>
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
- Atom: <http://80x24.org/dtas-all/new.atom>
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+ <http://www.gnu.org/licenses/gpl-3.0.txt>
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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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+ <http://www.gnu.org/licenses/gpl-3.0.txt>"
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 = 'http://dtas.80x24.org/'
56
- cgit_url = 'http://80x24.org/dtas.git/'
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: http://yhbt.net/git-set-file-times
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
@@ -6,4 +6,4 @@
6
6
  # COPYRIGHT
7
7
 
8
8
  Copyright 2013-2016 all contributors <dtas-all@nongnu.org>\
9
- License: GPL-3.0+ <http://www.gnu.org/licenses/gpl-3.0.txt>
9
+ License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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(/\.[\.]+\z/, '')}.stats" if stats
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) }
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
 
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'].freeze
162
- work[track] ||= fp = do_open(track)
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
- pos and fp = do_ra(fp, pos, w)
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] ||= fp = do_open(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] ||= fp = do_open(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
- timeout = nil
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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 = 'http://dtas.80x24.org/'
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')
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-2.0+ or later <http://www.gnu.org/licenses/gpl-2.0.txt>
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 = 'http://dtas.80x24.org/'
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+'
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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 = 'http://dtas.80x24.org/'
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
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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 http://dtas.80x24.org/ for more info.
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
 
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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'
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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.
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
2
+ # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require_relative '../dtas'
5
5
 
@@ -1,6 +1,6 @@
1
1
  # :enddoc:
2
2
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
3
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
@@ -1,5 +1,5 @@
1
1
  # Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
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
  require 'yaml'