uu 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 57c43fe47f8df558e817a38934b4f760dae94f15c7eabafaf26536ac35df5340
4
- data.tar.gz: 537b89fdc9bda0c7fcd14c545b058ee9221a8a026f3d508ace5372130854acab
3
+ metadata.gz: 7717f2099099eab9e82d072b956482bf5385e42c23da4e5ca3ca0ee7e68add65
4
+ data.tar.gz: 5d33bc23abf19deee81d3387fc5136eb7dd6d26aaf7800312ef9a6c4bc076f7a
5
5
  SHA512:
6
- metadata.gz: 301c7ea55c63b658c31133a55632be16571afd1aa758713163253d2308314674cf84a1949693b049e769486e8d36d80c8e4bc64d8c7941bfd2a9da97c8fd2e93
7
- data.tar.gz: 96edda98c433c727a5c2dbbdb9b46ce1161d342fecb7dfefce5c4a10902d14c200ccf86f1ec638a540246bbb5927400a47bad913610d6857cf38db7dc9d425ed
6
+ metadata.gz: 31309e9312993e2a6e2d905fe75772aacaa7e0638a57d4ee8ef39c85bb05f66eab86b76c70ed5b9653eac32727b802a585744ad37f81f729d0ee583aff9914b1
7
+ data.tar.gz: 12e53c040bc00db454646a76ddc34972c1d9aeeacdea79f8a842b73347ea71e2fe2d1a9bb7ae6a4ccbba71a88d2aea064bcb370206822df41fae3a848f9a82e5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uu (0.1.1)
4
+ uu (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/uu/remote.rb CHANGED
@@ -18,6 +18,14 @@ module UU
18
18
  @remote = DRbObject.new_with_uri(uri)
19
19
  end
20
20
 
21
+ def disable
22
+ @remote.disable
23
+ end
24
+
25
+ def enable
26
+ @remote.enable
27
+ end
28
+
21
29
  def eval_(code)
22
30
  @remote.eval_(code)
23
31
  end
@@ -27,10 +35,14 @@ module UU
27
35
  end
28
36
 
29
37
  def run(&block)
30
- @remote.disable
38
+ disable
31
39
  instance_eval(&block)
32
40
  ensure
33
- @remote.enable
41
+ enable
42
+ end
43
+
44
+ def enable_at_exit
45
+ at_exit { enable }
34
46
  end
35
47
  end
36
48
  end
data/lib/uu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UU
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minwoo Lee