firstfm 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "httparty"
4
+ gem "will_paginate"
5
+ gem "active_support"
6
+
7
+ group :development do
8
+ gem "bundler", "~> 1.0.0"
9
+ gem "jeweler", "~> 1.6.2"
10
+ gem "rcov", ">= 0"
11
+ gem "fakeweb"
12
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ active_support (3.0.0)
5
+ activesupport (= 3.0.0)
6
+ activesupport (3.0.0)
7
+ crack (0.1.8)
8
+ fakeweb (1.3.0)
9
+ git (1.2.5)
10
+ httparty (0.7.8)
11
+ crack (= 0.1.8)
12
+ jeweler (1.6.2)
13
+ bundler (~> 1.0)
14
+ git (>= 1.2.5)
15
+ rake
16
+ rake (0.9.2)
17
+ rcov (0.9.9)
18
+ will_paginate (2.3.15)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ active_support
25
+ bundler (~> 1.0.0)
26
+ fakeweb
27
+ httparty
28
+ jeweler (~> 1.6.2)
29
+ rcov
30
+ will_paginate
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Aleksandr Lossenko
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -20,4 +20,3 @@ My main focus is to import events from Last.FM, but with time I will try to add
20
20
 
21
21
  Firstfm::Geo.get_events :location => "Berlin"
22
22
 
23
-
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "firstfm"
18
+ gem.homepage = "http://github.com/egze/firstfm"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{A ruby wrapper for the Last.fm APIs}
21
+ gem.description = %Q{Firstfm is a ruby wrapper for the Last.fm APIs ( http://www.last.fm/api ). My main focus is to import events from Last.FM, but with time I will try to add support for all API methods.}
22
+ gem.email = "aleksandr.lossenko@gmail.com"
23
+ gem.authors = ["Aleksandr Lossenko"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ require 'rcov/rcovtask'
36
+ Rcov::RcovTask.new do |test|
37
+ test.libs << 'test'
38
+ test.pattern = 'test/**/test_*.rb'
39
+ test.verbose = true
40
+ test.rcov_opts << '--exclude "gems/*"'
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "firstfm #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION.yml ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 0
4
+ :build:
5
+ :patch: 2
data/firstfm.gemspec ADDED
@@ -0,0 +1,78 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{firstfm}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Aleksandr Lossenko"]
12
+ s.date = %q{2011-06-27}
13
+ s.description = %q{Firstfm is a ruby wrapper for the Last.fm APIs ( http://www.last.fm/api ). My main focus is to import events from Last.FM, but with time I will try to add support for all API methods.}
14
+ s.email = %q{aleksandr.lossenko@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION.yml",
26
+ "firstfm.gemspec",
27
+ "lib/firstfm.rb",
28
+ "lib/firstfm/event.rb",
29
+ "lib/firstfm/geo.rb",
30
+ "lib/firstfm/location.rb",
31
+ "lib/firstfm/venue.rb",
32
+ "test/fixtures/event.xml",
33
+ "test/fixtures/events.xml",
34
+ "test/fixtures/geo_event.xml",
35
+ "test/fixtures/geo_events.xml",
36
+ "test/fixtures/venue.xml",
37
+ "test/fixtures/venues.xml",
38
+ "test/helper.rb",
39
+ "test/test_geo.rb",
40
+ "test/test_venue.rb"
41
+ ]
42
+ s.homepage = %q{http://github.com/egze/firstfm}
43
+ s.licenses = ["MIT"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = %q{1.6.2}
46
+ s.summary = %q{A ruby wrapper for the Last.fm APIs}
47
+
48
+ if s.respond_to? :specification_version then
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
53
+ s.add_runtime_dependency(%q<will_paginate>, [">= 0"])
54
+ s.add_runtime_dependency(%q<active_support>, [">= 0"])
55
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
56
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
57
+ s.add_development_dependency(%q<rcov>, [">= 0"])
58
+ s.add_development_dependency(%q<fakeweb>, [">= 0"])
59
+ else
60
+ s.add_dependency(%q<httparty>, [">= 0"])
61
+ s.add_dependency(%q<will_paginate>, [">= 0"])
62
+ s.add_dependency(%q<active_support>, [">= 0"])
63
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
64
+ s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
65
+ s.add_dependency(%q<rcov>, [">= 0"])
66
+ s.add_dependency(%q<fakeweb>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<httparty>, [">= 0"])
70
+ s.add_dependency(%q<will_paginate>, [">= 0"])
71
+ s.add_dependency(%q<active_support>, [">= 0"])
72
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
73
+ s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
74
+ s.add_dependency(%q<rcov>, [">= 0"])
75
+ s.add_dependency(%q<fakeweb>, [">= 0"])
76
+ end
77
+ end
78
+
data/lib/firstfm.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'yaml'
3
2
  require 'httparty'
4
3
  require 'will_paginate'
@@ -0,0 +1,54 @@
1
+ <lfm status="ok">
2
+ <events venue="Cafe OTO" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
3
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
4
+ <id>1313175</id>
5
+ <title>U.S. Girls</title>
6
+ <artists>
7
+ <artist>U.S. Girls</artist>
8
+ <artist>Time</artist>
9
+ <artist>Heatsick</artist>
10
+ <headliner>U.S. Girls</headliner>
11
+ </artists>
12
+ <venue>
13
+ <id>8908030</id>
14
+ <name>Cafe OTO</name>
15
+ <location>
16
+ <city>London</city>
17
+ <country>United Kingdom</country>
18
+ <street>20 Ashwin St</street>
19
+ <postalcode>E8 3DL</postalcode>
20
+ <geo:point>
21
+ <geo:lat>51.546962</geo:lat>
22
+ <geo:long>-0.074755</geo:long>
23
+ </geo:point>
24
+ </location>
25
+ <url>http://www.last.fm/venue/8908030+Cafe+OTO</url>
26
+ <website>http://www.cafeoto.co.uk</website>
27
+ <phonenumber></phonenumber>
28
+ <image size="small">http://userserve-ak.last.fm/serve/34/6072239.jpg</image>
29
+ <image size="medium">http://userserve-ak.last.fm/serve/64/6072239.jpg</image>
30
+ <image size="large">http://userserve-ak.last.fm/serve/126/6072239.jpg</image>
31
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/6072239.jpg</image>
32
+ <image size="mega">http://userserve-ak.last.fm/serve/_/6072239/Cafe+OTO+url.jpg</image>
33
+ </venue>
34
+ <startDate>Mon, 01 Mar 2010 20:00:00</startDate>
35
+ <description></description>
36
+ <image size="small">http://userserve-ak.last.fm/serve/34/24234939.jpg</image>
37
+ <image size="medium">http://userserve-ak.last.fm/serve/64/24234939.jpg</image>
38
+ <image size="large">http://userserve-ak.last.fm/serve/126/24234939.jpg</image>
39
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/24234939.jpg</image>
40
+ <attendance>47</attendance>
41
+ <reviews>0</reviews>
42
+ <tag>lastfm:event=1313175</tag>
43
+ <url>http://www.last.fm/event/1313175+U.S.+Girls+at+Cafe+OTO+on+1+March+2010</url>
44
+ <website></website>
45
+ <tickets>
46
+ </tickets>
47
+ <cancelled>0</cancelled>
48
+ <tags>
49
+ <tag>psychedelic</tag>
50
+ <tag>experimental</tag>
51
+ </tags>
52
+ </event>
53
+ </events>
54
+ </lfm>
@@ -0,0 +1,128 @@
1
+ <lfm status="ok">
2
+ <events venue="Cafe OTO" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
3
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
4
+ <id>1313175</id>
5
+ <title>U.S. Girls</title>
6
+ <artists>
7
+ <artist>U.S. Girls</artist>
8
+ <artist>Time</artist>
9
+ <artist>Heatsick</artist>
10
+ <headliner>U.S. Girls</headliner>
11
+ </artists>
12
+ <venue>
13
+ <id>8908030</id>
14
+ <name>Cafe OTO</name>
15
+ <location>
16
+ <city>London</city>
17
+ <country>United Kingdom</country>
18
+ <street>20 Ashwin St</street>
19
+ <postalcode>E8 3DL</postalcode>
20
+ <geo:point>
21
+ <geo:lat>51.546962</geo:lat>
22
+ <geo:long>-0.074755</geo:long>
23
+ </geo:point>
24
+ </location>
25
+ <url>http://www.last.fm/venue/8908030+Cafe+OTO</url>
26
+ <website>http://www.cafeoto.co.uk</website>
27
+ <phonenumber></phonenumber>
28
+ <image size="small">http://userserve-ak.last.fm/serve/34/6072239.jpg</image>
29
+ <image size="medium">http://userserve-ak.last.fm/serve/64/6072239.jpg</image>
30
+ <image size="large">http://userserve-ak.last.fm/serve/126/6072239.jpg</image>
31
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/6072239.jpg</image>
32
+ <image size="mega">http://userserve-ak.last.fm/serve/_/6072239/Cafe+OTO+url.jpg</image>
33
+ </venue>
34
+ <startDate>Mon, 01 Mar 2010 20:00:00</startDate>
35
+ <description></description>
36
+ <image size="small">http://userserve-ak.last.fm/serve/34/24234939.jpg</image>
37
+ <image size="medium">http://userserve-ak.last.fm/serve/64/24234939.jpg</image>
38
+ <image size="large">http://userserve-ak.last.fm/serve/126/24234939.jpg</image>
39
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/24234939.jpg</image>
40
+ <attendance>47</attendance>
41
+ <reviews>0</reviews>
42
+ <tag>lastfm:event=1313175</tag>
43
+ <url>http://www.last.fm/event/1313175+U.S.+Girls+at+Cafe+OTO+on+1+March+2010</url>
44
+ <website></website>
45
+ <tickets>
46
+ </tickets>
47
+ <cancelled>0</cancelled>
48
+ <tags>
49
+ <tag>psychedelic</tag>
50
+ <tag>experimental</tag>
51
+ </tags>
52
+ </event>
53
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
54
+ <id>1372916</id>
55
+ <title>Shogun Kunitoki</title>
56
+ <artists>
57
+ <artist>Shogun Kunitoki</artist>
58
+ <headliner>Shogun Kunitoki</headliner>
59
+ </artists>
60
+ <venue>
61
+ <id>8908030</id>
62
+ <name>Cafe OTO</name>
63
+ <location>
64
+ <city>London</city>
65
+ <country>United Kingdom</country>
66
+ <street>20 Ashwin St</street>
67
+ <postalcode>E8 3DL</postalcode>
68
+ <geo:point>
69
+ <geo:lat>51.546962</geo:lat>
70
+ <geo:long>-0.074755</geo:long>
71
+ </geo:point>
72
+ </location>
73
+ <url>http://www.last.fm/venue/8908030+Cafe+OTO</url>
74
+ <website>http://www.cafeoto.co.uk</website>
75
+ <phonenumber></phonenumber>
76
+ <image size="small">http://userserve-ak.last.fm/serve/34/6072239.jpg</image>
77
+ <image size="medium">http://userserve-ak.last.fm/serve/64/6072239.jpg</image>
78
+ <image size="large">http://userserve-ak.last.fm/serve/126/6072239.jpg</image>
79
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/6072239.jpg</image>
80
+ <image size="mega">http://userserve-ak.last.fm/serve/_/6072239/Cafe+OTO+url.jpg</image>
81
+ </venue>
82
+ <startDate>Mon, 08 Mar 2010 20:00:00</startDate>
83
+ <description><![CDATA[><div class="bbcode">Shogun Kunitoki is a quartet from Helsinki with a love of vintage synths and keyboards, oscillators and ring modulators. They have produced two albums of driving and insistent instrumental psychedelic rock that have excited adventurous music fans across the globe with their deft mix of lysergic revivalism and post-rock innovation.<br />
84
+ <br />
85
+ <br />
86
+ <br />
87
+ Debut album Tasankokaiku (2006) was immediately recognized by reviewers and music fans as a compelling cocktail of accessibility and ambitious aspirations where edgy 8-bit bleeps and soft-focus psychedelia shake hands on seven kaleidoscopic trips. Rave reviews gushed forth in The Wire magazine, PopMatters, Stylus Magazine, Exclaim!, Dusted Magazine, and Pitchforkmedia, where it was even tagged as 'recommended'. It was also top of the weekly chart on New York’s WNYU radio station.<br />
88
+ <br />
89
+ <br />
90
+ <br />
91
+ Their second album, Vinonaamakasio (2009) saw Shogun Kunitoki claim full mastery of their somehow nostalgic yet futuristic and unique sound, with a fuller and fatter feel in both performance and production – the sound of a band in full possession of their powers. “There are splinters of Stereolab, bubbles of Broadcast, squeaks straight out of BBC Radiophonic experiments, the heart and soul of The Silver Apples...<br />
92
+ <br />
93
+ <br />
94
+ <br />
95
+ The end result, while oddly familiar, is almost impossibly irresistible. Shogun Kunitoki’s use of crusty analogue instrumentation and that band dynamic injects the project with the human element lacking from so much electronic music. You can hear the band busy at work, shakers rattling, keys being pressed, drums being hit – and it’s all the better for it. I was beginning to think music of this calibre had died out completely. Highly recommended.” Boomkat.com<br />
96
+ <br />
97
+ <br />
98
+ <br />
99
+ Despite the impact of their records, Shogun Kunitoki’s live appearances barely reach double figures, but their music has traveled wider, thanks to the endorsement of numerous music blogs and underground radio DJs in the US and Europe and as far as Australia and Japan. Both band and fervent audience concur that now is very much the time for the Shogun Kunitoki live experience to explode across the UK.<br />
100
+ <br />
101
+ <br />
102
+ <br />
103
+ LINKS<br />
104
+ <br />
105
+ <a href="http://www.shogunkunitoki.com" rel="nofollow">www.shogunkunitoki.com</a><br />
106
+ <br />
107
+ www.myspace/shogunkunitoki</div>]]></description>
108
+ <image size="small">http://userserve-ak.last.fm/serve/34/24848.jpg</image>
109
+ <image size="medium">http://userserve-ak.last.fm/serve/64/24848.jpg</image>
110
+ <image size="large">http://userserve-ak.last.fm/serve/126/24848.jpg</image>
111
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/24848.jpg</image>
112
+ <attendance>24</attendance>
113
+ <reviews>0</reviews>
114
+ <tag>lastfm:event=1372916</tag>
115
+ <url>http://www.last.fm/event/1372916+Shogun+Kunitoki+at+Cafe+OTO+on+8+March+2010</url>
116
+ <website>http://cafeoto.co.uk/ShogunKunitoki.shtm</website>
117
+ <tickets>
118
+ </tickets>
119
+ <cancelled>0</cancelled>
120
+ <tags>
121
+ <tag>finnish</tag>
122
+ <tag>fonal</tag>
123
+ <tag>instrumental</tag>
124
+ <tag>electronic</tag>
125
+ </tags>
126
+ </event>
127
+ </events>
128
+ </lfm>
@@ -0,0 +1,54 @@
1
+ <lfm status="ok">
2
+ <events xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" location="Madrid, Spain" page="1" totalpages="37" total="369">
3
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
4
+ <id>1405068</id>
5
+ <title>Entre Coche</title>
6
+ <artists>
7
+ <artist>ENTRE COCHE Y ANDEN</artist>
8
+ <headliner>ENTRE COCHE Y ANDEN</headliner>
9
+ </artists>
10
+ <venue>
11
+ <id>8791825</id>
12
+ <name>La Boite</name>
13
+ <location>
14
+ <city>Madrid</city>
15
+ <country>Spain</country>
16
+ <street>Tetuán 27</street>
17
+ <postalcode>28013</postalcode>
18
+ <geo:point>
19
+ <geo:lat>40.418162</geo:lat>
20
+ <geo:long>-3.703229</geo:long>
21
+ </geo:point>
22
+ </location>
23
+ <url>http://www.last.fm/venue/8791825+La+Boite</url>
24
+ <website>http://www.boitelive.es</website>
25
+ <phonenumber></phonenumber>
26
+ <image size="small">http://userserve-ak.last.fm/serve/34/5975683.jpg</image>
27
+ <image size="medium">http://userserve-ak.last.fm/serve/64/5975683.jpg</image>
28
+ <image size="large">http://userserve-ak.last.fm/serve/126/5975683.jpg</image>
29
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/5975683.jpg</image>
30
+ <image size="mega">http://userserve-ak.last.fm/serve/500/5975683/La+Boite+0001.jpg</image>
31
+ </venue>
32
+ <startDate>Wed, 10 Mar 2010 21:30:00</startDate>
33
+ <description><![CDATA[><div class="bbcode">apertura puertas. 21,30 h<br />
34
+ ENTRE COCHE Y ANDEN<br />
35
+ Presentacion de EP &quot; la fascinante aventura de vivir&quot;<br />
36
+ <a href="http://www.myspace.com/entrecocheyanden" rel="nofollow">http://www.myspace.com/entrecocheyanden</a><br />
37
+ Dj y artistas invitados<br />
38
+ anticipadas: 10€ ( disco incluido) en Escridiscos ,Tipo Rosa Negra o escribiendo <a href="mailto:info@entrecocheyanden.com">info@entrecocheyanden.com</a><br />
39
+ taquilla: 12€ ( disco incluido)</div>]]></description>
40
+ <image size="small"></image>
41
+ <image size="medium"></image>
42
+ <image size="large"></image>
43
+ <image size="extralarge"></image>
44
+ <attendance>3</attendance>
45
+ <reviews>0</reviews>
46
+ <tag>lastfm:event=1405068</tag>
47
+ <url>http://www.last.fm/event/1405068+Entre+Coche+y+And%C3%A9n%3A+%22La+fascinante+aventura+de+vivir%22+EP+Presentaci%C3%B3n</url>
48
+ <website>http://www.myspace.com/entrecocheyanden</website>
49
+ <tickets>
50
+ </tickets>
51
+ <cancelled>0</cancelled>
52
+ </event>
53
+ </events>
54
+ </lfm>
@@ -0,0 +1,109 @@
1
+ <lfm status="ok">
2
+ <events xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" location="Madrid, Spain" page="1" totalpages="37" total="369">
3
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
4
+ <id>1405068</id>
5
+ <title>Entre Coche</title>
6
+ <artists>
7
+ <artist>ENTRE COCHE Y ANDEN</artist>
8
+ <headliner>ENTRE COCHE Y ANDEN</headliner>
9
+ </artists>
10
+ <venue>
11
+ <id>8791825</id>
12
+ <name>La Boite</name>
13
+ <location>
14
+ <city>Madrid</city>
15
+ <country>Spain</country>
16
+ <street>Tetuán 27</street>
17
+ <postalcode>28013</postalcode>
18
+ <geo:point>
19
+ <geo:lat>40.418162</geo:lat>
20
+ <geo:long>-3.703229</geo:long>
21
+ </geo:point>
22
+ </location>
23
+ <url>http://www.last.fm/venue/8791825+La+Boite</url>
24
+ <website>http://www.boitelive.es</website>
25
+ <phonenumber></phonenumber>
26
+ <image size="small">http://userserve-ak.last.fm/serve/34/5975683.jpg</image>
27
+ <image size="medium">http://userserve-ak.last.fm/serve/64/5975683.jpg</image>
28
+ <image size="large">http://userserve-ak.last.fm/serve/126/5975683.jpg</image>
29
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/5975683.jpg</image>
30
+ <image size="mega">http://userserve-ak.last.fm/serve/500/5975683/La+Boite+0001.jpg</image>
31
+ </venue>
32
+ <startDate>Wed, 10 Mar 2010 21:30:00</startDate>
33
+ <description><![CDATA[><div class="bbcode">apertura puertas. 21,30 h<br />
34
+ ENTRE COCHE Y ANDEN<br />
35
+ Presentacion de EP &quot; la fascinante aventura de vivir&quot;<br />
36
+ <a href="http://www.myspace.com/entrecocheyanden" rel="nofollow">http://www.myspace.com/entrecocheyanden</a><br />
37
+ Dj y artistas invitados<br />
38
+ anticipadas: 10€ ( disco incluido) en Escridiscos ,Tipo Rosa Negra o escribiendo <a href="mailto:info@entrecocheyanden.com">info@entrecocheyanden.com</a><br />
39
+ taquilla: 12€ ( disco incluido)</div>]]></description>
40
+ <image size="small"></image>
41
+ <image size="medium"></image>
42
+ <image size="large"></image>
43
+ <image size="extralarge"></image>
44
+ <attendance>3</attendance>
45
+ <reviews>0</reviews>
46
+ <tag>lastfm:event=1405068</tag>
47
+ <url>http://www.last.fm/event/1405068+Entre+Coche+y+And%C3%A9n%3A+%22La+fascinante+aventura+de+vivir%22+EP+Presentaci%C3%B3n</url>
48
+ <website>http://www.myspace.com/entrecocheyanden</website>
49
+ <tickets>
50
+ </tickets>
51
+ <cancelled>0</cancelled>
52
+ </event>
53
+ <event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
54
+ <id>1443807</id>
55
+ <title>Bonafide</title>
56
+ <artists>
57
+ <artist>Bonafide</artist>
58
+ <artist>Still Nasty</artist>
59
+ <headliner>Bonafide</headliner>
60
+ </artists>
61
+ <venue>
62
+ <id>8783854</id>
63
+ <name>Ritmo y Compás</name>
64
+ <location>
65
+ <city>Madrid</city>
66
+ <country>Spain</country>
67
+ <street>Conde de Vilches 22</street>
68
+ <postalcode>28028</postalcode>
69
+ <geo:point>
70
+ <geo:lat>40.437547</geo:lat>
71
+ <geo:long>-3.669715</geo:long>
72
+ </geo:point>
73
+ </location>
74
+ <url>http://www.last.fm/venue/8783854+Ritmo+y+Comp%C3%A1s</url>
75
+ <website>http://www.ritmoycompas.com/</website>
76
+ <phonenumber></phonenumber>
77
+ <image size="small">http://userserve-ak.last.fm/serve/34/384925.jpg</image>
78
+ <image size="medium">http://userserve-ak.last.fm/serve/64/384925.jpg</image>
79
+ <image size="large">http://userserve-ak.last.fm/serve/126/384925.jpg</image>
80
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/384925.jpg</image>
81
+ <image size="mega">http://userserve-ak.last.fm/serve/_/384925/Ritmo+y+Comps.jpg</image>
82
+ </venue>
83
+ <startDate>Wed, 10 Mar 2010 21:30:00</startDate>
84
+ <description><![CDATA[><div class="bbcode">Bonafide + Still Nasty<br />
85
+ Miércoles 10 de marzo de 2010<br />
86
+ Ritmo &amp; Compás<br />
87
+ Madrid<br />
88
+ 21:00<br />
89
+ 10€ anticipada en TicketMaster<br />
90
+ 12€ taquilla</div>]]></description>
91
+ <image size="small">http://userserve-ak.last.fm/serve/34/39050457.jpg</image>
92
+ <image size="medium">http://userserve-ak.last.fm/serve/64/39050457.jpg</image>
93
+ <image size="large">http://userserve-ak.last.fm/serve/126/39050457.jpg</image>
94
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/39050457.jpg</image>
95
+ <attendance>1</attendance>
96
+ <reviews>0</reviews>
97
+ <tag>lastfm:event=1443807</tag>
98
+ <url>http://www.last.fm/event/1443807+Bonafide+at+Ritmo+y+Comp%C3%A1s+on+10+March+2010</url>
99
+ <website></website>
100
+ <tickets>
101
+ </tickets>
102
+ <cancelled>0</cancelled>
103
+ <tags>
104
+ <tag>blues rock</tag>
105
+ <tag>hard rock</tag>
106
+ </tags>
107
+ </event>
108
+ </events>
109
+ </lfm>
@@ -0,0 +1,32 @@
1
+ <lfm status="ok">
2
+ <results for="arena" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
3
+ <opensearch:Query role="request" searchTerms="arena" startPage="1" />
4
+ <opensearch:totalResults>1</opensearch:totalResults>
5
+ <opensearch:startIndex>0</opensearch:startIndex>
6
+ <opensearch:itemsPerPage>50</opensearch:itemsPerPage>
7
+ <venuematches>
8
+ <venue>
9
+ <id>8778545</id>
10
+ <name>Arena</name>
11
+ <location>
12
+ <city>Wien</city>
13
+ <country>Austria</country>
14
+ <street>Baumgasse 80</street>
15
+ <postalcode>1030</postalcode>
16
+ <geo:point>
17
+ <geo:lat>48.187523</geo:lat>
18
+ <geo:long>16.413379</geo:long>
19
+ </geo:point>
20
+ </location>
21
+ <url>http://www.last.fm/venue/8778545+Arena</url>
22
+ <website>http://www.arena.co.at</website>
23
+ <phonenumber></phonenumber>
24
+ <image size="small">http://userserve-ak.last.fm/serve/34/2149974.jpg</image>
25
+ <image size="medium">http://userserve-ak.last.fm/serve/64/2149974.jpg</image>
26
+ <image size="large">http://userserve-ak.last.fm/serve/126/2149974.jpg</image>
27
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/2149974.jpg</image>
28
+ <image size="mega">http://userserve-ak.last.fm/serve/_/2149974/Arena.jpg</image>
29
+ </venue>
30
+ </venuematches>
31
+ </results>
32
+ </lfm>
@@ -0,0 +1,54 @@
1
+ <lfm status="ok">
2
+ <results for="arena" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
3
+ <opensearch:Query role="request" searchTerms="arena" startPage="1" />
4
+ <opensearch:totalResults>2</opensearch:totalResults>
5
+ <opensearch:startIndex>0</opensearch:startIndex>
6
+ <opensearch:itemsPerPage>50</opensearch:itemsPerPage>
7
+ <venuematches>
8
+ <venue>
9
+ <id>8778545</id>
10
+ <name>Arena</name>
11
+ <location>
12
+ <city>Wien</city>
13
+ <country>Austria</country>
14
+ <street>Baumgasse 80</street>
15
+ <postalcode>1030</postalcode>
16
+ <geo:point>
17
+ <geo:lat>48.187523</geo:lat>
18
+ <geo:long>16.413379</geo:long>
19
+ </geo:point>
20
+ </location>
21
+ <url>http://www.last.fm/venue/8778545+Arena</url>
22
+ <website>http://www.arena.co.at</website>
23
+ <phonenumber></phonenumber>
24
+ <image size="small">http://userserve-ak.last.fm/serve/34/2149974.jpg</image>
25
+ <image size="medium">http://userserve-ak.last.fm/serve/64/2149974.jpg</image>
26
+ <image size="large">http://userserve-ak.last.fm/serve/126/2149974.jpg</image>
27
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/2149974.jpg</image>
28
+ <image size="mega">http://userserve-ak.last.fm/serve/_/2149974/Arena.jpg</image>
29
+ </venue>
30
+ <venue>
31
+ <id>8781374</id>
32
+ <name>Kuruçeşme Arena</name>
33
+ <location>
34
+ <city>İstanbul</city>
35
+ <country>Turkey</country>
36
+ <street></street>
37
+ <postalcode></postalcode>
38
+ <geo:point>
39
+ <geo:lat>41.056222</geo:lat>
40
+ <geo:long>29.035388</geo:long>
41
+ </geo:point>
42
+ </location>
43
+ <url>http://www.last.fm/venue/8781374+Kuru%C3%A7e%C5%9Fme+Arena</url>
44
+ <website></website>
45
+ <phonenumber></phonenumber>
46
+ <image size="small">http://userserve-ak.last.fm/serve/34/573501.jpg</image>
47
+ <image size="medium">http://userserve-ak.last.fm/serve/64/573501.jpg</image>
48
+ <image size="large">http://userserve-ak.last.fm/serve/126/573501.jpg</image>
49
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/573501.jpg</image>
50
+ <image size="mega">http://userserve-ak.last.fm/serve/500/573501/Kurueme+Arena.jpg</image>
51
+ </venue>
52
+ </venuematches>
53
+ </results>
54
+ </lfm>
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'fakeweb'
4
+ begin
5
+ Bundler.setup(:default, :development)
6
+ rescue Bundler::BundlerError => e
7
+ $stderr.puts e.message
8
+ $stderr.puts "Run `bundle install` to install missing gems"
9
+ exit e.status_code
10
+ end
11
+ require 'test/unit'
12
+
13
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
14
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
15
+ require 'firstfm'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -1,9 +1,9 @@
1
- require File.dirname(__FILE__) + '/../test_helper.rb'
1
+ require 'helper'
2
2
 
3
- class GeoTest < Test::Unit::TestCase
3
+ class TestGeo < Test::Unit::TestCase
4
4
 
5
5
  def test_should_get_events
6
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/geo_events.xml"))
6
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/geo_events.xml"))
7
7
  events = Firstfm::Geo.get_events
8
8
  assert_equal 2, events.size
9
9
 
@@ -19,7 +19,7 @@ class GeoTest < Test::Unit::TestCase
19
19
  end
20
20
 
21
21
  def test_should_get_events_with_one_event_as_result
22
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/geo_event.xml"))
22
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/geo_event.xml"))
23
23
  events = Firstfm::Geo.get_events
24
24
  assert_equal 1, events.size
25
25
 
@@ -1,9 +1,9 @@
1
- require File.dirname(__FILE__) + '/../test_helper.rb'
1
+ require 'helper'
2
2
 
3
- class VenueTest < Test::Unit::TestCase
3
+ class TestVenue < Test::Unit::TestCase
4
4
 
5
5
  def test_should_search_venues
6
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/venues.xml"))
6
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/venues.xml"))
7
7
  venues = Firstfm::Venue.search("arena")
8
8
  assert_equal 2, venues.size
9
9
  venue = venues.first
@@ -15,7 +15,7 @@ class VenueTest < Test::Unit::TestCase
15
15
  end
16
16
 
17
17
  def test_should_search_venues_with_one_venue_as_result
18
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/venue.xml"))
18
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/venue.xml"))
19
19
  venues = Firstfm::Venue.search("arena")
20
20
  assert_equal 1, venues.size
21
21
  venue = venues.first
@@ -25,7 +25,7 @@ class VenueTest < Test::Unit::TestCase
25
25
  end
26
26
 
27
27
  def test_should_get_events
28
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/events.xml"))
28
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/events.xml"))
29
29
  events = Firstfm::Venue.get_events(8908030)
30
30
  assert_equal 2, events.size
31
31
 
@@ -41,7 +41,7 @@ class VenueTest < Test::Unit::TestCase
41
41
  end
42
42
 
43
43
  def test_should_get_events_with_one_event_as_result
44
- FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/event.xml"))
44
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/event.xml"))
45
45
  events = Firstfm::Venue.get_events(8908030)
46
46
  assert_equal 1, events.size
47
47
 
@@ -51,4 +51,21 @@ class VenueTest < Test::Unit::TestCase
51
51
  assert_equal "Cafe OTO", event.venue.name
52
52
  end
53
53
 
54
+ def test_should_get_events_from_single_venue
55
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/venue.xml"))
56
+ venues = Firstfm::Venue.search("arena")
57
+ venue = venues.first
58
+ venue.id = 8908030
59
+
60
+ FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/event.xml"))
61
+
62
+ events = venue.get_events
63
+ assert_equal 1, events.size
64
+
65
+ event = events.first
66
+ assert_equal "U.S. Girls", event.title
67
+ assert_equal "1313175", event.id
68
+ assert_equal "Cafe OTO", event.venue.name
69
+ end
70
+
54
71
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firstfm
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 27
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 1
9
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Aleksandr Lossenko
@@ -14,83 +15,175 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-10 00:00:00 +01:00
18
+ date: 2011-06-27 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ name: httparty
32
+ type: :runtime
33
+ prerelease: false
34
+ requirement: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
21
45
  name: will_paginate
46
+ type: :runtime
22
47
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
48
+ requirement: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ none: false
24
52
  requirements:
25
53
  - - ">="
26
54
  - !ruby/object:Gem::Version
55
+ hash: 3
27
56
  segments:
28
- - 2
29
- - 3
30
- - 12
31
- version: 2.3.12
57
+ - 0
58
+ version: "0"
59
+ name: active_support
32
60
  type: :runtime
33
- version_requirements: *id001
61
+ prerelease: false
62
+ requirement: *id003
34
63
  - !ruby/object:Gem::Dependency
35
- name: httparty
64
+ version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ hash: 23
70
+ segments:
71
+ - 1
72
+ - 0
73
+ - 0
74
+ version: 1.0.0
75
+ name: bundler
76
+ type: :development
77
+ prerelease: false
78
+ requirement: *id004
79
+ - !ruby/object:Gem::Dependency
80
+ version_requirements: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ hash: 11
86
+ segments:
87
+ - 1
88
+ - 6
89
+ - 2
90
+ version: 1.6.2
91
+ name: jeweler
92
+ type: :development
36
93
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
94
+ requirement: *id005
95
+ - !ruby/object:Gem::Dependency
96
+ version_requirements: &id006 !ruby/object:Gem::Requirement
97
+ none: false
38
98
  requirements:
39
99
  - - ">="
40
100
  - !ruby/object:Gem::Version
101
+ hash: 3
41
102
  segments:
42
103
  - 0
43
- - 5
44
- - 2
45
- version: 0.5.2
46
- type: :runtime
47
- version_requirements: *id002
104
+ version: "0"
105
+ name: rcov
106
+ type: :development
107
+ prerelease: false
108
+ requirement: *id006
109
+ - !ruby/object:Gem::Dependency
110
+ version_requirements: &id007 !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ hash: 3
116
+ segments:
117
+ - 0
118
+ version: "0"
119
+ name: fakeweb
120
+ type: :development
121
+ prerelease: false
122
+ requirement: *id007
48
123
  description: Firstfm is a ruby wrapper for the Last.fm APIs ( http://www.last.fm/api ). My main focus is to import events from Last.FM, but with time I will try to add support for all API methods.
49
- email: aleksandr @nospam@ cligs.ee
124
+ email: aleksandr.lossenko@gmail.com
50
125
  executables: []
51
126
 
52
127
  extensions: []
53
128
 
54
129
  extra_rdoc_files:
130
+ - LICENSE.txt
55
131
  - README.rdoc
56
132
  files:
133
+ - Gemfile
134
+ - Gemfile.lock
135
+ - LICENSE.txt
136
+ - README.rdoc
137
+ - Rakefile
138
+ - VERSION.yml
139
+ - firstfm.gemspec
57
140
  - lib/firstfm.rb
58
141
  - lib/firstfm/event.rb
59
142
  - lib/firstfm/geo.rb
60
143
  - lib/firstfm/location.rb
61
144
  - lib/firstfm/venue.rb
62
- - README.rdoc
145
+ - test/fixtures/event.xml
146
+ - test/fixtures/events.xml
147
+ - test/fixtures/geo_event.xml
148
+ - test/fixtures/geo_events.xml
149
+ - test/fixtures/venue.xml
150
+ - test/fixtures/venues.xml
151
+ - test/helper.rb
152
+ - test/test_geo.rb
153
+ - test/test_venue.rb
63
154
  has_rdoc: true
64
155
  homepage: http://github.com/egze/firstfm
65
- licenses: []
66
-
156
+ licenses:
157
+ - MIT
67
158
  post_install_message:
68
- rdoc_options:
69
- - --charset=UTF-8
159
+ rdoc_options: []
160
+
70
161
  require_paths:
71
162
  - lib
72
163
  required_ruby_version: !ruby/object:Gem::Requirement
164
+ none: false
73
165
  requirements:
74
166
  - - ">="
75
167
  - !ruby/object:Gem::Version
168
+ hash: 3
76
169
  segments:
77
170
  - 0
78
171
  version: "0"
79
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
+ none: false
80
174
  requirements:
81
175
  - - ">="
82
176
  - !ruby/object:Gem::Version
177
+ hash: 3
83
178
  segments:
84
179
  - 0
85
180
  version: "0"
86
181
  requirements: []
87
182
 
88
183
  rubyforge_project:
89
- rubygems_version: 1.3.6
184
+ rubygems_version: 1.6.2
90
185
  signing_key:
91
186
  specification_version: 3
92
187
  summary: A ruby wrapper for the Last.fm APIs
93
- test_files:
94
- - test/test_helper.rb
95
- - test/unit/geo_test.rb
96
- - test/unit/venue_test.rb
188
+ test_files: []
189
+
data/test/test_helper.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'fakeweb'
4
- require File.dirname(__FILE__) + '/../lib/firstfm'