flok 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +7 -0
- data/Rakefile +13 -17
- data/app/drivers/chrome/Rakefile +10 -17
- data/app/drivers/chrome/src/config0.js +1 -0
- data/app/drivers/chrome/src/helpers.js +6 -0
- data/app/drivers/chrome/src/net.js +46 -0
- data/app/drivers/chrome/src/ui.js +87 -0
- data/app/drivers/chrome/{vendor → src/vendor}/jquery.js +0 -0
- data/app/kern/hello.js +1 -0
- data/docs/compilation.md +7 -10
- data/docs/driver_interface.md +61 -0
- data/docs/interface.md +5 -0
- data/docs/platform_drivers.md +1 -0
- data/docs/project_layout.md +3 -2
- data/docs/testing.md +1 -0
- data/flok.gemspec +1 -0
- data/lib/flok.rb +1 -41
- data/lib/flok/build.rb +79 -0
- data/lib/flok/version.rb +1 -1
- data/{public/application.js → output.js} +0 -0
- data/spec/build_valid_spec.rb +61 -0
- data/spec/drivers/net_spec.rb +157 -157
- data/spec/helpers.rb +6 -0
- metadata +29 -15
- data/.run2 +0 -3
- data/app/drivers/chrome/net.js +0 -48
- data/app/drivers/chrome/ui.js +0 -87
- data/lib/js/kernel/pipe.js +0 -36
- data/lib/js/kernel/utils.js +0 -8
- data/lib/js/namespaces.js +0 -2
- data/spec/cli_spec.rb +0 -210
- data/spec/merge_source_spec.rb +0 -68
- data/ypou +0 -0
data/spec/merge_source_spec.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
#require './lib/flok.rb'
|
2
|
-
#require 'tempfile'
|
3
|
-
#require 'securerandom'
|
4
|
-
#require 'v8'
|
5
|
-
|
6
|
-
#def ensure_tmp
|
7
|
-
#tmp_spec_path = './spec/tmp'
|
8
|
-
#Dir.mkdir(tmp_spec_path) unless File.exists?(tmp_spec_path)
|
9
|
-
#end
|
10
|
-
|
11
|
-
#RSpec.describe "Flok::MergeSourceSpec" do
|
12
|
-
#it "when merging the kernel, it returns a string" do
|
13
|
-
#str = Flok::MergeSource.merge_kernel
|
14
|
-
#expect(str.class).to be(String)
|
15
|
-
#end
|
16
|
-
|
17
|
-
#it "when merging the kernel, it returns a string with length" do
|
18
|
-
#str = Flok::MergeSource.merge_kernel
|
19
|
-
#expect(str.length).to be > 0
|
20
|
-
#end
|
21
|
-
|
22
|
-
#it "when merging the kernel, the kernel files located in ./lib/js/kernel/ do merge and run without js syntax errors" do
|
23
|
-
#str = Flok::MergeSource.merge_kernel
|
24
|
-
#ctx = V8::Context.new
|
25
|
-
#ctx.eval(str)
|
26
|
-
|
27
|
-
##It does not throw an error
|
28
|
-
#end
|
29
|
-
|
30
|
-
#it "merges the user generated source files from app/*.js" do
|
31
|
-
##Get a temporary file, delete it, but save the path
|
32
|
-
#temp = Tempfile.new "flok-temp"
|
33
|
-
#path = temp.path
|
34
|
-
#temp.close
|
35
|
-
#temp.unlink
|
36
|
-
|
37
|
-
##Create a new project
|
38
|
-
#`ruby -Ilib ./bin/flok new #{path}`
|
39
|
-
|
40
|
-
##Add a source function to this project
|
41
|
-
#main_js = %{
|
42
|
-
#function call_me_maybe() {
|
43
|
-
#return call_me_maybe_response;
|
44
|
-
#}
|
45
|
-
#}
|
46
|
-
|
47
|
-
#two_js = %{
|
48
|
-
#var call_me_maybe_response = "no_way";
|
49
|
-
#}
|
50
|
-
|
51
|
-
#File.write "#{path}/app/main.js", main_js
|
52
|
-
#File.write "#{path}/app/two.js", two_js
|
53
|
-
|
54
|
-
##Build
|
55
|
-
#rpath = Dir.pwd
|
56
|
-
#Dir.chdir path do
|
57
|
-
#`ruby -I#{rpath}/lib #{rpath}/bin/flok build`
|
58
|
-
|
59
|
-
##Execute
|
60
|
-
#Dir.chdir './public' do
|
61
|
-
#ctx = V8::Context.new
|
62
|
-
#ctx.load "application.js"
|
63
|
-
#res = ctx.eval("call_me_maybe()")
|
64
|
-
#expect(res).to eq("no_way")
|
65
|
-
#end
|
66
|
-
#end
|
67
|
-
#end
|
68
|
-
#end
|
data/ypou
DELETED
File without changes
|