yaesu 0.0.3.alpha → 0.0.5.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4c5f1308c086b97a5a83dcfb379a28fcf18c19d32b0dde85dc76d4fa3682569
4
- data.tar.gz: 2fa4568600549cf5b4795e12a56a6a01fd771dbc34e7623dd893772bc8cce686
3
+ metadata.gz: d6c39909bd916124e1ec9d7699d9d336e0f04cc5651c3bf60ded86186b74e4a8
4
+ data.tar.gz: cb39be05db286edaa740cbf22415bd86f0a0437213cca0ace08f42b8bdb01a86
5
5
  SHA512:
6
- metadata.gz: 29e8d1db910c519983c50e0205689a651527debefc6c5192ded8942e0aebb9c5dcfae965e4192813f1260fb387922b4d6b83d085b5bae0379e10001e0943fe73
7
- data.tar.gz: 531cf11cd06e4cf65ac5fb7ea8860b048a8b79eaadc1c9080a86e66853dc35f88a76d73ede598a9ff93d7e5707e13f7042d29f748416ff7ef686278f58b85385
6
+ metadata.gz: c4c3c27849bea4ef8ab79c401a4970d150838c0a88b74dfa2be09caf7be585f3291fdd8b043af275a750d21934f202d05ee086f5d2e4893675e5f82ca6a88a1c
7
+ data.tar.gz: 111cd19139a359e036fcf8cadcf032cfc438d5641f4386411c4694f9c093f6308371a502deea35159940877c1e3967db3c61c8c72a81e6bccd74dd4d724b0052
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yaesu (0.0.1.alpha)
4
+ yaesu (0.0.3.alpha)
5
5
  msgpack
6
6
  ohm
7
7
  ost
8
8
  sdbm
9
+ thor
9
10
  uuid
10
11
 
11
12
  GEM
@@ -32,6 +33,7 @@ GEM
32
33
  stal (0.3.0)
33
34
  redic (~> 1.5)
34
35
  systemu (2.6.5)
36
+ thor (1.1.0)
35
37
  uuid (2.3.9)
36
38
  macaddr (~> 1.0)
37
39
 
data/exe/yaesu ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'thor'
4
+ require 'yaesu'
5
+ require 'msgpack'
6
+
7
+
8
+ module Yaesu
9
+ class Cli < Thor
10
+ desc "log", "Last 10 transmissions"
11
+ def log(on)
12
+ data = Ost[on].items.first(10)
13
+ if data.count > 0
14
+ puts ""
15
+ puts "last 10 of #{Ost[on].items.count} messages on #{on}\n"
16
+ puts ""
17
+ Ost[on].items.first(10).reverse.each do |data|
18
+ o = OpenStruct.new(MessagePack.unpack(data))
19
+ puts ">> #{o.payload}"
20
+ end
21
+ puts ""
22
+ end
23
+ end
24
+ desc "transmit ON DATA", "Transmit ON DATA"
25
+ def transmit(on,data)
26
+ Yaesu.transmit on: on, data: data
27
+ end
28
+ desc "reset CHANNEL", "reset CHANNEL"
29
+ def reset(channel)
30
+ Ost[channel].redis.call("DEL",Ost[channel].key)
31
+ end
32
+ end
33
+ end
34
+
35
+ Yaesu::Cli.start(ARGV)
data/lib/yaesu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yaesu
4
- VERSION = "0.0.3.alpha"
4
+ VERSION = "0.0.5.alpha"
5
5
  end
data/lib/yaesu.rb CHANGED
@@ -4,10 +4,12 @@ require 'bundler/inline'
4
4
  require 'ost'
5
5
  require 'sdbm'
6
6
  require 'uuid'
7
+ require 'thor'
7
8
  require 'ostruct'
8
9
  require 'msgpack'
9
10
  require 'fileutils'
10
11
 
12
+
11
13
  require_relative "yaesu/version"
12
14
 
13
15
  module Yaesu
data/yaesu.gemspec CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'msgpack'
27
27
  spec.add_dependency 'uuid'
28
28
  spec.add_dependency 'sdbm'
29
+ spec.add_dependency 'thor'
29
30
 
30
31
  # For more information and examples about making a new gem, checkout our
31
32
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaesu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.alpha
4
+ version: 0.0.5.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coco Coder
@@ -80,15 +80,28 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: thor
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Yaesu message bus
84
98
  email:
85
99
  - shout@cococoder.com
86
- executables: []
100
+ executables:
101
+ - yaesu
87
102
  extensions: []
88
103
  extra_rdoc_files: []
89
104
  files:
90
- - ".data/Yaesu.dir"
91
- - ".data/Yaesu.pag"
92
105
  - ".gitignore"
93
106
  - ".ruby-version"
94
107
  - Gemfile
@@ -97,8 +110,10 @@ files:
97
110
  - Rakefile
98
111
  - bin/console
99
112
  - bin/setup
113
+ - exe/yaesu
100
114
  - lib/yaesu.rb
101
115
  - lib/yaesu/version.rb
116
+ - so.fa.dog
102
117
  - yaesu.gemspec
103
118
  homepage:
104
119
  licenses: []
data/.data/Yaesu.pag DELETED
Binary file
File without changes