parser (>= 2.2.0.pre.3, < 3.0)
parser (2.2.0.2)
ast (>= 1.1, < 3.0)
- powerpack (0.0.9)
+ powerpack (0.1.0)
rainbow (2.0.0)
- rubocop (0.28.0)
+ rubocop (0.29.0)
astrolabe (~> 1.3)
- parser (>= 2.2.0.pre.7, < 3.0)
- powerpack (~> 0.0.6)
+ parser (>= 2.2.0.1, < 3.0)
+ powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.7.1)
else
counts = uris_from_status(server)
.collect { |x| categorise_uri(x) }
- .each_with_object(Hash.new) do |h, e|
+ .each_with_object({}) do |h, e|
if h.key? e
h[e] += 1
else
delta_t = (max_time - min_time).to_f * 24 * 60
counts = lines
.collect { |x| categorise_uri(x) }
- .each_with_object(Hash.new) do |h, e|
+ .each_with_object({}) do |h, e|
if h.key? e
h[e] += 1
else
else
counts = uri_and_times_from_status(server)
.collect { |x, y| [categorise_uri(x), y] }
- .each_with_object(Hash.new) do |h, e|
+ .each_with_object({}) do |h, e|
category, time = e
if h.key? category
h[category] += [time]
n.interfaces.each do |interface|
next unless interface[:role] == "external" && interface[:zone]
- zones[interface[:zone]] ||= Hash.new
- zones[interface[:zone]][interface[:family]] ||= Array.new
+ zones[interface[:zone]] ||= {}
+ zones[interface[:zone]][interface[:family]] ||= []
zones[interface[:zone]][interface[:family]] << interface[:address]
end
end
fl.flock(File::LOCK_EX)
sequence = (@state.key?('sequence') ? @state['sequence'] + 1 : 0)
- data_file = @config['data_dir'] + sprintf("/%03d/%03d/%03d.osm.gz", sequence / 1000000, (sequence / 1000) % 1000, (sequence % 1000))
+ data_file = @config['data_dir'] + format("/%03d/%03d/%03d.osm.gz", sequence / 1000000, (sequence / 1000) % 1000, (sequence % 1000))
tmp_state = @config['state_file'] + ".tmp"
tmp_data = "/tmp/changeset_data.osm.tmp"
# try and write the files to tmp locations and then