downlow 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/downlow.gemspec +3 -3
- data/lib/downlow.rb +2 -2
- data/lib/downlow/extractor.rb +1 -1
- data/lib/downlow/fetcher.rb +1 -1
- metadata +41 -21
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.3"
|
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-
|
12
|
+
s.date = %q{2010-03-09}
|
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 = [
|
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.homepage = %q{http://github.com/quirkey/downlow}
|
47
47
|
s.rdoc_options = ["--charset=UTF-8"]
|
48
48
|
s.require_paths = ["lib"]
|
49
|
-
s.rubygems_version = %q{1.3.
|
49
|
+
s.rubygems_version = %q{1.3.6}
|
50
50
|
s.summary = %q{easy downloading and extracting API}
|
51
51
|
s.test_files = [
|
52
52
|
"test/helper.rb",
|
data/lib/downlow.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'downlow/ext/pathname'
|
2
2
|
|
3
3
|
module Downlow
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.3'
|
5
5
|
|
6
6
|
def self.get(url, *args)
|
7
7
|
options = {}
|
@@ -14,7 +14,7 @@ module Downlow
|
|
14
14
|
options[:destination] = first
|
15
15
|
end
|
16
16
|
# merge the rest as options
|
17
|
-
args.inject(options) {|o, arg| o = o.merge(arg) } if !args.empty?
|
17
|
+
options = args.inject(options) {|o, arg| o = o.merge(arg) } if !args.empty?
|
18
18
|
# fetch to a temp dir
|
19
19
|
fetch_options = options.dup
|
20
20
|
fetch_options.delete(:destination)
|
data/lib/downlow/extractor.rb
CHANGED
@@ -29,7 +29,7 @@ module Downlow
|
|
29
29
|
def initialize(path, options = {})
|
30
30
|
@path = Pathname.new(path)
|
31
31
|
@options = options
|
32
|
-
@tmp_dir = Pathname.new(options[:tmp_dir] || 'tmp').expand_path
|
32
|
+
@tmp_dir = Pathname.new(options[:tmp_dir] || 'tmp').expand_path + 'extract'
|
33
33
|
@tmp_dir.mkpath
|
34
34
|
@destination = Pathname.new(options[:destination] || tmp_dir + self.path.stem).expand_path
|
35
35
|
end
|
data/lib/downlow/fetcher.rb
CHANGED
@@ -25,7 +25,7 @@ module Downlow
|
|
25
25
|
def initialize(url, options = {})
|
26
26
|
@url = Pathname.new(url)
|
27
27
|
@options = options
|
28
|
-
@tmp_dir = Pathname.new(options[:tmp_dir] || 'tmp').expand_path
|
28
|
+
@tmp_dir = Pathname.new(options[:tmp_dir] || 'tmp').expand_path + 'fetch'
|
29
29
|
@tmp_dir.mkpath
|
30
30
|
@destination = Pathname.new(options[:destination] || tmp_dir + self.url.basename ).expand_path
|
31
31
|
@destination.dirname.mkpath
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: downlow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Aaron Quint
|
@@ -9,49 +14,62 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-03-09 00:00:00 -05:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rubyzip
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 9
|
30
|
+
- 4
|
23
31
|
version: 0.9.4
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: archive-tar-minitar
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 5
|
44
|
+
- 2
|
33
45
|
version: 0.5.2
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
35
48
|
- !ruby/object:Gem::Dependency
|
36
49
|
name: shoulda
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
52
|
requirements:
|
41
53
|
- - ">="
|
42
54
|
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 0
|
43
57
|
version: "0"
|
44
|
-
|
58
|
+
type: :development
|
59
|
+
version_requirements: *id003
|
45
60
|
- !ruby/object:Gem::Dependency
|
46
61
|
name: fakeweb
|
47
|
-
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
64
|
requirements:
|
51
65
|
- - ">="
|
52
66
|
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 1
|
69
|
+
- 2
|
53
70
|
version: "1.2"
|
54
|
-
|
71
|
+
type: :development
|
72
|
+
version_requirements: *id004
|
55
73
|
description: Downlow provides an easy way to fetch files or archives and extract them with minimal hassle.
|
56
74
|
email: aaron@quirkey.com
|
57
75
|
executables: []
|
@@ -100,18 +118,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
118
|
requirements:
|
101
119
|
- - ">="
|
102
120
|
- !ruby/object:Gem::Version
|
121
|
+
segments:
|
122
|
+
- 0
|
103
123
|
version: "0"
|
104
|
-
version:
|
105
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
125
|
requirements:
|
107
126
|
- - ">="
|
108
127
|
- !ruby/object:Gem::Version
|
128
|
+
segments:
|
129
|
+
- 0
|
109
130
|
version: "0"
|
110
|
-
version:
|
111
131
|
requirements: []
|
112
132
|
|
113
133
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.3.
|
134
|
+
rubygems_version: 1.3.6
|
115
135
|
signing_key:
|
116
136
|
specification_version: 3
|
117
137
|
summary: easy downloading and extracting API
|