Sha256: 5a09c21d31a8a4d6078985e2d398c8d5a594b0819bede85d5604c28af85d133f
Contents?: true
Size: 668 Bytes
Versions: 41
Compression:
Stored size: 668 Bytes
Contents
#!/usr/bin/env ruby # encoding: UTF-8 %w(lib ext).each do |dir| $LOAD_PATH.unshift File.expand_path("../../#{dir}", __FILE__) end require 'stringio' require 'oj' filename = File.join(File.dirname(__FILE__), 'day.json') File.open(filename, "w") do |f| w = Oj::StreamWriter.new(f, :indent => -1) 390.times do |i| w.push_object() w.push_value(12, 'msgType') w.push_value(1, 'version') w.push_value(1_400_074_200 + i * 60, 'bar') w.push_value('TBC', 'source') w.push_array('timebars') w.push_object() w.push_value('aapl_24', 'asset') w.push_value(91.87, 'close') w.pop() w.pop() w.pop() end f.write("\n") end
Version data entries
41 entries across 41 versions & 1 rubygems