futuroscope 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/futuroscope/future.rb +1 -1
- data/lib/futuroscope/version.rb +1 -1
- data/spec/futuroscope/future_spec.rb +5 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70defe434bca5f53af4dd004596ac2315f45a4ae
|
4
|
+
data.tar.gz: 7de8f394106d763a39f14630675775a1e128ba7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bbcbfc268c2df938baff9c664f6d10aa6036d59f1cd85e90425f3dcb2e0b7c9fa985e4079aa178b2cce991ce824ca6eb275ba4e80a36b4a4954a66c636e1280
|
7
|
+
data.tar.gz: fcb921324f145df0c3d2aa8d044cc4ee17839899c11cf652302a52c7f16bfdb5749f181d8a8de808a8d3d90beda9e400ae0f3be2b1e6aa9ebe852f48acc933c0
|
data/lib/futuroscope/future.rb
CHANGED
data/lib/futuroscope/version.rb
CHANGED
@@ -38,11 +38,9 @@ module Futuroscope
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "captures exceptions and re-raises them when calling the value" do
|
41
|
-
future = Future.new{ raise "Ed Balls" }
|
41
|
+
future = Future.new { raise "Ed Balls" }
|
42
42
|
|
43
|
-
expect
|
44
|
-
future.inspect
|
45
|
-
}).to raise_error(Exception)
|
43
|
+
expect { future.inspect }.to raise_error RuntimeError, "Ed Balls"
|
46
44
|
end
|
47
45
|
|
48
46
|
it "returns the original object when future_value gets called" do
|
@@ -60,11 +58,9 @@ module Futuroscope
|
|
60
58
|
end
|
61
59
|
|
62
60
|
it "re-raises captured exception when trying to marshal" do
|
63
|
-
future = Future.new{ raise
|
61
|
+
future = Future.new { raise "Ed Balls" }
|
64
62
|
|
65
|
-
expect(
|
66
|
-
Marshal.dump(future)
|
67
|
-
}).to raise_error(Exception)
|
63
|
+
expect { Marshal.dump(future) }.to raise_error RuntimeError, "Ed Balls"
|
68
64
|
end
|
69
65
|
|
70
66
|
it "correctly duplicates a future object" do
|
@@ -98,7 +94,7 @@ module Futuroscope
|
|
98
94
|
f1.future_value
|
99
95
|
f2.future_value
|
100
96
|
end
|
101
|
-
sleep 2
|
97
|
+
sleep 2.5
|
102
98
|
expect(test_thread).to_not be_alive
|
103
99
|
test_thread.kill
|
104
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: futuroscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|