Skip to content

Commit

Permalink
Fix ordering issue that meant the combined version didn't work correc…
Browse files Browse the repository at this point in the history
…tly for some sites.

Update test suite to run against release version.
  • Loading branch information
monsieurvideo committed May 5, 2009
1 parent 73f5607 commit c0dd1cc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
10 changes: 6 additions & 4 deletions Makefile
Expand Up @@ -13,8 +13,10 @@ clean:
# Build the main get_flash_videos, by combining the modules and sites into one
# file, for easier download and installation.

$(MAIN)-$(VERSION): $(COMBINE) $(MAIN) FlashVideo/* .sitemodules
$(COMBINE) --name="$(MAIN)" --include="^FlashVideo::" $(MAIN) .sitemodules > $@
$(MAIN)-$(VERSION): $(COMBINE) $(MAIN) FlashVideo/* .sitemodules \
utils/combine-header
$(COMBINE) --name="$(MAIN)" --include="^FlashVideo::" \
utils/combine-header .sitemodules $(MAIN) > $@
chmod a+x $@

# This makes sure to 'use' all the Site modules, so that the combiner can pick
Expand All @@ -39,8 +41,8 @@ combined-$(MAIN): $(COMBINE) $(COMBINED_SOURCES)
chmod a+x $@

# Run our Perl tests.
check: $(MAIN)
$(MAKE) -C t $@
check: $(MAIN)-$(VERSION)
$(MAKE) -C t $@ SCRIPT=$^

# Manpage
$(MAIN).1: $(MAIN).pod
Expand Down
2 changes: 1 addition & 1 deletion get_flash_videos
Expand Up @@ -26,7 +26,7 @@ use FlashVideo::Downloader;
use FlashVideo::RTMPDownloader;
use FlashVideo::Utils;

use constant VERSION => "1.8";
use constant VERSION => "1.9";

use constant VER_INFO => <<EOF;
get_flash_videos version @{[VERSION]} (http://code.google.com/p/get-flash-videos/)
Expand Down
4 changes: 1 addition & 3 deletions t/url.t
Expand Up @@ -6,8 +6,6 @@ use Test::More;
use File::Path;
use FlashVideo::Downloader;

BEGIN { $ENV{PERL5LIB} = "../.." }

# We don't want to do this unless they really meant it, as it downloads a lot.
unless($ENV{SITE} || $ENV{SURE}) {
plan skip_all => "RTFS";
Expand All @@ -27,7 +25,7 @@ for my $url_info(@urls) {

diag "Testing $note";

my $pid = open my $out_fh, "-|", "../../get_flash_videos --yes '$url' 2>&1";
my $pid = open my $out_fh, "-|", "../../$ENV{SCRIPT} --yes '$url' 2>&1";

while(<$out_fh>) {
DEBUG && diag $_;
Expand Down
20 changes: 20 additions & 0 deletions utils/combine-header
@@ -0,0 +1,20 @@
#!/usr/bin/perl
#
# get_flash_videos -- download all the Flash videos off a web page
#
# http://code.google.com/p/get-flash-videos/
#
# Copyright 2009, zakflash and MonsieurVideo
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain a
# copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Contributions are welcome and encouraged, but please take care to
# maintain the JustWorks(tm) nature of the program.

0 comments on commit c0dd1cc

Please sign in to comment.