net-pns 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -3
- data/lib/net/pns.rb +4 -4
- data/lib/net/pns/version.rb +1 -1
- data/net-pns.gemspec +5 -4
- metadata +10 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d94fa6d4ad0154a65f346811f7a0e3171184d4d7c4a25af902cfeaf5eff7d763
|
4
|
+
data.tar.gz: a9d7339459bd27c88cb0304ffa9a2482a055d83ef8245feef52a768b7d1ab1b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf669952502e5013f28487cf9ffb620e7db32e5719421c0791dc9a6925abe5a21f0c215d7b95749e849702895691b264a69cfa683f705c235230ced55727393e
|
7
|
+
data.tar.gz: df2f6edad549d153b56b1d044aff20a9691380d8c6fbbda2f0ea90a3315d1a901f228bda0a86993012ecfc8dbd3dab1626f5c0a79fb3c542986016ecc06a7465
|
data/.travis.yml
CHANGED
data/lib/net/pns.rb
CHANGED
@@ -32,8 +32,8 @@ module Net
|
|
32
32
|
}
|
33
33
|
def light(command)
|
34
34
|
cmd = KEYS.map{|c| [c, VALUES[command[c]] || 9]}.to_h.values
|
35
|
-
ret = send('S', cmd, 1).
|
36
|
-
raise LightError.new unless ret == 0x06
|
35
|
+
ret = send('S', cmd, 1).ord
|
36
|
+
raise LightError.new("code 0x#{ret.to_s(16).rjust(2, '0')}") unless ret == 0x06
|
37
37
|
end
|
38
38
|
|
39
39
|
def stat
|
@@ -42,8 +42,8 @@ module Net
|
|
42
42
|
|
43
43
|
PATTERN = {0 => 0, 1 => 1, stop: 0, play: 1}
|
44
44
|
def play_sound(ch, pattern = :play, repeat = 0)
|
45
|
-
ret = send('V', [PATTERN[pattern] || 1, repeat, 0, ch], 1)
|
46
|
-
raise PlayError.new unless ret == 0x06
|
45
|
+
ret = send('V', [PATTERN[pattern] || 1, repeat, 0, ch], 1).ord
|
46
|
+
raise PlayError.new("code 0x#{ret.to_s(16).rjust(2, '0')}") unless ret == 0x06
|
47
47
|
end
|
48
48
|
|
49
49
|
def clear
|
data/lib/net/pns/version.rb
CHANGED
data/net-pns.gemspec
CHANGED
@@ -6,7 +6,9 @@ require 'net/pns/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "net-pns"
|
8
8
|
spec.version = Net::PNS::VERSION
|
9
|
-
spec.
|
9
|
+
spec.platform = Gem::Platform::RUBY
|
10
|
+
spec.required_ruby_version = '>= 2.5.0'
|
11
|
+
spec.authors = ["Tada, Tadashi"]
|
10
12
|
spec.email = ["t@tdtds.jp"]
|
11
13
|
spec.summary = %q{protocol handler of PNS commands}
|
12
14
|
spec.description = %q{protocol handler of PNS commands for PATLITE NH-FV series}
|
@@ -18,8 +20,7 @@ Gem::Specification.new do |spec|
|
|
18
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
21
|
spec.require_paths = ["lib"]
|
20
22
|
|
21
|
-
spec.add_development_dependency "bundler"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "bundler"
|
24
|
+
spec.add_development_dependency "rake"
|
23
25
|
spec.add_development_dependency "rspec"
|
24
|
-
spec.add_development_dependency "pry"
|
25
26
|
end
|
metadata
CHANGED
@@ -1,45 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-pns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Tada, Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - ">="
|
@@ -53,7 +39,7 @@ dependencies:
|
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
42
|
+
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - ">="
|
@@ -98,15 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
84
|
requirements:
|
99
85
|
- - ">="
|
100
86
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
87
|
+
version: 2.5.0
|
102
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
89
|
requirements:
|
104
90
|
- - ">="
|
105
91
|
- !ruby/object:Gem::Version
|
106
92
|
version: '0'
|
107
93
|
requirements: []
|
108
|
-
|
109
|
-
rubygems_version: 2.4.5
|
94
|
+
rubygems_version: 3.1.2
|
110
95
|
signing_key:
|
111
96
|
specification_version: 4
|
112
97
|
summary: protocol handler of PNS commands
|