mogilefs-client 3.11.1 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.olddoc.yml +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/HACKING +1 -1
- data/README +7 -7
- data/bin/mog +5 -0
- data/lib/mogilefs.rb +2 -1
- data/lib/mogilefs/backend.rb +2 -2
- data/lib/mogilefs/copy_stream.rb +3 -3
- data/lib/mogilefs/http_file.rb +11 -11
- data/lib/mogilefs/new_file/stream.rb +0 -1
- data/lib/mogilefs/pool.rb +1 -1
- data/lib/mogilefs/socket/pure_ruby.rb +1 -1
- data/mogilefs-client.gemspec +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b951478ff08706d1d9d20a309aaefac0eced795f295c70d7e763b6084e44d880
|
4
|
+
data.tar.gz: 7d33847113888c4764eb0fd0dffa5bb9fc9aa04bf12f87eea8e478c137508a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfedf381941b997a8b96446188c072f88776eeee23e54db8c81dc037e9c4a0d81cf69bdc8eceae8973285a6f2204d59d6023cc4a4180c7833cedd73e2ab082ee
|
7
|
+
data.tar.gz: 2d4b79d51b3d729bf84fec28ef5b013dc44382f858efbad1822261abb66a06205939060cbe24ab126eb7ff8222b0917c0ee36c87c739b56d8ad86ce4b6ffd9cc
|
data/.olddoc.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
cgit_url: https://bogomips.org/mogilefs-client.git
|
3
|
-
git_url:
|
3
|
+
git_url: https://bogomips.org/mogilefs-client.git
|
4
4
|
rdoc_url: https://bogomips.org/mogilefs-client/
|
5
5
|
changelog_start: v1.2.1
|
6
6
|
public_email: mogilefs-client-public@bogomips.org
|
data/GIT-VERSION-GEN
CHANGED
data/HACKING
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Hacking mogilefs-client for Ruby
|
2
2
|
|
3
3
|
* The latest code is available via git:
|
4
|
-
-
|
4
|
+
- https://bogomips.org/mogilefs-client.git
|
5
5
|
- git://repo.or.cz/ruby-mogilefs-client
|
6
6
|
|
7
7
|
* Follow conventions set in existing code, don't add hard runtime
|
data/README
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
= mogilefs-client - MogileFS client library for Ruby
|
2
2
|
|
3
3
|
A MogileFS client library for Ruby. MogileFS is an open source
|
4
|
-
distributed filesystem, see:
|
5
|
-
|
6
|
-
|
4
|
+
distributed filesystem, see:
|
5
|
+
https://github.com/mogilefs/MogileFS-Server/wiki for more
|
6
|
+
details. This library allows any Ruby application to read,
|
7
|
+
write and delete files in a MogileFS instance.
|
7
8
|
|
8
9
|
== Links
|
9
10
|
|
10
11
|
rdoc :: https://bogomips.org/mogilefs-client
|
11
|
-
mogilefs ::
|
12
|
+
mogilefs :: git clone https://github.com/mogilefs/MogileFS-Server
|
12
13
|
list :: mailto:mogilefs-client-public@bogomips.org
|
13
14
|
list-cc :: mailto:mogile@googlegroups.com
|
14
15
|
list-archive :: https://bogomips.org/mogilefs-client-public
|
15
|
-
repo ::
|
16
|
-
https://bogomips.org/mogilefs-client.git
|
16
|
+
repo :: https://bogomips.org/mogilefs-client.git
|
17
17
|
gitweb :: http://repo.or.cz/w/ruby-mogilefs-client.git
|
18
18
|
download :: https://bogomips.org/mogilefs-client/files/
|
19
19
|
|
20
20
|
== Install
|
21
21
|
|
22
22
|
First you need a MogileFS 2.x installation. You can find information on
|
23
|
-
how to do that at
|
23
|
+
how to do that at https://github.com/mogilefs/MogileFS-Server/wiki
|
24
24
|
|
25
25
|
Then install the RubyGem:
|
26
26
|
|
data/bin/mog
CHANGED
@@ -160,6 +160,11 @@ def human_size(size)
|
|
160
160
|
mg.get_file_data(key, $stdout)
|
161
161
|
end
|
162
162
|
end
|
163
|
+
when 'updateclass'
|
164
|
+
newclass = cfg[:class] or abort '-C/--class not specified'
|
165
|
+
ARGV.each do |key|
|
166
|
+
mg.updateclass(key, newclass)
|
167
|
+
end
|
163
168
|
when 'ls'
|
164
169
|
prefixes = ARGV.empty? ? [ nil ] : ARGV
|
165
170
|
if ls_l
|
data/lib/mogilefs.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
#
|
3
|
-
# To read more about \MogileFS,
|
3
|
+
# To read more about \MogileFS, see
|
4
|
+
# https://github.com/mogilefs/MogileFS-Server/wiki
|
4
5
|
#
|
5
6
|
# Client usage information is available in MogileFS::MogileFS.
|
6
7
|
module MogileFS
|
data/lib/mogilefs/backend.rb
CHANGED
data/lib/mogilefs/copy_stream.rb
CHANGED
@@ -23,8 +23,8 @@ def self.copy_stream(src, dst)
|
|
23
23
|
end
|
24
24
|
dst_io.flush if dst_io.respond_to?(:flush)
|
25
25
|
written
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
ensure
|
27
|
+
src_io.close if src.respond_to?(:to_str)
|
28
|
+
dst_io.close if dst.respond_to?(:to_str)
|
29
29
|
end
|
30
30
|
end
|
data/lib/mogilefs/http_file.rb
CHANGED
@@ -83,11 +83,11 @@ def put_streaming_io(sock, uri) # unlikely to be used
|
|
83
83
|
|
84
84
|
def rewind_or_raise!(uri, err)
|
85
85
|
@active.rewind if @active
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
rescue => e
|
87
|
+
msg = "#{uri} failed with #{err.message} (#{err.class}) and " \
|
88
|
+
"retrying is impossible as rewind on " \
|
89
|
+
"#{@active.inspect} failed with: #{e.message} (#{e.class})"
|
90
|
+
raise NonRetryableError, msg, e.backtrace
|
91
91
|
end
|
92
92
|
|
93
93
|
##
|
@@ -127,12 +127,12 @@ def upload(devid, uri) # :nodoc:
|
|
127
127
|
|
128
128
|
read_response(sock) # raises on errors
|
129
129
|
file_size
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
130
|
+
rescue SystemCallError, RetryableError => err
|
131
|
+
rewind_or_raise!(uri, err)
|
132
|
+
raise
|
133
|
+
ensure
|
134
|
+
file.close if file && @big_io != file
|
135
|
+
sock.close if sock
|
136
136
|
end
|
137
137
|
|
138
138
|
def nhp_put(devid, uri)
|
data/lib/mogilefs/pool.rb
CHANGED
data/mogilefs-client.gemspec
CHANGED
@@ -9,7 +9,8 @@
|
|
9
9
|
s.summary = 'MogileFS client library for Ruby'
|
10
10
|
s.description = <<EOF
|
11
11
|
A MogileFS client library for Ruby. MogileFS is an open source
|
12
|
-
distributed filesystem, see:
|
12
|
+
distributed filesystem, see:
|
13
|
+
https://github.com/mogilefs/MogileFS-Server/wiki for more details.
|
13
14
|
This library allows any Ruby application to read, write and delete
|
14
15
|
files in a MogileFS instance.
|
15
16
|
EOF
|
metadata
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mogilefs-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mogilefs-client hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
A MogileFS client library for Ruby. MogileFS is an open source
|
15
|
-
distributed filesystem, see:
|
15
|
+
distributed filesystem, see:
|
16
|
+
https://github.com/mogilefs/MogileFS-Server/wiki for more details.
|
16
17
|
This library allows any Ruby application to read, write and delete
|
17
18
|
files in a MogileFS instance.
|
18
19
|
email: mogilefs-client-public@bogomips.org
|
@@ -113,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
114
|
- !ruby/object:Gem::Version
|
114
115
|
version: '0'
|
115
116
|
requirements: []
|
116
|
-
|
117
|
-
rubygems_version: 2.6.10
|
117
|
+
rubygems_version: 3.0.1
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: MogileFS client library for Ruby
|