uricp 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +7 -7
- data/bin/uricp +2 -0
- data/features/documented_options.feature +1 -0
- data/features/step_definitions/orbit_steps.rb +6 -6
- data/lib/uricp/strategy/common.rb +4 -0
- data/lib/uricp/strategy/piped_local_decompress.rb +42 -0
- data/lib/uricp/strategy/piped_remote_get.rb +2 -0
- data/lib/uricp/uri_strategy.rb +1 -0
- data/lib/uricp/version.rb +1 -1
- data/lib/uricp.rb +1 -0
- data/uricp.gemspec +1 -2
- metadata +16 -55
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 37bb516638075a8d54d891f2d1049e5abe1197e4
|
4
|
+
data.tar.gz: 31d80850767fad7b32d5f9282031e6acdaa60b3f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d137a74223d94356968ddaba23d2d855d0127fbea9f19fc2cee96a05c37f7900d3fe433fcccb3b6e12608d252174b9848fd882548319e794995c8828804bec2a
|
7
|
+
data.tar.gz: c49e4055788800047b66611d56de7fc0270e96bb88f2fccd0e7b0da7f329e739ca7daef0b672d44df94c3f816a9158204589c4f403f0e018e771c210193a90df
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
uricp (0.0.
|
4
|
+
uricp (0.0.10)
|
5
5
|
filesize (= 0.0.2)
|
6
6
|
methadone (~> 1.8.0)
|
7
7
|
open4 (~> 1.3.0)
|
@@ -17,22 +17,22 @@ GEM
|
|
17
17
|
builder (3.2.2)
|
18
18
|
childprocess (0.5.6)
|
19
19
|
ffi (~> 1.0, >= 1.0.11)
|
20
|
-
cucumber (1.3.
|
20
|
+
cucumber (1.3.20)
|
21
21
|
builder (>= 2.1.2)
|
22
22
|
diff-lcs (>= 1.1.3)
|
23
23
|
gherkin (~> 2.12)
|
24
24
|
multi_json (>= 1.7.5, < 2.0)
|
25
25
|
multi_test (>= 0.1.2)
|
26
26
|
diff-lcs (1.2.5)
|
27
|
-
ffi (1.9.
|
27
|
+
ffi (1.9.10)
|
28
28
|
filesize (0.0.2)
|
29
29
|
gherkin (2.12.2)
|
30
30
|
multi_json (~> 1.3)
|
31
31
|
inifile (1.1.0)
|
32
|
-
json (1.8.
|
32
|
+
json (1.8.3)
|
33
33
|
methadone (1.8.0)
|
34
34
|
bundler
|
35
|
-
multi_json (1.11.
|
35
|
+
multi_json (1.11.2)
|
36
36
|
multi_test (0.1.2)
|
37
37
|
open4 (1.3.4)
|
38
38
|
rake (10.4.2)
|
@@ -45,14 +45,14 @@ GEM
|
|
45
45
|
rspec-core (2.99.2)
|
46
46
|
rspec-expectations (2.99.2)
|
47
47
|
diff-lcs (>= 1.1.3, < 2.0)
|
48
|
-
rspec-mocks (2.99.
|
48
|
+
rspec-mocks (2.99.4)
|
49
49
|
sendfile (1.2.2)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
aruba
|
55
|
+
aruba (~> 0.6.0)
|
56
56
|
bundler (~> 1.7)
|
57
57
|
cucumber (~> 1.3)
|
58
58
|
inifile (~> 1.1)
|
data/bin/uricp
CHANGED
@@ -18,6 +18,7 @@ Feature: Documented Help
|
|
18
18
|
|--segment|
|
19
19
|
And the option "compress" should be documented which is negatable
|
20
20
|
And the option "dry-run" should be documented which is negatable
|
21
|
+
And the option "force" should be documented which is negatable
|
21
22
|
And the banner should document that this app's arguments are:
|
22
23
|
|from_uri|which is required|
|
23
24
|
|to_uri|which is required|
|
@@ -83,14 +83,14 @@ end
|
|
83
83
|
When(/^I retrieve "([^"]*)" with options "([^"]*)" from container "([^"]*)" into "([^"]*)"$/) do |name, runoptions, container, target|
|
84
84
|
url = File.join(@current_storage_url, container, name)
|
85
85
|
steps %{
|
86
|
-
When I successfully run `uricp #{runoptions} --auth-token #{@current_auth_token} #{url} #{target}`
|
86
|
+
When I successfully run `uricp --force #{runoptions} --auth-token #{@current_auth_token} #{url} #{target}`
|
87
87
|
}
|
88
88
|
end
|
89
89
|
|
90
90
|
When(/^I retrieve "([^"]*)" from container "([^"]*)" into "([^"]*)" with a userid$/) do |name, container, target|
|
91
91
|
url = File.join(@current_storage_url, container, name)
|
92
92
|
steps %{
|
93
|
-
When I successfully run `uricp --auth-user '#{@clientid}' --auth-key '#{@key}' #{url} #{target}`
|
93
|
+
When I successfully run `uricp --force --auth-user '#{@clientid}' --auth-key '#{@key}' #{url} #{target}`
|
94
94
|
}
|
95
95
|
end
|
96
96
|
|
@@ -99,7 +99,7 @@ When(/^I store "([^"]*)" into container "([^"]*)" from "([^"]*)" with a userid$/
|
|
99
99
|
@current_name = name
|
100
100
|
url = File.join(@current_storage_url, container, name)
|
101
101
|
steps %{
|
102
|
-
When I successfully run `uricp --auth-user '#{@clientid}' --auth-key '#{@key}' #{source} #{url}`
|
102
|
+
When I successfully run `uricp --force --auth-user '#{@clientid}' --auth-key '#{@key}' #{source} #{url}`
|
103
103
|
}
|
104
104
|
end
|
105
105
|
|
@@ -114,7 +114,7 @@ When(/^I store "([^"]*)" with options "([^"]*)" into container "([^"]*)" from "(
|
|
114
114
|
@current_name = name
|
115
115
|
url = File.join(@current_storage_url, container, name)
|
116
116
|
steps %{
|
117
|
-
When I successfully run `uricp #{runoptions} --auth-token #{@current_auth_token} #{source} #{url}`
|
117
|
+
When I successfully run `uricp --force #{runoptions} --auth-token #{@current_auth_token} #{source} #{url}`
|
118
118
|
}
|
119
119
|
end
|
120
120
|
|
@@ -123,7 +123,7 @@ When(/^I store "([^"]*)" with segment size "([^"]*)" into container "([^"]*)" fr
|
|
123
123
|
@current_name = name
|
124
124
|
url = File.join(@current_storage_url, container, name)
|
125
125
|
steps %{
|
126
|
-
When I successfully run `uricp --auth-user '#{@clientid}' --auth-key '#{@key}' --segment-size '#{segment_size}' #{source} #{url}`
|
126
|
+
When I successfully run `uricp --force --auth-user '#{@clientid}' --auth-key '#{@key}' --segment-size '#{segment_size}' #{source} #{url}`
|
127
127
|
}
|
128
128
|
end
|
129
129
|
|
@@ -132,7 +132,7 @@ When(/^I store "([^"]*)" with segment size "([^"]*)" and options "([^"]*)" into
|
|
132
132
|
@current_name = name
|
133
133
|
url = File.join(@current_storage_url, container, name)
|
134
134
|
steps %{
|
135
|
-
When I successfully run `uricp #{runoptions} --auth-user '#{@clientid}' --auth-key '#{@key}' --segment-size '#{segment_size}' #{source} #{url}`
|
135
|
+
When I successfully run `uricp --force #{runoptions} --auth-user '#{@clientid}' --auth-key '#{@key}' --segment-size '#{segment_size}' #{source} #{url}`
|
136
136
|
}
|
137
137
|
end
|
138
138
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Uricp::Strategy
|
2
|
+
|
3
|
+
class PipedLocalDecompress
|
4
|
+
|
5
|
+
include Uricp::Strategy::Common
|
6
|
+
|
7
|
+
def appropriate?
|
8
|
+
case from.scheme
|
9
|
+
when 'pipe'
|
10
|
+
if raw_target? && lz4_source? && to.scheme == 'file'
|
11
|
+
if always_write_sparse?
|
12
|
+
return proposal
|
13
|
+
else
|
14
|
+
debug "#{self.class.name}: using safe sparse expansion via stream"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
debug "#{self.class.name}: not appropriate"
|
19
|
+
false
|
20
|
+
end
|
21
|
+
|
22
|
+
def command
|
23
|
+
"lz4 -qd - #{to.path};"
|
24
|
+
end
|
25
|
+
|
26
|
+
def proposal
|
27
|
+
@proposed_options = options.dup
|
28
|
+
@proposed_options.delete('source-format')
|
29
|
+
if @proposed_options['target-format']
|
30
|
+
@proposed_options['source-format'] = :raw
|
31
|
+
if @proposed_options['source-format'] == @proposed_options['target-format']
|
32
|
+
@proposed_options.delete('source-format')
|
33
|
+
@proposed_options.delete('target-format')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
@proposed_options['from_uri'] = @proposed_options['to_uri']
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/lib/uricp/uri_strategy.rb
CHANGED
data/lib/uricp/version.rb
CHANGED
data/lib/uricp.rb
CHANGED
@@ -11,6 +11,7 @@ require 'uricp/strategy/piped_local_put'
|
|
11
11
|
require 'uricp/strategy/piped_remote_get'
|
12
12
|
require 'uricp/strategy/piped_compress'
|
13
13
|
require 'uricp/strategy/piped_decompress'
|
14
|
+
require 'uricp/strategy/piped_local_decompress'
|
14
15
|
require 'uricp/strategy/piped_local_compress'
|
15
16
|
require 'uricp/strategy/segmented_remote_put'
|
16
17
|
require 'uricp/strategy/remote_put'
|
data/uricp.gemspec
CHANGED
@@ -19,9 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
22
|
spec.add_development_dependency('rdoc')
|
24
|
-
spec.add_development_dependency('aruba')
|
23
|
+
spec.add_development_dependency('aruba', '~> 0.6.0')
|
25
24
|
spec.add_development_dependency('cucumber', '~> 1.3')
|
26
25
|
spec.add_development_dependency('rake')
|
27
26
|
spec.add_dependency('methadone', '~> 1.8.0')
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uricp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.10
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Neil Wilson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,63 +20,41 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '1.7'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rake
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '10.0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '10.0'
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
28
|
name: rdoc
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - '>='
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: '0'
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- -
|
38
|
+
- - '>='
|
60
39
|
- !ruby/object:Gem::Version
|
61
40
|
version: '0'
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: aruba
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - ~>
|
68
46
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
47
|
+
version: 0.6.0
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- -
|
52
|
+
- - ~>
|
76
53
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
54
|
+
version: 0.6.0
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: cucumber
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
59
|
- - ~>
|
84
60
|
- !ruby/object:Gem::Version
|
@@ -86,7 +62,6 @@ dependencies:
|
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
66
|
- - ~>
|
92
67
|
- !ruby/object:Gem::Version
|
@@ -94,23 +69,20 @@ dependencies:
|
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: rake
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
72
|
requirements:
|
99
|
-
- -
|
73
|
+
- - '>='
|
100
74
|
- !ruby/object:Gem::Version
|
101
75
|
version: '0'
|
102
76
|
type: :development
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
79
|
requirements:
|
107
|
-
- -
|
80
|
+
- - '>='
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: '0'
|
110
83
|
- !ruby/object:Gem::Dependency
|
111
84
|
name: methadone
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
86
|
requirements:
|
115
87
|
- - ~>
|
116
88
|
- !ruby/object:Gem::Version
|
@@ -118,7 +90,6 @@ dependencies:
|
|
118
90
|
type: :runtime
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
93
|
requirements:
|
123
94
|
- - ~>
|
124
95
|
- !ruby/object:Gem::Version
|
@@ -126,7 +97,6 @@ dependencies:
|
|
126
97
|
- !ruby/object:Gem::Dependency
|
127
98
|
name: open4
|
128
99
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
100
|
requirements:
|
131
101
|
- - ~>
|
132
102
|
- !ruby/object:Gem::Version
|
@@ -134,7 +104,6 @@ dependencies:
|
|
134
104
|
type: :runtime
|
135
105
|
prerelease: false
|
136
106
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
107
|
requirements:
|
139
108
|
- - ~>
|
140
109
|
- !ruby/object:Gem::Version
|
@@ -142,7 +111,6 @@ dependencies:
|
|
142
111
|
- !ruby/object:Gem::Dependency
|
143
112
|
name: filesize
|
144
113
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
114
|
requirements:
|
147
115
|
- - '='
|
148
116
|
- !ruby/object:Gem::Version
|
@@ -150,7 +118,6 @@ dependencies:
|
|
150
118
|
type: :runtime
|
151
119
|
prerelease: false
|
152
120
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
121
|
requirements:
|
155
122
|
- - '='
|
156
123
|
- !ruby/object:Gem::Version
|
@@ -158,7 +125,6 @@ dependencies:
|
|
158
125
|
- !ruby/object:Gem::Dependency
|
159
126
|
name: sendfile
|
160
127
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
128
|
requirements:
|
163
129
|
- - ~>
|
164
130
|
- !ruby/object:Gem::Version
|
@@ -166,7 +132,6 @@ dependencies:
|
|
166
132
|
type: :runtime
|
167
133
|
prerelease: false
|
168
134
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
135
|
requirements:
|
171
136
|
- - ~>
|
172
137
|
- !ruby/object:Gem::Version
|
@@ -174,7 +139,6 @@ dependencies:
|
|
174
139
|
- !ruby/object:Gem::Dependency
|
175
140
|
name: rspec
|
176
141
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
142
|
requirements:
|
179
143
|
- - ~>
|
180
144
|
- !ruby/object:Gem::Version
|
@@ -182,7 +146,6 @@ dependencies:
|
|
182
146
|
type: :development
|
183
147
|
prerelease: false
|
184
148
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
149
|
requirements:
|
187
150
|
- - ~>
|
188
151
|
- !ruby/object:Gem::Version
|
@@ -190,7 +153,6 @@ dependencies:
|
|
190
153
|
- !ruby/object:Gem::Dependency
|
191
154
|
name: inifile
|
192
155
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
156
|
requirements:
|
195
157
|
- - ~>
|
196
158
|
- !ruby/object:Gem::Version
|
@@ -198,7 +160,6 @@ dependencies:
|
|
198
160
|
type: :development
|
199
161
|
prerelease: false
|
200
162
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
163
|
requirements:
|
203
164
|
- - ~>
|
204
165
|
- !ruby/object:Gem::Version
|
@@ -252,6 +213,7 @@ files:
|
|
252
213
|
- lib/uricp/strategy/piped_compress.rb
|
253
214
|
- lib/uricp/strategy/piped_decompress.rb
|
254
215
|
- lib/uricp/strategy/piped_local_compress.rb
|
216
|
+
- lib/uricp/strategy/piped_local_decompress.rb
|
255
217
|
- lib/uricp/strategy/piped_local_get.rb
|
256
218
|
- lib/uricp/strategy/piped_local_put.rb
|
257
219
|
- lib/uricp/strategy/piped_remote_get.rb
|
@@ -265,27 +227,26 @@ files:
|
|
265
227
|
homepage: ''
|
266
228
|
licenses:
|
267
229
|
- gplv3
|
230
|
+
metadata: {}
|
268
231
|
post_install_message:
|
269
232
|
rdoc_options: []
|
270
233
|
require_paths:
|
271
234
|
- lib
|
272
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
273
|
-
none: false
|
274
236
|
requirements:
|
275
|
-
- -
|
237
|
+
- - '>='
|
276
238
|
- !ruby/object:Gem::Version
|
277
239
|
version: '0'
|
278
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
279
|
-
none: false
|
280
241
|
requirements:
|
281
|
-
- -
|
242
|
+
- - '>='
|
282
243
|
- !ruby/object:Gem::Version
|
283
244
|
version: '0'
|
284
245
|
requirements: []
|
285
246
|
rubyforge_project:
|
286
|
-
rubygems_version:
|
247
|
+
rubygems_version: 2.4.8
|
287
248
|
signing_key:
|
288
|
-
specification_version:
|
249
|
+
specification_version: 4
|
289
250
|
summary: Copy one URL to another with optional cacheing
|
290
251
|
test_files:
|
291
252
|
- features/auth_download.feature
|