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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5e710c5ff6c1aed6f175940838ba96fa8b02e120
4
- data.tar.gz: fea7121750f19434132ca4f8bf3e5c6622ab5b22
2
+ SHA256:
3
+ metadata.gz: b951478ff08706d1d9d20a309aaefac0eced795f295c70d7e763b6084e44d880
4
+ data.tar.gz: 7d33847113888c4764eb0fd0dffa5bb9fc9aa04bf12f87eea8e478c137508a55
5
5
  SHA512:
6
- metadata.gz: ebe4ca7a1ea70527190eb0a42c018ecfe9a1369dd0c1ad34e1501abb3b1404fe4556eebcb8e1d43fdda75a727290998debd802f26ee891077436e43fde6364a8
7
- data.tar.gz: 4f7fb96da46bcb144622eb9dd2a5682e07644345459f8b46b5786889fa9c3e748e964925193c45fdaf6f2e3d8e57cc96006ac50f68afbce10a6f9d4a321e6a1c
6
+ metadata.gz: bfedf381941b997a8b96446188c072f88776eeee23e54db8c81dc037e9c4a0d81cf69bdc8eceae8973285a6f2204d59d6023cc4a4180c7833cedd73e2ab082ee
7
+ data.tar.gz: 2d4b79d51b3d729bf84fec28ef5b013dc44382f858efbad1822261abb66a06205939060cbe24ab126eb7ff8222b0917c0ee36c87c739b56d8ad86ce4b6ffd9cc
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  cgit_url: https://bogomips.org/mogilefs-client.git
3
- git_url: git://bogomips.org/mogilefs-client.git
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
@@ -2,7 +2,7 @@
2
2
  CONSTANT = "MogileFS::VERSION"
3
3
  RVF = "lib/mogilefs/version.rb"
4
4
  GVF = "GIT-VERSION-FILE"
5
- DEF_VER = "v3.11.1"
5
+ DEF_VER = "v3.12.0"
6
6
  vn = DEF_VER
7
7
 
8
8
  # First see if there is a version file (included in release tarballs),
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
- - git://bogomips.org/mogilefs-client.git
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: http://mogilefs.org for more details.
5
- This library allows any Ruby application to read, write and delete
6
- files in a MogileFS instance.
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 :: http://mogilefs.org/
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 :: git://bogomips.org/mogilefs-client.git
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 http://mogilefs.org
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
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: binary -*-
2
2
  #
3
- # To read more about \MogileFS, go to http://mogilefs.org/
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
@@ -335,8 +335,8 @@ def clear_cache(types = %w(all))
335
335
  end
336
336
  end
337
337
  nil
338
- ensure
339
- sockets.each { |io| io.close }
338
+ ensure
339
+ sockets.each { |io| io.close }
340
340
  end
341
341
 
342
342
  # Returns a socket connected to a MogileFS tracker.
@@ -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
- ensure
27
- src_io.close if src.respond_to?(:to_str)
28
- dst_io.close if dst.respond_to?(:to_str)
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
@@ -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
- 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
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
- 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
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)
@@ -14,7 +14,6 @@ def initialize(dests, opts)
14
14
  @opts = opts
15
15
  @md5 = nil
16
16
  @bytes_uploaded = 0
17
- error = nil
18
17
  dests.each do |devid, path|
19
18
  begin
20
19
  uri = URI.parse(path)
@@ -11,7 +11,7 @@ class MogileFS::Pool
11
11
  # Default: 2
12
12
  attr_accessor :purge_keep
13
13
 
14
- class BadObjectError < RuntimeError; end
14
+ BadObjectError = Class.new(RuntimeError)
15
15
 
16
16
  def initialize(klass, *args)
17
17
  @args = args
@@ -42,7 +42,7 @@ def timed_peek(len, dst, timeout = 5)
42
42
  rescue Errno::EAGAIN
43
43
  wait(timeout) or unreadable_socket!(timeout)
44
44
  rescue EOFError
45
- dst.replace("")
45
+ dst.respond_to?(:clear) ? dst.clear : dst.replace("")
46
46
  return
47
47
  end while true
48
48
  rescue EOFError
@@ -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: http://mogilefs.org for more details.
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.11.1
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: 2017-03-23 00:00:00.000000000 Z
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: http://mogilefs.org for more details.
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
- rubyforge_project:
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