hyalite 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97d81068c80477baf4128d88b35389a3d9f25a77cf5bc5f506340fa4472bc8f8
4
- data.tar.gz: e1eccec6dfc4d0a0672418fe54870d8b1a4916b0880297c648009173b026e36e
3
+ metadata.gz: 9a2498e2fd75b49300346004b44abd11ef79c8b23888e295d6790c61ee890edb
4
+ data.tar.gz: e81e3b4e8d38f4753f1b0f93b1cdf1561237993b0f45341f39085c60511ad2a3
5
5
  SHA512:
6
- metadata.gz: aa63333c172b11a3f7f2fa23f4d849437cd1aa26cf7079173f288db8e90af71eee84d699e1669d4d46ab7cfce2c8fc844093c3c92dea5ccf7d220deb0aea9e22
7
- data.tar.gz: 2db3e64bb316f2f05f394f1d53dd7f6c771a3209758eb30a9e0306e9a53262acfd50e563a4bee853d03f9039c3462d5f4c211d7d9a140080610a1dc8b20925f7
6
+ metadata.gz: fdf9b43688bdce352ca8a6efa7516117e3f9b58522f25a4162982991734d1500d49f44b771ad66fea976f218d57ac655897c7b8ba773069e2baf130312794864
7
+ data.tar.gz: e8fcfa84752ac8a370f66c34611dc02b21aa197c31f41df418ab2593773c5ff3314e1414aa57d82a8a82dfc42e165df8a54f31e007bf733605c747790769b830
data/Gemfile CHANGED
@@ -2,5 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rake'
6
- gem 'opal-rspec'
5
+ group :test do
6
+ gem 'rake'
7
+ gem 'opal-test-unit'
8
+ end
@@ -1,28 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hyalite (0.2.5)
4
+ hyalite (0.2.7)
5
5
  opal
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- concurrent-ruby (1.0.5)
10
+ ast (2.4.0)
11
11
  hike (1.2.3)
12
- opal (0.10.5)
12
+ opal (0.11.3)
13
+ ast (>= 2.3.0)
13
14
  hike (~> 1.2)
15
+ parser (= 2.3.3.1)
14
16
  sourcemap (~> 0.1.0)
15
- sprockets (~> 3.1)
16
- tilt (>= 1.4)
17
- opal-rspec (0.6.1)
18
- opal (>= 0.10.0, < 0.12)
19
- rack (2.0.3)
20
- rake (12.0.0)
17
+ opal-test-unit (0.1.2)
18
+ opal
19
+ parser (2.3.3.1)
20
+ ast (~> 2.2)
21
+ rake (12.3.1)
21
22
  sourcemap (0.1.1)
22
- sprockets (3.7.1)
23
- concurrent-ruby (~> 1.0)
24
- rack (> 1, < 3)
25
- tilt (2.0.8)
26
23
 
27
24
  PLATFORMS
28
25
  ruby
@@ -30,8 +27,8 @@ PLATFORMS
30
27
  DEPENDENCIES
31
28
  bundler (~> 1.8)
32
29
  hyalite!
33
- opal-rspec
30
+ opal-test-unit
34
31
  rake
35
32
 
36
33
  BUNDLED WITH
37
- 1.13.6
34
+ 1.16.6
data/README.md CHANGED
@@ -12,7 +12,6 @@ Example
12
12
 
13
13
  ```ruby
14
14
  require 'hyalite'
15
- require 'browser/interval'
16
15
 
17
16
  class ExampleView
18
17
  include Hyalite::Component
@@ -20,9 +19,11 @@ class ExampleView
20
19
  state :count, 0
21
20
 
22
21
  def component_did_mount
23
- every(5) do
22
+ interval = Proc.new do
24
23
  @state.count += 1
25
24
  end
25
+
26
+ `setInterval(interval, 5000)`
26
27
  end
27
28
 
28
29
  def render
data/Rakefile CHANGED
@@ -1,13 +1,5 @@
1
- require 'opal'
2
- require 'opal/rspec/rake_task'
3
1
  require "bundler/gem_tasks"
2
+ require "opal/test/unit/rake_task"
3
+ require "hyalite"
4
4
 
5
- Opal::Config.source_map_enabled = true
6
-
7
- Opal::RSpec::RakeTask.new(:default) do |server, task|
8
- task.files = [ENV['FILE']] if ENV['FILE']
9
- server.append_path File.expand_path('../lib', __FILE__)
10
- server.source_map = true
11
- server.debug = true
12
- end
13
-
5
+ Opal::Test::Unit::RakeTask.new(:default, File.expand_path("../test", __FILE__), runner: :chrome)
@@ -1,5 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem 'opal'
4
- gem 'opal-browser'
5
4
  gem 'opal-haml'
@@ -1,28 +1,38 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- concurrent-ruby (1.0.2)
5
- haml (4.0.7)
4
+ ast (2.4.0)
5
+ concurrent-ruby (1.0.5)
6
+ haml (5.0.4)
7
+ temple (>= 0.8.0)
6
8
  tilt
7
9
  hike (1.2.3)
8
- opal (0.10.3)
10
+ opal (0.11.3)
11
+ ast (>= 2.3.0)
9
12
  hike (~> 1.2)
13
+ parser (= 2.3.3.1)
10
14
  sourcemap (~> 0.1.0)
11
- sprockets (~> 3.1)
12
- tilt (>= 1.4)
13
15
  opal-browser (0.2.0)
14
16
  opal
15
17
  paggio
16
- opal-haml (0.4.2)
18
+ opal-haml (0.4.5)
17
19
  haml
18
- opal (~> 0.10.0)
20
+ opal (~> 0.10, < 0.12)
21
+ opal-sprockets (~> 0.4.1)
22
+ opal-sprockets (0.4.2.0.11.0.3.1)
23
+ opal (~> 0.11.0)
24
+ sprockets (~> 3.1)
25
+ tilt (>= 1.4)
19
26
  paggio (0.2.6)
20
- rack (2.0.1)
27
+ parser (2.3.3.1)
28
+ ast (~> 2.2)
29
+ rack (2.0.5)
21
30
  sourcemap (0.1.1)
22
- sprockets (3.7.0)
31
+ sprockets (3.7.2)
23
32
  concurrent-ruby (~> 1.0)
24
33
  rack (> 1, < 3)
25
- tilt (2.0.5)
34
+ temple (0.8.0)
35
+ tilt (2.0.8)
26
36
 
27
37
  PLATFORMS
28
38
  ruby
@@ -33,4 +43,4 @@ DEPENDENCIES
33
43
  opal-haml
34
44
 
35
45
  BUNDLED WITH
36
- 1.13.6
46
+ 1.16.6
@@ -1,5 +1,4 @@
1
1
  require 'hyalite'
2
- require 'browser/interval'
3
2
 
4
3
  class ExampleView
5
4
  include Hyalite::Component
@@ -7,9 +6,12 @@ class ExampleView
7
6
  state :count, 0
8
7
 
9
8
  def component_did_mount
10
- every(5) do
9
+ interval = Proc.new do
11
10
  @state.count += 1
11
+ #set_state :count, @state.count
12
12
  end
13
+
14
+ `setInterval(interval, 5000)`
13
15
  end
14
16
 
15
17
  def render
@@ -1,9 +1,9 @@
1
1
  require 'bundler'
2
2
  Bundler.require
3
3
 
4
- run Opal::Server.new { |s|
4
+ run Opal::Sprockets::Server.new { |s|
5
5
  s.append_path 'app'
6
- s.append_path '../client'
6
+ s.append_path '../lib'
7
7
 
8
8
  s.debug = true
9
9
  s.main = 'application'
@@ -2,6 +2,8 @@ module Hyalite::DOM
2
2
  module Node
3
3
  include EventTarget
4
4
 
5
+ attr_reader :native
6
+
5
7
  def self.create(node)
6
8
  @classes ||= [nil, Element, nil, Text, nil, nil, nil, nil, nil, Document, nil, nil]
7
9
 
@@ -132,7 +132,7 @@ module Hyalite
132
132
  when DOM::Node
133
133
  Mount.render_subtree_into_container(next_element, container, &block)
134
134
  when Enumerable
135
- container.each {|node| render(next_element, node, &block) }
135
+ container.map {|node| render(next_element, node, &block) }
136
136
  end
137
137
  end
138
138
 
@@ -1,3 +1,3 @@
1
1
  module Hyalite
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyalite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - youchan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.7.3
147
+ rubygems_version: 2.7.6
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Virtual DOM implimentation in Ruby