mockspotify 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mockspotify/version.rb +1 -1
  2. data/src/link.c +26 -0
  3. metadata +28 -51
@@ -1,5 +1,5 @@
1
1
  module Spotify
2
2
  module Mock
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
data/src/link.c CHANGED
@@ -81,3 +81,29 @@ sp_link_as_user(sp_link *link)
81
81
  {
82
82
  return mocksp_user_create(link->data, "", "", "", SP_RELATION_TYPE_UNKNOWN, 1);
83
83
  }
84
+
85
+ sp_track *
86
+ sp_link_as_track(sp_link *link)
87
+ {
88
+ return mocksp_track_create("Bogus", 0, NULL, NULL, 100, 42, 1, 7, SP_ERROR_OK, 1);
89
+ }
90
+
91
+ sp_track *
92
+ sp_link_as_track_and_offset(sp_link *link, int *offset)
93
+ {
94
+ /* parse the offset */
95
+ int mins = 0, secs = 0;
96
+ char *optr = NULL;
97
+
98
+ if (optr = strchr(link->data, '#'))
99
+ {
100
+ sscanf(optr, "#%u:%u", &mins, &secs);
101
+ *offset = (mins * 60 + secs) * 1000;
102
+ }
103
+ else
104
+ {
105
+ *offset = 0;
106
+ }
107
+
108
+ return sp_link_as_track(link);
109
+ }
metadata CHANGED
@@ -1,46 +1,34 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mockspotify
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kim Burgestrand
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-07-22 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-07-24 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: spotify
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156420020 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: *2156420020
35
25
  description:
36
26
  email: kim@burgestrand.se
37
27
  executables: []
38
-
39
- extensions:
28
+ extensions:
40
29
  - src/extconf.rb
41
30
  extra_rdoc_files: []
42
-
43
- files:
31
+ files:
44
32
  - .gitignore
45
33
  - Gemfile
46
34
  - Makefile.am
@@ -70,40 +58,29 @@ files:
70
58
  - src/util.c
71
59
  - src/util.h
72
60
  - test/mockspotify_spec.rb
73
- has_rdoc: true
74
61
  homepage: https://github.com/Burgestrand/libmockspotify
75
62
  licenses: []
76
-
77
63
  post_install_message:
78
64
  rdoc_options: []
79
-
80
- require_paths:
65
+ require_paths:
81
66
  - lib
82
67
  - src
83
- required_ruby_version: !ruby/object:Gem::Requirement
68
+ required_ruby_version: !ruby/object:Gem::Requirement
84
69
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
- version: "0"
92
- required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
75
  none: false
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- hash: 3
98
- segments:
99
- - 0
100
- version: "0"
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
101
80
  requirements: []
102
-
103
81
  rubyforge_project:
104
- rubygems_version: 1.6.2
82
+ rubygems_version: 1.8.5
105
83
  signing_key:
106
84
  specification_version: 3
107
85
  summary: A mock of libspotify for use in development of language bindings
108
86
  test_files: []
109
-