xmltv 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/xmltv/xmltv.rb +13 -1
  2. metadata +1 -1
@@ -95,7 +95,7 @@ module XMLTV
95
95
  super {|h,v| h[v] = Hash.new }
96
96
  end
97
97
  end
98
- VERSION = '0.8.3'
98
+ VERSION = '0.8.4'
99
99
  Progdir = ($LOAD_PATH.find {|x| test(?f, "#{x}/xmltv/xmltv.rb")} || 'lib') + '/xmltv/sites'
100
100
  Sites = Dir["#{Progdir}/*.rb"].map{|x| x[0..-4]}.map{|x| File.basename(x)}
101
101
  class XmltvOptparser
@@ -107,6 +107,14 @@ module XMLTV
107
107
  options = OpenStruct.new
108
108
  options.basedir = "#{ENV['HOME']}/.xmltv"
109
109
  options.validate = true
110
+ xfound = nil
111
+ %w{ xmllint tv_sort }.each do |prog|
112
+ xfound = false
113
+ ENV['PATH'].split(':').each do |path|
114
+ xfound = true if test(?x, "#{path}/#{prog}")
115
+ end
116
+ break unless xfound
117
+ end
110
118
 
111
119
  opts = OptionParser.new do |opts|
112
120
  opts.banner = "Usage: #{$PROGRAM_NAME} [options]"
@@ -163,6 +171,10 @@ module XMLTV
163
171
  end
164
172
 
165
173
  opts.parse!(args)
174
+ if ! xfound && options.validate
175
+ options.validate = false
176
+ STDERR.puts "Disabled validation: xmllint and/or tv_sort not found"
177
+ end
166
178
  options
167
179
  end
168
180
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmltv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Han Holl