├── shpotify.cfg ├── roboto.png ├── maestro.png ├── .travis.yml ├── Gemfile ├── Gemfile.lock ├── app.rb ├── spec ├── maestro_spec.rb └── spotify_spec.rb ├── spotify.rb ├── README.md ├── .rubocop.yml └── spotify.sh /shpotify.cfg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roboto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smashingboxes/maestro/HEAD/roboto.png -------------------------------------------------------------------------------- /maestro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smashingboxes/maestro/HEAD/maestro.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | script: 3 | - bundle exec rubocop 4 | - bundle exec rspec 5 | - bundle exec bundler-audit 6 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "sinatra" 4 | 5 | group :development, :test do 6 | gem "pry-byebug" 7 | gem "rubocop" 8 | end 9 | 10 | group :test do 11 | gem "rspec" 12 | gem "rack-test" 13 | gem "bundler-audit" 14 | end 15 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | ast (2.4.0) 5 | bundler-audit (0.6.0) 6 | bundler (~> 1.2) 7 | thor (~> 0.18) 8 | byebug (9.1.0) 9 | coderay (1.1.2) 10 | diff-lcs (1.3) 11 | method_source (0.9.0) 12 | mustermann (1.0.2) 13 | parallel (1.12.1) 14 | parser (2.5.0.3) 15 | ast (~> 2.4.0) 16 | powerpack (0.1.1) 17 | pry (0.11.3) 18 | coderay (~> 1.1.0) 19 | method_source (~> 0.9.0) 20 | pry-byebug (3.5.0) 21 | byebug (~> 9.1) 22 | pry (~> 0.10) 23 | rack (2.0.5) 24 | rack-protection (2.0.3) 25 | rack 26 | rack-test (0.8.3) 27 | rack (>= 1.0, < 3) 28 | rainbow (3.0.0) 29 | rspec (3.7.0) 30 | rspec-core (~> 3.7.0) 31 | rspec-expectations (~> 3.7.0) 32 | rspec-mocks (~> 3.7.0) 33 | rspec-core (3.7.1) 34 | rspec-support (~> 3.7.0) 35 | rspec-expectations (3.7.0) 36 | diff-lcs (>= 1.2.0, < 2.0) 37 | rspec-support (~> 3.7.0) 38 | rspec-mocks (3.7.0) 39 | diff-lcs (>= 1.2.0, < 2.0) 40 | rspec-support (~> 3.7.0) 41 | rspec-support (3.7.1) 42 | rubocop (0.52.1) 43 | parallel (~> 1.10) 44 | parser (>= 2.4.0.2, < 3.0) 45 | powerpack (~> 0.1) 46 | rainbow (>= 2.2.2, < 4.0) 47 | ruby-progressbar (~> 1.7) 48 | unicode-display_width (~> 1.0, >= 1.0.1) 49 | ruby-progressbar (1.9.0) 50 | sinatra (2.0.3) 51 | mustermann (~> 1.0) 52 | rack (~> 2.0) 53 | rack-protection (= 2.0.3) 54 | tilt (~> 2.0) 55 | thor (0.20.0) 56 | tilt (2.0.8) 57 | unicode-display_width (1.3.0) 58 | 59 | PLATFORMS 60 | ruby 61 | 62 | DEPENDENCIES 63 | bundler-audit 64 | pry-byebug 65 | rack-test 66 | rspec 67 | rubocop 68 | sinatra 69 | 70 | BUNDLED WITH 71 | 1.16.1 72 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require "sinatra" 2 | require "json" 3 | require "./spotify.rb" 4 | 5 | HELP_TEXT = <<~HELP_TEXT.freeze 6 | Usage: 7 | `/maestro play` -- Resumes playback where Spotify last left off. 8 | `/maestro play ` -- Finds a song by name and plays it. 9 | `/maestro play album ` -- Finds an album by name and plays it. 10 | `/maestro play artist ` -- Finds an artist by name and plays it. 11 | `/maestro play list ` -- Finds a playlist by name and plays it. 12 | `/maestro play uri ` -- Play songs from specific uri. 13 | 14 | `/maestro next` -- Skips to the next song in a playlist. 15 | `/maestro prev` -- Returns to the previous song in a playlist. 16 | `/maestro replay` -- Replays the current track from the begining. 17 | `/maestro pos