clearwater 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clearwater/version.rb +1 -1
- data/opal/clearwater/application.rb +18 -4
- data/opal/clearwater/component.rb +1 -1
- data/opal/clearwater/dom_reference.rb +9 -0
- data/opal/clearwater/virtual_dom.rb +11 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db375a0696ec574fae4263215dfde5ba4b0af97
|
4
|
+
data.tar.gz: bdf36853856326f64742bd6f2d075727f1514713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50d6c60d11599bcfcd3935c7ebccfb86c11f6f85b1873c998e18ccd5b4b5f2107b5b0f3ff1d609d2dc22edd0fe25f19cfdecc735750820eaf7fa142711d69e84
|
7
|
+
data.tar.gz: 28a9a411ffe93d08ea8a9c0749574ac0ade1b144645013d00d60b2e5893c1fac58c5432d1cd358b2486a31933988e409368d45024a7556f21695780b2fccb16f
|
data/lib/clearwater/version.rb
CHANGED
@@ -43,6 +43,11 @@ module Clearwater
|
|
43
43
|
render_current_url &block
|
44
44
|
watch_url
|
45
45
|
end
|
46
|
+
alias mount call
|
47
|
+
|
48
|
+
def unmount
|
49
|
+
AppRegistry.delete self
|
50
|
+
end
|
46
51
|
|
47
52
|
def watch_url
|
48
53
|
unless @watching_url
|
@@ -78,10 +83,19 @@ module Clearwater
|
|
78
83
|
|
79
84
|
def benchmark message
|
80
85
|
if debug?
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
86
|
+
result = nil
|
87
|
+
|
88
|
+
if `!!(console.time && console.timeEnd)`
|
89
|
+
`console.time(message)`
|
90
|
+
result = yield
|
91
|
+
`console.timeEnd(message)`
|
92
|
+
else
|
93
|
+
start = `performance.now()`
|
94
|
+
result = yield
|
95
|
+
finish = `performance.now()`
|
96
|
+
puts "#{message} in #{(finish - start).round(3)}ms"
|
97
|
+
end
|
98
|
+
|
85
99
|
result
|
86
100
|
else
|
87
101
|
yield
|
@@ -5,9 +5,18 @@ module Clearwater
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def unmount node, previous
|
8
|
+
@node = nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def mounted?
|
12
|
+
!!@node
|
8
13
|
end
|
9
14
|
|
10
15
|
def method_missing *args, &block
|
16
|
+
if @node.nil?
|
17
|
+
raise TypeError, "#{self} has not been mounted, received #{args}"
|
18
|
+
end
|
19
|
+
|
11
20
|
@node.public_send *args, &block
|
12
21
|
end
|
13
22
|
|
@@ -70,8 +70,18 @@ module VirtualDOM
|
|
70
70
|
end
|
71
71
|
|
72
72
|
module StringUtils
|
73
|
+
# Speed up camelization like whoa.
|
74
|
+
%x{ var camelized_cache = {}; }
|
75
|
+
|
73
76
|
def self.camelize string
|
74
|
-
|
77
|
+
%x{
|
78
|
+
if(camelized_cache.hasOwnProperty(string)) {
|
79
|
+
return camelized_cache[string];
|
80
|
+
} else {
|
81
|
+
camelized_cache[string] = string.replace(/_(\w)/g, self.$_camelize_handler);
|
82
|
+
return camelized_cache[string];
|
83
|
+
}
|
84
|
+
}
|
75
85
|
end
|
76
86
|
|
77
87
|
def self._camelize_handler _, character_match
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearwater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Gaskins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1
|
33
|
+
version: '0.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1
|
40
|
+
version: '0.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: 1.3.1
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
166
|
+
rubygems_version: 2.6.6
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Front-end Ruby web framework for fast, reasonable, and composable applications
|