Commit 1546cae4 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

fixed a gemspec bug where we required the whole application rather than just...

fixed a gemspec bug where we required the whole application rather than just application information.
parent d0d012f6
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'apex'
require 'apex/app_info'
Gem::Specification.new do |spec|
spec.name = 'apex'
......@@ -28,13 +28,13 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rdoc'
spec.add_development_dependency 'aruba'
spec.add_dependency 'colorize'
spec.add_dependency 'abstraction'
spec.add_dependency 'json'
spec.add_dependency 'serialport'
spec.add_dependency 'methadone'
spec.add_dependency 'colorize'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rdoc'
spec.add_development_dependency 'aruba'
end
require 'colorize'
require 'kiss/kiss_serial'
require 'aprs/aprs_kiss'
require 'apex/app_info'
module Apex
VERSION = "0.0.1"
def self.echo_color_frame(frame, direction_in)
formatted_aprs = [frame[:source].colorize(:green), frame[:destination].colorize(:blue)].join('>')
paths = []
frame[:path].each do |path|
paths << path.colorize(:cyan)
end
paths = ','.join(paths)
if frame['path']
formatted_aprs = ','.join([formatted_aprs, paths])
end
formatted_aprs += ':'
formatted_aprs += frame['text']
if direction_in
click.echo(click.style(port_name + ' << ', fg='magenta') + formatted_aprs)
else
click.echo(click.style(port_name + ' >> ', fg='magenta', bold=True, blink=True) + formatted_aprs)
end
end
def self.main
kiss = Kiss::KissSerial.new('/dev/ttyUSB1', 9600)
......@@ -12,7 +31,7 @@ module Apex
while true
frame = aprs_kiss.read
if frame
p frame
echo_color_frame(frame)
else
sleep(1)
end
......
module Apex
VERSION = "0.0.1"
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment