isrc 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +1 -0
- data/README.md +7 -0
- data/lib/isrc.rb +37 -28
- data/lib/isrc/version.rb +1 -1
- data/spec/isrc_spec.rb +44 -2
- data/spec/mocks/ajax.html +2 -0
- data/spec/mocks/main.html +62 -0
- data/spec/spec_helper.rb +2 -6
- metadata +24 -32
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjRhOTMyZWJiMzZiNjg5YzVjYTNjNTgzYzk5MTZjMjEyOGM4Njc3Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZmRiYTg5YWQzYTg4OWIzNzU5NDI3YTU5YmQ3OTA5MWVmZWZlMDRkNg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTk2NDcwMjBlYzIxMmRiM2FjODY0MzNmNGJkODBjZGExYzY3MzJhNjNlNTUx
|
10
|
+
OGRlMWU3ZTE5MjM3OWNhNWY0ODJlNDYwNWMyOTU4MTNmNmViMjRkZTRhYTQ2
|
11
|
+
OTIwMTc2YWRiMDJhZjE1NzI0MDU2MTk1OWJmYzhiODNmODMzNTc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTZiMmFmMDkxNTQ5OWVlNGE0NGJlNmE5ZjUzMzlkNzJlMzRiNTJlYTk4MjM1
|
14
|
+
MWNhYzIxYTc5NTFjZGZlNmJhYzg3NWJkNjE5Y2E2NTkwMDUxMmFlNGYzYmYx
|
15
|
+
NDc3OGI1N2NjYmUxYTI0MTdjZDA0NDhlOTBlZTAzYmUwMzBjMzU=
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -21,6 +21,13 @@ Add this line to your application's Gemfile or install manually.
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
## How Does it Work?
|
25
|
+
|
26
|
+
We are querying the PPL UK ISRC databases using their [public search tool](http://repsearch.ppluk.com/ARSWeb/appmanager/ARS/main).
|
27
|
+
|
28
|
+
The web app is written in Java. It makes an ajax request to grab search results.
|
29
|
+
|
30
|
+
The AJAX request will fail unless the request has specific session vars and cookie values based on the response data from the main app response.
|
24
31
|
|
25
32
|
## Contributing
|
26
33
|
|
data/lib/isrc.rb
CHANGED
@@ -11,7 +11,9 @@ module ISRC
|
|
11
11
|
|
12
12
|
class PPLUK
|
13
13
|
def retrieve(opts)
|
14
|
-
#
|
14
|
+
# default options
|
15
|
+
opts = { :title_size => 2 }.merge(opts)
|
16
|
+
|
15
17
|
agent = Mechanize.new
|
16
18
|
agent.log = Logger.new "mech.log"
|
17
19
|
agent.user_agent_alias = 'Mac Safari'
|
@@ -29,14 +31,10 @@ module ISRC
|
|
29
31
|
# NOTE the online search is a bit funky: adding more to the search make the results worse
|
30
32
|
# trying out a three word limit
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
# TODO remove '(Club Mix)' from titles
|
35
|
-
# TODO remove anything in brackets
|
34
|
+
title_pieces = extract_song_peices(opts[:title])
|
35
|
+
shortened_title = title_pieces.slice(0, [opts[:title_size], title_pieces.size].min).join(' ')
|
36
36
|
|
37
|
-
|
38
|
-
shortened_title = shortened_title.split(' ').slice(0, 3).join(' ')
|
39
|
-
end
|
37
|
+
# puts "Title: #{shortened_title}\nArtist: #{opts[:artist]}"
|
40
38
|
|
41
39
|
begin
|
42
40
|
isrc_search = agent.post PPLUK_AJAX_SEARCH_URL, {
|
@@ -52,16 +50,16 @@ module ISRC
|
|
52
50
|
# 'ice.event.y' => '65',
|
53
51
|
# 'ice.event.left' => 'false',
|
54
52
|
# 'ice.event.right' => 'false',
|
55
|
-
'
|
56
|
-
'
|
57
|
-
'
|
58
|
-
'
|
59
|
-
'
|
60
|
-
'
|
53
|
+
'T5000782701386267377497:ars_form:search_button' => 'Search',
|
54
|
+
'T5000782701386267377497:ars_form:isrc_code' => '',
|
55
|
+
'T5000782701386267377497:ars_form:rec_title_idx' => '',
|
56
|
+
'T5000782701386267377497:ars_form:rec_title' => shortened_title,
|
57
|
+
'T5000782701386267377497:ars_form:rec_band_artist_idx' => '',
|
58
|
+
'T5000782701386267377497:ars_form:rec_band_artist' => opts[:artist],
|
61
59
|
'javax.faces.RenderKitId' => 'ICEfacesRenderKit',
|
62
60
|
'javax.faces.ViewState' => view_state,
|
63
61
|
'icefacesCssUpdates' => '',
|
64
|
-
'
|
62
|
+
'T5000782701386267377497:ars_form' => '',
|
65
63
|
'ice.session' => ice_session,
|
66
64
|
'ice.view' => view_state,
|
67
65
|
'ice.focus' => '',
|
@@ -70,13 +68,13 @@ module ISRC
|
|
70
68
|
'rand' => sprintf('%1.17f', rand)
|
71
69
|
}
|
72
70
|
rescue Mechanize::ResponseCodeError => e
|
73
|
-
agent.log.error "
|
71
|
+
agent.log.error "Error submitting AJAX request: #{e.page.body}"
|
74
72
|
end
|
75
73
|
|
76
74
|
# creates an array representation of the table:
|
77
75
|
# artist, title, isrc, rights holder, released, time
|
78
76
|
isrc_html = Nokogiri::HTML(isrc_search.body)
|
79
|
-
@matches = isrc_html.css("table[id='
|
77
|
+
@matches = isrc_html.css("table[id='T5000782701386267377497:ars_form:searchResultsTable'] tbody tr").map do |m|
|
80
78
|
columns = m.css('td')
|
81
79
|
|
82
80
|
# if there is no ISRC don't bother looking
|
@@ -87,6 +85,11 @@ module ISRC
|
|
87
85
|
|
88
86
|
columns.map &:text
|
89
87
|
end
|
88
|
+
|
89
|
+
# if the shortened title did not work, try making it longer
|
90
|
+
if @matches.empty? && opts[:title_size] < title_pieces.size
|
91
|
+
self.retrieve(opts.merge({:title_size => opts[:title_size] + 1}))
|
92
|
+
end
|
90
93
|
end
|
91
94
|
|
92
95
|
def match(opts = {})
|
@@ -128,19 +131,25 @@ module ISRC
|
|
128
131
|
end
|
129
132
|
|
130
133
|
protected
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
+
def extract_song_peices(title)
|
135
|
+
title_pieces = title.split(/(\([^)]+\)|\[[^\]]+\])/).reject { |s| s.strip.empty? }
|
136
|
+
title_pieces[0] = title_pieces[0].split(' ')
|
137
|
+
title_pieces.flatten
|
138
|
+
end
|
134
139
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
end
|
140
|
+
def extract_view_state(body)
|
141
|
+
body.match(/javax\.faces\.ViewState" value="([0-9])"/)[1]
|
142
|
+
end
|
139
143
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
+
def extract_ice_session(body)
|
145
|
+
session_info = body.match(/history-frame:([^:]+):([0-9]+)/)
|
146
|
+
[session_info[1], session_info[2].to_i]
|
147
|
+
end
|
148
|
+
|
149
|
+
def timestring_to_integer(time_string)
|
150
|
+
minutes, seconds = time_string.split(':')
|
151
|
+
minutes.to_i * 60 + seconds.to_i
|
152
|
+
end
|
144
153
|
|
145
154
|
end
|
146
155
|
end
|
data/lib/isrc/version.rb
CHANGED
data/spec/isrc_spec.rb
CHANGED
@@ -18,16 +18,25 @@ describe ISRC do
|
|
18
18
|
context "should handle songs with multiple results" do
|
19
19
|
it "when the results have the same title and time code" do
|
20
20
|
isrc.retrieve artist:'Parade', title:'Louder'
|
21
|
-
isrc.match(time:'2:53')[:isrc].should == 'GBAHS1000333'
|
21
|
+
isrc.match(time:'2:53')[:isrc].should == 'GBAHS1000333'
|
22
22
|
end
|
23
23
|
|
24
|
-
it "
|
24
|
+
it "handles different names" do
|
25
25
|
isrc.retrieve artist:'Soul II Soul', title: 'Back To Life (However Do You Want Me) (Club Mix)'
|
26
26
|
isrc.match(time:'7:39')[:isrc].should == 'GBAAA8900153'
|
27
27
|
|
28
28
|
# the better match seems to be: GB1209500610
|
29
29
|
# however, the length delta is huge
|
30
30
|
end
|
31
|
+
|
32
|
+
it "handles edge cases that don't make sense" do
|
33
|
+
isrc.retrieve artist:'Toni Braxton', title:'Youre Making me High'
|
34
|
+
isrc.match(time:'4:12')[:isrc].should == 'USLF29600183'
|
35
|
+
end
|
36
|
+
|
37
|
+
it "handles the case where the primary match is not supplied" do
|
38
|
+
|
39
|
+
end
|
31
40
|
end
|
32
41
|
|
33
42
|
it "should handle songs with no results" do
|
@@ -38,4 +47,37 @@ describe ISRC do
|
|
38
47
|
isrc.retrieve artist:'Slut Puppies', title:'Funky Together'
|
39
48
|
isrc.match(time:'6:36')[:isrc].should == 'No Match'
|
40
49
|
end
|
50
|
+
|
51
|
+
context "song title processing" do
|
52
|
+
it "should handle bracket mixes" do
|
53
|
+
pieces = isrc.send(:extract_song_peices, "Surrender [Original Mix]")
|
54
|
+
pieces.size.should == 2
|
55
|
+
pieces.last.should == "[Original Mix]"
|
56
|
+
end
|
57
|
+
|
58
|
+
context 'of parenthesis' do
|
59
|
+
it "should count parenthesis as a single song peice" do
|
60
|
+
pieces = isrc.send(:extract_song_peices, "Want Me (Like Water) (New Vocal Mix No 1)")
|
61
|
+
pieces.size.should == 4
|
62
|
+
pieces.last.should == '(New Vocal Mix No 1)'
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should handle a single word song with parenthesis" do
|
66
|
+
isrc.retrieve artist:'Niko', title: 'Womb (Flight Facilities feat. Giselle)'
|
67
|
+
isrc.match(time:'3:44')[:isrc].should == 'GBKNX0500003'
|
68
|
+
|
69
|
+
isrc = ISRC::PPLUK.new
|
70
|
+
isrc.retrieve artist:'Frank Sinatra', title: 'Chicago (Digitally Remastered)'
|
71
|
+
isrc.match(time:'2:14')[:isrc].should == 'USCA20300966'
|
72
|
+
# or USCA29800388; they are basically the same
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should handle a standard multi-word title" do
|
77
|
+
pieces = isrc.send(:extract_song_peices, "Take Your Time")
|
78
|
+
pieces.size.should == 3
|
79
|
+
pieces.last.should == "Time"
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
41
83
|
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<updates><update address="9gIBHRbcKcZqCXD_XTAU9A:1:dynamic-code" tag="script"><attribute name="id"><![CDATA[9gIBHRbcKcZqCXD_XTAU9A:1:dynamic-code]]></attribute><attribute name="type"><![CDATA[text/javascript]]></attribute><content><![CDATA[ new Ice.Autocompleter('T5000782701386267377497:ars_form:rec_band_artist','T5000782701386267377497:ars_form:rec_band_artist_div', {frequency:0.3} ,'iceSelInpTxtRow Row iceInpTxtRow','iceSelInpTxtSelRow SelRow iceInpTxtSelRow'); new Ice.Autocompleter('T5000782701386267377497:ars_form:rec_title','T5000782701386267377497:ars_form:rec_title_div', {frequency:0.3} ,'iceSelInpTxtRow Row iceInpTxtRow','iceSelInpTxtSelRow SelRow iceInpTxtSelRow');Ice.Focus.setFocus('T5000782701386267377497:ars_form:search_button');//1002589172]]></content></update></updates>
|
2
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
3
|
+
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>main</title><script src="/ARSWeb/framework/skeletons/bighorn/js/buttons.js" type="text/javascript"></script><script src="/ARSWeb/framework/skeletons/bighorn/js/util.js" type="text/javascript"></script><script src="/ARSWeb/js/jquery.js" type="text/javascript"></script><script src="/ARSWeb/js/jquery-ui-1.8.custom2.min.js" type="text/javascript"></script><script src="/ARSWeb/js/hotkeys.js" type="text/javascript"></script><script src="/ARSWeb/js/input.js" type="text/javascript"></script><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/pplv2.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/rime-local-v1.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/colors.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/general.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/bighorn/css/menu.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/window.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/bighorn/css/wsrp.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/bighorn/css/custom.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/ppl/css/jquery-ui-1.8.custom.css"><link rel="stylesheet" type="text/css" href="/ARSWeb/framework/skins/bighorn/borderless/css/window.css"></head><body><div class="wlp-bighorn-header"><div class="wlp-bighorn-layout wlp-bighorn-layout-flow"><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-horizontal wlp-bighorn-layout-flow-first" style="width: 100%"><div></div><div class="wlp-bighorn-theme wlp-bighorn-theme-borderless"><div id="header1" class="wlp-bighorn-window "><div class="wlp-bighorn-window-content">
|
4
|
+
<div class="headerleft">
|
5
|
+
<a tabindex="-1" href="http://www.ppluk.com"><img class="myppllogo" src="/ARSWeb/images/ppl_header_logo_text.jpg"
|
6
|
+
width="362" height="78" alt="PPL"/></a>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
</div></div></div></div></div></div><div id="ARSPortal_portal_book_1" class="wlp-bighorn-book"><div class="topnav"><div class="leftlinks"><ul><li class="single"><a class="single" href="#" tabindex="-1">REPERTOIRE SEARCH FACILITY</a></li></ul></div></div><div class="wlp-bighorn-book-content"><div id="audiosearchpage" class="wlp-bighorn-page"><table class="wlp-bighorn-layout wlp-bighorn-layout-grid" width="100%" cellpadding="0" border="0" cellspacing="0"><tr><td width="100%"><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-grid-cell"><div></div><div class="wlp-bighorn-layout wlp-bighorn-layout-flow"><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-vertical wlp-bighorn-layout-flow-first" style="width: 100%"><div></div><div id="T5000782701386267377497" class="wlp-bighorn-window "><div class="wlp-bighorn-titlebar"><div class="wlp-bighorn-titlebar-title-panel"><span id="wlp_title_repl_C_t_50007">Rep Search</span></div><div class="wlp-bighorn-titlebar-button-panel"> <a href="http://repsearch.ppluk.com:80/ARSWeb/appmanager/ARS/main;jsessionid=pyjRSltLcnZSLhDF1XjMJLC107g8Sw5n8HcrxNMd1dCnC5G27mcC!2021157161?_nfpb=true&_windowLabel=T5000782701386267377497&_state=maximized&_pageLabel=audiosearchpage"><img src="/ARSWeb/framework/skins/bighorn/images/titlebar-button-maximize.gif" alt="Maximize" title="Maximize" name="maximized" class=""/></a><a href="http://repsearch.ppluk.com:80/ARSWeb/appmanager/ARS/main;jsessionid=pyjRSltLcnZSLhDF1XjMJLC107g8Sw5n8HcrxNMd1dCnC5G27mcC!2021157161?_nfpb=true&_windowLabel=T5000782701386267377497&_state=minimized&_pageLabel=audiosearchpage"><img src="/ARSWeb/framework/skins/bighorn/images/titlebar-button-minimize.gif" alt="Minimize" title="Minimize" name="minimized" class=""/></a></div></div><div class="wlp-bighorn-window-content"><div>
|
12
|
+
<iframe frameborder="0" id="history-frame:tcRy2s-4MxWlMdr3ynZZ0Q:1" name="history-frame:tcRy2s-4MxWlMdr3ynZZ0Q:1" src="/ARSWeb/xmlhttp/blank" style="z-index: 10000; visibility: hidden; width: 0; height: 0; position: absolute; opacity: 0.22; filter: alpha(opacity=22);" title="Icefaces Redirect"></iframe><div id="cntIncDiv" style="display: none;"><script src="/ARSWeb/xmlhttp/1386785416283/icefaces-d2d.js" type="text/javascript"></script>
|
13
|
+
<script src="/ARSWeb/xmlhttp/1386785416283/ice-extras.js" type="text/javascript"></script>
|
14
|
+
<script type="text/javascript">try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}</script></div><script id="tcRy2s-4MxWlMdr3ynZZ0Q:1:configuration-script" type="text/javascript">window.disposeViewsURI = '/ARSWeb/block/dispose-views';
|
15
|
+
var container = 'tcRy2s-4MxWlMdr3ynZZ0Q:1:configuration-script'.asElement().parentNode;
|
16
|
+
container.bridge = new Ice.Community.Application({blockUI: true,session: 'tcRy2s-4MxWlMdr3ynZZ0Q',view: 1,synchronous: true,connectionLostRedirectURI: null,sessionExpiredRedirectURI: null,serverErrorRetryTimeouts: [1000,2000,4000], connection: {context: '/ARSWeb/', sendReceiveUpdatesURI: 'http://repsearch.ppluk.com:80/ARSWeb/block/send-receive-updates;jsessionid=pyjRSltLcnZSLhDF1XjMJLC107g8Sw5n8HcrxNMd1dCnC5G27mcC!2021157161',timeout: 6000000},messages: {sessionExpired: 'User Session Expired',connectionLost: 'Network Connection Interrupted',serverError: 'Server Internal Error',description: 'To reconnect click the Reload button on the browser or click the button below',buttonText: 'Reload'}}, container);</script><script type="text/javascript">
|
17
|
+
/* <![CDATA[ */
|
18
|
+
/* Load css */
|
19
|
+
document.write('<link rel="stylesheet" type="text/css" href="../../framework/skins/ppl/css/pplv2.css">');
|
20
|
+
document.write('<link rel="stylesheet" type="text/css" href="../../framework/skins/ppl/css/ppl-iev2.css">');
|
21
|
+
|
22
|
+
/* ]]> */</script><div id="T5000782701386267377497"><form action="javascript:;" class="iceFrm" enctype="application/x-www-form-urlencoded" id="T5000782701386267377497:ars_form" method="post" onsubmit="return false;"><script id="T5000782701386267377497:ars_formscript" type="text/javascript">$element(document.getElementById('T5000782701386267377497:ars_form')).captureAndRedirectSubmit();</script><input name="T5000782701386267377497:ars_form" type="hidden" value="T5000782701386267377497:ars_form" /><input name="icefacesCssUpdates" type="hidden" value="" /><div id="T5000782701386267377497:ars_form:stateSavingMarker" style="width:0px;height:0px;"><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="1" /><input name="javax.faces.RenderKitId" type="hidden" value="ICEfacesRenderKit" /></div>
|
23
|
+
<span class="iceOutTxt" id="T5000782701386267377497:ars_form:j_id6"></span>
|
24
|
+
<span class="iceOutTxt" id="T5000782701386267377497:ars_form:j_id7" style="font-weight: bold; color: #EF3E42;">PPL Repertoire Search</span>
|
25
|
+
<div class="searchBorder"><span class="iceOutTxt" id="T5000782701386267377497:ars_form:j_id9" style="font-weight: bold; color: red;"></span>
|
26
|
+
<br /><br /><span class="iceOutTxt searchAdvice" id="T5000782701386267377497:ars_form:j_id12">Please enter values in one or more of the below fields to perform a search.</span>
|
27
|
+
<br /><br /><span class="iceOutTxt repMsg" id="T5000782701386267377497:ars_form:j_id15">The PPL Repertoire Search facility is designed for use primarily by PPL's licensees to search PPL's repertoire database for track information.</span>
|
28
|
+
<br /><br /><span class="iceOutTxt repMsg" id="T5000782701386267377497:ars_form:j_id18">The information displayed in search results is based on information PPL receives from its members and this service is therefore intended as a general guide only. Although PPL endeavours to keep the information provided in this service up-to-date and accurate, information provided by the service will not necessarily be a representation of all repertoire controlled by PPL or all of the uses for which that repertoire can be licensed by PPL. If in doubt please contact PPL for further assistance. There is a maximum number of results that can be returned for any single search.</span>
|
29
|
+
<br /><br /><span class="iceOutTxt searchAdvice" id="T5000782701386267377497:ars_form:j_id21">By clicking "search" you are acknowledging and accepting the conditions of use (which are subject to English law and jurisdiction) detailed <a href="http://www.ppluk.com/Repertoire-search/PPL-Repertoire-Search-Terms-and-Conditions" target="_blank">here</a>.</span>
|
30
|
+
<br /><br /><br /><table id="T5000782701386267377497:ars_form:j_id25"><tbody><tr><td id="T5000782701386267377497:ars_form:j_id25-0-0"><span class="iceOutTxt labelText" id="T5000782701386267377497:ars_form:j_id26">Artist Name:</span></td><td id="T5000782701386267377497:ars_form:j_id25-0-1"><div class="iceSelInpTxt iceInpTxt" rows="10" width="250"><input autocomplete="off" class="iceSelInpTxtTxt Txt iceInpTxtTxt" id="T5000782701386267377497:ars_form:rec_band_artist" name="T5000782701386267377497:ars_form:rec_band_artist" onblur="setFocus('');" onfocus="setFocus(this.id);" onmousedown="this.focus();" style="width:250px;" type="text" value="" /><div class="iceSelInpTxtList List iceInpTxtList" id="T5000782701386267377497:ars_form:rec_band_artist_div"></div><input name="T5000782701386267377497:ars_form:rec_band_artist_idx" type="hidden" /></div></td><td id="T5000782701386267377497:ars_form:j_id25-0-2"><span class="iceOutTxt" id="T5000782701386267377497:ars_form:j_id27"></span></td></tr>
|
31
|
+
<tr><td id="T5000782701386267377497:ars_form:j_id25-1-0"><span class="iceOutTxt labelText" id="T5000782701386267377497:ars_form:j_id28">Recording Title :</span></td><td id="T5000782701386267377497:ars_form:j_id25-1-1"><div class="iceSelInpTxt iceInpTxt" rows="10" width="250"><input autocomplete="off" class="iceSelInpTxtTxt Txt iceInpTxtTxt" id="T5000782701386267377497:ars_form:rec_title" name="T5000782701386267377497:ars_form:rec_title" onblur="setFocus('');" onfocus="setFocus(this.id);" onmousedown="this.focus();" style="width:250px;" type="text" value="" /><div class="iceSelInpTxtList List iceInpTxtList" id="T5000782701386267377497:ars_form:rec_title_div"></div><input name="T5000782701386267377497:ars_form:rec_title_idx" type="hidden" /></div></td><td id="T5000782701386267377497:ars_form:j_id25-1-2"><span class="iceOutTxt" id="T5000782701386267377497:ars_form:j_id29"></span></td></tr>
|
32
|
+
<tr><td id="T5000782701386267377497:ars_form:j_id25-2-0"><span class="iceOutTxt labelText" id="T5000782701386267377497:ars_form:j_id30">ISRC:</span></td><td id="T5000782701386267377497:ars_form:j_id25-2-1"><input class="iceInpTxt portlet-form-input-field" id="T5000782701386267377497:ars_form:isrc_code" maxlength="250" name="T5000782701386267377497:ars_form:isrc_code" onblur="setFocus('');" onfocus="setFocus(this.id);" onkeypress="iceSubmit(form,this,event);" onmousedown="this.focus();" style="width: 250px" type="text" value="" /></td><td id="T5000782701386267377497:ars_form:j_id25-2-2"><span class="iceOutTxt labelNote" id="T5000782701386267377497:ars_form:j_id31">e.g. GBAAA0500002</span></td></tr></tbody></table><input class="iceCmdBtn portlet-form-button btn" id="T5000782701386267377497:ars_form:search_button" name="T5000782701386267377497:ars_form:search_button" onblur="setFocus('');" onclick="iceSubmit(form,this,event);return false;" onfocus="setFocus(this.id);" type="submit" value="Search" /></div>
|
33
|
+
<div id="T5000782701386267377497:ars_formhdnFldsDiv" style="display:none;"></div></form></div><script id="tcRy2s-4MxWlMdr3ynZZ0Q:1:dynamic-code" type="text/javascript"> new Ice.Autocompleter('T5000782701386267377497:ars_form:rec_band_artist','T5000782701386267377497:ars_form:rec_band_artist_div', {frequency:0.3} ,'iceSelInpTxtRow Row iceInpTxtRow','iceSelInpTxtSelRow SelRow iceInpTxtSelRow'); new Ice.Autocompleter('T5000782701386267377497:ars_form:rec_title','T5000782701386267377497:ars_form:rec_title_div', {frequency:0.3} ,'iceSelInpTxtRow Row iceInpTxtRow','iceSelInpTxtSelRow SelRow iceInpTxtSelRow');//-665228519</script><noscript><meta content="0;url=/ARSWeb/xmlhttp/javascript-blocked" http-equiv="refresh" /></noscript></div>
|
34
|
+
</div></div><script type="text/javascript">
|
35
|
+
var wlp_title_repl_C_t_50007_elem = document.getElementById('wlp_title_repl_C_t_50007');
|
36
|
+
if (wlp_title_repl_C_t_50007_elem != null) wlp_title_repl_C_t_50007_elem.innerHTML = 'Rep Search';
|
37
|
+
</script></div></div></div></td></tr></table></div></div></div><div class="wlp-bighorn-footer"><div class="wlp-bighorn-layout wlp-bighorn-layout-flow"><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-horizontal wlp-bighorn-layout-flow-first" style="width: 100%"><div></div><div class="wlp-bighorn-theme wlp-bighorn-theme-borderless"><div id="footer1" class="wlp-bighorn-window "><div class="wlp-bighorn-window-content"><div class="footer">
|
38
|
+
<div class="footerleft">
|
39
|
+
<ul id="FooterLeft">
|
40
|
+
<li>
|
41
|
+
<p>© PPL (or its licensors) 2011</p>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
</div>
|
45
|
+
<div class="footerright">
|
46
|
+
<ul>
|
47
|
+
<li>
|
48
|
+
<a tabindex="-1" href="http://www.ppluk.com/en/Additional-Pages/Copyright-Notice/" target="_self">Copyright Notice</a>
|
49
|
+
</li>
|
50
|
+
<li>
|
51
|
+
<a tabindex="-1" href="http://www.ppluk.com/en/Additional-Pages/Terms-and-Conditions/" target="_self">Terms & Conditions</a>
|
52
|
+
</li>
|
53
|
+
<li>
|
54
|
+
<a tabindex="-1" href="http://www.ppluk.com/en/Additional-Pages/Privacy-Policy/" target="_self">Privacy Policy</a>
|
55
|
+
</li>
|
56
|
+
<li>
|
57
|
+
<a tabindex="-1" class="last" href="http://www.ppluk.com/en/Additional-Pages/Accessibility/" target="_self">Accessibility</a>
|
58
|
+
</li>
|
59
|
+
</ul>
|
60
|
+
</div>
|
61
|
+
<div class="clear"/>
|
62
|
+
</div></div></div></div></div></div></div></body></html>
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
1
|
+
require 'pry'
|
2
|
+
|
7
3
|
RSpec.configure do |config|
|
8
4
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
9
5
|
config.run_all_when_everything_filtered = true
|
metadata
CHANGED
@@ -1,96 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isrc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 1.0.1
|
4
|
+
version: 1.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Michael Bianco
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
none: false
|
21
|
-
name: httparty
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
23
|
requirements:
|
26
24
|
- - ! '>='
|
27
25
|
- !ruby/object:Gem::Version
|
28
26
|
version: '0'
|
29
|
-
none: false
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
|
28
|
+
name: nokogiri
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
32
30
|
requirements:
|
33
31
|
- - ! '>='
|
34
32
|
- !ruby/object:Gem::Version
|
35
33
|
version: '0'
|
36
|
-
none: false
|
37
|
-
name: nokogiri
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
37
|
requirements:
|
42
38
|
- - ! '>='
|
43
39
|
- !ruby/object:Gem::Version
|
44
40
|
version: '0'
|
45
|
-
none: false
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
|
42
|
+
name: mechanize
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
48
44
|
requirements:
|
49
45
|
- - ! '>='
|
50
46
|
- !ruby/object:Gem::Version
|
51
47
|
version: '0'
|
52
|
-
none: false
|
53
|
-
name: mechanize
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - ! '>='
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: '0'
|
61
|
-
none: false
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
|
-
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - ! '>='
|
66
60
|
- !ruby/object:Gem::Version
|
67
61
|
version: '0'
|
68
|
-
none: false
|
69
|
-
name: rspec
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
65
|
requirements:
|
74
66
|
- - ! '>='
|
75
67
|
- !ruby/object:Gem::Version
|
76
68
|
version: '0'
|
77
|
-
none: false
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
|
-
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
80
72
|
requirements:
|
81
73
|
- - ! '>='
|
82
74
|
- !ruby/object:Gem::Version
|
83
75
|
version: '0'
|
84
|
-
none: false
|
85
|
-
name: guard
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
|
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
79
|
requirements:
|
90
80
|
- - ! '>='
|
91
81
|
- !ruby/object:Gem::Version
|
92
82
|
version: '0'
|
93
|
-
none: false
|
94
83
|
description: Pull ISRC codes from PPLK UK's database
|
95
84
|
email:
|
96
85
|
- info@cliffsidedev.com
|
@@ -109,9 +98,12 @@ files:
|
|
109
98
|
- lib/isrc.rb
|
110
99
|
- lib/isrc/version.rb
|
111
100
|
- spec/isrc_spec.rb
|
101
|
+
- spec/mocks/ajax.html
|
102
|
+
- spec/mocks/main.html
|
112
103
|
- spec/spec_helper.rb
|
113
104
|
homepage: http://github.com/iloveitaly/isrc
|
114
105
|
licenses: []
|
106
|
+
metadata: {}
|
115
107
|
post_install_message:
|
116
108
|
rdoc_options: []
|
117
109
|
require_paths:
|
@@ -121,19 +113,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
121
113
|
- - ! '>='
|
122
114
|
- !ruby/object:Gem::Version
|
123
115
|
version: '0'
|
124
|
-
none: false
|
125
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
117
|
requirements:
|
127
118
|
- - ! '>='
|
128
119
|
- !ruby/object:Gem::Version
|
129
120
|
version: '0'
|
130
|
-
none: false
|
131
121
|
requirements: []
|
132
122
|
rubyforge_project:
|
133
|
-
rubygems_version: 1.
|
123
|
+
rubygems_version: 2.1.11
|
134
124
|
signing_key:
|
135
|
-
specification_version:
|
125
|
+
specification_version: 4
|
136
126
|
summary: Pull ISRC codes from PPLK UK's database
|
137
127
|
test_files:
|
138
128
|
- spec/isrc_spec.rb
|
129
|
+
- spec/mocks/ajax.html
|
130
|
+
- spec/mocks/main.html
|
139
131
|
- spec/spec_helper.rb
|