hallon 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +6 -0
- data/.gemtest +0 -0
- data/.gitignore +29 -0
- data/.rspec +7 -0
- data/.yardopts +8 -0
- data/CHANGELOG +20 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/QUIRKS +11 -0
- data/README.markdown +58 -0
- data/Rakefile +75 -0
- data/Termfile +7 -0
- data/examples/logging_in.rb +26 -0
- data/examples/printing_link_information.rb +27 -0
- data/hallon.gemspec +31 -0
- data/lib/hallon.rb +34 -0
- data/lib/hallon/error.rb +54 -0
- data/lib/hallon/ext/ffi.rb +26 -0
- data/lib/hallon/ext/spotify.rb +101 -0
- data/lib/hallon/image.rb +70 -0
- data/lib/hallon/link.rb +101 -0
- data/lib/hallon/linkable.rb +50 -0
- data/lib/hallon/observable.rb +91 -0
- data/lib/hallon/session.rb +189 -0
- data/lib/hallon/synchronizable.rb +32 -0
- data/lib/hallon/user.rb +69 -0
- data/lib/hallon/version.rb +7 -0
- data/spec/fixtures/example_uris.rb +11 -0
- data/spec/fixtures/pink_cover.jpg +0 -0
- data/spec/hallon/error_spec.rb +30 -0
- data/spec/hallon/ffi_spec.rb +5 -0
- data/spec/hallon/hallon_spec.rb +16 -0
- data/spec/hallon/image_spec.rb +41 -0
- data/spec/hallon/link_spec.rb +84 -0
- data/spec/hallon/linkable_spec.rb +43 -0
- data/spec/hallon/observable_spec.rb +103 -0
- data/spec/hallon/session_spec.rb +61 -0
- data/spec/hallon/synchronizable_spec.rb +19 -0
- data/spec/hallon/user_spec.rb +73 -0
- data/spec/spec_helper.rb +71 -0
- data/spec/support/.gitkeep +0 -0
- data/spec/support/context_initialized_session.rb +3 -0
- data/spec/support/context_logged_in.rb +16 -0
- data/spec/support/cover_me.rb +5 -0
- data/spec/support/shared_for_loadable_objects.rb +7 -0
- metadata +271 -96
@@ -0,0 +1,61 @@
|
|
1
|
+
describe Hallon::Session do
|
2
|
+
include_context "initialized session"
|
3
|
+
|
4
|
+
describe "options" do
|
5
|
+
subject { session.options }
|
6
|
+
its([:user_agent]) { should == options[:user_agent] }
|
7
|
+
its([:settings_path]) { should == options[:settings_path] }
|
8
|
+
its([:cache_path]) { should == options[:cache_path] }
|
9
|
+
|
10
|
+
its([:load_playlists]) { should == true }
|
11
|
+
its([:compress_playlists]) { should == true }
|
12
|
+
its([:cache_playlist_metadata]) { should == true }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#process_events" do
|
16
|
+
it "should return the timeout" do
|
17
|
+
session.process_events.should be_a Fixnum
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#process_events_on" do
|
22
|
+
it "should not call given block on :notify_main_thread implicitly" do
|
23
|
+
notified = false
|
24
|
+
|
25
|
+
session.should_receive(:process_events).twice.and_return do
|
26
|
+
unless notified
|
27
|
+
session.trigger(:notify_main_thread, :notify)
|
28
|
+
notified = true
|
29
|
+
else
|
30
|
+
session.trigger(:bogus, :bogus)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
session.process_events_on(:bogus) { |e| e.inspect }.should eq ":bogus"
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should time out if waiting for events too long" do
|
38
|
+
session.should_receive(:process_events).once.and_return { session.trigger(:whatever) }
|
39
|
+
session.process_events_on(:whatever) { |e| e.inspect }.should eq "nil"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "#logout" do
|
44
|
+
it "should check logged in status" do
|
45
|
+
session.should_receive(:logged_in?).once.and_return(false)
|
46
|
+
expect { session.logout }.to_not raise_error
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "when logged in", :logged_in => true do
|
51
|
+
it "should be logged in" do
|
52
|
+
session.should be_logged_in
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#relation_type?" do
|
56
|
+
it "should retrieve the relation between the current user and given user" do
|
57
|
+
session.relation_type?(session.user).should eq :unknown
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe Hallon::Synchronizable do
|
2
|
+
subject do
|
3
|
+
Class.new { include Hallon::Synchronizable }.new
|
4
|
+
end
|
5
|
+
|
6
|
+
describe "#synchronize" do
|
7
|
+
it "should not deadlock when called recursively in itself" do
|
8
|
+
expect do
|
9
|
+
subject.synchronize { subject.synchronize {} }
|
10
|
+
end.to_not raise_error
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#new_cond" do
|
15
|
+
it "should give us a new condition variable" do
|
16
|
+
subject.new_cond.should be_a Monitor::ConditionVariable
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
describe Hallon::User do
|
3
|
+
describe ".new" do
|
4
|
+
it "should raise ArgumentError when given an invalid link" do
|
5
|
+
expect { Hallon::User.new("invalid link") }.to raise_error ArgumentError
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should raise ArgumentError when given a non-user link" do
|
9
|
+
expect { Hallon::User.new("spotify:search:moo") }.to raise_error ArgumentError
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "creating a User", :logged_in => true do
|
14
|
+
context ".new", "from a Spotify URI" do
|
15
|
+
subject { Hallon::User.new("spotify:user:burgestrand") }
|
16
|
+
it_should_behave_like "a loadable object"
|
17
|
+
end
|
18
|
+
|
19
|
+
context ".new", "from a Link" do
|
20
|
+
subject { Hallon::User.new Hallon::Link.new("spotify:user:burgestrand") }
|
21
|
+
it_should_behave_like "a loadable object"
|
22
|
+
end
|
23
|
+
|
24
|
+
context "from Session#user" do
|
25
|
+
subject { session.user }
|
26
|
+
it_should_behave_like "a loadable object"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "an instance", :logged_in => true do
|
31
|
+
let(:link) { Hallon::Link.new("spotify:user:burgestrand") }
|
32
|
+
let(:user) { Hallon::User.new(link) }
|
33
|
+
subject { user }
|
34
|
+
|
35
|
+
before(:all) do
|
36
|
+
session.process_events_on(:userinfo_updated) { user.loaded? }
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "#to_link" do
|
40
|
+
it "should return a Link for this user" do
|
41
|
+
user.to_link.should eq link
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#name" do
|
46
|
+
it "should be able to get the display name" do
|
47
|
+
Spotify.should_receive(:user_display_name)
|
48
|
+
user.name(:display).should be_a String
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should be able to get the full name" do
|
52
|
+
Spotify.should_receive(:user_full_name)
|
53
|
+
user.name(:full).should be_a String
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should get the canonical name when unspecified" do
|
57
|
+
Spotify.should_receive(:user_canonical_name)
|
58
|
+
user.name.should be_a String
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should fail on invalid name types" do
|
62
|
+
expect { user.name(:i_am_invalid) }.to raise_error
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "#picture" do
|
67
|
+
it "should retrieve the user picture" do
|
68
|
+
Spotify.should_receive(:user_picture)
|
69
|
+
user.picture.should be_a String
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'hallon'
|
3
|
+
|
4
|
+
# Bail on failure
|
5
|
+
Thread.abort_on_exception = true
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
9
|
+
|
10
|
+
def options
|
11
|
+
{
|
12
|
+
:user_agent => "Hallon (rspec)",
|
13
|
+
:settings_path => "tmp",
|
14
|
+
:cache_path => "tmp/cache"
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
def session
|
19
|
+
@session ||= Hallon::Session.instance(Hallon::APPKEY, options)
|
20
|
+
end
|
21
|
+
|
22
|
+
def fixture_image_path
|
23
|
+
File.expand_path('../fixtures/pink_cover.jpg', __FILE__)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Requires supporting files in ./support/ and ./fixtures/
|
28
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
29
|
+
Dir["#{File.dirname(__FILE__)}/fixtures/**/*.rb"].each {|f| require f}
|
30
|
+
|
31
|
+
unless ENV.values_at(*%w(HALLON_APPKEY HALLON_USERNAME HALLON_PASSWORD)).all?
|
32
|
+
abort <<-ERROR
|
33
|
+
You must supply a valid Spotify username, password and application
|
34
|
+
key in order to run Hallons specs. This is done by setting these
|
35
|
+
environment variables:
|
36
|
+
|
37
|
+
- HALLON_APPKEY (path to spotify_appkey.key)
|
38
|
+
- HALLON_USERNAME (your spotify username)
|
39
|
+
- HALLON_PASSWORD (your spotify password)
|
40
|
+
ERROR
|
41
|
+
end
|
42
|
+
|
43
|
+
module Hallon
|
44
|
+
APPKEY ||= IO.read File.expand_path(ENV['HALLON_APPKEY'])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Hallon::Session#instance requires that a Session object have not been created
|
48
|
+
# so test it here instead. This assures it is tested before anything else!
|
49
|
+
describe Hallon::Session do
|
50
|
+
it { Hallon::Session.should_not respond_to :new }
|
51
|
+
|
52
|
+
describe "#instance" do
|
53
|
+
it "should require an application key" do
|
54
|
+
expect { Hallon::Session.instance }.to raise_error(ArgumentError)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should fail on an invalid application key" do
|
58
|
+
expect { Hallon::Session.instance('invalid') }.to raise_error(Hallon::Error, /BAD_APPLICATION_KEY/)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should fail on a small user-agent of multibyte chars (> 255 characters)" do
|
62
|
+
expect { Hallon::Session.send(:new, Hallon::APPKEY, :user_agent => 'ö' * 128) }.
|
63
|
+
to raise_error(ArgumentError)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should fail on a huge user agent (> 255 characters)" do
|
67
|
+
expect { Hallon::Session.send(:new, Hallon::APPKEY, :user_agent => 'a' * 256) }.
|
68
|
+
to raise_error(ArgumentError)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
shared_context "logged in", :logged_in do
|
2
|
+
before(:all) do
|
3
|
+
unless session.logged_in?
|
4
|
+
session.login ENV['HALLON_USERNAME'], ENV['HALLON_PASSWORD']
|
5
|
+
logged_in = session.process_events_on(:logged_in) { |error| error }
|
6
|
+
logged_in.should eq :ok
|
7
|
+
|
8
|
+
finished = session.process_events_on(:connection_error) { |error| session.logged_in? or error }
|
9
|
+
finished.should be_true
|
10
|
+
end
|
11
|
+
|
12
|
+
session.should be_logged_in
|
13
|
+
end
|
14
|
+
|
15
|
+
before(:each) { session.should be_logged_in }
|
16
|
+
end
|
metadata
CHANGED
@@ -1,143 +1,318 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hallon
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Kim Burgestrand
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
name: ffi
|
18
|
-
prerelease: false
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2011-07-18 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: spotify
|
16
|
+
requirement: &2153550680 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
18
|
+
requirements:
|
22
19
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 8.0.5
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *2153550680
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &2153548620 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
29
|
+
requirements:
|
33
30
|
- - ~>
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.8'
|
36
33
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: watchr
|
40
34
|
prerelease: false
|
41
|
-
|
35
|
+
version_requirements: *2153548620
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &2153545900 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2'
|
47
44
|
type: :development
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: test_notifier
|
51
45
|
prerelease: false
|
52
|
-
|
46
|
+
version_requirements: *2153545900
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: autotest-standalone
|
49
|
+
requirement: &2153545240 !ruby/object:Gem::Requirement
|
53
50
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
58
55
|
type: :development
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: simplecov
|
62
56
|
prerelease: false
|
63
|
-
|
57
|
+
version_requirements: *2153545240
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: autotest-growl
|
60
|
+
requirement: &2153543840 !ruby/object:Gem::Requirement
|
64
61
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
69
66
|
type: :development
|
70
|
-
version_requirements: *id005
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: yard
|
73
67
|
prerelease: false
|
74
|
-
|
68
|
+
version_requirements: *2153543840
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: cover_me
|
71
|
+
requirement: &2153542660 !ruby/object:Gem::Requirement
|
75
72
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: 0
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
80
77
|
type: :development
|
81
|
-
version_requirements: *id006
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: rdiscount
|
84
78
|
prerelease: false
|
85
|
-
|
79
|
+
version_requirements: *2153542660
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: yard
|
82
|
+
requirement: &2153541100 !ruby/object:Gem::Requirement
|
86
83
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
91
88
|
type: :development
|
92
|
-
version_requirements: *id007
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: jeweler
|
95
89
|
prerelease: false
|
96
|
-
|
90
|
+
version_requirements: *2153541100
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rdiscount
|
93
|
+
requirement: &2153530920 !ruby/object:Gem::Requirement
|
97
94
|
none: false
|
98
|
-
requirements:
|
99
|
-
- -
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version:
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
102
99
|
type: :development
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
executables: []
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *2153530920
|
102
|
+
description: ! 'What is Hallon?
|
107
103
|
|
108
|
-
|
104
|
+
===============
|
105
|
+
|
106
|
+
We rubyists have this awesome [spotify gem][] allowing us to use [libspotify][]
|
107
|
+
from within Ruby, but it has a significant drawback: the `libspotify` API is very
|
108
|
+
hard to use. Now, we can’t have that, so what do we do? We make Hallon!
|
109
|
+
|
110
|
+
|
111
|
+
Hallon is Swedish for “Raspberry”, and has been written to satisfy my needs for
|
112
|
+
API simplicity. It provides you with a wrapper around the spotify gem, making the
|
113
|
+
experience of using `libspotify` from Ruby much more enjoyable.
|
114
|
+
|
115
|
+
|
116
|
+
Hallon would not have been possible if not for these people:
|
117
|
+
|
118
|
+
|
119
|
+
- Per Reimers, cracking synchronization bugs with me in the deep night (4 AM) and
|
120
|
+
correcting me when I didn’t know better
|
121
|
+
|
122
|
+
- [Spotify](http://www.spotify.com/), providing a service worth attention (and my
|
123
|
+
money!)
|
124
|
+
|
125
|
+
- [Linus Oleander](https://github.com/oleander), involving me with the `radiofy.se`
|
126
|
+
project, ultimately spawning the necessity of Hallon
|
127
|
+
|
128
|
+
- [Jesper Särnesjö][], creator of [Greenstripes][], making me think of Hallon as
|
129
|
+
an achievable goal
|
130
|
+
|
131
|
+
|
132
|
+
Code samples can be found under `examples/` directory.
|
133
|
+
|
134
|
+
|
135
|
+
This is awesome! I want to help!
|
136
|
+
|
137
|
+
--------------------------------
|
138
|
+
|
139
|
+
Sweet! You contribute in more than one way!
|
140
|
+
|
141
|
+
|
142
|
+
### Write code!
|
143
|
+
|
144
|
+
[Fork](http://help.github.com/forking/) Hallon, [write tests for everything](http://relishapp.com/rspec)
|
145
|
+
you do (so I don’t break your stuff during my own development) and send a pull request.
|
146
|
+
If you modify existing files, please adhere to the coding standard surrounding your
|
147
|
+
code!
|
148
|
+
|
149
|
+
|
150
|
+
### [Send me feedback and requests](http://github.com/Burgestrand/Hallon/issues)
|
151
|
+
|
152
|
+
Really, I ❤ feedback! Suggestions on how to improve the API, tell me what is delicious
|
153
|
+
about Hallon, tell me what is yucky about Hallon… anything! All feedback is useful
|
154
|
+
in one way or another.
|
109
155
|
|
110
|
-
extra_rdoc_files: []
|
111
156
|
|
112
|
-
|
157
|
+
You have any questions?
|
113
158
|
|
114
|
-
|
159
|
+
-----------------------
|
160
|
+
|
161
|
+
If you need to discuss issues or feature requests you can use [Hallons issue tracker](http://github.com/Burgestrand/Hallon/issues).
|
162
|
+
For *anything* else you have to say or ask I can also be reached via [email (found
|
163
|
+
on GitHub profile)](http://github.com/Burgestrand) or [@burgestrand on twitter](http://twitter.com/Burgestrand).
|
164
|
+
|
165
|
+
|
166
|
+
In fact, you can contact me via email or twitter even if it’s about features or
|
167
|
+
issues. I’ll probably put them in the issue tracker myself after the discussion
|
168
|
+
;)
|
169
|
+
|
170
|
+
|
171
|
+
What’s the catch?
|
172
|
+
|
173
|
+
-----------------
|
174
|
+
|
175
|
+
There are several!
|
176
|
+
|
177
|
+
|
178
|
+
### Hallon is unstable
|
179
|
+
|
180
|
+
The API is unstable, my code is likely unstable. Everything should be considered
|
181
|
+
unstable!
|
182
|
+
|
183
|
+
|
184
|
+
### Hallon only supports one session per process
|
185
|
+
|
186
|
+
You can only keep one session with Spotify alive at a time in the same process,
|
187
|
+
due to a limitation of `libspotify`.
|
188
|
+
|
189
|
+
|
190
|
+
### You still have to worry about threads
|
191
|
+
|
192
|
+
I have been doing my best at hiding the complexity in `libspotify`, but it’s still
|
193
|
+
a work in progress. Despite my efforts, you’ll need to be familiar with concurrent
|
194
|
+
programming to use Hallon properly.
|
195
|
+
|
196
|
+
|
197
|
+
Versioning policy
|
198
|
+
|
199
|
+
-----------------
|
200
|
+
|
201
|
+
Hallon uses [semantic versioning](http://semver.org) as of v0.0.0. As long
|
202
|
+
|
203
|
+
as Hallon stays at major version 0, no guarantees of backwards-compatibility
|
204
|
+
|
205
|
+
are made. CHANGELOG will be kept up to date with the different versions.
|
206
|
+
|
207
|
+
|
208
|
+
License
|
209
|
+
|
210
|
+
-------
|
211
|
+
|
212
|
+
Hallon is licensed under a 2-clause (Simplified) BSD license. More information can
|
213
|
+
be found in the `LICENSE.txt` file.
|
214
|
+
|
215
|
+
|
216
|
+
[spotify gem]: https://rubygems.org/gems/spotify
|
217
|
+
|
218
|
+
[libspotify]: http://developer.spotify.com/en/libspotify/overview/
|
219
|
+
|
220
|
+
[Greenstripes]: http://github.com/sarnesjo/greenstripes
|
221
|
+
|
222
|
+
[Jesper Särnesjö]: http://jesper.sarnesjo.org/
|
223
|
+
|
224
|
+
'
|
225
|
+
email: kim@burgestrand.se
|
226
|
+
executables: []
|
227
|
+
extensions: []
|
228
|
+
extra_rdoc_files: []
|
229
|
+
files:
|
230
|
+
- .autotest
|
231
|
+
- .gemtest
|
232
|
+
- .gitignore
|
233
|
+
- .rspec
|
234
|
+
- .yardopts
|
235
|
+
- CHANGELOG
|
236
|
+
- Gemfile
|
237
|
+
- LICENSE.txt
|
238
|
+
- QUIRKS
|
239
|
+
- README.markdown
|
240
|
+
- Rakefile
|
241
|
+
- Termfile
|
242
|
+
- examples/logging_in.rb
|
243
|
+
- examples/printing_link_information.rb
|
244
|
+
- hallon.gemspec
|
245
|
+
- lib/hallon.rb
|
246
|
+
- lib/hallon/error.rb
|
247
|
+
- lib/hallon/ext/ffi.rb
|
248
|
+
- lib/hallon/ext/spotify.rb
|
249
|
+
- lib/hallon/image.rb
|
250
|
+
- lib/hallon/link.rb
|
251
|
+
- lib/hallon/linkable.rb
|
252
|
+
- lib/hallon/observable.rb
|
253
|
+
- lib/hallon/session.rb
|
254
|
+
- lib/hallon/synchronizable.rb
|
255
|
+
- lib/hallon/user.rb
|
256
|
+
- lib/hallon/version.rb
|
257
|
+
- spec/fixtures/example_uris.rb
|
258
|
+
- spec/fixtures/pink_cover.jpg
|
259
|
+
- spec/hallon/error_spec.rb
|
260
|
+
- spec/hallon/ffi_spec.rb
|
261
|
+
- spec/hallon/hallon_spec.rb
|
262
|
+
- spec/hallon/image_spec.rb
|
263
|
+
- spec/hallon/link_spec.rb
|
264
|
+
- spec/hallon/linkable_spec.rb
|
265
|
+
- spec/hallon/observable_spec.rb
|
266
|
+
- spec/hallon/session_spec.rb
|
267
|
+
- spec/hallon/synchronizable_spec.rb
|
268
|
+
- spec/hallon/user_spec.rb
|
269
|
+
- spec/spec_helper.rb
|
270
|
+
- spec/support/.gitkeep
|
271
|
+
- spec/support/context_initialized_session.rb
|
272
|
+
- spec/support/context_logged_in.rb
|
273
|
+
- spec/support/cover_me.rb
|
274
|
+
- spec/support/shared_for_loadable_objects.rb
|
115
275
|
homepage: http://github.com/Burgestrand/Hallon
|
116
|
-
licenses:
|
276
|
+
licenses:
|
117
277
|
- GNU AGPL
|
118
278
|
post_install_message:
|
119
279
|
rdoc_options: []
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
+
require_paths:
|
281
|
+
- lib
|
282
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
283
|
none: false
|
125
|
-
requirements:
|
284
|
+
requirements:
|
126
285
|
- - ~>
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version:
|
129
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
|
+
- !ruby/object:Gem::Version
|
287
|
+
version: '1.9'
|
288
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
289
|
none: false
|
131
|
-
requirements:
|
132
|
-
- -
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version:
|
290
|
+
requirements:
|
291
|
+
- - ! '>='
|
292
|
+
- !ruby/object:Gem::Version
|
293
|
+
version: '0'
|
135
294
|
requirements: []
|
136
|
-
|
137
295
|
rubyforge_project:
|
138
|
-
rubygems_version: 1.5
|
296
|
+
rubygems_version: 1.8.5
|
139
297
|
signing_key:
|
140
298
|
specification_version: 3
|
141
|
-
summary: Delicious Ruby bindings to the official Spotify API
|
142
|
-
test_files:
|
143
|
-
|
299
|
+
summary: Delicious Ruby bindings to the official Spotify API
|
300
|
+
test_files:
|
301
|
+
- spec/fixtures/example_uris.rb
|
302
|
+
- spec/fixtures/pink_cover.jpg
|
303
|
+
- spec/hallon/error_spec.rb
|
304
|
+
- spec/hallon/ffi_spec.rb
|
305
|
+
- spec/hallon/hallon_spec.rb
|
306
|
+
- spec/hallon/image_spec.rb
|
307
|
+
- spec/hallon/link_spec.rb
|
308
|
+
- spec/hallon/linkable_spec.rb
|
309
|
+
- spec/hallon/observable_spec.rb
|
310
|
+
- spec/hallon/session_spec.rb
|
311
|
+
- spec/hallon/synchronizable_spec.rb
|
312
|
+
- spec/hallon/user_spec.rb
|
313
|
+
- spec/spec_helper.rb
|
314
|
+
- spec/support/.gitkeep
|
315
|
+
- spec/support/context_initialized_session.rb
|
316
|
+
- spec/support/context_logged_in.rb
|
317
|
+
- spec/support/cover_me.rb
|
318
|
+
- spec/support/shared_for_loadable_objects.rb
|