Ruby mogilefs-client dev/users discussion/patches/bugs/help/...
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: mogilefs-client-public@bogomips.org
Subject: [PATCH 2/3] fix more indentation warnings
Date: Wed, 30 Oct 2019 09:23:56 +0000	[thread overview]
Message-ID: <20191030092357.30238-3-e@80x24.org> (raw)
In-Reply-To: <20191030092357.30238-1-e@80x24.org>

Not sure how or why I missed these with commit 4e0f8155a62711ae
("fix indentation warnings with ruby trunk"), but this cleans
them up.
---
 lib/mogilefs/new_file/stream.rb   |  4 ++--
 test/test_fresh.rb                |  4 ++--
 test/test_http_reader.rb          |  4 ++--
 test/test_mogilefs.rb             | 16 ++++++++--------
 test/test_mogilefs_integration.rb |  4 ++--
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lib/mogilefs/new_file/stream.rb b/lib/mogilefs/new_file/stream.rb
index 2207a13..4396b8b 100644
--- a/lib/mogilefs/new_file/stream.rb
+++ b/lib/mogilefs/new_file/stream.rb
@@ -58,8 +58,8 @@ def commit
     end
     read_response(@to_io) # raises on errors
     create_close(@devid, @uri, @bytes_uploaded)
-    ensure
-      @to_io.close if @to_io && ! @to_io.closed?
+  ensure
+    @to_io.close if @to_io && ! @to_io.closed?
   end
 
   def start_sock(sock, uri)
diff --git a/test/test_fresh.rb b/test/test_fresh.rb
index ff7bae6..b8ae292 100644
--- a/test/test_fresh.rb
+++ b/test/test_fresh.rb
@@ -247,8 +247,8 @@ def test_create_update_delete_class
     assert_equal 1, tmp["mindevcount"]
     assert_equal "MultipleHosts(1)", tmp["replpolicy"]
     @admin.update_class(domain, "klassy", 2)
-    ensure
-      @admin.delete_class(domain, "klassy") rescue nil
+  ensure
+    @admin.delete_class(domain, "klassy") rescue nil
   end
 
   def test_device_file_add
diff --git a/test/test_http_reader.rb b/test/test_http_reader.rb
index f6f0055..e2d8842 100644
--- a/test/test_http_reader.rb
+++ b/test/test_http_reader.rb
@@ -16,8 +16,8 @@ def rsock
     assert_nil th.value
     assert_kind_of IO, r
     r
-    ensure
-      s.close
+  ensure
+    s.close
   end
 
   def test_short_to_s
diff --git a/test/test_mogilefs.rb b/test/test_mogilefs.rb
index 186e88a..45d4452 100644
--- a/test/test_mogilefs.rb
+++ b/test/test_mogilefs.rb
@@ -590,8 +590,8 @@ def assert_get_paths_args(expect, *args)
     assert_equal "foo", tmp.delete("domain")
     assert_equal expect, tmp
     c.backend.shutdown
-    ensure
-      sock.close
+  ensure
+    sock.close
   end
 
   def test_get_paths_args
@@ -762,8 +762,8 @@ def test_list_keys_verbose_ordering # implementation detail
     th.join
     received.map! { |(key,_,_)| key }
     assert_equal %w(a b c d e), received
-    ensure
-      sock.close
+  ensure
+    sock.close
   end
 
   def test_list_keys_verbose_retry_eof # implementation detail
@@ -806,8 +806,8 @@ def test_list_keys_verbose_retry_eof # implementation detail
     th.join
     received.map! { |(key,_,_)| key }
     assert_equal %w(a b c d e), received
-    ensure
-      sock.close
+  ensure
+    sock.close
   end
 
   def test_list_keys_verbose_retry_truncated # implementation detail
@@ -851,8 +851,8 @@ def test_list_keys_verbose_retry_truncated # implementation detail
     th.join
     received.map! { |(key,_,_)| key }
     assert_equal %w(a b c d e), received
-    ensure
-      sock.close
+  ensure
+    sock.close
   end
 
   def test_sleep
diff --git a/test/test_mogilefs_integration.rb b/test/test_mogilefs_integration.rb
index 6d16cd7..13ae3f1 100644
--- a/test/test_mogilefs_integration.rb
+++ b/test/test_mogilefs_integration.rb
@@ -242,8 +242,8 @@ def test_new_file_content_md5
     assert_raises(MogileFS::Backend::UnregClassError) {
       @client.new_file("a", :class => "non-existent")
     }
-    ensure
-      r.close if r
+  ensure
+    r.close if r
   end
 
   def test_store_content_opts

  parent reply	other threads:[~2019-10-30  9:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  9:23 [PATCH 0/3] updates for newer Rubies Eric Wong
2019-10-30  9:23 ` [PATCH 1/3] mogilefs: actually use kwarg for Net::HTTP::Persistent.new Eric Wong
2019-10-30  9:23 ` Eric Wong [this message]
2019-10-30  9:23 ` [PATCH 3/3] test_client: quiet warnings about redefining accessors Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/mogilefs-client/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191030092357.30238-3-e@80x24.org \
    --to=e@80x24.org \
    --cc=mogilefs-client-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/mogilefs-client.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).