[perl-Finance-Quote] Fix some UK fund sources

Paul Howarth pghmcfc at fedoraproject.org
Wed Feb 25 18:30:37 UTC 2015


commit 042ca5e552645c9210c3203a2172b9cb07bed2dc
Author: Paul Howarth <paul at city-fan.org>
Date:   Wed Feb 25 18:29:37 2015 +0000

    Fix some UK fund sources
    
    - Fix GBX pricing in FTfunds (CPAN RT#99783)
    - Fix MStaruk quote retrieval (CPAN RT#99784)

 Finance-Quote-1.37-rt99783.patch | 11 +++++++++++
 Finance-Quote-1.37-rt99784.patch | 11 +++++++++++
 perl-Finance-Quote.spec          | 14 +++++++++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/Finance-Quote-1.37-rt99783.patch b/Finance-Quote-1.37-rt99783.patch
new file mode 100644
index 0000000..6cf458a
--- /dev/null
+++ b/Finance-Quote-1.37-rt99783.patch
@@ -0,0 +1,11 @@
+--- lib/Finance/Quote/FTfunds.pm
++++ lib/Finance/Quote/FTfunds.pm
+@@ -233,7 +233,7 @@
+ # Find the currency
+ 		my $currency;
+ 		if ($webdoc->content =~
+-		m[($code):([A-Z]{3})]  )
++		m[<th>(Price currency)</th><td>([A-Z]{3})</td>]  )
+         {
+ 
+ 			$currency    = $2;
diff --git a/Finance-Quote-1.37-rt99784.patch b/Finance-Quote-1.37-rt99784.patch
new file mode 100644
index 0000000..8a9023c
--- /dev/null
+++ b/Finance-Quote-1.37-rt99784.patch
@@ -0,0 +1,11 @@
+--- lib/Finance/Quote/MStaruk.pm
++++ lib/Finance/Quote/MStaruk.pm
+@@ -157,7 +157,7 @@
+ 
+ 		my ($currency, $date, $price, $pchange);
+ 		if ($webdoc =~
+-		m[<td class="line heading">ISIN</td>.*<span class="heading"><br />([0-9]{2}/[0-9]{2}/[0-9]{4})</span>.*([A-Z]{3}).([0-9\.]+).*>([0-9\.\-]+)] )
++		m[<td class="line heading">NAV<span class="heading"><br />([0-9]{2}/[0-9]{2}/[0-9]{4})</span>.*([A-Z]{3}).([0-9\.]+).*>([0-9\.\-]+)] )
+         {
+ 
+             $date = $1;
diff --git a/perl-Finance-Quote.spec b/perl-Finance-Quote.spec
index 9588703..05c8950 100644
--- a/perl-Finance-Quote.spec
+++ b/perl-Finance-Quote.spec
@@ -1,10 +1,12 @@
 Name:           perl-Finance-Quote
 Version:        1.37
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A Perl module that retrieves stock and mutual fund quotes
 License:        GPLv2+
 URL:            http://search.cpan.org/dist/Finance-Quote/
 Source0:        http://search.cpan.org/CPAN/authors/id/E/EC/ECOCODE/Finance-Quote-%{version}.tar.gz
+Patch0:         Finance-Quote-1.37-rt99783.patch
+Patch1:         Finance-Quote-1.37-rt99784.patch
 BuildArch:      noarch
 # Module Build
 BuildRequires:  perl >= 4:5.10.0
@@ -53,6 +55,12 @@ using various source.
 %prep
 %setup -q -n Finance-Quote-%{version} 
 
+# Fix GBX pricing in FTfunds (CPAN RT#99783)
+%patch0
+
+# Fix MStaruk quote retrieval (CPAN RT#99784)
+%patch1
+
 %build
 perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
@@ -130,6 +138,10 @@ make test
 %{_mandir}/man3/Finance::Quote::ZA_UnitTrusts.3*
 
 %changelog
+* Tue Feb 24 2015 Paul Howarth <paul at city-fan.org> - 1.37-2
+- Fix GBX pricing in FTfunds (CPAN RT#99783)
+- Fix MStaruk quote retrieval (CPAN RT#99784)
+
 * Mon Feb  2 2015 Paul Howarth <paul at city-fan.org> - 1.37-1
 - Update to 1.37
   - MorningstarJP: changed dependency from Date::Calc to DateTime


More information about the scm-commits mailing list