downlow 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/downlow.gemspec +2 -2
- data/lib/downlow.rb +1 -1
- data/lib/downlow/fetchers/http.rb +1 -0
- data/test/test_downlow_fetcher.rb +10 -0
- metadata +2 -2
data/downlow.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{downlow}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Quint"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-21}
|
13
13
|
s.description = %q{Downlow provides an easy way to fetch files or archives and extract them with minimal hassle.}
|
14
14
|
s.email = %q{aaron@quirkey.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/downlow.rb
CHANGED
@@ -91,6 +91,16 @@ class TestDownlowFetcher < Test::Unit::TestCase
|
|
91
91
|
assert_equal @path, @fetcher.local_path
|
92
92
|
end
|
93
93
|
|
94
|
+
should "strip query-string when determining file name" do
|
95
|
+
gist_url = "http://github.com/malsup/form/raw/master/jquery.form.js?v2.38"
|
96
|
+
FakeWeb.register_uri(:get, gist_url, :body => "I'm just a normal file")
|
97
|
+
@fetcher = Downlow::Http.new(gist_url, :tmp_dir => tmp_dir)
|
98
|
+
@path = @fetcher.fetch
|
99
|
+
assert @path.is_a?(Pathname)
|
100
|
+
assert @path.file?
|
101
|
+
assert_match(/jquery.form.js$/, @path.to_s)
|
102
|
+
end
|
103
|
+
|
94
104
|
should "respect content-disposition headers" do
|
95
105
|
gist_url = "http://gist.github.com/gists/290151/download"
|
96
106
|
FakeWeb.register_uri(:get, gist_url, :response => fixture('gist_response'))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: downlow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Quint
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-21 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|