songkickr 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -2
- data/Gemfile.lock +32 -10
- data/README.rdoc +7 -7
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/autospec +16 -0
- data/bin/convert_to_should_syntax +16 -0
- data/bin/guard +16 -0
- data/bin/htmldiff +16 -0
- data/bin/httparty +16 -0
- data/bin/jeweler +16 -0
- data/bin/ldiff +16 -0
- data/bin/rake +16 -0
- data/bin/rake2thor +16 -0
- data/bin/rg +16 -0
- data/bin/ri +16 -0
- data/bin/rspec +16 -0
- data/bin/thor +16 -0
- data/doc/APIError.html +241 -0
- data/doc/APIKeyNotSet.html +164 -175
- data/doc/LICENSE.html +109 -109
- data/doc/README_rdoc.html +120 -117
- data/doc/ResourceNotFound.html +203 -0
- data/doc/Songkickr/Artist.html +210 -237
- data/doc/Songkickr/ArtistResult.html +228 -254
- data/doc/Songkickr/ConcertSetlistResult.html +205 -223
- data/doc/Songkickr/Event.html +344 -409
- data/doc/Songkickr/EventResult.html +226 -252
- data/doc/Songkickr/Location.html +210 -237
- data/doc/Songkickr/LocationResult.html +229 -255
- data/doc/Songkickr/Performance.html +222 -253
- data/doc/Songkickr/Remote.html +630 -481
- data/doc/Songkickr/Setlist.html +258 -296
- data/doc/Songkickr/SetlistItem.html +187 -206
- data/doc/Songkickr/Venue.html +205 -232
- data/doc/Songkickr.html +204 -271
- data/doc/created.rid +16 -16
- data/doc/images/add.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/index.html +93 -127
- data/doc/js/darkfish.js +99 -62
- data/doc/js/jquery.js +15 -29
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +119 -339
- data/doc/table_of_contents.html +185 -0
- data/lib/songkickr/artist.rb +3 -3
- data/lib/songkickr/remote.rb +36 -13
- data/lib/songkickr.rb +16 -2
- data/songkickr.gemspec +121 -4
- data/test/fixtures/vcr/invalid_api_key.yml +63 -0
- data/test/fixtures/vcr/invalid_event_id.yml +33 -0
- data/test/fixtures/vcr/invalid_user.yml +32 -0
- data/test/fixtures/vcr/invalid_venue_id.yml +33 -0
- data/test/fixtures/vcr/valid_event.yml +52 -0
- data/test/fixtures/vcr/valid_user.yml +71 -0
- data/test/fixtures/vcr/valid_venue.yml +53 -0
- data/test/helper.rb +2 -2
- data/test/songkickr/test_remote.rb +68 -24
- data/test/vcr_helper.rb +7 -0
- data/test.rb +2 -2
- metadata +626 -40
data/doc/index.html
CHANGED
@@ -1,144 +1,110 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
1
|
+
<!DOCTYPE html>
|
4
2
|
|
5
|
-
<html
|
3
|
+
<html>
|
6
4
|
<head>
|
7
|
-
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
8
6
|
|
9
|
-
|
7
|
+
<title>RDoc Documentation</title>
|
10
8
|
|
11
|
-
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
17
14
|
|
18
|
-
|
19
|
-
<
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
20
21
|
|
21
|
-
|
22
|
-
<h1>RDoc Documentation</h1>
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
<body>
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="./index.html">Home</a>
|
28
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
27
41
|
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="project-metadata">
|
47
|
+
<nav id="fileindex-section" class="section project-section">
|
48
|
+
<h3 class="section-header">Pages</h3>
|
49
|
+
|
50
|
+
<ul>
|
28
51
|
|
52
|
+
<li class="file"><a href="./LICENSE.html">LICENSE</a>
|
29
53
|
|
30
|
-
|
31
|
-
<ul>
|
32
|
-
|
33
|
-
<li class="file"><a href="LICENSE.html">LICENSE</a></li>
|
34
|
-
|
35
|
-
<li class="file"><a href="README_rdoc.html">README.rdoc</a></li>
|
36
|
-
|
37
|
-
</ul>
|
54
|
+
<li class="file"><a href="./README_rdoc.html">README</a>
|
38
55
|
|
39
|
-
|
40
|
-
<h2 id="classes">Classes/Modules</h2>
|
41
|
-
<ul>
|
42
|
-
|
43
|
-
<li class="module"><a href="Songkickr.html">Songkickr</a></li>
|
44
|
-
|
45
|
-
<li class="class"><a href="Songkickr/Artist.html">Songkickr::Artist</a></li>
|
46
|
-
|
47
|
-
<li class="class"><a href="Songkickr/ArtistResult.html">Songkickr::ArtistResult</a></li>
|
48
|
-
|
49
|
-
<li class="class"><a href="Songkickr/ConcertSetlistResult.html">Songkickr::ConcertSetlistResult</a></li>
|
50
|
-
|
51
|
-
<li class="class"><a href="Songkickr/Event.html">Songkickr::Event</a></li>
|
52
|
-
|
53
|
-
<li class="class"><a href="Songkickr/EventResult.html">Songkickr::EventResult</a></li>
|
54
|
-
|
55
|
-
<li class="class"><a href="Songkickr/Location.html">Songkickr::Location</a></li>
|
56
|
-
|
57
|
-
<li class="class"><a href="Songkickr/LocationResult.html">Songkickr::LocationResult</a></li>
|
58
|
-
|
59
|
-
<li class="class"><a href="Songkickr/Performance.html">Songkickr::Performance</a></li>
|
60
|
-
|
61
|
-
<li class="class"><a href="Songkickr/Remote.html">Songkickr::Remote</a></li>
|
62
|
-
|
63
|
-
<li class="class"><a href="Songkickr/Setlist.html">Songkickr::Setlist</a></li>
|
64
|
-
|
65
|
-
<li class="class"><a href="Songkickr/SetlistItem.html">Songkickr::SetlistItem</a></li>
|
66
|
-
|
67
|
-
<li class="class"><a href="Songkickr/Venue.html">Songkickr::Venue</a></li>
|
68
|
-
|
69
|
-
<li class="class"><a href="APIKeyNotSet.html">APIKeyNotSet</a></li>
|
70
|
-
|
71
56
|
</ul>
|
57
|
+
</nav>
|
72
58
|
|
73
|
-
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<li><a href="Songkickr/Remote.html#method-i-events">#events — Songkickr::Remote</a></li>
|
111
|
-
|
112
|
-
<li><a href="Songkickr/Remote.html#method-i-gigography">#gigography — Songkickr::Remote</a></li>
|
113
|
-
|
114
|
-
<li><a href="Songkickr/Remote.html#method-i-location_search">#location_search — Songkickr::Remote</a></li>
|
115
|
-
|
116
|
-
<li><a href="Songkickr/Remote.html#method-i-metro_areas_events">#metro_areas_events — Songkickr::Remote</a></li>
|
117
|
-
|
118
|
-
<li><a href="Songkickr/Event.html#method-i-parse_performance">#parse_performance — Songkickr::Event</a></li>
|
119
|
-
|
120
|
-
<li><a href="Songkickr/EventResult.html#method-i-parse_results">#parse_results — Songkickr::EventResult</a></li>
|
121
|
-
|
122
|
-
<li><a href="Songkickr/ArtistResult.html#method-i-parse_results">#parse_results — Songkickr::ArtistResult</a></li>
|
123
|
-
|
124
|
-
<li><a href="Songkickr/LocationResult.html#method-i-parse_results">#parse_results — Songkickr::LocationResult</a></li>
|
125
|
-
|
126
|
-
<li><a href="Songkickr/ConcertSetlistResult.html#method-i-parse_results">#parse_results — Songkickr::ConcertSetlistResult</a></li>
|
127
|
-
|
128
|
-
<li><a href="Songkickr/Setlist.html#method-i-parse_setlist_items">#parse_setlist_items — Songkickr::Setlist</a></li>
|
129
|
-
|
130
|
-
<li><a href="Songkickr/Event.html#method-i-start_hash_to_datetime">#start_hash_to_datetime — Songkickr::Event</a></li>
|
131
|
-
|
132
|
-
<li><a href="APIKeyNotSet.html#method-i-to_s">#to_s — APIKeyNotSet</a></li>
|
133
|
-
|
134
|
-
<li><a href="Songkickr/Remote.html#method-i-users_events">#users_events — Songkickr::Remote</a></li>
|
135
|
-
|
59
|
+
<nav id="classindex-section" class="section project-section">
|
60
|
+
<h3 class="section-header">Class and Module Index</h3>
|
61
|
+
|
62
|
+
<ul class="link-list">
|
63
|
+
|
64
|
+
<li><a href="./Songkickr.html">Songkickr</a>
|
65
|
+
|
66
|
+
<li><a href="./Songkickr/Artist.html">Songkickr::Artist</a>
|
67
|
+
|
68
|
+
<li><a href="./Songkickr/ArtistResult.html">Songkickr::ArtistResult</a>
|
69
|
+
|
70
|
+
<li><a href="./Songkickr/ConcertSetlistResult.html">Songkickr::ConcertSetlistResult</a>
|
71
|
+
|
72
|
+
<li><a href="./Songkickr/Event.html">Songkickr::Event</a>
|
73
|
+
|
74
|
+
<li><a href="./Songkickr/EventResult.html">Songkickr::EventResult</a>
|
75
|
+
|
76
|
+
<li><a href="./Songkickr/Location.html">Songkickr::Location</a>
|
77
|
+
|
78
|
+
<li><a href="./Songkickr/LocationResult.html">Songkickr::LocationResult</a>
|
79
|
+
|
80
|
+
<li><a href="./Songkickr/Performance.html">Songkickr::Performance</a>
|
81
|
+
|
82
|
+
<li><a href="./Songkickr/Remote.html">Songkickr::Remote</a>
|
83
|
+
|
84
|
+
<li><a href="./Songkickr/Setlist.html">Songkickr::Setlist</a>
|
85
|
+
|
86
|
+
<li><a href="./Songkickr/SetlistItem.html">Songkickr::SetlistItem</a>
|
87
|
+
|
88
|
+
<li><a href="./Songkickr/Venue.html">Songkickr::Venue</a>
|
89
|
+
|
90
|
+
<li><a href="./APIError.html">APIError</a>
|
91
|
+
|
92
|
+
<li><a href="./APIKeyNotSet.html">APIKeyNotSet</a>
|
93
|
+
|
94
|
+
<li><a href="./ResourceNotFound.html">ResourceNotFound</a>
|
95
|
+
|
136
96
|
</ul>
|
97
|
+
</nav>
|
137
98
|
|
138
|
-
<div id="validator-badges">
|
139
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
140
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
141
|
-
Rdoc Generator</a> 2</small>.</p>
|
142
99
|
</div>
|
143
|
-
</
|
144
|
-
|
100
|
+
</nav>
|
101
|
+
|
102
|
+
<p>This is the API documentation for RDoc Documentation.
|
103
|
+
|
104
|
+
|
105
|
+
<footer id="validator-badges">
|
106
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
107
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
108
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
109
|
+
</footer>
|
110
|
+
|
data/doc/js/darkfish.js
CHANGED
@@ -9,12 +9,12 @@
|
|
9
9
|
|
10
10
|
/* Provide console simulation for firebug-less environments */
|
11
11
|
if (!("console" in window) || !("firebug" in console)) {
|
12
|
-
|
12
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
13
|
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
window.console = {};
|
16
|
+
for (var i = 0; i < names.length; ++i)
|
17
|
+
window.console[names[i]] = function() {};
|
18
18
|
};
|
19
19
|
|
20
20
|
|
@@ -23,94 +23,131 @@ if (!("console" in window) || !("firebug" in console)) {
|
|
23
23
|
*/
|
24
24
|
$.fn.unwrap = function( expr ) {
|
25
25
|
return this.each( function() {
|
26
|
-
|
26
|
+
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
27
|
});
|
28
28
|
};
|
29
29
|
|
30
30
|
|
31
31
|
function showSource( e ) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
32
|
+
var target = e.target;
|
33
|
+
var codeSections = $(target).
|
34
|
+
parents('.method-detail').
|
35
|
+
find('.method-source-code');
|
36
|
+
|
37
|
+
$(target).
|
38
|
+
parents('.method-detail').
|
39
|
+
find('.method-source-code').
|
40
|
+
slideToggle();
|
41
41
|
};
|
42
42
|
|
43
43
|
function hookSourceViews() {
|
44
|
-
|
44
|
+
$('.method-heading').click( showSource );
|
45
45
|
};
|
46
46
|
|
47
47
|
function toggleDebuggingSection() {
|
48
|
-
|
48
|
+
$('.debugging-section').slideToggle();
|
49
49
|
};
|
50
50
|
|
51
51
|
function hookDebuggingToggle() {
|
52
|
-
|
52
|
+
$('#debugging-toggle img').click( toggleDebuggingSection );
|
53
53
|
};
|
54
54
|
|
55
|
-
function
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
55
|
+
function hookTableOfContentsToggle() {
|
56
|
+
$('.indexpage li .toc-toggle').each( function() {
|
57
|
+
$(this).click( function() {
|
58
|
+
$(this).toggleClass('open');
|
59
|
+
});
|
60
|
+
|
61
|
+
var section = $(this).next();
|
62
|
+
|
63
|
+
$(this).click( function() {
|
64
|
+
section.slideToggle();
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
function hookSearch() {
|
70
|
+
var input = $('#search-field').eq(0);
|
71
|
+
var result = $('#search-results').eq(0);
|
72
|
+
$(result).show();
|
73
|
+
|
74
|
+
var search_section = $('#search-section').get(0);
|
75
|
+
$(search_section).show();
|
76
|
+
|
77
|
+
var search = new Search(search_data, input, result);
|
78
|
+
|
79
|
+
search.renderItem = function(result) {
|
80
|
+
var li = document.createElement('li');
|
81
|
+
var html = '';
|
82
|
+
|
83
|
+
// TODO add relative path to <script> per-page
|
84
|
+
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
|
85
|
+
if (result.params)
|
86
|
+
html += '<span class="params">' + result.params + '</span>';
|
87
|
+
html += '</a>';
|
88
|
+
|
89
|
+
|
90
|
+
if (result.namespace)
|
91
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
92
|
+
|
93
|
+
if (result.snippet)
|
94
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
95
|
+
|
96
|
+
li.innerHTML = html;
|
97
|
+
|
98
|
+
return li;
|
99
|
+
}
|
100
|
+
|
101
|
+
search.select = function(result) {
|
102
|
+
var result_element = result.get(0);
|
103
|
+
window.location.href = result_element.firstChild.firstChild.href;
|
104
|
+
}
|
105
|
+
|
106
|
+
search.scrollIntoView = search.scrollInWindow;
|
71
107
|
};
|
72
108
|
|
73
109
|
function highlightTarget( anchor ) {
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
110
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
111
|
+
|
112
|
+
$("a[name=" + anchor + "]").each( function() {
|
113
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
114
|
+
console.debug( "Wrapping the target-section" );
|
115
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
116
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
117
|
+
} else {
|
118
|
+
console.debug( "Already wrapped." );
|
119
|
+
}
|
120
|
+
});
|
85
121
|
};
|
86
122
|
|
87
123
|
function highlightLocationTarget() {
|
88
|
-
|
89
|
-
|
124
|
+
console.debug( "Location hash: %s", window.location.hash );
|
125
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
90
126
|
|
91
|
-
|
92
|
-
|
127
|
+
var anchor = window.location.hash.substring(1);
|
128
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
93
129
|
|
94
|
-
|
130
|
+
highlightTarget( anchor );
|
95
131
|
};
|
96
132
|
|
97
133
|
function highlightClickTarget( event ) {
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
134
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
135
|
+
try {
|
136
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
137
|
+
console.debug( "Found target anchor: %s", anchor );
|
138
|
+
highlightTarget( anchor );
|
139
|
+
} catch ( err ) {
|
140
|
+
console.error( "Exception while highlighting: %o", err );
|
141
|
+
};
|
106
142
|
};
|
107
143
|
|
108
144
|
|
109
145
|
$(document).ready( function() {
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
146
|
+
hookSourceViews();
|
147
|
+
hookDebuggingToggle();
|
148
|
+
hookSearch();
|
149
|
+
highlightLocationTarget();
|
150
|
+
hookTableOfContentsToggle();
|
114
151
|
|
115
|
-
|
152
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
116
153
|
});
|