delayer-deferred 1.0.3 → 1.0.4

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: 183ed8e88dfb16a9048b32c58d8828f2e02a1852
4
- data.tar.gz: 9e3518eaa9364c793a9806ac9118fe9753e22111
3
+ metadata.gz: e7ac95be8514c4cce712ba5be5f9959daefdf012
4
+ data.tar.gz: b63a1e2ef68c15092edd125c28a7d3a68e92a43f
5
5
  SHA512:
6
- metadata.gz: 967dd8cf829055be44173ba0803217b47f225b43763c46bf849e6df55a1a3235ff4415b87067e359b9b2e6d5f3c6b7034ba4a83d5ec3cf59b69a88fd4c18cf12
7
- data.tar.gz: e5ffd6ee62923b498db4090648f6852d1e646312ca36255dbf87d9e0ef8c32d2f55dc4679eeaad17b32411af70f217a7e7e546acb3d5b909386c32e1df64b4f1
6
+ metadata.gz: 85b360491e8385fccdf2b5aa5b7679dff0d57f36f9b988e26675f1cc8759a4c3ad23adf2bae933766f330633b9d0da6ce896d18489dc12ccd566ee043b5239df
7
+ data.tar.gz: 8dcb697c132e1ecefb19923988fdac533e63aa176e1346117d11e3e8ee86536209abe2558730ca69c478be1e8ce578da4ec2e4676c6a7ec6b7a946557f24649f
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["toshi.alternative@gmail.com"]
11
11
  spec.summary = %q{Deferred for Delayer}
12
12
  spec.description = %q{Deferred for Delayer.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/toshia/delayer-deferred"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -29,7 +29,8 @@ class Thread
29
29
  self.call(result)
30
30
  result
31
31
  rescue Exception => exception
32
- self.fail(exception) end
32
+ self.fail(exception)
33
+ raise exception end
33
34
  throw :__deferredable_success end
34
35
  self.fail(failed) end end end
35
36
  end
@@ -1,5 +1,5 @@
1
1
  module Delayer
2
2
  module Deferred
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
data/test/thread_test.rb CHANGED
@@ -9,6 +9,23 @@ describe(Thread) do
9
9
  Delayer.default = Delayer.generate_class
10
10
  end
11
11
 
12
+ describe 'Generic thread operation' do
13
+ describe 'Exception in thread' do
14
+ before do
15
+ @error = Class.new(RuntimeError)
16
+ @thread = Thread.new {
17
+ raise @error
18
+ }
19
+ end
20
+
21
+ it 'should takes the exception' do
22
+ assert_raises(@error) do
23
+ @thread.value
24
+ end
25
+ end
26
+ end
27
+ end
28
+
12
29
  it "defer with Deferred#next" do
13
30
  thread = succeed = result = false
14
31
  uuid = SecureRandom.uuid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayer-deferred
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshiaki Asai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-17 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: delayer
@@ -98,7 +98,7 @@ files:
98
98
  - test/helper.rb
99
99
  - test/testutils.rb
100
100
  - test/thread_test.rb
101
- homepage: ''
101
+ homepage: https://github.com/toshia/delayer-deferred
102
102
  licenses:
103
103
  - MIT
104
104
  metadata: {}
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.4.5.1
121
+ rubygems_version: 2.5.1
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Deferred for Delayer
@@ -128,4 +128,3 @@ test_files:
128
128
  - test/helper.rb
129
129
  - test/testutils.rb
130
130
  - test/thread_test.rb
131
- has_rdoc: