downcer 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,19 +46,61 @@ Usage
46
46
  github.com:
47
47
  command: hub
48
48
  option: clone
49
+ my.private.server.local:
50
+ command: wget
51
+ option: --http-user=username --http-password=password
49
52
  default:
50
53
  command: curl
51
54
  option: -LO
52
55
 
53
56
  2. Run `downcer`
54
57
 
55
- $ downcer https://github.com/sinatra/sinatra
56
- Cloning into 'sinatra'...
57
- remote: Counting objects: 11686, done.
58
- remote: Compressing objects: 100% (4890/4890), done.
59
- remote: Total 11686 (delta 7202), reused 11030 (delta 6617)
60
- Receiving objects: 100% (11686/11686), 2.07 MiB | 348 KiB/s, done.
61
- Resolving deltas: 100% (7202/7202), done.
58
+ YouTube ([youtube-dl](http://rg3.github.com/youtube-dl))
59
+
60
+ ```sh
61
+ $ downcer 'http://www.youtube.com/watch?v=QH2-TGUlwu4'
62
+ Use `youtube-dl`
63
+ --
64
+ [youtube] Setting language
65
+ [youtube] QH2-TGUlwu4: Downloading video webpage
66
+ [youtube] QH2-TGUlwu4: Downloading video info webpage
67
+ [youtube] QH2-TGUlwu4: Extracting video information
68
+ [download] Destination: Nyan_Cat_original-QH2-TGUlwu4.flv
69
+ [download] 100.0% of 13.93M at 1.90M/s ETA 00:00
70
+ ```
71
+
72
+ GitHub Repository
73
+
74
+ ```sh
75
+ $ downcer https://github.com/holman/spark
76
+ Use `hub`
77
+ --
78
+ Cloning into 'spark'...
79
+ remote: Counting objects: 193, done.
80
+ remote: Compressing objects: 100% (105/105), done.
81
+ remote: Total 193 (delta 99), reused 174 (delta 85)
82
+ Receiving objects: 100% (193/193), 31.69 KiB, done.
83
+ Resolving deltas: 100% (99/99), done.
84
+ ```
85
+
86
+ Private basic authentication file server
87
+
88
+ ```sh
89
+ $ downcer http://my.private.server.local/movies/sample.mp4
90
+ Use `wget`
91
+ --
92
+ --2012-09-11 21:19:11-- http://my.private.server.local/movies/sample.mp4
93
+ Resolving my.private.server.local... 10.0.1.2
94
+ Connecting to my.private.server.local|10.0.1.2|:80... connected.
95
+ HTTP request sent, awaiting response... 401 Unauthorized
96
+ Reusing existing connection to my.private.server.local:80.
97
+ HTTP request sent, awaiting response... 200 OK
98
+ Length: 208737764 (199M) [text/plain]
99
+ Saving to: ‘sample.m4v’
100
+ 100%[=================================================================>] 208,737,764 2.49MB/s in 98s
101
+
102
+ 2012-09-11 21:20:49 (2.04 MB/s) - ‘sample.m4v’ saved [208737764/208737764]
103
+ ```
62
104
 
63
105
 
64
106
  LICENSE
@@ -1,3 +1,4 @@
1
+ # sample
1
2
  ---
2
3
  youtube.com:
3
4
  command: youtube-dl
@@ -12,7 +12,7 @@ module Downcer
12
12
  def initialize(url)
13
13
  @url = URI.parse(URI.encode(url))
14
14
  @config = get_config(@url)
15
- rescue URI::InvalidURIError => e
15
+ rescue NoMethodError, URI::InvalidURIError => e
16
16
  abort 'Usage: downcer <url>'
17
17
  rescue SystemCallError => e
18
18
  abort e.to_s
@@ -1,3 +1,3 @@
1
1
  module Downcer
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: downcer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: