-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
36 lines (31 loc) · 1013 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require "bundler/gem_tasks"
require 'rake/testtask'
desc 'Run rackitscrobbler unit tests.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
task :default => :test
desc "Open an pry session with Potemkin loaded"
task :console do
sh "pry -I lib -r rackit_scrobbler.rb"
end
desc "start"
task :start do
require "rackit_scrobbler"
last_fm_client = RackitScrobbler::LastFm::Client.new
last_fm_client.authenticate unless last_fm_client.authenticated?
player = RackitScrobbler::Player.new(last_fm_client)
listener = RackitScrobbler::Rackit.new(player)
listener.start_rackmate
end
desc "creates the config file"
task :config do
require "rackit_scrobbler"
RackitScrobbler.config.last_fm.api_key = "57572cbb1e0f50ffe2caffe88c2e9888"
RackitScrobbler.config.last_fm.api_secret = "dc0f9f9eeb17d19fea2d1d5d8256bb31"
RackitScrobbler.config.rackit.rackmate_socket = "ws://localhost:13581"
RackitScrobbler.config.write!
end