xftp 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xftp.rb +11 -0
  3. data/lib/xftp/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 519e2c6a592998d81cfcff39a0b07896de6d107a
4
- data.tar.gz: 7c964302e0290616bb71e32fa2da427804c0a839
3
+ metadata.gz: 2f601423be046224ed203e2acb44cb993114ab3e
4
+ data.tar.gz: d1bccf7e9c9ceada5f2db9d2f297f68b307f5efe
5
5
  SHA512:
6
- metadata.gz: 21e2e2c9f5d002ea1cbb48bafb28fb08f1e6645ba5eac6d1131dcf1093b8b1f1458cbc0ea077c951cdf6ac4267e38fdd9728f0f46b33a4432504900a91cf3b4a
7
- data.tar.gz: 06b5984a465cefa1e955550d5dfc0859d5f995fa7ce3294c7f7985e66c2e4cf9afcbc3cd4a31e86d9047c335f28952932bf10598386182f7acfa8c31f2703249
6
+ metadata.gz: 0583a79eb3b60152916e2e8fbc7a86c95a4cf0b1cb6979e7d627ebb70e48857fab24adc5c3594761475205135d68898832eefcccec0bb83600a913e1712b9e55
7
+ data.tar.gz: 83b276150721e726e55377973b151814459a5f84a990836f5d6ea319318c99680da12fd7bbcb8bac5875abd96c9c808f2b2918a07ca99448050bd1037bc7d6ef
@@ -15,6 +15,17 @@ module XFTP
15
15
  @configuration ||= Configuration.new
16
16
  end
17
17
 
18
+ # Calls the given block using temporary configuration
19
+ # :reek:TooManyStatements
20
+ def self.using(logger: config.logger, ftp: config.ftp, ssh: config.ssh)
21
+ snapshot = config.clone
22
+ config.logger = logger
23
+ config.ftp = ftp
24
+ config.ssh = ssh
25
+ yield
26
+ @configuration = snapshot
27
+ end
28
+
18
29
  # For a block { |config| ... }
19
30
  # @yield the (see #config)
20
31
  def self.configure
@@ -3,7 +3,7 @@ module XFTP
3
3
  module VERSION
4
4
  MAJOR = 0
5
5
  MINOR = 4
6
- PATCH = 1
6
+ PATCH = 2
7
7
  SUFFIX = ''
8
8
 
9
9
  NUMBER = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliy Yorkin
@@ -239,6 +239,6 @@ rubyforge_project:
239
239
  rubygems_version: 2.2.2
240
240
  signing_key:
241
241
  specification_version: 4
242
- summary: xftp-0.4.1
242
+ summary: xftp-0.4.2
243
243
  test_files: []
244
244
  has_rdoc: