flok 0.0.39 → 0.0.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/drivers/chrome/src/dispatch.js +1 -1
- data/app/drivers/chrome/src/persist.js +1 -1
- data/app/kern/services/vm.rb +1 -1
- data/docs/services/vm.md +1 -3
- data/lib/flok/version.rb +1 -1
- data/spec/iface/driver/persist_spec.rb +5 -5
- data/spec/kern/vm_service_spec.rb +11 -11
- 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: cc78ec824536368816557ea2429cc882fa3e6ad2
|
4
|
+
data.tar.gz: 80886a45fa70d64ab8d1d9d1806452636215a834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c42dd2f5b49bad2ce1dce1fb1b15f5ace5d20936d01df4f4efb5658c5338332c39a81363091cba50d5d2fb5d1a9a41c15c79198d9f87493e1c93c8b4d60331c
|
7
|
+
data.tar.gz: cc7ac536f24ce5f3b0501cc1523148c36bc916e4bb8694d1862b24d2ff5b955434c4bf63f24e1b82fc37cb10b5ab671d18e921c0271c268a4fb921b5fb5bfe0e
|
@@ -44,7 +44,7 @@ function if_dispatch(qq) {
|
|
44
44
|
//Dispatch asynchronous queue events
|
45
45
|
while (q.length > 0) {
|
46
46
|
//Grab the next thing and look that up in the function table. Pass args left
|
47
|
-
function({
|
47
|
+
(function(){
|
48
48
|
var argc = q.shift();
|
49
49
|
var q0 = q.shift();
|
50
50
|
var q1 = q.splice(0, argc);
|
data/app/kern/services/vm.rb
CHANGED
@@ -65,7 +65,7 @@ service :vm do
|
|
65
65
|
//For each mapping, write the page
|
66
66
|
for (var i = 0; i < ids.length; ++i) {
|
67
67
|
var p = id_to_page[ids[i]];
|
68
|
-
SEND("
|
68
|
+
SEND("disk", "if_per_set", "<%= p[:namespace] %>", ids[i], p);
|
69
69
|
}
|
70
70
|
<% end %>
|
71
71
|
}
|
data/docs/services/vm.md
CHANGED
@@ -106,9 +106,7 @@ if (page is not resident in memory && not_synchronous) {
|
|
106
106
|
* `sync (optional)` - If set to `true` then the disk read will be performed synchronously.
|
107
107
|
* Event Responses
|
108
108
|
* `read_res` - Whenever a change occurs to a page or the first read.
|
109
|
-
|
110
|
-
* `first` - A boolean that indicates whether this page was ever received on `page_update` before. i.e. is it a change after we were already given this page previously in a `page_update` for this receiver?
|
111
|
-
* `page` - A dictionary object that is a reference to the page. This should be treated as immutable as it is a shared resource.
|
109
|
+
* Returns an immutable page in params
|
112
110
|
* Debug mode
|
113
111
|
* When `@debug`, an exception will be thrown if you attempt to watch the same key from one controller multiple times.
|
114
112
|
|
data/lib/flok/version.rb
CHANGED
@@ -32,7 +32,7 @@ RSpec.describe "iface:driver:persist" do
|
|
32
32
|
@pipe.puts [[0, 3, "if_per_get", "session", "my_ns", key]].to_json
|
33
33
|
|
34
34
|
#Expect a response
|
35
|
-
res = [
|
35
|
+
res = [3, "int_per_get_res", "session", "my_ns", value]
|
36
36
|
expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
|
37
37
|
end
|
38
38
|
|
@@ -47,7 +47,7 @@ RSpec.describe "iface:driver:persist" do
|
|
47
47
|
@pipe.puts [[0, 3, "if_per_get", "session", "my_ns", key]].to_json
|
48
48
|
|
49
49
|
#Expect a response
|
50
|
-
res = [
|
50
|
+
res = [3, "int_per_get_res", "session", "my_ns", nil]
|
51
51
|
expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
|
52
52
|
end
|
53
53
|
|
@@ -66,11 +66,11 @@ RSpec.describe "iface:driver:persist" do
|
|
66
66
|
@pipe.puts [[0, 3, "if_per_get", "session", "my_ns", key2]].to_json
|
67
67
|
|
68
68
|
#Results for first key
|
69
|
-
res = [
|
69
|
+
res = [3, "int_per_get_res", "session", "my_ns", nil]
|
70
70
|
expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
|
71
71
|
|
72
72
|
#Expect a response
|
73
|
-
res = [
|
73
|
+
res = [3, "int_per_get_res", "session", "my_ns", value2]
|
74
74
|
expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
|
75
75
|
end
|
76
76
|
|
@@ -85,7 +85,7 @@ RSpec.describe "iface:driver:persist" do
|
|
85
85
|
@pipe.puts [[0, 3, "if_per_get", "session", "my_ns", key]].to_json
|
86
86
|
|
87
87
|
#Expect a response
|
88
|
-
res = [
|
88
|
+
res = [3, "int_per_get_res", "session", "my_ns", nil]
|
89
89
|
expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
|
90
90
|
end
|
91
91
|
end
|
@@ -11,7 +11,7 @@ RSpec.describe "kern:vm_service" do
|
|
11
11
|
include Zlib
|
12
12
|
include_context "kern"
|
13
13
|
|
14
|
-
|
14
|
+
it "vm_rehash_page can calculate the hash correctly" do
|
15
15
|
ctx = flok_new_user File.read('./spec/kern/assets/vm/controller0.rb'), File.read("./spec/kern/assets/vm/config3.rb")
|
16
16
|
|
17
17
|
#Run the check
|
@@ -536,8 +536,8 @@ RSpec.describe "kern:vm_service" do
|
|
536
536
|
|
537
537
|
page = JSON.parse(ctx.eval("JSON.stringify(page)"))
|
538
538
|
|
539
|
-
@driver.ignore_up_to "if_per_set",
|
540
|
-
@driver.mexpect("if_per_set", ["spec", page["_id"], page])
|
539
|
+
@driver.ignore_up_to "if_per_set", 2
|
540
|
+
@driver.mexpect("if_per_set", ["spec", page["_id"], page], 2)
|
541
541
|
end
|
542
542
|
|
543
543
|
it "Does send a read request from disk cache when watching a key for the first time" do
|
@@ -834,8 +834,8 @@ RSpec.describe "kern:vm_service" do
|
|
834
834
|
@driver.int "int_timer", []
|
835
835
|
end
|
836
836
|
|
837
|
-
@driver.ignore_up_to "if_per_set",
|
838
|
-
@driver.mexpect("if_per_set", ["spec", page["_id"], page])
|
837
|
+
@driver.ignore_up_to "if_per_set", 2
|
838
|
+
@driver.mexpect("if_per_set", ["spec", page["_id"], page], 2)
|
839
839
|
end
|
840
840
|
|
841
841
|
it "Does not attempt to write twice to disk after 41 seconds if there is no pending data to write" do
|
@@ -854,8 +854,8 @@ RSpec.describe "kern:vm_service" do
|
|
854
854
|
@driver.int "int_timer", []
|
855
855
|
end
|
856
856
|
|
857
|
-
@driver.ignore_up_to "if_per_set",
|
858
|
-
@driver.mexpect("if_per_set", ["spec", page["_id"], page])
|
857
|
+
@driver.ignore_up_to "if_per_set", 2
|
858
|
+
@driver.mexpect("if_per_set", ["spec", page["_id"], page], 2)
|
859
859
|
|
860
860
|
expect {
|
861
861
|
@driver.ignore_up_to "if_per_set"
|
@@ -879,8 +879,8 @@ RSpec.describe "kern:vm_service" do
|
|
879
879
|
@driver.int "int_timer", []
|
880
880
|
end
|
881
881
|
|
882
|
-
@driver.ignore_up_to "if_per_set",
|
883
|
-
@driver.mexpect("if_per_set", ["spec", page["_id"], page])
|
882
|
+
@driver.ignore_up_to "if_per_set", 2
|
883
|
+
@driver.mexpect("if_per_set", ["spec", page["_id"], page], 2)
|
884
884
|
|
885
885
|
#Call next on controller which will write an new page
|
886
886
|
ctx.eval %{ int_dispatch([3, "int_event", base, "next", {}]); }
|
@@ -890,7 +890,7 @@ RSpec.describe "kern:vm_service" do
|
|
890
890
|
@driver.int "int_timer", []
|
891
891
|
end
|
892
892
|
|
893
|
-
@driver.ignore_up_to "if_per_set",
|
894
|
-
@driver.mexpect("if_per_set", ["spec", page2["_id"], page2])
|
893
|
+
@driver.ignore_up_to "if_per_set", 2
|
894
|
+
@driver.mexpect("if_per_set", ["spec", page2["_id"], page2], 2)
|
895
895
|
end
|
896
896
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|