ceol 0.1.0 → 0.3.0

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: 2919719bf08d45b38cebb55b6c8ec3c00a1c1b6356950a1e8aa0c632759c18fe
4
- data.tar.gz: 70736b960b02f0269e88196e38058fe368083ae5329f0e888a01056f62de0ec8
3
+ metadata.gz: 7f5270a72554e6f6c47975ff23108c9b2f68bd25a9defed6af4310f493658e4b
4
+ data.tar.gz: 78100a81474ea01504fc6310175adc39800b4d25f7e1c6c3b0b9eab82646a4b0
5
5
  SHA512:
6
- metadata.gz: 8a231f385b7891f4535782c9c3c89b2000bea031dff30bffd72f21de12a97c361d9fc572a3e3d65d11bfa54d6f4e1023334d90726bb10319cc3f5b4d5d3bcb6e
7
- data.tar.gz: ffb5accc47b7df505ebdceb9759db92237bdfe74a2bc8644a63af4c1f2eec2e48204a335939a9c255c6512781874bd0a4b74d49ffb2e7f77b3cb6dd4769f110f
6
+ metadata.gz: d6fa2f044d759c413ac9a1a0b5185b6373c00c3a099608804ed4e43c11a3b510a927b523aef2df082f14b02be9c37b4af757065fba04481595ce57df7e444e3c
7
+ data.tar.gz: 5ebdbd450bc1e442aaaca87f632331cf744f9660902ad549b175b9a0352143d74eae4beb6cb1c08ac1d3505f545b74fbff419dc27ddfa5b8f141c84697e13b85
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2022-10-19
4
+
5
+ - Add `on` command to change power to on
6
+
7
+ ## [0.2.0] - 2022-10-18
8
+
9
+ - Add `off` command to change power to standby
10
+
3
11
  ## [0.1.0] - 2022-10-18
4
12
 
5
13
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ceol (0.1.0)
4
+ ceol (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -34,9 +34,11 @@ In the command line run the executable:
34
34
 
35
35
  ```
36
36
  $ ceol + # turns the volume up by 1
37
- $ ceol ++ # turns the volume up by 2
37
+ $ ceol ++ # turns the volume up by 2 and so on
38
38
  $ ceol - # turns the volume down by 1
39
- $ ceol -- # turns the volume down by 2
39
+ $ ceol -- # turns the volume down by 2 and so on
40
+ $ ceol off # powers off to standby
41
+ $ ceol on # powers on from standby
40
42
  ```
41
43
 
42
44
  ## Development
data/exe/ceol CHANGED
@@ -5,13 +5,20 @@ require "ceol"
5
5
 
6
6
  commands = ARGF.argv.first
7
7
  Ceol::Controller.control do |controller|
8
- commands.each_char do |command|
9
- case command
10
- when "+"
11
- controller.volume_up
12
- when "-"
13
- controller.volume_down
8
+ case commands
9
+ when "off"
10
+ controller.off
11
+ when "on"
12
+ controller.on
13
+ else
14
+ commands.each_char do |command|
15
+ case command
16
+ when "+"
17
+ controller.volume_up
18
+ when "-"
19
+ controller.volume_down
20
+ end
21
+ sleep(0.5)
14
22
  end
15
- sleep(0.5)
16
23
  end
17
24
  end
@@ -28,6 +28,14 @@ module Ceol
28
28
  connection.close unless connection.nil?
29
29
  end
30
30
 
31
+ def off
32
+ write("PWSTANDBY")
33
+ end
34
+
35
+ def on
36
+ write("PWON")
37
+ end
38
+
31
39
  def volume_down
32
40
  write("MVDOWN")
33
41
  end
data/lib/ceol/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ceol
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ceol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rasmus Bang Grouleff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-18 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: