scm_workspace 0.3.0 → 0.3.1

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
2
  SHA1:
3
- metadata.gz: 6a6ca321bae08aaafea7d717e1807f8d22f79945
4
- data.tar.gz: c49506dc81028ed0052301b4b69e8549e972655c
3
+ metadata.gz: 22b5aed2ebb23effa0e4d640181d609aa67fbf26
4
+ data.tar.gz: c49b9fa6ff2dab68bfd7bfcfcb4b77f9481ef497
5
5
  SHA512:
6
- metadata.gz: 4aad7efa2ec7fb4db8298c3d65de9be0413a0a6bbf04ade013c5b4ec9a7e7c47074dccc28bca0eb59ff63014cf9ed8dfd04122cebe535623a8f72079cc0dbfcb
7
- data.tar.gz: 2bc81ed0c8769892b8e8c0e4ea915891ea630b3747c39dca282bd0d50f56806c5932035fb20589472d030b32e2643c7c5c4d76cc08319176b8ba48b8ab3fcbd2
6
+ metadata.gz: 189d7d0d60e6fa0bd1f490ffee50f0047e1a2e853c42eb940e6817798760e42b946b9739dec09cd79abdb6b43ef81081481e095268ac8a2d77ada54608de9ea0
7
+ data.tar.gz: 0846be292f4e3ab347608db6c70a480d5e0c8ab175bd6727ef3bb005149c1b20ebcf401f88833d5e12088b01a9bdf3918a16201586d2b430d77d17039a166fad
@@ -3,6 +3,21 @@ require 'logger'
3
3
 
4
4
  module FileUtils
5
5
 
6
+ # Monkey patch
7
+ # original source code is here:
8
+ # https://github.com/ruby/ruby/blob/v2_0_0_247/lib/fileutils.rb#L122
9
+ def cd(dir, options = {}, &block) # :yield: dir
10
+ fu_check_options options, OPT_TABLE['cd']
11
+ fu_output_message "cd #{dir}" if options[:verbose]
12
+ r = Dir.chdir(dir, &block)
13
+ fu_output_message 'cd -' if options[:verbose] and block
14
+ r
15
+ end
16
+ module_function :cd
17
+
18
+ alias chdir cd
19
+ module_function :chdir
20
+
6
21
  class << self
7
22
  def with_logger(logger, level = :info)
8
23
  output = LoggerAdapter.new(logger, level)
@@ -1,3 +1,3 @@
1
1
  class ScmWorkspace
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/scm_workspace.rb CHANGED
@@ -57,9 +57,7 @@ class ScmWorkspace
57
57
  end
58
58
 
59
59
  def system_at_root!(cmd)
60
- fileutils.chdir(root) do
61
- return system!(cmd)
62
- end
60
+ fileutils.chdir(root){ system!(cmd) }
63
61
  end
64
62
 
65
63
  def configure(url)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scm_workspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - akima