rubynk 0.0.0 → 0.0.2
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/bin/rubynk +1 -17
- data/lib/app.rb +3 -26
- data/lib/rubynk.rb +21 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6f461ad30379d31487b4d8489db57fd531251a
|
4
|
+
data.tar.gz: 1465508e8dfcfab0b81b8a098f24ef73f29d3178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c32b363db4138ad5d3f241d1933ef079d28e89ebf29b1c7be30af0257477193126c48943ee17a2adfcab9175d32cec6efcbf0ec9e88369a23b9aa33a6d97d0
|
7
|
+
data.tar.gz: 03edcfd4b1e6b6ba2020d411fa2f99a88c0324f1e148178a512e5fca46335dfbd19acd21460f05d6075be8bdf3450aaa1a44163457a11ac55ba53a628b4f1f92
|
data/bin/rubynk
CHANGED
@@ -1,18 +1,2 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'opal'
|
4
|
-
|
5
|
-
def build(script)
|
6
|
-
Opal.append_path "."
|
7
|
-
Opal.append_path "lib"
|
8
|
-
src = IO.binread("lib/processing.js")
|
9
|
-
src << IO.binread("lib/opal.js")
|
10
|
-
src << Opal::Builder.build("app").to_s
|
11
|
-
src << Opal::Builder.build(script).to_s
|
12
|
-
File.binwrite "app.js", src
|
13
|
-
|
14
|
-
html = IO.binread("lib/htmltemplate")
|
15
|
-
File.binwrite "main.html", html
|
16
|
-
|
17
|
-
end
|
18
|
-
build(ARGV[0])
|
2
|
+
require "rubynk"
|
data/lib/app.rb
CHANGED
@@ -33,34 +33,12 @@ end
|
|
33
33
|
|
34
34
|
class Rubynk
|
35
35
|
include Common
|
36
|
-
attr_accessor :p
|
37
|
-
def
|
36
|
+
attr_accessor :p, :window
|
37
|
+
def initialize
|
38
38
|
ynk_setup
|
39
39
|
@p = $p
|
40
|
+
@window = $window
|
40
41
|
end
|
41
|
-
|
42
|
-
def draw
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
def mousePressed
|
49
|
-
|
50
|
-
end
|
51
|
-
def mouseClicked
|
52
|
-
# @container.start
|
53
|
-
# @container.hanna.mouseReleased
|
54
|
-
end
|
55
|
-
def mouseReleased
|
56
|
-
# @container.start
|
57
|
-
# @container.hanna.mouseReleased
|
58
|
-
end
|
59
|
-
|
60
|
-
def keyPressed
|
61
|
-
puts $p.key.to_s
|
62
|
-
end
|
63
|
-
|
64
42
|
end
|
65
43
|
|
66
44
|
|
@@ -70,7 +48,6 @@ end
|
|
70
48
|
window.p = processing
|
71
49
|
|
72
50
|
#{
|
73
|
-
|
74
51
|
@a = App.new #Initilize main app
|
75
52
|
}
|
76
53
|
|
data/lib/rubynk.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'opal'
|
4
|
+
|
5
|
+
def build(script)
|
6
|
+
|
7
|
+
root = File.expand_path '../..', __FILE__
|
8
|
+
|
9
|
+
Opal.append_path "."
|
10
|
+
Opal.append_path root+"/lib"
|
11
|
+
src = IO.binread(root+"/lib/processing.js")
|
12
|
+
src << IO.binread(root+"/lib/opal.js")
|
13
|
+
src << Opal::Builder.build("app").to_s
|
14
|
+
src << Opal::Builder.build(script).to_s
|
15
|
+
File.binwrite "app.js", src
|
16
|
+
|
17
|
+
html = IO.binread(root+"/lib/htmltemplate")
|
18
|
+
File.binwrite "main.html", html
|
19
|
+
|
20
|
+
end
|
21
|
+
build(ARGV[0])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubynk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Lamber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.10.0
|
27
|
-
description:
|
27
|
+
description: Tiny little wrapper around opal and processing
|
28
28
|
email: peternoino@gmail.com
|
29
29
|
executables:
|
30
30
|
- rubynk
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- lib/htmltemplate
|
37
37
|
- lib/opal.js
|
38
38
|
- lib/processing.js
|
39
|
+
- lib/rubynk.rb
|
39
40
|
homepage: http://rubygems.org/gems/hola
|
40
41
|
licenses:
|
41
42
|
- MIT
|