spotilocal 0.3.0 → 0.4.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 +4 -4
- data/.rubocop_todo.yml +3 -2
- data/README.md +14 -1
- data/exe/spotilocal +5 -0
- data/lib/spotilocal/cli.rb +18 -0
- data/lib/spotilocal/client.rb +5 -0
- data/lib/spotilocal/version.rb +1 -1
- data/spotilocal.gemspec +1 -0
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8677fecab24399ca755cef8fa65e9de8fe06f254
|
4
|
+
data.tar.gz: a88c87355e6f4541c1eed871fbe08967ba2ea411
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc333f1c1494ce737d57b91aec8a6c7c89a21087810b0b02ad9d56d23bdc5cf21601d3f17c5f1a29b522bec69b506e03c082cc5ff4a6c3323a9f5647ad9d41ae
|
7
|
+
data.tar.gz: fba68e4521b10ffc02d1d2f8d6dffad6d9b6ce38a27967ac1527c235db23d04a90bce33e5502960000e906823d1484b30db774f32d7aa7183f8f115ae124fa16
|
data/.rubocop_todo.yml
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2016-12-
|
3
|
+
# on 2016-12-25 10:24:00 +0100 using RuboCop version 0.42.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 3
|
10
10
|
Style/Documentation:
|
11
11
|
Exclude:
|
12
12
|
- 'spec/**/*'
|
13
13
|
- 'test/**/*'
|
14
14
|
- 'lib/spotilocal.rb'
|
15
|
+
- 'lib/spotilocal/cli.rb'
|
15
16
|
- 'lib/spotilocal/client.rb'
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Spotilocal
|
2
|
+
[](https://badge.fury.io/rb/spotilocal)
|
2
3
|
[](https://travis-ci.org/Flipez/spotilocal)
|
4
|
+
[](https://codeclimate.com/github/Flipez/spotilocal)
|
3
5
|
|
4
6
|
Spotilocal allows you to query the local spotify client and fetch informations about the current status and perform actions such as start/stop.
|
5
7
|
|
@@ -20,7 +22,7 @@ Or install it yourself as:
|
|
20
22
|
$ gem install spotilocal
|
21
23
|
|
22
24
|
## Usage
|
23
|
-
|
25
|
+
### Libary
|
24
26
|
You can specify a port to create the instance faster. Otherwise spotilocal will try to discover the port.
|
25
27
|
```ruby
|
26
28
|
# Create a new spotify object
|
@@ -34,6 +36,17 @@ s.pause # true if paused
|
|
34
36
|
s.unpause # true if playing
|
35
37
|
```
|
36
38
|
|
39
|
+
### Cli
|
40
|
+
Spotilocas comes with a thor cli. The cli is currently a bit slow due to port autodiscover. You can use it like this
|
41
|
+
|
42
|
+
```bash
|
43
|
+
spotilocal play URI # plays uri
|
44
|
+
spotilocal pause # guess what
|
45
|
+
spotilocal unpause # yup..
|
46
|
+
```
|
47
|
+
|
48
|
+
Thor allows argument guessing. So commands like `spotilocal un` will work too.
|
49
|
+
|
37
50
|
## Development
|
38
51
|
|
39
52
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/exe/spotilocal
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Spotilocal
|
2
|
+
class CLI < Thor
|
3
|
+
desc 'play URI', 'play given spotify uri'
|
4
|
+
def play(uri)
|
5
|
+
Spotilocal::Client.new.play uri
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'pause', 'pause local spotify client'
|
9
|
+
def pause
|
10
|
+
Spotilocal::Client.new.pause
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'unpause', 'unpause local spotify client'
|
14
|
+
def unpause
|
15
|
+
Spotilocal::Client.new.unpause
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/spotilocal/client.rb
CHANGED
data/lib/spotilocal/version.rb
CHANGED
data/spotilocal.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spotilocal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flipez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,7 +97,8 @@ dependencies:
|
|
83
97
|
description: Wrapper to remote control a local spotify client
|
84
98
|
email:
|
85
99
|
- code@brauser.io
|
86
|
-
executables:
|
100
|
+
executables:
|
101
|
+
- spotilocal
|
87
102
|
extensions: []
|
88
103
|
extra_rdoc_files: []
|
89
104
|
files:
|
@@ -97,7 +112,9 @@ files:
|
|
97
112
|
- Rakefile
|
98
113
|
- bin/console
|
99
114
|
- bin/setup
|
115
|
+
- exe/spotilocal
|
100
116
|
- lib/spotilocal.rb
|
117
|
+
- lib/spotilocal/cli.rb
|
101
118
|
- lib/spotilocal/client.rb
|
102
119
|
- lib/spotilocal/version.rb
|
103
120
|
- spotilocal.gemspec
|