]> git.openstreetmap.org Git - rails.git/blob - lib/daemons/gpx_import_ctl
Fix most auto-correctable rubocop issues
[rails.git] / lib / daemons / gpx_import_ctl
1 #!/usr/bin/env ruby
2 require 'rubygems'
3 require "daemons"
4 require 'yaml'
5 require 'erb'
6
7 class Hash
8   def with_symbols!
9     keys.each { |key| self[key.to_s.to_sym] = self[key] }; self
10   end
11 end
12
13 options = YAML.load(
14   ERB.new(
15     IO.read(
16       File.dirname(__FILE__) + "/../../config/daemons.yml"
17     )).result).with_symbols!
18 options[:dir_mode] = options[:dir_mode].to_sym
19
20 Daemons.run File.dirname(__FILE__) + '/gpx_import.rb', options