Sha256: 6de00288feba44d251c8ae115af940512bfca05659b873b12993113933b0b93e
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' # require 'safe_yaml' # SafeYAML::OPTIONS[:default_mode] = :safe # Borrowing from "whiches" gem ... cmd = 'json_pp' exes = [] exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| exts.each { |ext| exe = File.join(path, "#{cmd}#{ext}") exes << exe if File.executable? exe } end path = if exes.size > 0 File.dirname(exes[0]) else File.dirname(__FILE__) end add_path = File.expand_path(File.join(path, "..", "lib")) $:.unshift(add_path) require 'json_pp' JsonPp::run
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_pp-0.0.1 | bin/json_pp |