humble_rpi-plugin-mtp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/humble_rpi-plugin-mtp.rb +27 -0
- metadata +87 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7beb502b3d2fb7cec65ef4b4c9506585b8a09ccc
|
4
|
+
data.tar.gz: e57a5dd1ca89a8a8c9746f0c4b7c095037511767
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7771418ce8dda3e979cc67f8be7087f5d7f5acc04b1dd4ae1d81f2695ad3b74142f1dbcd75be5fbe8ad3d3f845b80ab432584fd7cd4fb6921edda026b08503b2
|
7
|
+
data.tar.gz: 1e17a596fac4d014779430c8d71a396c04ae6b52d77a954916ad4ecc5649991386e5eb4e58d83b9603397cc1e5f046adc65f53005356ddc13ab3ba6ea667fbe6
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: humble_rpi-plugin-mtp.rb
|
4
|
+
|
5
|
+
|
6
|
+
require 'serialport_mtp'
|
7
|
+
|
8
|
+
|
9
|
+
class HumbleRPiPluginMTP < SerialPortMTP
|
10
|
+
|
11
|
+
def initialize(settings: {}, variables: {})
|
12
|
+
|
13
|
+
h = {port: "/dev/ttyAMA0", baud_rate: 19200}.merge settings
|
14
|
+
device_id = variables[:device_id] || 'pi'
|
15
|
+
|
16
|
+
super(port: h[:port], baud_rate: h[:baud_rate])
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
def on_printer_message(message)
|
21
|
+
self.println(Time.now.to_s + "\n" + message)
|
22
|
+
self.feed 4
|
23
|
+
end
|
24
|
+
|
25
|
+
alias on_start start
|
26
|
+
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: humble_rpi-plugin-mtp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- James Robertson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
|
+
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
+
8ixkARkWAmV1MB4XDTE1MDgyNzIxMjgwNFoXDTE2MDgyNjIxMjgwNFowSDESMBAG
|
16
|
+
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
|
+
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
+
ggEBALfbWqDDFb2T3nKu+7FYSYOG/t+4b9c+rWsBbNhn3XEcHCSl8HdCTZQ5lY4a
|
19
|
+
Sn9np75SXKyWf5F+gPqMwLZuIWFkTe07N6uBywBkrU8ASzMoNhHCxshxdwa0qE+K
|
20
|
+
hvmy43i2LeYdPoQU36WVHZzFDThIr/R7VLgcNrO3fln3YQTXyoNybhYJSQMs/SFi
|
21
|
+
8vMS8wmWEZ2PJaauMCuFUbzBYMArYFgkzbIpHguTOKIYZjhYgEn4B5k01WXHKkNI
|
22
|
+
tMwofuvtbqrgK/RW0AhLiADz8HWzqchSCJA6bgPWA0XCiSlsbmfLOlYm+leswtlR
|
23
|
+
btw+5cs9BB+ahgB4yoVBvwYNZbUCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUmZCJg6ryGQuPTekCpoBZ2jalvK8wJgYDVR0RBB8w
|
25
|
+
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAKQK/Z2ZF
|
27
|
+
LsVJDmJhkIVrZgs5sMykVynle9rYsKIT6H0dIydosyLh2wRFEEiu8OR6Oj/mRtyJ
|
28
|
+
8XYQattVmxmYXhqxGphKzFVJDe8/Bg6DGcEAchHFgT7WGOCiav0Csl62X+qJrQ5V
|
29
|
+
vTbNOEbcLE6a6HGRHjxyCTK+GzT6VmAEewjP9bTJTTGY8WrnADOglTttidPRj5uC
|
30
|
+
9gqijv5egfnkc83BD7bmFNYnVSeGFXlQEqC01+0AafQVgOcCpPps3Pg1X/YNMmNB
|
31
|
+
07Qsn8/aUhItdv3jAFZhDZ0Je1h0BeZoQQygHJrJDg7K0lFZXkWE/fJqdoPgKdPv
|
32
|
+
KcCsTt7owyec9w==
|
33
|
+
-----END CERTIFICATE-----
|
34
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: serialport_mtp
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0.1'
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.0
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.1'
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.1.0
|
56
|
+
description:
|
57
|
+
email: james@r0bertson.co.uk
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/humble_rpi-plugin-mtp.rb
|
63
|
+
homepage: https://github.com/jrobertson/humble_rpi-plugin-mtp
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.4.8
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: This Humble RPi plugin controls the mini thermal printer.
|
87
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|